diff mbox series

[v2,2/2] linux-gen: tm: use handle conversion function

Message ID 1488360469-25958-2-git-send-email-petri.savolainen@linaro.org
State Accepted
Commit ff7600a119f02bb1ef2a57e5611e392968666420
Headers show
Series [v2,1/2] linux-gen: ipc: use hdr to handle conversion function | expand

Commit Message

Petri Savolainen March 1, 2017, 9:27 a.m. UTC
Use (from buffer to packet handle) conversion function instead
of casting.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
 platform/linux-generic/odp_traffic_mngr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.8.1
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c
index 309f237..4e9358b 100644
--- a/platform/linux-generic/odp_traffic_mngr.c
+++ b/platform/linux-generic/odp_traffic_mngr.c
@@ -107,7 +107,7 @@  static int queue_tm_reenq(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr)
 	odp_tm_queue_t tm_queue = MAKE_ODP_TM_QUEUE((uint8_t *)queue -
 						    offsetof(tm_queue_obj_t,
 							     tm_qentry));
-	odp_packet_t pkt = (odp_packet_t)buf_hdr->handle.handle;
+	odp_packet_t pkt = _odp_packet_from_buffer(buf_hdr->handle.handle);
 
 	return odp_tm_enq(tm_queue, pkt);
 }