n_tty: check printk arguments for n_tty_trace
authorJiri Slaby <jslaby@suse.cz>
Thu, 30 Jan 2020 11:58:43 +0000 (12:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Feb 2020 20:34:43 +0000 (12:34 -0800)
When N_TTY_TRACE is undefined (the default), define n_tty_trace to use
no_printk. That way, arguments are still checked during compilation.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200130115843.7452-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c

index f9c584244f72c1b856ce71bebd673b81ee00cf76..640fdd1e4c1d942556b2db40843a84d74f4f35d9 100644 (file)
@@ -84,7 +84,7 @@
 #ifdef N_TTY_TRACE
 # define n_tty_trace(f, args...)       trace_printk(f, ##args)
 #else
-# define n_tty_trace(f, args...)
+# define n_tty_trace(f, args...)       no_printk(f, ##args)
 #endif
 
 struct n_tty_data {