From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-sh@vger.kernel.org, linux-mtd@lists.infradead.org,
Rich Felker <dalias@libc.org>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Marek Vasut <marek.vasut@gmail.com>,
Richard Weinberger <richard@nod.at>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v3] mtd/maps: fix solutionengine.c printk format warnings
Date: Thu, 26 Jul 2018 21:43:35 +0200 [thread overview]
Message-ID: <20180726214335.047e877e@bbrezillon> (raw)
In-Reply-To: <578dd079-80d0-939a-fbfd-ae101da1dc29@infradead.org>
On Tue, 24 Jul 2018 11:29:01 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:
> From: Randy Dunlap <rdunlap@infradead.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@infradead.org>
> Cc: Brian Norris <computersforpeace@gmail.com>
> Cc: Boris Brezillon <boris.brezillon@bootlin.com>
> Cc: Marek Vasut <marek.vasut@gmail.com>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: linux-mtd@lists.infradead.org
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: linux-sh@vger.kernel.org
> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.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/
WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-sh@vger.kernel.org, linux-mtd@lists.infradead.org,
Rich Felker <dalias@libc.org>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Marek Vasut <marek.vasut@gmail.com>,
Richard Weinberger <richard@nod.at>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v3] mtd/maps: fix solutionengine.c printk format warnings
Date: Thu, 26 Jul 2018 19:43:35 +0000 [thread overview]
Message-ID: <20180726214335.047e877e@bbrezillon> (raw)
In-Reply-To: <578dd079-80d0-939a-fbfd-ae101da1dc29@infradead.org>
On Tue, 24 Jul 2018 11:29:01 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:
> From: Randy Dunlap <rdunlap@infradead.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@infradead.org>
> Cc: Brian Norris <computersforpeace@gmail.com>
> Cc: Boris Brezillon <boris.brezillon@bootlin.com>
> Cc: Marek Vasut <marek.vasut@gmail.com>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: linux-mtd@lists.infradead.org
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: linux-sh@vger.kernel.org
> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.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/
next prev parent reply other threads:[~2018-07-26 19:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-24 18:29 [PATCH v3] mtd/maps: fix solutionengine.c printk format warnings Randy Dunlap
2018-07-24 18:29 ` Randy Dunlap
2018-07-26 19:43 ` Boris Brezillon [this message]
2018-07-26 19:43 ` Boris Brezillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180726214335.047e877e@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=computersforpeace@gmail.com \
--cc=dalias@libc.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-sh@vger.kernel.org \
--cc=marek.vasut@gmail.com \
--cc=rdunlap@infradead.org \
--cc=richard@nod.at \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.