powerpc/vdso: Remove sys_ni_syscall and sys_call_table prototypes
PATCH 1/1 powerpc/vdso: Remove sys_ni_syscall and sys_call_table prototypes
Prototypes for sys_ni_syscall and sys_call_table are available in header files, so remove the prototypes in c code.
This was noticed when building with -flto, because the prototype for sys_ni_syscall doesn't match the function and we get a compiler error.
---
arch/powerpc/include/asm/syscall.h +0 -3
@@ -17,10 +17,7 @@#include <linux/sched.h> #include <linux/thread_info.h> -/* ftrace syscalls requires exporting the sys_call_table */ -#ifdef CONFIG_FTRACE_SYSCALLS extern const unsigned long sys_call_table[]; -#endif /* CONFIG_FTRACE_SYSCALLS */ static inline int syscall_get_nr (struct task_struct *task,struct pt_regs *regs) {
arch/powerpc/kernel/vdso.c +2 -3
@@ -21,6 +21,7 @@#include <linux/elf.h> #include <linux/security.h> #include <linux/memblock.h> +#include <linux/syscalls.h> #include <asm/pgtable.h> #include <asm/processor.h>
@@ -34,6 +35,7 @@#include <asm/vdso.h> #include <asm/vdso_datapage.h> #include <asm/setup.h> +#include <asm/syscall.h> #undef DEBUG
@@ -667,9 +669,6 @@ static __init int vdso_setup(void)static void __init vdso_setup_syscall_map (void ) {unsigned int i; -extern unsigned long *sys_call_table; -extern unsigned long sys_ni_syscall; -for (i =0 ; i < __NR_syscalls; i++) {#ifdef CONFIG_PPC64
Michael Ellerman
reviewerQuoted 5 lines · Anton Blanchard
Prototypes for
sys_ni_syscallandsys_call_tableare available in header files, so remove the prototypes in c code.This was noticed when building with -flto, because the prototype for
sys_ni_syscalldoesn't match the function and we get a compiler error.
Doesn't build for me:
arch/powerpc/kernel/vdso.c:675:27: error: comparison between pointer and integer [-Werror]
if (sys_call_table[i*2] != sys_ni_syscall)
^
etc.
cheers