From bc2eb9321ec0d17d41596933617b2522c9aa5e0b Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 29 Jan 2020 20:38:36 +0000 Subject: linux: Remove INTERNAL_SYSCALL_DECL With all Linux ABIs using the expected Linux kABI to indicate syscalls errors, the INTERNAL_SYSCALL_DECL is an empty declaration on all ports. This patch removes the 'err' argument on INTERNAL_SYSCALL* macro and remove the INTERNAL_SYSCALL_DECL usage. Checked with a build against all affected ABIs. --- sysdeps/unix/sysv/linux/riscv/syscall.c | 5 ++--- sysdeps/unix/sysv/linux/riscv/sysdep.h | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 15 deletions(-) (limited to 'sysdeps/unix/sysv/linux/riscv') diff --git a/sysdeps/unix/sysv/linux/riscv/syscall.c b/sysdeps/unix/sysv/linux/riscv/syscall.c index 9d0e4175dd..a99375c054 100644 --- a/sysdeps/unix/sysv/linux/riscv/syscall.c +++ b/sysdeps/unix/sysv/linux/riscv/syscall.c @@ -23,12 +23,11 @@ syscall (long int syscall_number, long int arg1, long int arg2, long int arg3, long int arg4, long int arg5, long int arg6, long int arg7) { long int ret; - INTERNAL_SYSCALL_DECL (err); - ret = INTERNAL_SYSCALL_NCS (syscall_number, err, 7, arg1, arg2, arg3, arg4, + ret = INTERNAL_SYSCALL_NCS (syscall_number, 7, arg1, arg2, arg3, arg4, arg5, arg6, arg7); - if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + if (INTERNAL_SYSCALL_ERROR_P (ret)) return __syscall_error (ret); return ret; diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h index e46160f3f6..83e4adf6a2 100644 --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h @@ -130,13 +130,13 @@ # define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday" # define HAVE_GETCPU_VSYSCALL "__vdso_getcpu" -# define INTERNAL_SYSCALL(name, err, nr, args...) \ - internal_syscall##nr (SYS_ify (name), err, args) +# define INTERNAL_SYSCALL(name, nr, args...) \ + internal_syscall##nr (SYS_ify (name), args) -# define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ - internal_syscall##nr (number, err, args) +# define INTERNAL_SYSCALL_NCS(number, nr, args...) \ + internal_syscall##nr (number, args) -# define internal_syscall0(number, err, dummy...) \ +# define internal_syscall0(number, dummy...) \ ({ \ long int _sys_result; \ \ @@ -153,7 +153,7 @@ _sys_result; \ }) -# define internal_syscall1(number, err, arg0) \ +# define internal_syscall1(number, arg0) \ ({ \ long int _sys_result; \ long int _arg0 = (long int) (arg0); \ @@ -171,7 +171,7 @@ _sys_result; \ }) -# define internal_syscall2(number, err, arg0, arg1) \ +# define internal_syscall2(number, arg0, arg1) \ ({ \ long int _sys_result; \ long int _arg0 = (long int) (arg0); \ @@ -191,7 +191,7 @@ _sys_result; \ }) -# define internal_syscall3(number, err, arg0, arg1, arg2) \ +# define internal_syscall3(number, arg0, arg1, arg2) \ ({ \ long int _sys_result; \ long int _arg0 = (long int) (arg0); \ @@ -213,7 +213,7 @@ _sys_result; \ }) -# define internal_syscall4(number, err, arg0, arg1, arg2, arg3) \ +# define internal_syscall4(number, arg0, arg1, arg2, arg3) \ ({ \ long int _sys_result; \ long int _arg0 = (long int) (arg0); \ @@ -237,7 +237,7 @@ _sys_result; \ }) -# define internal_syscall5(number, err, arg0, arg1, arg2, arg3, arg4) \ +# define internal_syscall5(number, arg0, arg1, arg2, arg3, arg4) \ ({ \ long int _sys_result; \ long int _arg0 = (long int) (arg0); \ @@ -263,7 +263,7 @@ _sys_result; \ }) -# define internal_syscall6(number, err, arg0, arg1, arg2, arg3, arg4, arg5) \ +# define internal_syscall6(number, arg0, arg1, arg2, arg3, arg4, arg5) \ ({ \ long int _sys_result; \ long int _arg0 = (long int) (arg0); \ @@ -292,7 +292,7 @@ _sys_result; \ }) -# define internal_syscall7(number, err, arg0, arg1, arg2, arg3, arg4, arg5, arg6) \ +# define internal_syscall7(number, arg0, arg1, arg2, arg3, arg4, arg5, arg6) \ ({ \ long int _sys_result; \ long int _arg0 = (long int) (arg0); \ -- cgit 1.4.1