arm64: uaccess: Remove redundant __force from addr cast in __range_ok
authorWill Deacon <will.deacon@arm.com>
Mon, 3 Jul 2017 13:37:46 +0000 (14:37 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 20 Jul 2017 09:20:48 +0000 (10:20 +0100)
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>
arch/arm64/include/asm/uaccess.h

index 8f0a1de11e4a6cd11fc7af0bd6db587538fab7be..fab46a0ea223d74781464a2a3904a4d2eac0a423 100644 (file)
@@ -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"         \