diff options
author | Joe Perches <joe@perches.com> | 2010-02-05 18:09:49 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 14:54:59 -0800 |
commit | efcbd3df079a6f8a8a2d5207c4e8429e02356c79 (patch) | |
tree | 6910757b12b230add2afd3b5347818ed2343b991 /include/linux/usb.h | |
parent | f45ba776da4fe6c9a9eddd42b0fd5d1f15c260f3 (diff) | |
download | op-kernel-dev-efcbd3df079a6f8a8a2d5207c4e8429e02356c79.zip op-kernel-dev-efcbd3df079a6f8a8a2d5207c4e8429e02356c79.tar.gz |
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.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index ad50fc8..3492abf 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1566,14 +1566,18 @@ extern void usb_register_notify(struct notifier_block *nb); extern void usb_unregister_notify(struct notifier_block *nb); #ifdef DEBUG -#define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , \ - __FILE__ , ## arg) +#define dbg(format, arg...) \ + printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg) #else -#define dbg(format, arg...) do {} while (0) +#define dbg(format, arg...) \ +do { \ + if (0) \ + printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \ +} while (0) #endif -#define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \ - format "\n" , ## arg) +#define err(format, arg...) \ + printk(KERN_ERR KBUILD_MODNAME ": " format "\n", ##arg) /* debugfs stuff */ extern struct dentry *usb_debug_root; |