From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id 71E531C0FA for ; Fri, 13 Apr 2018 13:22:39 +0200 (CEST) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3DBMLZ7011217 for ; Fri, 13 Apr 2018 07:22:38 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2haqxwa21v-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 13 Apr 2018 07:22:38 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Apr 2018 12:22:36 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 13 Apr 2018 12:22:32 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3DBMWL310420488; Fri, 13 Apr 2018 11:22:32 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D62FAE057; Fri, 13 Apr 2018 12:12:26 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 42F17AE051; Fri, 13 Apr 2018 12:12:25 +0100 (BST) Received: from chozha.in.ibm.com (unknown [9.84.230.188]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 13 Apr 2018 12:12:25 +0100 (BST) From: Gowrishankar To: Hemant Agrawal , Shreyansh Jain Cc: dev@dpdk.org, Thomas Monjalon , Gowrishankar Muthukrishnan Date: Fri, 13 Apr 2018 16:52:30 +0530 X-Mailer: git-send-email 1.9.1 In-Reply-To: <5438d3242ebb9d995d0a52a63feba80efd783e6f.1523595487.git.gowrishankar.m@linux.vnet.ibm.com> References: <5438d3242ebb9d995d0a52a63feba80efd783e6f.1523595487.git.gowrishankar.m@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18041311-0040-0000-0000-0000042DED80 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041311-0041-0000-0000-0000263209FD Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-04-13_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804130105 Subject: [dpdk-dev] [PATCH v3] bus/fslmc: use PRIu64 instead of llX in format specifier X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Apr 2018 11:22:39 -0000 From: Gowrishankar Muthukrishnan 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 -- 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