aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-02-05 21:09:49 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:54:59 -0500
commitefcbd3df079a6f8a8a2d5207c4e8429e02356c79 (patch)
tree6910757b12b230add2afd3b5347818ed2343b991 /include/linux/usb.h
parentf45ba776da4fe6c9a9eddd42b0fd5d1f15c260f3 (diff)
USB: Extend and neaten dbg macros
Add format/argument validation for #ifndef DEBUG dbg macro Neaten dbg macro definitions Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index ad50fc8a7ad3..3492abf82e75 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -1566,14 +1566,18 @@ extern void usb_register_notify(struct notifier_block *nb);
1566extern void usb_unregister_notify(struct notifier_block *nb); 1566extern void usb_unregister_notify(struct notifier_block *nb);
1567 1567
1568#ifdef DEBUG 1568#ifdef DEBUG
1569#define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , \ 1569#define dbg(format, arg...) \
1570 __FILE__ , ## arg) 1570 printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg)
1571#else 1571#else
1572#define dbg(format, arg...) do {} while (0) 1572#define dbg(format, arg...) \
1573do { \
1574 if (0) \
1575 printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \
1576} while (0)
1573#endif 1577#endif
1574 1578
1575#define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \ 1579#define err(format, arg...) \
1576 format "\n" , ## arg) 1580 printk(KERN_ERR KBUILD_MODNAME ": " format "\n", ##arg)
1577 1581
1578/* debugfs stuff */ 1582/* debugfs stuff */
1579extern struct dentry *usb_debug_root; 1583extern struct dentry *usb_debug_root;