* [PATCH 1/1] usbnet: allow type check of devdbg arguments in non-debug build
@ 2008-09-15 15:47 Steve Glendinning
2008-09-25 2:14 ` Jeff Garzik
2009-01-17 7:19 ` [patch 2.6.29-rc] " David Brownell
0 siblings, 2 replies; 10+ messages in thread
From: Steve Glendinning @ 2008-09-15 15:47 UTC (permalink / raw)
To: netdev; +Cc: Ian Saturley, David Brownell, Jeff Garzik, Steve Glendinning
improve usbnet's devdbg to always type-check diagnostic arguments,
like dev_dbg (device.h). This makes no change to the resulting size of
usbnet modules.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
---
include/linux/usb/usbnet.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index ba09fe8..7d38222 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -197,7 +197,9 @@ extern int usbnet_nway_reset(struct net_device *net);
#define devdbg(usbnet, fmt, arg...) \
printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
#else
-#define devdbg(usbnet, fmt, arg...) do {} while(0)
+#define devdbg(usbnet, fmt, arg...) \
+ ({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \
+ ## arg); 0; })
#endif
#define deverr(usbnet, fmt, arg...) \
--
1.5.5.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/1] usbnet: allow type check of devdbg arguments in non-debug build
2008-09-15 15:47 [PATCH 1/1] usbnet: allow type check of devdbg arguments in non-debug build Steve Glendinning
@ 2008-09-25 2:14 ` Jeff Garzik
2009-01-17 7:19 ` [patch 2.6.29-rc] " David Brownell
1 sibling, 0 replies; 10+ messages in thread
From: Jeff Garzik @ 2008-09-25 2:14 UTC (permalink / raw)
To: Steve Glendinning; +Cc: netdev, Ian Saturley, David Brownell
Steve Glendinning wrote:
> improve usbnet's devdbg to always type-check diagnostic arguments,
> like dev_dbg (device.h). This makes no change to the resulting size of
> usbnet modules.
>
> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
> ---
> include/linux/usb/usbnet.h | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
> index ba09fe8..7d38222 100644
> --- a/include/linux/usb/usbnet.h
> +++ b/include/linux/usb/usbnet.h
> @@ -197,7 +197,9 @@ extern int usbnet_nway_reset(struct net_device *net);
> #define devdbg(usbnet, fmt, arg...) \
> printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
> #else
> -#define devdbg(usbnet, fmt, arg...) do {} while(0)
> +#define devdbg(usbnet, fmt, arg...) \
> + ({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \
> + ## arg); 0; })
> #endif
applied
^ permalink raw reply [flat|nested] 10+ messages in thread
* [patch 2.6.29-rc] usbnet: allow type check of devdbg arguments in non-debug build
2008-09-15 15:47 [PATCH 1/1] usbnet: allow type check of devdbg arguments in non-debug build Steve Glendinning
2008-09-25 2:14 ` Jeff Garzik
@ 2009-01-17 7:19 ` David Brownell
2009-01-20 1:12 ` David Miller
1 sibling, 1 reply; 10+ messages in thread
From: David Brownell @ 2009-01-17 7:19 UTC (permalink / raw)
To: netdev; +Cc: Steve Glendinning, Ian Saturley, Jeff Garzik
From: Steve Glendinning <steve.glendinning@smsc.com>
Subject: usbnet: allow type check of devdbg arguments in non-debug build
Improve usbnet's devdbg to always type-check diagnostic arguments,
like dev_dbg (device.h). This makes no change to the resulting size of
usbnet modules.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
[ refreshed against 2.6.29-rc1 GIT ]
include/linux/usb/usbnet.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -197,7 +197,9 @@ extern int usbnet_nway_reset(struct net_
#define devdbg(usbnet, fmt, arg...) \
printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
#else
-#define devdbg(usbnet, fmt, arg...) do {} while(0)
+#define devdbg(usbnet, fmt, arg...) \
+ ({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \
+ ## arg); 0; })
#endif
#define deverr(usbnet, fmt, arg...) \
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 2.6.29-rc] usbnet: allow type check of devdbg arguments in non-debug build
2009-01-17 7:19 ` [patch 2.6.29-rc] " David Brownell
@ 2009-01-20 1:12 ` David Miller
2009-01-20 1:57 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2009-01-20 1:12 UTC (permalink / raw)
To: david-b; +Cc: netdev, steve.glendinning, ian.saturley, jeff
From: David Brownell <david-b@pacbell.net>
Date: Fri, 16 Jan 2009 23:19:44 -0800
> Improve usbnet's devdbg to always type-check diagnostic arguments,
> like dev_dbg (device.h). This makes no change to the resulting size of
> usbnet modules.
>
> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Applied, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 2.6.29-rc] usbnet: allow type check of devdbg arguments in non-debug build
2009-01-20 1:12 ` David Miller
@ 2009-01-20 1:57 ` David Miller
2009-01-20 2:04 ` David Brownell
0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2009-01-20 1:57 UTC (permalink / raw)
To: david-b; +Cc: netdev, steve.glendinning, ian.saturley, jeff
From: David Miller <davem@davemloft.net>
Date: Mon, 19 Jan 2009 17:12:00 -0800 (PST)
> From: David Brownell <david-b@pacbell.net>
> Date: Fri, 16 Jan 2009 23:19:44 -0800
>
> > Improve usbnet's devdbg to always type-check diagnostic arguments,
> > like dev_dbg (device.h). This makes no change to the resulting size of
> > usbnet modules.
> >
> > Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
> > Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
>
> Applied, thanks.
I have to back this out, it breaks the build:
drivers/net/wireless/rndis_wlan.c: In function 'rndis_translate_scan':
drivers/net/wireless/rndis_wlan.c:1664: error: 'usbdev' undeclared (first use in this function)
drivers/net/wireless/rndis_wlan.c:1664: error: (Each undeclared identifier is reported only once
drivers/net/wireless/rndis_wlan.c:1664: error: for each function it appears in.)
make[3]: *** [drivers/net/wireless/rndis_wlan.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [drivers/net/wireless] Error 2
make[2]: *** Waiting for unfinished jobs....
I bet there are other similar gremlins like this in the tree.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 2.6.29-rc] usbnet: allow type check of devdbg arguments in non-debug build
2009-01-20 1:57 ` David Miller
@ 2009-01-20 2:04 ` David Brownell
2009-01-20 4:08 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: David Brownell @ 2009-01-20 2:04 UTC (permalink / raw)
To: David Miller
Cc: netdev, steve.glendinning, ian.saturley, jeff, Jussi Kivilinna
On Monday 19 January 2009, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Mon, 19 Jan 2009 17:12:00 -0800 (PST)
>
> > From: David Brownell <david-b@pacbell.net>
> > Date: Fri, 16 Jan 2009 23:19:44 -0800
> >
> > > Improve usbnet's devdbg to always type-check diagnostic arguments,
> > > like dev_dbg (device.h). This makes no change to the resulting size of
> > > usbnet modules.
> > >
> > > Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
> > > Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> >
> > Applied, thanks.
>
> I have to back this out, it breaks the build:
>
> drivers/net/wireless/rndis_wlan.c: In function 'rndis_translate_scan':
> drivers/net/wireless/rndis_wlan.c:1664: error: 'usbdev' undeclared (first use in this function)
> drivers/net/wireless/rndis_wlan.c:1664: error: (Each undeclared identifier is reported only once
> drivers/net/wireless/rndis_wlan.c:1664: error: for each function it appears in.)
> make[3]: *** [drivers/net/wireless/rndis_wlan.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> make[2]: *** [drivers/net/wireless] Error 2
> make[2]: *** Waiting for unfinished jobs....
>
> I bet there are other similar gremlins like this in the tree.
Maybe, but that's after all part of why we want this kind
of patch merged ... after the first gremlines are fixed!
In this case I'll guess this is the root cause of the bug:
#ifdef DEBUG
struct usbnet *usbdev = netdev_priv(dev);
#endif
CC'd someone more involved in rndis_wlan than me ...
- Dave
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 2.6.29-rc] usbnet: allow type check of devdbg arguments in non-debug build
2009-01-20 2:04 ` David Brownell
@ 2009-01-20 4:08 ` David Miller
2009-01-20 5:11 ` David Brownell
0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2009-01-20 4:08 UTC (permalink / raw)
To: david-b; +Cc: netdev, steve.glendinning, ian.saturley, jeff, jussi.kivilinna
From: David Brownell <david-b@pacbell.net>
Date: Mon, 19 Jan 2009 18:04:08 -0800
> Maybe, but that's after all part of why we want this kind
> of patch merged ... after the first gremlines are fixed!
When you submit a change like this that can have
potential warning and build failure effects across
the entire tree, the onus is on you to do an
allmodconfig sanity check build or similar and
add any necessary fixes to your change.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 2.6.29-rc] usbnet: allow type check of devdbg arguments in non-debug build
2009-01-20 4:08 ` David Miller
@ 2009-01-20 5:11 ` David Brownell
2009-01-20 10:56 ` Steve.Glendinning
0 siblings, 1 reply; 10+ messages in thread
From: David Brownell @ 2009-01-20 5:11 UTC (permalink / raw)
To: David Miller
Cc: netdev, steve.glendinning, ian.saturley, jeff, jussi.kivilinna
On Monday 19 January 2009, David Miller wrote:
> > Maybe, but that's after all part of why we want this kind
> > of patch merged ... after the first gremlines are fixed!
>
> When you submit a change like this that can have
> potential warning and build failure effects across
> the entire tree, the onus is on you to do an
> allmodconfig sanity check build or similar and
> add any necessary fixes to your change.
It's actually Steve's patch ... Steve?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 2.6.29-rc] usbnet: allow type check of devdbg arguments in non-debug build
2009-01-20 5:11 ` David Brownell
@ 2009-01-20 10:56 ` Steve.Glendinning
2009-01-20 17:19 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Steve.Glendinning @ 2009-01-20 10:56 UTC (permalink / raw)
To: David Brownell; +Cc: David Miller, ian.saturley, jeff, jussi.kivilinna, netdev
David Brownell <david-b@pacbell.net> wrote on 20/01/2009 05:11:48:
> On Monday 19 January 2009, David Miller wrote:
> > > Maybe, but that's after all part of why we want this kind
> > > of patch merged ... after the first gremlines are fixed!
> >
> > When you submit a change like this that can have
> > potential warning and build failure effects across
> > the entire tree, the onus is on you to do an
> > allmodconfig sanity check build or similar and
> > add any necessary fixes to your change.
>
> It's actually Steve's patch ... Steve?
>
Sorry, my bad - I tested compilation of usbnet drivers in
drivers/net/usb but missed this wireless usbnet driver hiding
in drivers/net/wireless. allmodconfig was what i was looking
for, thanks David!
I've fixed this compilation breakage now, updated patchset to
follow.
Steve
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 2.6.29-rc] usbnet: allow type check of devdbg arguments in non-debug build
2009-01-20 10:56 ` Steve.Glendinning
@ 2009-01-20 17:19 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2009-01-20 17:19 UTC (permalink / raw)
To: Steve.Glendinning; +Cc: david-b, ian.saturley, jeff, jussi.kivilinna, netdev
From: Steve.Glendinning@smsc.com
Date: Tue, 20 Jan 2009 10:56:09 +0000
> I've fixed this compilation breakage now, updated patchset to
> follow.
But you added a new warning for the non-DEBUG case during the
intermediate steps between the patches.
Please respin this all into a single patch in order to make the
transition cleanly, for all cases.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-01-20 17:19 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-15 15:47 [PATCH 1/1] usbnet: allow type check of devdbg arguments in non-debug build Steve Glendinning
2008-09-25 2:14 ` Jeff Garzik
2009-01-17 7:19 ` [patch 2.6.29-rc] " David Brownell
2009-01-20 1:12 ` David Miller
2009-01-20 1:57 ` David Miller
2009-01-20 2:04 ` David Brownell
2009-01-20 4:08 ` David Miller
2009-01-20 5:11 ` David Brownell
2009-01-20 10:56 ` Steve.Glendinning
2009-01-20 17:19 ` David Miller
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).