Re: [PATCH v3 1/6] mips: add __NR_syscalls along with __NR_Linux_syscalls

Arnd Bergmann
2018-11-29T14:11:02Z

On Thu, Nov 29, 2018 at 9:44 AM Firoz Khan <firoz.khan@linaro.org> wrote:

> arch/mips/include/uapi/asm/unistd.h | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h
> index f25dd1d..6914be5 100644
> --- a/arch/mips/include/uapi/asm/unistd.h
> +++ b/arch/mips/include/uapi/asm/unistd.h
> @@ -391,11 +391,14 @@
> #define __NR_rseq (__NR_Linux + 367)
> #define __NR_io_pgetevents (__NR_Linux + 368)
>
> +#ifdef __KERNEL__
> +#define __NR_syscalls 368
> +#endif
>
> /*
> * Offset of the last Linux o32 flavoured syscall
> */
> -#define __NR_Linux_syscalls 368
> +#define __NR_Linux_syscalls __NR_syscalls

This seems odd: you define __NR_Linux_syscalls outside of
#ifdef __KERNEL__, but the definition only works
with __NR_syscalls being defined first, which it isn't in
user space.

Since the macros are completely unused as well as unusable
now, how about removing them together with the other
ones removed in patch 2?

Arnd