printk: add __printf attributes to internal functions

When compiling with -Wsuggest-attribute=format, gcc complains that some
functions in kernel/printk/printk_safe.c transmit their argument to
printf-like functions without having a printf attribute. Silence these
warnings by adding relevant __printf attributes.

Cc: Steven Rostedt <>
Signed-off-by: Nicolas Iooss <>
Reviewed-by: Sergey Senozhatsky <>
Signed-off-by: Petr Mladek <>
1 file changed