aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/uaccess.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2017-07-03 14:37:46 +0100
committerWill Deacon <will.deacon@arm.com>2017-07-20 10:20:48 +0100
commitc396fe7f0c2efdf6c02d723f7bd492c58725c822 (patch)
tree5f33351fcb1d4b16f1d594c58b593711995a7b47 /arch/arm64/include/asm/uaccess.h
parentLinux v4.13-rc1 (diff)
downloadlinux-dev-c396fe7f0c2efdf6c02d723f7bd492c58725c822.tar.xz
linux-dev-c396fe7f0c2efdf6c02d723f7bd492c58725c822.zip
arm64: uaccess: Remove redundant __force from addr cast in __range_ok
Casting a pointer to an integral type doesn't require a __force attribute, because you'll need to cast back to a pointer in order to dereference the thing anyway. This patch removes the redundant __force cast from __range_ok. Reported-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to '')
-rw-r--r--arch/arm64/include/asm/uaccess.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h
index 8f0a1de11e4a..fab46a0ea223 100644
--- a/arch/arm64/include/asm/uaccess.h
+++ b/arch/arm64/include/asm/uaccess.h
@@ -69,7 +69,7 @@ static inline void set_fs(mm_segment_t fs)
*/
#define __range_ok(addr, size) \
({ \
- unsigned long __addr = (unsigned long __force)(addr); \
+ unsigned long __addr = (unsigned long)(addr); \
unsigned long flag, roksum; \
__chk_user_ptr(addr); \
asm("adds %1, %1, %3; ccmp %1, %4, #2, cc; cset %0, ls" \