Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751284AbeAPIYM (ORCPT + 1 other); Tue, 16 Jan 2018 03:24:12 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:54294 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750822AbeAPIYL (ORCPT ); Tue, 16 Jan 2018 03:24:11 -0500 Subject: Re: [PATCH] mtd: onenand: omap2: print resource using %pR format string To: Arnd Bergmann , Kyungmin Park , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen CC: Ladislav Michl , Roger Quadros , Sebastian Reichel , , References: <20180116074359.2861596-1-arnd@arndb.de> From: Peter Ujfalusi Message-ID: Date: Tue, 16 Jan 2018 10:23:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180116074359.2861596-1-arnd@arndb.de> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 2018-01-16 09:43, Arnd Bergmann wrote: > The omap2 onenand driver is now available for compile-testing, which > uncovers a warning in configurations that have a 64-bit resource_size_t: > > drivers/mtd/onenand/omap2.c: In function 'omap2_onenand_probe': > drivers/mtd/onenand/omap2.c:536:54: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=] > dev_err(dev, "Cannot reserve memory region at 0x%08x, size: 0x%x\n", > drivers/mtd/onenand/omap2.c:536:66: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=] > > Changing the format string to the special %pR simplifies the code > and lets it do the right thing in that configuration, while avoiding > the warning. Reviewed-by: Peter Ujfalusi > Fixes: a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT") > Signed-off-by: Arnd Bergmann > --- > drivers/mtd/onenand/omap2.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c > index 2ce73fb6da1c..a4a2159bcfb7 100644 > --- a/drivers/mtd/onenand/omap2.c > +++ b/drivers/mtd/onenand/omap2.c > @@ -533,8 +533,7 @@ static int omap2_onenand_probe(struct platform_device *pdev) > > c->onenand.base = devm_ioremap_resource(dev, res); > if (IS_ERR(c->onenand.base)) { > - dev_err(dev, "Cannot reserve memory region at 0x%08x, size: 0x%x\n", > - res->start, resource_size(res)); > + dev_err(dev, "Cannot reserve memory region %pR\n", res); > return PTR_ERR(c->onenand.base); > } > > - Péter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki