Commit c396fe7f authored by Will Deacon's avatar Will Deacon

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: default avatarLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 5771a8c0
...@@ -69,7 +69,7 @@ static inline void set_fs(mm_segment_t fs) ...@@ -69,7 +69,7 @@ static inline void set_fs(mm_segment_t fs)
*/ */
#define __range_ok(addr, size) \ #define __range_ok(addr, size) \
({ \ ({ \
unsigned long __addr = (unsigned long __force)(addr); \ unsigned long __addr = (unsigned long)(addr); \
unsigned long flag, roksum; \ unsigned long flag, roksum; \
__chk_user_ptr(addr); \ __chk_user_ptr(addr); \
asm("adds %1, %1, %3; ccmp %1, %4, #2, cc; cset %0, ls" \ asm("adds %1, %1, %3; ccmp %1, %4, #2, cc; cset %0, ls" \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment