diff mbox series

[API-NEXT,v1,9/14] linux-gen: dpdk: cast addresses to uintptr_t rather than uint64_t

Message ID 1513008012-9231-10-git-send-email-odpbot@yandex.ru
State New
Headers show
Series None | expand

Commit Message

Github ODP bot Dec. 11, 2017, 4 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>

Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com>
---
/** Email created from pull request 335 (muvarov:devel/api-next_master_merge)
 ** https://github.com/Linaro/odp/pull/335
 ** Patch: https://github.com/Linaro/odp/pull/335.patch
 ** Base sha: 630d8422564ebf4991b468cb38a29e9483fc2ec2
 ** Merge commit sha: 2de2af9eca01b713e51c66fee7a5c7e535502f85
 **/
 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;
 }
 
 /**