DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] bus/fslmc: use PRIu64 instead of llX in format specifier
@ 2018-04-13  5:04 Gowrishankar
  2018-04-13  7:10 ` Shreyansh Jain
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Gowrishankar @ 2018-04-13  5:04 UTC (permalink / raw)
  To: Hemant Agrawal, Shreyansh Jain
  Cc: Anatoly Burakov, dev, Thomas Monjalon, Gowrishankar Muthukrishnan

From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>

Instead of llX, use C99 standard "PRIu64" in format specifier. Former one
breaks compile in ppc64le.

Fixes: c2c167fdb3 ("bus/fslmc: support memory event callbacks for VFIO")

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
--
In file included from dpdk/drivers/bus/fslmc/fslmc_vfio.c:37:0:
dpdk/drivers/bus/fslmc/fslmc_vfio.c: In function ‘fslmc_map_dma’:
dpdk/drivers/bus/fslmc/fslmc_logs.h:18:44: error: format ‘%llX’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=]
  rte_log(RTE_LOG_DEBUG, dpaa2_logtype_bus, "fslmc: %s(): " fmt "\n", \
                                            ^
dpdk/drivers/bus/fslmc/fslmc_vfio.c:272:2: note: in expansion of macro ‘DPAA2_BUS_DEBUG’
  DPAA2_BUS_DEBUG("--> Map address: %llX, size: 0x%llX",
  ^~~~~~~~~~~~~~~
dpdk/drivers/bus/fslmc/fslmc_vfio.c:272:39: note: format string is defined here
  DPAA2_BUS_DEBUG("--> Map address: %llX, size: 0x%llX",
                                    ~~~^
                                    %lX

 drivers/bus/fslmc/fslmc_vfio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 4036e82..a003a7d 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -270,7 +270,7 @@ static int vfio_map_irq_region(struct fslmc_vfio_group *group)
 		return -1;
 	}
 
-	DPAA2_BUS_DEBUG("--> Map address: %llX, size: 0x%llX",
+	DPAA2_BUS_DEBUG("--> Map address: %"PRIu64", size: 0x%"PRIu64"",
 			dma_map.vaddr, dma_map.size);
 	ret = ioctl(group->container->fd, VFIO_IOMMU_MAP_DMA, &dma_map);
 	if (ret) {
@@ -303,7 +303,7 @@ static int vfio_map_irq_region(struct fslmc_vfio_group *group)
 		return -1;
 	}
 
-	DPAA2_BUS_DEBUG("--> Unmap address: %llX, size: 0x%llX",
+	DPAA2_BUS_DEBUG("--> Unmap address: %"PRIu64", size: 0x%"PRIu64"",
 			dma_unmap.iova, dma_unmap.size);
 	ret = ioctl(group->container->fd, VFIO_IOMMU_UNMAP_DMA, &dma_unmap);
 	if (ret) {
@@ -401,7 +401,7 @@ static int64_t vfio_map_mcp_obj(struct fslmc_vfio_group *group, char *mcp_obj)
 		goto MC_FAILURE;
 	}
 
-	DPAA2_BUS_DEBUG("Region offset = %llx  , region size = %llx",
+	DPAA2_BUS_DEBUG("Region offset = %"PRIu64"  , region size = %"PRIu64"",
 			reg_info.offset, reg_info.size);
 
 	v_addr = (size_t)mmap(NULL, reg_info.size,
-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-04-15 12:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-13  5:04 [dpdk-dev] [PATCH] bus/fslmc: use PRIu64 instead of llX in format specifier Gowrishankar
2018-04-13  7:10 ` Shreyansh Jain
2018-04-13  7:09   ` Hemant Agrawal
2018-04-13  7:37 ` Hemant Agrawal
2018-04-13  7:41 ` Thomas Monjalon
2018-04-13  8:56   ` Shreyansh Jain
2018-04-13  8:43     ` gowrishankar muthukrishnan
2018-04-13 10:37       ` Shreyansh Jain
2018-04-13 10:40 ` [dpdk-dev] [PATCH v2] " Gowrishankar
2018-04-13 10:47   ` gowrishankar muthukrishnan
2018-04-13 10:55 ` Gowrishankar
2018-04-13 11:17   ` Shreyansh Jain
2018-04-13 11:22 ` [dpdk-dev] [PATCH v3] " Gowrishankar
2018-04-13 12:44   ` Hemant Agrawal
2018-04-15 12:22     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).