From: Gowrishankar <gowrishankar.m@linux.vnet.ibm.com>
To: Hemant Agrawal <hemant.agrawal@nxp.com>,
Shreyansh Jain <shreyansh.jain@nxp.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Subject: [dpdk-dev] [PATCH v3] bus/fslmc: use PRIu64 instead of llX in format specifier
Date: Fri, 13 Apr 2018 16:52:30 +0530 [thread overview]
Message-ID: <c6ff83e03e791b7c119635d999cbc05230b1cfe1.1523618353.git.gowrishankar.m@linux.vnet.ibm.com> (raw)
In-Reply-To: <5438d3242ebb9d995d0a52a63feba80efd783e6f.1523595487.git.gowrishankar.m@linux.vnet.ibm.com>
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>
--
v3:
- correction to prefix address with 0x
v2:
- corrected format specifier wrt address and size.
Thanks Shreyansh, Hemant and Thomas.
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 | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 4036e82..675d160 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -270,8 +270,8 @@ static int vfio_map_irq_region(struct fslmc_vfio_group *group)
return -1;
}
- DPAA2_BUS_DEBUG("--> Map address: %llX, size: 0x%llX",
- dma_map.vaddr, dma_map.size);
+ DPAA2_BUS_DEBUG("--> Map address: 0x%"PRIx64", size: %"PRIu64"",
+ (uint64_t)dma_map.vaddr, (uint64_t)dma_map.size);
ret = ioctl(group->container->fd, VFIO_IOMMU_MAP_DMA, &dma_map);
if (ret) {
DPAA2_BUS_ERR("VFIO_IOMMU_MAP_DMA API(errno = %d)",
@@ -303,8 +303,8 @@ static int vfio_map_irq_region(struct fslmc_vfio_group *group)
return -1;
}
- DPAA2_BUS_DEBUG("--> Unmap address: %llX, size: 0x%llX",
- dma_unmap.iova, dma_unmap.size);
+ DPAA2_BUS_DEBUG("--> Unmap address: 0x%"PRIx64", size: %"PRIu64"",
+ (uint64_t)dma_unmap.iova, (uint64_t)dma_unmap.size);
ret = ioctl(group->container->fd, VFIO_IOMMU_UNMAP_DMA, &dma_unmap);
if (ret) {
DPAA2_BUS_ERR("VFIO_IOMMU_UNMAP_DMA API(errno = %d)",
@@ -401,8 +401,8 @@ 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",
- reg_info.offset, reg_info.size);
+ DPAA2_BUS_DEBUG("Region offset = 0x%"PRIx64" , region size = %"PRIu64"",
+ (uint64_t)reg_info.offset, (uint64_t)reg_info.size);
v_addr = (size_t)mmap(NULL, reg_info.size,
PROT_WRITE | PROT_READ, MAP_SHARED,
--
1.9.1
next prev parent reply other threads:[~2018-04-13 11:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-13 5:04 [dpdk-dev] [PATCH] " 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 ` Gowrishankar [this message]
2018-04-13 12:44 ` [dpdk-dev] [PATCH v3] " Hemant Agrawal
2018-04-15 12:22 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c6ff83e03e791b7c119635d999cbc05230b1cfe1.1523618353.git.gowrishankar.m@linux.vnet.ibm.com \
--to=gowrishankar.m@linux.vnet.ibm.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=shreyansh.jain@nxp.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).