LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* W1 printk format warning
@ 2007-04-25 23:21 Randy Dunlap
  2007-04-25 23:45 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2007-04-25 23:21 UTC (permalink / raw)
  To: johnpol; +Cc: lkml, akpm

in 2.6.21-rc7-mm1.  Are you aware of this?

drivers/w1/w1.c:460: warning: too few arguments for format

	dev_dbg(&sl->dev, "%s: registering %s as %p.\n", __func__,
		&sl->dev.bus_id[0]);

Thanks,
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: W1 printk format warning
  2007-04-25 23:21 W1 printk format warning Randy Dunlap
@ 2007-04-25 23:45 ` Andrew Morton
  2007-04-26 18:17   ` Evgeniy Polyakov
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2007-04-25 23:45 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: johnpol, lkml, Dan Williams

On Wed, 25 Apr 2007 16:21:04 -0700 Randy Dunlap <randy.dunlap@oracle.com> wrote:

> in 2.6.21-rc7-mm1.  Are you aware of this?
> 
> drivers/w1/w1.c:460: warning: too few arguments for format
> 
> 	dev_dbg(&sl->dev, "%s: registering %s as %p.\n", __func__,
> 		&sl->dev.bus_id[0]);
> 

Yeah, that's because Dan's dev_dbg-check-dev_dbg-arguments.patch added
printk arg-checking to dev_dbg() and a bunch of bugs got exposed.  I fixed
a few of them.

Incidentally, there are at least four different drivers which privately do
things like:

#if !defined(DEBUG)
#undef dev_dbg
static inline int __attribute__ ((format (printf, 2, 3))) dev_dbg(
	const struct device *_dev, const char *fmt, ...) {return 0;}
#endif

which can all be removed with Dan's (good) patch in place.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: W1 printk format warning
  2007-04-25 23:45 ` Andrew Morton
@ 2007-04-26 18:17   ` Evgeniy Polyakov
  2007-04-26 21:22     ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Evgeniy Polyakov @ 2007-04-26 18:17 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Randy Dunlap, lkml, Dan Williams

On Wed, Apr 25, 2007 at 04:45:09PM -0700, Andrew Morton (akpm@linux-foundation.org) wrote:
> On Wed, 25 Apr 2007 16:21:04 -0700 Randy Dunlap <randy.dunlap@oracle.com> wrote:
> 
> > in 2.6.21-rc7-mm1.  Are you aware of this?
> > 
> > drivers/w1/w1.c:460: warning: too few arguments for format
> > 
> > 	dev_dbg(&sl->dev, "%s: registering %s as %p.\n", __func__,
> > 		&sl->dev.bus_id[0]);
> > 
> 
> Yeah, that's because Dan's dev_dbg-check-dev_dbg-arguments.patch added
> printk arg-checking to dev_dbg() and a bunch of bugs got exposed.  I fixed
> a few of them.

Could you post a full list for w1, if there is only one, here is a fix.

Thanks a lot, Randy.

diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 63c0724..7d6876d 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -459,7 +459,7 @@ static int __w1_attach_slave_device(struct w1_slave *sl)
 		 (unsigned long long) sl->reg_num.id);
 
 	dev_dbg(&sl->dev, "%s: registering %s as %p.\n", __func__,
-		&sl->dev.bus_id[0]);
+		&sl->dev.bus_id[0], sl);
 
 	err = device_register(&sl->dev);
 	if (err < 0) {
-- 
	Evgeniy Polyakov

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: W1 printk format warning
  2007-04-26 18:17   ` Evgeniy Polyakov
@ 2007-04-26 21:22     ` Andrew Morton
  2007-04-27  0:55       ` Williams, Dan J
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2007-04-26 21:22 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: Randy Dunlap, lkml, Dan Williams

On Thu, 26 Apr 2007 22:17:44 +0400 Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:

> On Wed, Apr 25, 2007 at 04:45:09PM -0700, Andrew Morton (akpm@linux-foundation.org) wrote:
> > On Wed, 25 Apr 2007 16:21:04 -0700 Randy Dunlap <randy.dunlap@oracle.com> wrote:
> > 
> > > in 2.6.21-rc7-mm1.  Are you aware of this?
> > > 
> > > drivers/w1/w1.c:460: warning: too few arguments for format
> > > 
> > > 	dev_dbg(&sl->dev, "%s: registering %s as %p.\n", __func__,
> > > 		&sl->dev.bus_id[0]);
> > > 
> > 
> > Yeah, that's because Dan's dev_dbg-check-dev_dbg-arguments.patch added
> > printk arg-checking to dev_dbg() and a bunch of bugs got exposed.  I fixed
> > a few of them.
> 
> Could you post a full list for w1, if there is only one, here is a fix.
> 

There's only the one in w1, I think.  I fixed a few more but I didn't
actually go looking for more such errors.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: W1 printk format warning
  2007-04-26 21:22     ` Andrew Morton
@ 2007-04-27  0:55       ` Williams, Dan J
  0 siblings, 0 replies; 5+ messages in thread
From: Williams, Dan J @ 2007-04-27  0:55 UTC (permalink / raw)
  To: Andrew Morton, Evgeniy Polyakov; +Cc: Randy Dunlap, lkml

> From: Andrew Morton [mailto:akpm@linux-foundation.org]
> On Thu, 26 Apr 2007 22:17:44 +0400 Evgeniy Polyakov
<johnpol@2ka.mipt.ru>
> wrote:
> 
> > On Wed, Apr 25, 2007 at 04:45:09PM -0700, Andrew Morton (akpm@linux-
> foundation.org) wrote:
> > > On Wed, 25 Apr 2007 16:21:04 -0700 Randy Dunlap
<randy.dunlap@oracle.com>
> wrote:
> > >
> > > > in 2.6.21-rc7-mm1.  Are you aware of this?
> > > >
> > > > drivers/w1/w1.c:460: warning: too few arguments for format
> > > >
> > > > 	dev_dbg(&sl->dev, "%s: registering %s as %p.\n",
__func__,
> > > > 		&sl->dev.bus_id[0]);
> > > >
> > >
> > > Yeah, that's because Dan's dev_dbg-check-dev_dbg-arguments.patch
added
> > > printk arg-checking to dev_dbg() and a bunch of bugs got exposed.
I fixed
> > > a few of them.
> >
> > Could you post a full list for w1, if there is only one, here is a
fix.
> >
> 
> There's only the one in w1, I think.  I fixed a few more but I didn't
> actually go looking for more such errors.

Feel free to bug me if there is more fallout that is not otherwise
picked up...

--
Dan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-04-27  0:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-25 23:21 W1 printk format warning Randy Dunlap
2007-04-25 23:45 ` Andrew Morton
2007-04-26 18:17   ` Evgeniy Polyakov
2007-04-26 21:22     ` Andrew Morton
2007-04-27  0:55       ` Williams, Dan J

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).