From dc40c4297760be1b0be1a4a1e6bc74f269f1ab8b Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 13 Sep 2023 16:08:35 +0200 Subject: m68k: sun3: Annotate prom_printf() with __printf() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/61017c012617e6f633ac9f9a3c2659ae38e1f2fb.1694613528.git.geert@linux-m68k.org --- arch/m68k/include/asm/oplib.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/m68k') diff --git a/arch/m68k/include/asm/oplib.h b/arch/m68k/include/asm/oplib.h index 48cb4fd09f8d..6d5ea67c65d0 100644 --- a/arch/m68k/include/asm/oplib.h +++ b/arch/m68k/include/asm/oplib.h @@ -9,6 +9,8 @@ #ifndef __SPARC_OPLIB_H #define __SPARC_OPLIB_H +#include + #include /* 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 */ -- cgit v1.2.3