From 8d949ae25bd0c18038c51e291cb4053dff5f0297 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 2 Mar 2021 00:36:54 +0900 Subject: xtensa: stop filling syscall array with sys_ni_syscall arch/xtensa/kernel/syscalls/syscalltbl.sh fills missing syscall numbers with sys_ni_syscall. So, the generated arch/xtensa/include/generated/asm/syscall_table.h has no hole. Hence, the line: [0 ... __NR_syscalls - 1] = (syscall_t)&sys_ni_syscall, is meaningless. The number of generated __SYSCALL() macros is the same as __NR_syscalls (this is 442 as of v5.11). Hence, the array size, [__NR_syscalls] is unneeded. The designated initializer, '[nr] =', is also unneeded. This file does not need to know __NR_syscalls. Drop the unneeded include directive. Signed-off-by: Masahiro Yamada Message-Id: <20210301153656.363839-1-masahiroy@kernel.org> Signed-off-by: Max Filippov --- arch/xtensa/kernel/syscall.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'arch/xtensa') diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c index 2c415fce6801..26fa09ce4d17 100644 --- a/arch/xtensa/kernel/syscall.c +++ b/arch/xtensa/kernel/syscall.c @@ -17,7 +17,6 @@ */ #include #include -#include #include #include #include @@ -28,10 +27,8 @@ #include #include -syscall_t sys_call_table[__NR_syscalls] /* FIXME __cacheline_aligned */= { - [0 ... __NR_syscalls - 1] = (syscall_t)&sys_ni_syscall, - -#define __SYSCALL(nr, entry, nargs)[nr] = (syscall_t)entry, +syscall_t sys_call_table[] /* FIXME __cacheline_aligned */= { +#define __SYSCALL(nr, entry, nargs) (syscall_t)entry, #include #undef __SYSCALL }; -- cgit v1.2.3