aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-10-22 10:09:03 -0400
committerBob Liu <lliubbo@gmail.com>2012-12-13 00:50:56 -0500
commitaff06631da3c8349149fe4214091735b35294151 (patch)
treee7e4592aba57e8422347ea52082c9cf449bbe5cd /arch/blackfin/include
parentd95dcaa06ba895ec379d80b35c25ddba3a71943a (diff)
Blackfin: Add missing __user annotations to put_user
typeof() will not inherit the __user annotation so we have to explicitly specify this for '_p'. This fixes the following and quite a few similar warnings from spatch: kernel/sys.c:884:26: warning: incorrect type in initializer (different address spaces) kernel/sys.c:884:26: expected unsigned int *_p kernel/sys.c:884:26: got unsigned int [noderef] [usertype] <asn:1>*ruidp kernel/sys.c:885:26: warning: incorrect type in initializer (different address spaces) kernel/sys.c:885:26: expected unsigned int *_p kernel/sys.c:885:26: got unsigned int [noderef] [usertype] <asn:1>*euidp kernel/sys.c:886:26: warning: incorrect type in initializer (different address spaces) kernel/sys.c:886:26: expected unsigned int *_p kernel/sys.c:886:26: got unsigned int [noderef] [usertype] <asn:1>*suidp Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin/include')
-rw-r--r--arch/blackfin/include/asm/uaccess.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/blackfin/include/asm/uaccess.h b/arch/blackfin/include/asm/uaccess.h
index 3edb4afa3053..90f32c2a65bb 100644
--- a/arch/blackfin/include/asm/uaccess.h
+++ b/arch/blackfin/include/asm/uaccess.h
@@ -89,7 +89,7 @@ struct exception_table_entry {
89 ({ \ 89 ({ \
90 int _err = 0; \ 90 int _err = 0; \
91 typeof(*(p)) _x = (x); \ 91 typeof(*(p)) _x = (x); \
92 typeof(*(p)) *_p = (p); \ 92 typeof(*(p)) __user *_p = (p); \
93 if (!access_ok(VERIFY_WRITE, _p, sizeof(*(_p)))) {\ 93 if (!access_ok(VERIFY_WRITE, _p, sizeof(*(_p)))) {\
94 _err = -EFAULT; \ 94 _err = -EFAULT; \
95 } \ 95 } \
@@ -108,8 +108,8 @@ struct exception_table_entry {
108 long _xl, _xh; \ 108 long _xl, _xh; \
109 _xl = ((long *)&_x)[0]; \ 109 _xl = ((long *)&_x)[0]; \
110 _xh = ((long *)&_x)[1]; \ 110 _xh = ((long *)&_x)[1]; \
111 __put_user_asm(_xl, ((long *)_p)+0, ); \ 111 __put_user_asm(_xl, ((long __user *)_p)+0, ); \
112 __put_user_asm(_xh, ((long *)_p)+1, ); \ 112 __put_user_asm(_xh, ((long __user *)_p)+1, ); \
113 } break; \ 113 } break; \
114 default: \ 114 default: \
115 _err = __put_user_bad(); \ 115 _err = __put_user_bad(); \
@@ -136,7 +136,7 @@ static inline int bad_user_access_length(void)
136 * aliasing issues. 136 * aliasing issues.
137 */ 137 */
138 138
139#define __ptr(x) ((unsigned long *)(x)) 139#define __ptr(x) ((unsigned long __force *)(x))
140 140
141#define __put_user_asm(x,p,bhw) \ 141#define __put_user_asm(x,p,bhw) \
142 __asm__ (#bhw"[%1] = %0;\n\t" \ 142 __asm__ (#bhw"[%1] = %0;\n\t" \