x86/uaccess: Add missing __force to casts in __access_ok() and valid_user_address()
authorThomas Gleixner <tglx@linutronix.de>
Mon, 4 Mar 2024 10:12:25 +0000 (11:12 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 4 Mar 2024 11:09:12 +0000 (12:09 +0100)
commitae6b0195f5c503f22673a4acf21111822305c1e0
tree0a52c3393062b0d49d9f6113a16d7fc08b508f54
parent71eb4893cfaf37f8884515c8f71717044b97bf44
x86/uaccess: Add missing __force to casts in __access_ok() and valid_user_address()

Sparse complains about losing the __user address space due to the cast to
long:

  uaccess_64.h:88:24: sparse: warning: cast removes address space '__user' of expression

Annotate it with __force to tell sparse that this is intentional.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20240304005104.677606054@linutronix.de
arch/x86/include/asm/uaccess_64.h