summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/uaccess.h
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2017-01-30 07:41:55 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2017-02-02 06:35:21 +0100
commitf2ca809059294b27703d709a3c4218197c5f16dc (patch)
tree897d49144e62ec2a01b5f648af629f7f7fe621f6 /arch/powerpc/include/asm/uaccess.h
parentpowerpc/sparse: Constify the address pointer in __get_user_nocheck() (diff)
downloadlinux-f2ca809059294b27703d709a3c4218197c5f16dc.tar.xz
linux-f2ca809059294b27703d709a3c4218197c5f16dc.zip
powerpc/sparse: Constify the address pointer in __get_user_nosleep()
In __get_user_nosleep, we create an intermediate pointer for the user address we're about to fetch. We currently don't tag this pointer as const. Make it const, as we are simply dereferencing it, and it's scope is limited to the __get_user_nosleep macro. Signed-off-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/uaccess.h')
-rw-r--r--arch/powerpc/include/asm/uaccess.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h
index 44ded4193001..0e6add3187bc 100644
--- a/arch/powerpc/include/asm/uaccess.h
+++ b/arch/powerpc/include/asm/uaccess.h
@@ -286,7 +286,7 @@ do { \
({ \
long __gu_err; \
unsigned long __gu_val; \
- __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
+ const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
__chk_user_ptr(ptr); \
__get_user_size(__gu_val, __gu_addr, (size), __gu_err); \
(x) = (__force __typeof__(*(ptr)))__gu_val; \