diff options
author | Steve Glendinning <steve.glendinning@smsc.com> | 2009-01-21 15:35:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 15:35:43 -0500 |
commit | 0b491eee46012772cbf029450d123e933c2e7940 (patch) | |
tree | bb24c555235635dec746f8cce810d85b02cdf491 | |
parent | 748085fcbedbf7b0f38d95e178265d7b13360b44 (diff) |
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>
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 2 | ||||
-rw-r--r-- | include/linux/usb/usbnet.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 607ce9f61b54..ed93ac41297f 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -1649,9 +1649,7 @@ static char *rndis_translate_scan(struct net_device *dev, | |||
1649 | char *end_buf, | 1649 | char *end_buf, |
1650 | struct ndis_80211_bssid_ex *bssid) | 1650 | struct ndis_80211_bssid_ex *bssid) |
1651 | { | 1651 | { |
1652 | #ifdef DEBUG | ||
1653 | struct usbnet *usbdev = netdev_priv(dev); | 1652 | struct usbnet *usbdev = netdev_priv(dev); |
1654 | #endif | ||
1655 | u8 *ie; | 1653 | u8 *ie; |
1656 | char *current_val; | 1654 | char *current_val; |
1657 | int bssid_len, ie_len, i; | 1655 | int bssid_len, ie_len, i; |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index ba09fe88adda..7d3822243074 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); | |||
197 | #define devdbg(usbnet, fmt, arg...) \ | 197 | #define devdbg(usbnet, fmt, arg...) \ |
198 | printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg) | 198 | printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg) |
199 | #else | 199 | #else |
200 | #define devdbg(usbnet, fmt, arg...) do {} while(0) | 200 | #define devdbg(usbnet, fmt, arg...) \ |
201 | ({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \ | ||
202 | ## arg); 0; }) | ||
201 | #endif | 203 | #endif |
202 | 204 | ||
203 | #define deverr(usbnet, fmt, arg...) \ | 205 | #define deverr(usbnet, fmt, arg...) \ |