diff mbox series

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

Message ID 1488211057-15651-2-git-send-email-petri.savolainen@linaro.org
State Superseded
Headers show
Series [1/2] linux-gen: ipc: use hdr to handle conversion function | expand

Commit Message

Petri Savolainen Feb. 27, 2017, 3:57 p.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);
 }