diff mbox series

[v4,5/6] linux-gen: dpdk: cast addresses to uintptr_t rather than uint64_t

Message ID 1512727218-7712-6-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v4,1/6] configure: separate common DPDK check to odp_dpdk.m4 | expand

Commit Message

Github ODP bot Dec. 8, 2017, 10 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


This is to remove the following error:

pktio/dpdk.c: In function ‘mbuf_data_off’:
pktio/dpdk.c:126:9: error: cast from pointer to integer of different
size [-Werror=pointer-to-int-cast]
  return (uint64_t)pkt_hdr->buf_hdr.seg[0].data -
         ^
pktio/dpdk.c:127:4: error: cast from pointer to integer of different
size [-Werror=pointer-to-int-cast]
    (uint64_t)mbuf->buf_addr;

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 321 (lumag:dpdk-system-master)
 ** https://github.com/Linaro/odp/pull/321
 ** Patch: https://github.com/Linaro/odp/pull/321.patch
 ** Base sha: c15a810b7a47f2e07200f83aa534163ca06e2b16
 ** Merge commit sha: 540836da19aed3d8c900429f089415c51b77529f
 **/
 platform/linux-generic/pktio/dpdk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c
index db2a8b0f2..585ff462a 100644
--- a/platform/linux-generic/pktio/dpdk.c
+++ b/platform/linux-generic/pktio/dpdk.c
@@ -123,8 +123,8 @@  static unsigned cache_size(uint32_t num)
 static inline uint16_t mbuf_data_off(struct rte_mbuf *mbuf,
 				     odp_packet_hdr_t *pkt_hdr)
 {
-	return (uint64_t)pkt_hdr->buf_hdr.seg[0].data -
-			(uint64_t)mbuf->buf_addr;
+	return (uintptr_t)pkt_hdr->buf_hdr.seg[0].data -
+			(uintptr_t)mbuf->buf_addr;
 }
 
 /**