Skip to content

Commit c22f907

Browse files
committed
xtensa: fix type conversion in __get_user_size
8-byte access in __get_user_size converts pointer to temporary variable to the type of original user pointer and then dereferences it, resulting in the following sparse warning: sparse: warning: dereference of noderef expression Instead dereference the original user pointer under the __typeof__ and add indirection outside. Signed-off-by: Max Filippov <[email protected]>
1 parent 3ac4a61 commit c22f907

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/xtensa/include/asm/uaccess.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ do { \
204204
retval = -EFAULT; \
205205
(x) = 0; \
206206
} else { \
207-
(x) = *(__force __typeof__((ptr)))&__x; \
207+
(x) = *(__force __typeof__(*(ptr)) *)&__x; \
208208
} \
209209
break; \
210210
} \

0 commit comments

Comments
 (0)