Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751256AbeAPIWM (ORCPT + 1 other); Tue, 16 Jan 2018 03:22:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:50834 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750846AbeAPIWL (ORCPT ); Tue, 16 Jan 2018 03:22:11 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A9802175A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=sre@kernel.org Date: Tue, 16 Jan 2018 09:22:07 +0100 From: Sebastian Reichel To: Arnd Bergmann Cc: Kyungmin Park , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen , Ladislav Michl , Roger Quadros , Peter Ujfalusi , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: onenand: omap2: print resource using %pR format string Message-ID: <20180116082207.lfdzqn62hxtupnnb@earth.universe> References: <20180116074359.2861596-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="g75otujk25vqwc5g" Content-Disposition: inline In-Reply-To: <20180116074359.2861596-1-arnd@arndb.de> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: --g75otujk25vqwc5g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Tue, Jan 16, 2018 at 08:43:40AM +0100, 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: >=20 > drivers/mtd/onenand/omap2.c: In function 'omap2_onenand_probe': > drivers/mtd/onenand/omap2.c:536:54: error: format '%x' expects argument o= f type 'unsigned int', but argument 3 has type 'resource_size_t {aka long l= ong unsigned int}' [-Werror=3Dformat=3D] > 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 o= f type 'unsigned int', but argument 4 has type 'resource_size_t {aka long l= ong unsigned int}' [-Werror=3Dformat=3D] >=20 > 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. >=20 > Fixes: a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT") > Signed-off-by: Arnd Bergmann Reviewed-by: Sebastian Reichel -- Sebastian > --- > drivers/mtd/onenand/omap2.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > 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) > =20 > c->onenand.base =3D 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); > } > =20 > --=20 > 2.9.0 >=20 --g75otujk25vqwc5g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlpdtiwACgkQ2O7X88g7 +ppLHg/+KcA22IifqSJa5c4en1hlYNHotpP0Iet8gxEDGgKe+PgvC60izFMnjglA 3MZCoQkF8J/ulRaAHaqFRsdAavdYgfh+Q97TDdaMw8Cvl5pOBZD9qTz7TSWj6crB J8aaHLS0U63wajugrYVQi0/1OgCGb+xz/rX+tvbH82wyXPiiVIMSfi9PP0ACWQhH hjLpYkPXYsRYqFIn/b63UeI+lrtDLJSLfrszDpIusDwpAFMYh/6beavH9Oss5uj8 CrDMNeTgPPodI++zpIdY8N1GtjHKk0F8PpmB7B8S7OLLx2LRWpfpDVezb2TyfMvz einfn9Kamh32qqOzl3J7N/VJr/U9LUTn43lYLGBssynessZkkdPijZTDPQjf2o/L oanxIp1ViPHkO241vlsS9EkDyP+/GvFwR8PtCTkqKeFvwdHG1bMRg7uSWz0jsHbk Ma/qqeDXd6ISzpIeKJKsx874i/r404YJh+HjE1hEr2NHypVsqNxQGWGq+m/6rOQK eQexICl1CbCipaN3Zl9z1sUTxwZcluPpw9gsv6ChHH+CnLZFgshV/z+ratt5+Jk7 z5HuAXZ9wNjC54kvisJMW/gMMElVk3j56I2s9G1AbQmlyKCgnGQ1FXiWXqW0r16c 9PPsQ6+iG6E2JGTmfOXeJZPCBtlHW4ArkBwLcMHYJPx20VSGOko= =IJP+ -----END PGP SIGNATURE----- --g75otujk25vqwc5g--