[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180726214335.047e877e@bbrezillon>
Date: Thu, 26 Jul 2018 21:43:35 +0200
From: Boris Brezillon <boris.brezillon@...tlin.com>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>, linux-sh@...r.kernel.org,
linux-mtd@...ts.infradead.org, Rich Felker <dalias@...c.org>,
Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Marek Vasut <marek.vasut@...il.com>,
Richard Weinberger <richard@....at>,
Brian Norris <computersforpeace@...il.com>,
David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH v3] mtd/maps: fix solutionengine.c printk format
warnings
On Tue, 24 Jul 2018 11:29:01 -0700
Randy Dunlap <rdunlap@...radead.org> wrote:
> From: Randy Dunlap <rdunlap@...radead.org>
>
> Fix 2 printk format warnings (this driver is currently only used by
> arch/sh/) by using "%pap" instead of "%lx".
>
> Fixes these build warnings:
>
> ../drivers/mtd/maps/solutionengine.c: In function 'init_soleng_maps':
> ../include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
> ../drivers/mtd/maps/solutionengine.c:62:54: note: format string is defined here
> printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
> ~~~~^
> %08x
> ../include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
> ../drivers/mtd/maps/solutionengine.c:62:72: note: format string is defined here
> printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
> ~~~~^
> %08x
>
> Cc: David Woodhouse <dwmw2@...radead.org>
> Cc: Brian Norris <computersforpeace@...il.com>
> Cc: Boris Brezillon <boris.brezillon@...tlin.com>
> Cc: Marek Vasut <marek.vasut@...il.com>
> Cc: Richard Weinberger <richard@....at>
> Cc: linux-mtd@...ts.infradead.org
> Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
> Cc: Rich Felker <dalias@...c.org>
> Cc: linux-sh@...r.kernel.org
> Cc: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
>
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
Applied.
Thanks,
Boris
> ---
> v3: drop anding the phys addresses with 0x1fffffff since the only
> phys addresses are 0 or 0x01000000.
>
> drivers/mtd/maps/solutionengine.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> --- linux-next-20180717.orig/drivers/mtd/maps/solutionengine.c
> +++ linux-next-20180717/drivers/mtd/maps/solutionengine.c
> @@ -59,9 +59,9 @@ static int __init init_soleng_maps(void)
> return -ENXIO;
> }
> }
> - printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
> - soleng_flash_map.phys & 0x1fffffff,
> - soleng_eprom_map.phys & 0x1fffffff);
> + printk(KERN_NOTICE "Solution Engine: Flash at 0x%pap, EPROM at 0x%pap\n",
> + &soleng_flash_map.phys,
> + &soleng_eprom_map.phys);
> flash_mtd->owner = THIS_MODULE;
>
> eprom_mtd = do_map_probe("map_rom", &soleng_eprom_map);
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
Powered by blists - more mailing lists