From: John Ogness Date: Mon, 27 Sep 2021 14:22:03 +0000 (+0206) Subject: printk: use gnu_printf format attribute for printk_sprint() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=264a750472ea5bbc3abca23c16ee2a7501119a8d;p=linux.git printk: use gnu_printf format attribute for printk_sprint() Fix the following W=1 kernel build warning: kernel/printk/printk.c: In function 'printk_sprint': kernel/printk/printk.c:1913:9: warning: function 'printk_sprint' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] Reported-by: kernel test robot Signed-off-by: John Ogness Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210927142203.124730-1-john.ogness@linutronix.de --- diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 4d6dea5d7c1c7..d617987f57854 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2066,6 +2066,7 @@ u16 printk_parse_prefix(const char *text, int *level, return prefix_len; } +__printf(5, 0) static u16 printk_sprint(char *text, u16 size, int facility, enum printk_info_flags *flags, const char *fmt, va_list args)