[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1232456838-10025-2-git-send-email-steve.glendinning@smsc.com>
Date: Tue, 20 Jan 2009 13:07:18 +0000
From: Steve Glendinning <steve.glendinning@...c.com>
To: netdev@...r.kernel.org
Cc: David Miller <davem@...emloft.net>,
David Brownell <david-b@...bell.net>,
Steve Glendinning <steve.glendinning@...c.com>
Subject: [PATCH 2/2] 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@...c.com>
Signed-off-by: David Brownell <dbrownell@...rs.sourceforge.net>
---
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.6.0.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists