diff mbox series

[v1,5/6] linux-gen: dpdk: cast addresses to unsigned long rather than uint64_t

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

Commit Message

Github ODP bot Dec. 3, 2017, 1 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: 5329e5211c447b9b823149baf76112eedfeb07fb
 ** Merge commit sha: 527862cca98549d4fc5bd0f966d3609477b20443
 **/
 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..a3deea9fc 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 (unsigned long)pkt_hdr->buf_hdr.seg[0].data -
+			(unsigned long)mbuf->buf_addr;
 }
 
 /**