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 D91C01BBB2 for ; Fri, 13 Apr 2018 12:40:53 +0200 (CEST) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3DAduch053422 for ; Fri, 13 Apr 2018 06:40:53 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2harqs62nr-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 13 Apr 2018 06:40:52 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Apr 2018 11:40:50 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 13 Apr 2018 11:40:47 +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 w3DAellW11796772; Fri, 13 Apr 2018 10:40:47 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 70DEAAE045; Fri, 13 Apr 2018 11:30:41 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A322BAE051; Fri, 13 Apr 2018 11:30:39 +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 11:30:39 +0100 (BST) From: Gowrishankar To: Hemant Agrawal , Shreyansh Jain Cc: Anatoly Burakov , dev@dpdk.org, Thomas Monjalon , Gowrishankar Muthukrishnan Date: Fri, 13 Apr 2018 16:10:44 +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: 18041310-0012-0000-0000-000005CA735E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041310-0013-0000-0000-00001946AD80 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-1804130099 Subject: [dpdk-dev] [PATCH v2] 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 10:40:54 -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 -- v2: - corrected format specifier wrt address and size. 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..80c64d2 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: %"PRIx64", 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: %"PRIx64", 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 = %"PRIx64" , region size = %"PRIu64"", reg_info.offset, reg_info.size); v_addr = (size_t)mmap(NULL, reg_info.size, -- 1.9.1