Skip to content

Commit

Permalink
USB: usb.h: reduce syslog clutter [v3]
Browse files Browse the repository at this point in the history
The the err() / info() / warn() macros in usb.h inserted __FILE__ at
the beginning of the message, which expands to the complete pathname
of the source file within the kernel tree, frequently taking up half
of an 80 character screen line before the actual message even begins.
Use the module name instead.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Tilman Schmidt authored and Greg Kroah-Hartman committed Apr 25, 2008
1 parent ff66e3c commit f66396b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions include/linux/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -1701,13 +1701,12 @@ extern void usb_unregister_notify(struct notifier_block *nb);
#define dbg(format, arg...) do {} while (0)
#endif

#define err(format, arg...) printk(KERN_ERR "%s: " format "\n" , \
__FILE__ , ## arg)
#define info(format, arg...) printk(KERN_INFO "%s: " format "\n" , \
__FILE__ , ## arg)
#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n" , \
__FILE__ , ## arg)

#define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \
format "\n" , ## arg)
#define info(format, arg...) printk(KERN_INFO KBUILD_MODNAME ": " \
format "\n" , ## arg)
#define warn(format, arg...) printk(KERN_WARNING KBUILD_MODNAME ": " \
format "\n" , ## arg)

#endif /* __KERNEL__ */

Expand Down

0 comments on commit f66396b

Please sign in to comment.