mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 16:44:27 +08:00
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: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9f25bc510e
commit
998b4a4571
@ -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) {}
|
||||
#endif
|
||||
|
||||
#define tty_debug(tty, f, args...) \
|
||||
do { \
|
||||
printk(KERN_DEBUG "%s: %s: " f, __func__, \
|
||||
tty_name(tty), ##args); \
|
||||
} while (0)
|
||||
#define tty_debug(tty, f, ...) \
|
||||
pr_debug("%s: %s: " f, tty_name(tty), __func__, ##__VA_ARGS__)
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user