From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10058.outbound.protection.outlook.com [40.107.1.58]) by dpdk.org (Postfix) with ESMTP id 29B6D1BB56 for ; Fri, 13 Apr 2018 13:02:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LB6Jr2EL23VH+FIc3jTx6uMIC3b+8I45c3+1H+ATryA=; b=g5gounJDoPvH78mHMndQFenXqXXONvMjIB94SGRZ8rA/9e8RYqhYTyyWQHvVsDqDenZniiNNz7beULW1fa2RPeq7EXEicXJxSCoXc49bSIjLCA2JmllGh8DzEqWEADmFcpcPwRP9VrTm3j5ZWwf7fApgFuOW3ItbZejgFyELswY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from [10.232.14.39] (14.142.187.166) by VI1PR0402MB2781.eurprd04.prod.outlook.com (2603:10a6:800:ad::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.10; Fri, 13 Apr 2018 11:02:20 +0000 To: Gowrishankar Cc: Hemant Agrawal , Anatoly Burakov , dev@dpdk.org, Thomas Monjalon References: <5438d3242ebb9d995d0a52a63feba80efd783e6f.1523595487.git.gowrishankar.m@linux.vnet.ibm.com> From: Shreyansh Jain Message-ID: Date: Fri, 13 Apr 2018 16:47:20 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: TY1PR01CA0178.jpnprd01.prod.outlook.com (2603:1096:402::30) To VI1PR0402MB2781.eurprd04.prod.outlook.com (2603:10a6:800:ad::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR0402MB2781; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0402MB2781; 3:Kqk0SIKreiu48PYmj+E3g+dkOMKtuMcEKbukpiE89oz5pBe6XDNBu7ME+6ooNNPVaJJU9crExlsZOHiKMohyBJbgV4JbT7lbCK+ErpyHG7Tv2crQ3dVt/XucKsOcscPGm77w0ajzTTbhUQg2UbPy/xFaDGmLWWc6rxwp0wpw9JPWYipInkFoGMKPGx3sBZqiG9+Hqdh9aAc94fJFv+lpMFJ13WhECUWP2ymLLn3rXoPkvch3OPOOPje79aaSDOo9; 25:wm7bnQ8/G4eIj1SCUXqGn0VSsKsuPBQzLih81xrFzdZLkWKttJz6RqztLBOSNLLqe1U+dzp0BsuWgNuPwfQG8Cr44MScgXxGc0Tgq1x/GSoGIMDcFIHzQW3At9YVSRLcZgrZUyF17W6gqTs3Y5W/0AKvJqnx42FqLaac9BonN1X1PZgF6TuyA7+KYgHgUwf6makLbJEddbKc7U9mrKvgYfCaNu7/8NyTqk2fQYl439BGfcBqWfFPDkp3Hzuj6+a0x8xEkiQ4bu2RIXDd62XDZx4hiVocR2eFPRNmAtCBbWvEiiDHjnJvK7ra6Uz8zLQ97uzArTFGjQFoM7PGK4KVRw==; 31:qYXWASjIy8eJqWJ3m62L5AmsAe+3Rysiuymvf16IorKKmsaWRkpoge5zPoGpk07tAoHchncsjqP3D1HYl+sC8AFYfOG8kTZpcRACQTYnfnw1Wp7ho2kWcMZzmSGdx8UXl2WmdsJxUuY2f+8NMka0lTK1IM1TC3twg0bww99v7IvMiPzXhsFWzL8QQo/in68/25wo1Pgqx9SYRZccyWNXeLhfduL5C8LDHkeXBiZpykk= X-MS-TrafficTypeDiagnostic: VI1PR0402MB2781: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0402MB2781; 20:XFjk7BrvquIT6yslyv0UiBPnLTVm/hHND9QVXgwH/R6lowsouurDKRt1VAgVLhHmGPYpNGY9UKiiABqNbuAXsuIPJhu0sntcI6R/sUJiyq6HrJxZ6bZWl+QIPNTENiH5olSIVTu5KiGFCsaKElC52J93f/oHE1EuP/SNvftlL58oCq2pnhdSvxTgXRkRoGXeAAhJQ0pmyIXT0YGRDm+N1PByImg/aVLqoutPPDstKoRkTIUk+njdMXQxndfheQEYxuif3YZTAJJtiS6aNfcEqiUbCJgb2S19IO7LseY18+mT7tiV1klai4kr+iBCHRXI1H1lG4WNbGtOkmK0AUT11wW7O5TRFtHNcMSs6OGKcuSTzl24Cc6Qv+v7VXwzDv0w1jID/TjeAfvrBSWN3LMUQYCQpq1z0Jka2gAy3qsSBLXEaVMnVUmEJg7v2jM7m3HRasTo2CkpHU0JPHuu4JKTOa6QkaBBvjkbjmzYhmD4LTImphbItmmdezbcp5MIxuRY; 4:rLIuBROGICQaB5vbZglnfEblwt5mPy7J1HhALmsZv8O1yCbZHVAyf2ALOTPtIxVkJt+D+/d7XBBn9bxGEeHRMAEAjmTu/NFJHgnulh436SCDB2ZEyW1tAdGtoIWCFle/lPCLdcu7S006c7WrszeBejwa7lWPeSqdiTBSs06fHRJWUmsEn/MVbE3ivVn4org2RJjar/5gd6+FuTxrtyLYR5UEJqiKUTUGUnUgz5KpwV8tlpwep02U9uChlHOcRA+C4hNtMV4Q92tU5BOvBIX843eV3x4h/X/bd487KlEqukQOdmsyf9sc/bieRnRQ03Kg X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(104084551191319); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231232)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:VI1PR0402MB2781; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0402MB2781; X-Forefront-PRVS: 0641678E68 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(366004)(376002)(39860400002)(346002)(396003)(39380400002)(199004)(189003)(386003)(2486003)(7736002)(76176011)(2906002)(59450400001)(55236004)(86362001)(476003)(52146003)(2870700001)(305945005)(956004)(446003)(23676004)(50466002)(2616005)(64126003)(31696002)(11346002)(97736004)(31686004)(105586002)(229853002)(5009440100003)(106356001)(52116002)(8676002)(36756003)(6246003)(53936002)(6116002)(478600001)(4326008)(3846002)(6916009)(58126008)(26005)(77096007)(6486002)(81166006)(81156014)(8936002)(67846002)(16526019)(186003)(65826007)(316002)(25786009)(5660300001)(65956001)(54906003)(66066001)(65806001)(68736007)(16576012)(44832011)(486006)(47776003)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0402MB2781; H:[10.232.14.39]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA0MDJNQjI3ODE7MjM6aHRvelhpcERZamFuY292SHdmc2FwMFJv?= =?utf-8?B?S0xsb1JtT0loY3dtS05KTDBZa0pjYmo0SkhuWCt3bW9yYU90QjNpa0VjN2xN?= =?utf-8?B?TlRLV3NQZEtYQ0hoMkc2d3VZYzhxTG91Y1ptRFZCcDRMSTZZNmZEL1ArN3hB?= =?utf-8?B?Mk5QRHBGa0Q4bmVHeTI3Zi9MZzFJMzRYYWZrZEV5eDdrQjlqWWx5OHlwdGFt?= =?utf-8?B?SGhWNCtSSEtmS3c3UmZ6bG93YTBoWE5pcW12ZHdlbFFUOE9jY0NRVDFTMWNM?= =?utf-8?B?UURVRGJRS3RjNXI2WjNxVkFZZUp0RFlDVE5sb3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; 7:hD/nCEW7qbTTBl4eCmafGQ7p82jADiVWc/kgZFBJLkrtNEWJS10WG8gVI/QpmmU9hInY8/etCowr1GC+LWiWnQor3kzrZ/nTtlWZZYltE4A36O0UuW4EqdxIBmDNMVdvlSNJaTy5jcv9SBnqAzgfdAVgX+GHMfLrIwLGCYAIGzzHH/XudPZcYwkHhpmlmAt0u83Riztt7feuIBCQKa7j8zz78/zHs0PZcbs3yZ+yGx5UIVtTYCG++5ByeUkVzOsZ X-MS-Office365-Filtering-Correlation-Id: f9442547-256f-480f-423b-08d5a12e08e8 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2018 11:02:20.5768 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f9442547-256f-480f-423b-08d5a12e08e8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB2781 Subject: Re: [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 11:02:25 -0000 On Friday 13 April 2018 04:25 PM, Gowrishankar wrote: > 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. > 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, >