diff options
author | Richard Weinberger <richard@nod.at> | 2015-10-25 20:28:14 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-11-06 22:49:10 +0100 |
commit | f10e6d652bc2dad67b5e7b6e6d890c76f739ed77 (patch) | |
tree | 335e7780479d92f77a28c5cc552046074bdc7377 /arch/um | |
parent | 1d80f0cda10118d7505bd0a09a5c1c72f3a5f6c8 (diff) | |
download | linux-f10e6d652bc2dad67b5e7b6e6d890c76f739ed77.tar.bz2 |
um: Get rid of open coded NR_SYSCALLS
We can use __NR_syscall_max.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/skas/syscall.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c index 64a8fe589d6f..1683b8efdfda 100644 --- a/arch/um/kernel/skas/syscall.c +++ b/arch/um/kernel/skas/syscall.c @@ -10,9 +10,6 @@ #include <sysdep/syscalls.h> #include <os.h> -extern int syscall_table_size; -#define NR_SYSCALLS (syscall_table_size / sizeof(void *)) - void handle_syscall(struct uml_pt_regs *r) { struct pt_regs *regs = container_of(r, struct pt_regs, regs); @@ -26,9 +23,10 @@ void handle_syscall(struct uml_pt_regs *r) syscall = get_syscall(r); - if ((syscall >= NR_SYSCALLS) || (syscall < 0)) + if ((syscall > __NR_syscall_max) || syscall < 0) result = -ENOSYS; - else result = EXECUTE_SYSCALL(syscall, regs); + else + result = EXECUTE_SYSCALL(syscall, regs); out: PT_REGS_SET_SYSCALL_RETURN(regs, result); |