diff mbox series

[3/3] bus/fslmc: fix the compliation err with ppc64 compiler

Message ID 20190722065407.9180-3-hemant.agrawal@nxp.com
State New
Headers show
Series [1/3] bus/dpaa: fix to remove err print for non-dpaa devices | expand

Commit Message

Hemant Agrawal July 22, 2019, 6:54 a.m. UTC
fslmc_vfio.c:387:36: note: format string is defined here
DPAA2_BUS_DEBUG("VFIO dmamap 0x%llx:0x%llx, size 0x%llx\n",

format ‘%llx’ expects argument of type ‘long long unsigned int’
argument 6 has type ‘__u64 {aka long unsigned int}’

Fixes: 2b5fa25708cf ("mempool/dpaa2: map external memory with VFIO")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 drivers/bus/fslmc/fslmc_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Thomas Monjalon July 22, 2019, 8:16 a.m. UTC | #1
22/07/2019 08:54, Hemant Agrawal:
> fslmc_vfio.c:387:36: note: format string is defined here

> DPAA2_BUS_DEBUG("VFIO dmamap 0x%llx:0x%llx, size 0x%llx\n",

> 

> format ‘%llx’ expects argument of type ‘long long unsigned int’

> argument 6 has type ‘__u64 {aka long unsigned int}’

> 

> Fixes: 2b5fa25708cf ("mempool/dpaa2: map external memory with VFIO")

> 

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> ---

> --- a/drivers/bus/fslmc/fslmc_vfio.c

> +++ b/drivers/bus/fslmc/fslmc_vfio.c

> -	DPAA2_BUS_DEBUG("VFIO dmamap 0x%llx:0x%llx, size 0x%llx\n",

> +	DPAA2_BUS_DEBUG("VFIOdmamap 0x%"PRIx64":0x%"PRIx64",size 0x%"PRIx64"\n",

>  			dma_map.vaddr, dma_map.iova, dma_map.size);


It gives this error:
drivers/bus/fslmc/fslmc_logs.h:18:44: error:
format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘__u64’

I don't understand what happens. Where is the '%lx'?
diff mbox series

Patch

diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 247b2a4a1..564bef9cb 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -384,7 +384,7 @@  rte_fslmc_vfio_mem_dmamap(uint64_t vaddr, uint64_t iova, uint64_t size)
 	dma_map.vaddr = vaddr;
 	dma_map.iova = iova;
 
-	DPAA2_BUS_DEBUG("VFIO dmamap 0x%llx:0x%llx, size 0x%llx\n",
+	DPAA2_BUS_DEBUG("VFIOdmamap 0x%"PRIx64":0x%"PRIx64",size 0x%"PRIx64"\n",
 			dma_map.vaddr, dma_map.iova, dma_map.size);
 	ret = ioctl(group->container->fd, VFIO_IOMMU_MAP_DMA,
 		    &dma_map);