Skip to content

Commit 8d949ae

Browse files
masahir0yjcmvbkbc
authored andcommitted
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 <asm/unistd.h> include directive. Signed-off-by: Masahiro Yamada <[email protected]> Message-Id: <[email protected]> Signed-off-by: Max Filippov <[email protected]>
1 parent 7b66578 commit 8d949ae

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

arch/xtensa/kernel/syscall.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*/
1818
#include <linux/uaccess.h>
1919
#include <asm/syscall.h>
20-
#include <asm/unistd.h>
2120
#include <linux/linkage.h>
2221
#include <linux/stringify.h>
2322
#include <linux/errno.h>
@@ -28,10 +27,8 @@
2827
#include <linux/sched/mm.h>
2928
#include <linux/shm.h>
3029

31-
syscall_t sys_call_table[__NR_syscalls] /* FIXME __cacheline_aligned */= {
32-
[0 ... __NR_syscalls - 1] = (syscall_t)&sys_ni_syscall,
33-
34-
#define __SYSCALL(nr, entry, nargs)[nr] = (syscall_t)entry,
30+
syscall_t sys_call_table[] /* FIXME __cacheline_aligned */= {
31+
#define __SYSCALL(nr, entry, nargs) (syscall_t)entry,
3532
#include <asm/syscall_table.h>
3633
#undef __SYSCALL
3734
};

0 commit comments

Comments
 (0)