From: Shreyansh Jain <shreyansh.jain@nxp.com>
To: Gowrishankar <gowrishankar.m@linux.vnet.ibm.com>
Cc: Hemant Agrawal <hemant.agrawal@nxp.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH v2] bus/fslmc: use PRIu64 instead of llX in format specifier
Date: Fri, 13 Apr 2018 16:47:20 +0530 [thread overview]
Message-ID: <f7e46585-9f43-6af9-ee8b-4693a317b1da@nxp.com> (raw)
In-Reply-To: <a3aed65ba8ba35f0200e16399b584290d203caed.1523616712.git.gowrishankar.m@linux.vnet.ibm.com>
On Friday 13 April 2018 04:25 PM, Gowrishankar wrote:
> 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>
> --
>
> 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..93c20f3 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: %"PRIx64", size: 0x%"PRIu64"",
^^^^^^^^^^^^^^^^^^^^^^
Should be: 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: %"PRIx64", size: 0x%"PRIu64"",
^^^^^^^^^^^^^^^^^^^^^^
Should be: 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 = %"PRIx64" , region size = %"PRIu64"",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Should be: 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,
>
next prev parent reply other threads:[~2018-04-13 11:02 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 [this message]
2018-04-13 11:22 ` [dpdk-dev] [PATCH v3] " Gowrishankar
2018-04-13 12:44 ` 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=f7e46585-9f43-6af9-ee8b-4693a317b1da@nxp.com \
--to=shreyansh.jain@nxp.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=gowrishankar.m@linux.vnet.ibm.com \
--cc=hemant.agrawal@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).