Commit 998b4a45 authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman

tty: Improve tty_debug() macro

Incorporate suggestions for tty core debug macro improvements
 - printk(KERN_DEBUG) => pr_debug()
 - ##args => ##__VA_ARGS__
 - remove do {} while()
 - output tty_name() first

cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9f25bc51
...@@ -667,10 +667,7 @@ static inline void proc_tty_register_driver(struct tty_driver *d) {} ...@@ -667,10 +667,7 @@ static inline void proc_tty_register_driver(struct tty_driver *d) {}
static inline void proc_tty_unregister_driver(struct tty_driver *d) {} static inline void proc_tty_unregister_driver(struct tty_driver *d) {}
#endif #endif
#define tty_debug(tty, f, args...) \ #define tty_debug(tty, f, ...) \
do { \ pr_debug("%s: %s: " f, tty_name(tty), __func__, ##__VA_ARGS__)
printk(KERN_DEBUG "%s: %s: " f, __func__, \
tty_name(tty), ##args); \
} while (0)
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment