summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSteve Glendinning <steve.glendinning@smsc.com>2009-01-21 12:35:43 -0800
committerDavid S. Miller <davem@davemloft.net>2009-01-21 12:35:43 -0800
commit0b491eee46012772cbf029450d123e933c2e7940 (patch)
treebb24c555235635dec746f8cce810d85b02cdf491 /include
parent748085fcbedbf7b0f38d95e178265d7b13360b44 (diff)
downloadop-kernel-dev-0b491eee46012772cbf029450d123e933c2e7940.zip
op-kernel-dev-0b491eee46012772cbf029450d123e933c2e7940.tar.gz
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. This patch also removes an #ifdef DEBUG directive from rndis_wlan so it's devdbg statements are always type-checked at compile time. Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/usbnet.h4
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...) \
OpenPOWER on IntegriCloud