Commit c22f9075 authored by Max Filippov's avatar Max Filippov

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: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent 3ac4a615
......@@ -204,7 +204,7 @@ do { \
retval = -EFAULT; \
(x) = 0; \
} else { \
(x) = *(__force __typeof__((ptr)))&__x; \
(x) = *(__force __typeof__(*(ptr)) *)&__x; \
} \
break; \
} \
......
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