arm64/traps: Avoid unnecessary kernel/user pointer conversion
authorAmit Daniel Kachhap <amit.kachhap@arm.com>
Fri, 17 Sep 2021 05:58:11 +0000 (11:28 +0530)
committerWill Deacon <will@kernel.org>
Wed, 29 Sep 2021 15:44:20 +0000 (16:44 +0100)
commitf5b650f887f30dda15a8d524249e48a407544126
tree2517a37700d7e3cba760fd3270e4161bf15cfc77
parent5816b3e6577eaa676ceb00a848f0fd65fe2adc29
arm64/traps: Avoid unnecessary kernel/user pointer conversion

Annotating a pointer from kernel to __user and then back again requires
an extra __force annotation to silent sparse warning. In call_undef_hook()
this unnecessary complexity can be avoided by modifying the intermediate
user pointer to unsigned long.

This way there is no inter-changeable use of user and kernel pointers
and the code is consistent.

Note: This patch adds no functional changes to code.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20210917055811.22341-1-amit.kachhap@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/traps.c