lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 16 Jan 2018 10:44:27 +0100
From:   Boris Brezillon <boris.brezillon@...e-electrons.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Kyungmin Park <kyungmin.park@...sung.com>,
        David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Richard Weinberger <richard@....at>,
        Cyrille Pitchen <cyrille.pitchen@...ev4u.fr>,
        Ladislav Michl <ladis@...ux-mips.org>,
        Roger Quadros <rogerq@...com>,
        Peter Ujfalusi <peter.ujfalusi@...com>,
        Sebastian Reichel <sre@...nel.org>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: onenand: omap2: print resource using %pR format
 string

On Tue, 16 Jan 2018 08:43:40 +0100
Arnd Bergmann <arnd@...db.de> 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.
> 

Applied. I'll adjust my PR to include this fix.

Thanks,

Boris

> Fixes: a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  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);
>  	}
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ