All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
	linux-kernel@vger.kernel.org,
	Samium Gromoff <_deepfire@feelingofgreen.ru>,
	Greg KH <greg@kroah.com>
Subject: Re: [PATCH -mmotm] 8250_early: fix printk format warnings
Date: Fri, 9 Jul 2010 15:46:44 -0700	[thread overview]
Message-ID: <20100709154644.f5d8877a.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100709144148.3D25.A69D9226@jp.fujitsu.com>

On Fri,  9 Jul 2010 14:47:52 +0900 (JST)
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:

> > From: Randy Dunlap <randy.dunlap@oracle.com>
> > 
> > Fix printk format warnings in serial-mmio32-support-for-8250_earlyc.patch:
> > 
> > drivers/serial/8250_early.c:207: warning: format '%p' expects type 'void *', but argument 3 has type 'long long unsigned int'
> > drivers/serial/8250_early.c:210: warning: format '%p' expects type 'void *', but argument 2 has type 'long long unsigned int'
> > 
> > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> > Cc: Samium Gromoff <_deepfire@feelingofgreen.ru>
> > Cc: Greg KH <greg@kroah.com>
> > ---
> >  drivers/serial/8250_early.c |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > --- mmotm-2010-0701-1219.orig/drivers/serial/8250_early.c
> > +++ mmotm-2010-0701-1219/drivers/serial/8250_early.c
> > @@ -202,12 +202,12 @@ static int __init parse_options(struct e
> >  	}
> >  
> >  	if (mmio || mmio32)
> > -		printk(KERN_INFO "Early serial console at MMIO%s 0x%p (options '%s')\n",
> > +		printk(KERN_INFO "Early serial console at MMIO%s 0x%llu (options '%s')\n",
> >  		       mmio32 ? "32" : "", (unsigned long long) port->mapbase,
> >  		       device->options);
> >  	else
> >  		printk(KERN_INFO "Early serial console at I/O port 0x%pr (options '%s')\n",
> > -		       (unsigned long long) port->iobase, device->options);
> > +		       (void *) port->iobase, device->options);
> 
> seems still odd.

Yes.

> %pr don't mean bare pointer. it want resource. another %pr use case is here.
> 
> drivers/pnp/resoruce.c
> ======================================================================
> struct pnp_resource *pnp_add_dma_resource(struct pnp_dev *dev, int dma,
>                                           int flags)
> {
>         struct pnp_resource *pnp_res;
>         struct resource *res;
> (snip)
>         pnp_dbg(&dev->dev, "  add %pr\n", res);
> ======================================================================
> 
> and port->iobase is merely unsingned long.
> I guess following change or something like are necessary.
> 
> -               printk(KERN_INFO "Early serial console at I/O port 0x%pr (options '%s')\n",
> -                      (unsigned long long) port->iobase, device->options);
> +               printk(KERN_INFO "Early serial console at I/O port %lu (options '%s')\n",
> +                      port->iobase, device->options);
> 

This?

	if (mmio || mmio32)
		printk(KERN_INFO
		       "Early serial console at MMIO%s 0x%llu (options '%s')\n",
			mmio32 ? "32" : "",
			(unsigned long long)port->mapbase,
			device->options);
	else
		printk(KERN_INFO
		      "Early serial console at I/O port 0x%lu (options '%s')\n",
			port->iobase,
			device->options);


  reply	other threads:[~2010-07-09 22:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-01 19:19 mmotm 2010-07-01-12-19 uploaded akpm
2010-07-01 23:28 ` mmotm 2010-07-01-12-19 uploaded (mmc) Randy Dunlap
2010-07-07 21:36   ` Andrew Morton
2010-07-02  9:26 ` mmotm 2010-07-01-12-19 uploaded Xiaotian Feng
2010-07-02 18:24   ` Andrew Morton
2010-07-02 18:24   ` Andrew Morton
2010-07-03  1:24 ` [PATCH -mmotm] 8250_early: fix printk format warnings Randy Dunlap
2010-07-08 18:37   ` Greg KH
2010-07-08 18:45     ` Randy Dunlap
2010-07-08 18:55       ` Greg KH
2010-07-09  5:47   ` KOSAKI Motohiro
2010-07-09 22:46     ` Andrew Morton [this message]
2010-07-12  1:18       ` KOSAKI Motohiro
2010-07-12  2:25     ` Randy Dunlap
2010-07-05 20:35 ` mmotm 2010-07-01 pm_get_wakeup_count() declaration Valdis.Kletnieks
2010-07-05 20:43   ` Rafael J. Wysocki
2010-07-05 20:43   ` Rafael J. Wysocki
2010-07-06  2:24     ` Valdis.Kletnieks
2010-07-06 18:06       ` Rafael J. Wysocki
2010-07-06 18:06       ` Rafael J. Wysocki
2010-07-06  2:24     ` Valdis.Kletnieks
2010-07-05 20:35 ` Valdis.Kletnieks

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=20100709154644.f5d8877a.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=_deepfire@feelingofgreen.ru \
    --cc=greg@kroah.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    /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.