diff mbox series

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

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

Commit Message

Github ODP bot Dec. 4, 2017, 3 p.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: 5329e5211c447b9b823149baf76112eedfeb07fb
 ** Merge commit sha: 280c62aa5d2ea89ff05e376a74d7c6bbd29f002f
 **/
 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 fa73cb93d..705a7968c 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;
 }
 
 /**