* [PATCH printk v1] printk: use gnu_printf format attribute for printk_sprint()
@ 2021-09-27 14:22 John Ogness
2021-10-04 9:24 ` Petr Mladek
0 siblings, 1 reply; 2+ messages in thread
From: John Ogness @ 2021-09-27 14:22 UTC (permalink / raw)
To: Petr Mladek
Cc: Sergey Senozhatsky, Steven Rostedt, linux-kernel, kernel test robot
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 <lkp@intel.com>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
kernel/printk/printk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 4d6dea5d7c1c..d617987f5785 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)
base-commit: 9980c4251f8ddfcf0617ed5724e4df5bd1f69c85
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH printk v1] printk: use gnu_printf format attribute for printk_sprint()
2021-09-27 14:22 [PATCH printk v1] printk: use gnu_printf format attribute for printk_sprint() John Ogness
@ 2021-10-04 9:24 ` Petr Mladek
0 siblings, 0 replies; 2+ messages in thread
From: Petr Mladek @ 2021-10-04 9:24 UTC (permalink / raw)
To: John Ogness
Cc: Sergey Senozhatsky, Steven Rostedt, linux-kernel, kernel test robot
On Mon 2021-09-27 16:28:03, John Ogness wrote:
> 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 <lkp@intel.com>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>
The patch has been committed into printk/linux.git, branch for-5.16.
Best Regards,
Petr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-04 9:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 14:22 [PATCH printk v1] printk: use gnu_printf format attribute for printk_sprint() John Ogness
2021-10-04 9:24 ` Petr Mladek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®