From: Masahiro Yamada Date: Mon, 1 Mar 2021 13:15:26 +0000 (+0900) Subject: x86/syscalls: Fix -Wmissing-prototypes warnings from COND_SYSCALL() X-Git-Tag: accepted/tizen/unified/20230118.172025~7432^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7dfe553affd0d003c7535b7ba60d09193471ea9d;p=platform%2Fkernel%2Flinux-rpi.git x86/syscalls: Fix -Wmissing-prototypes warnings from COND_SYSCALL() Building kernel/sys_ni.c with W=1 emits tons of -Wmissing-prototypes warnings: $ make W=1 kernel/sys_ni.o [ snip ] CC kernel/sys_ni.o ./arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__ia32_sys_io_setup' [-Wmissing-prototypes] ... The problem is in __COND_SYSCALL(), the __SYS_STUB0() and __SYS_STUBx() macros defined a few lines above already have forward declarations. Let's do likewise for __COND_SYSCALL() to fix the warnings. Signed-off-by: Masahiro Yamada Signed-off-by: Ingo Molnar Tested-by: Mickaël Salaün Link: https://lore.kernel.org/r/20210301131533.64671-2-masahiroy@kernel.org --- diff --git a/arch/x86/include/asm/syscall_wrapper.h b/arch/x86/include/asm/syscall_wrapper.h index a84333a..80c08c7 100644 --- a/arch/x86/include/asm/syscall_wrapper.h +++ b/arch/x86/include/asm/syscall_wrapper.h @@ -80,6 +80,7 @@ extern long __ia32_sys_ni_syscall(const struct pt_regs *regs); } #define __COND_SYSCALL(abi, name) \ + __weak long __##abi##_##name(const struct pt_regs *__unused); \ __weak long __##abi##_##name(const struct pt_regs *__unused) \ { \ return sys_ni_syscall(); \