Commit dc40c429 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

m68k: sun3: Annotate prom_printf() with __printf()

When building with W=1:

    arch/m68k/sun3/prom/printf.c: In function ‘prom_printf’:
    arch/m68k/sun3/prom/printf.c:35:9: warning: function ‘prom_printf’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
       35 |         vsprintf(ppbuf, fmt, args);
	  |         ^~~~~~~~

Fix this by annotating prom_printf() with __printf(1, 2).
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/61017c012617e6f633ac9f9a3c2659ae38e1f2fb.1694613528.git.geert@linux-m68k.org
parent 66ed28ea
......@@ -9,6 +9,8 @@
#ifndef __SPARC_OPLIB_H
#define __SPARC_OPLIB_H
#include <linux/compiler.h>
#include <asm/openprom.h>
/* The master romvec pointer... */
......@@ -149,7 +151,7 @@ extern char prom_getchar(void);
extern void prom_putchar(char character);
/* Prom's internal printf routine, don't use in kernel/boot code. */
void prom_printf(char *fmt, ...);
__printf(1, 2) void prom_printf(char *fmt, ...);
/* Query for input device type */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment