x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long
authorAndy Lutomirski <luto@kernel.org>
Wed, 3 Jul 2019 20:34:05 +0000 (13:34 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 22 Jul 2019 08:31:22 +0000 (10:31 +0200)
commit45e29d119e9923ff14dfb840e3482bef1667bbfb
treec6cffb14d2047427f379d100a48f86ae71f8763d
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b
x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long

Currently, it's an int.  This is bizarre.  Fortunately, the code using it
still works: ~__X32_SYSCALL_BIT is also int, so, if nr is unsigned long,
then C kindly sign-extends the ~__X32_SYSCALL_BIT part, and it actually
results in the desired value.

This is far more subtle than it deserves to be.  Syscall numbers are, for
all practical purposes, unsigned long, so make __X32_SYSCALL_BIT be
unsigned long.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/99b0d83ad891c67105470a1a6b63243fd63a5061.1562185330.git.luto@kernel.org
arch/x86/include/uapi/asm/unistd.h