netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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).