summaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2020-05-22 13:20:05 -0700
committerMax Filippov <jcmvbkbc@gmail.com>2020-05-22 14:33:52 -0700
commitc22f9075044057f130f6b73a0638a2eb78f459ad (patch)
tree7eb73d4b8efbbfb5cd70de36e96dc23407c6a6fe /arch/xtensa
parent3ac4a615bdb10ee7df8818ff107f974322e4c190 (diff)
downloadlinux-c22f9075044057f130f6b73a0638a2eb78f459ad.tar.bz2
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 <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/include/asm/uaccess.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/uaccess.h b/arch/xtensa/include/asm/uaccess.h
index 754a7c96b9da..445bb4cf3c28 100644
--- a/arch/xtensa/include/asm/uaccess.h
+++ b/arch/xtensa/include/asm/uaccess.h
@@ -204,7 +204,7 @@ do { \
retval = -EFAULT; \
(x) = 0; \
} else { \
- (x) = *(__force __typeof__((ptr)))&__x; \
+ (x) = *(__force __typeof__(*(ptr)) *)&__x; \
} \
break; \
} \