diff options
author | John Ogness <john.ogness@linutronix.de> | 2021-09-27 16:28:03 +0206 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2021-10-04 10:35:13 +0200 |
commit | 264a750472ea5bbc3abca23c16ee2a7501119a8d (patch) | |
tree | ab725e6bf7b130f3d70b9ab3a6ceed3caf192594 /kernel/printk | |
parent | 5aa7eea9316ceb4b57175ce04b39e498105b7e92 (diff) | |
download | lwn-264a750472ea5bbc3abca23c16ee2a7501119a8d.tar.gz lwn-264a750472ea5bbc3abca23c16ee2a7501119a8d.zip |
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 <lkp@intel.com>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210927142203.124730-1-john.ogness@linutronix.de
Diffstat (limited to 'kernel/printk')
-rw-r--r-- | kernel/printk/printk.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) |