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 <masahiroy@kernel.org>
Message-Id: <20210301153656.363839-1-masahiroy@kernel.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
Masahiro Yamada 2021-03-02 00:36:54 +09:00 коммит произвёл Max Filippov
Родитель 7b6657843c
Коммит 8d949ae25b
1 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -17,7 +17,6 @@
*/
#include <linux/uaccess.h>
#include <asm/syscall.h>
#include <asm/unistd.h>
#include <linux/linkage.h>
#include <linux/stringify.h>
#include <linux/errno.h>
@ -28,10 +27,8 @@
#include <linux/sched/mm.h>
#include <linux/shm.h>
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 <asm/syscall_table.h>
#undef __SYSCALL
};