Skip to content

Commit c396fe7

Browse files
committed
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 <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 5771a8c commit c396fe7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/include/asm/uaccess.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static inline void set_fs(mm_segment_t fs)
6969
*/
7070
#define __range_ok(addr, size) \
7171
({ \
72-
unsigned long __addr = (unsigned long __force)(addr); \
72+
unsigned long __addr = (unsigned long)(addr); \
7373
unsigned long flag, roksum; \
7474
__chk_user_ptr(addr); \
7575
asm("adds %1, %1, %3; ccmp %1, %4, #2, cc; cset %0, ls" \

0 commit comments

Comments
 (0)