aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-10-22 10:09:04 -0400
committerBob Liu <lliubbo@gmail.com>2012-12-13 00:50:57 -0500
commit10dc42b5b262f3bb2e4532759e4e1147ebf6a22f (patch)
treed2695d50b1aeb12e4cd08de708197630701e1b26 /arch/blackfin
parentaff06631da3c8349149fe4214091735b35294151 (diff)
Blackfin: Annotate clear_user 'to' parameter with __user
The 'to' parameter of clear_user is supposed to take a userspace pointer, so annotate it with __user. This fixes the following and similar sparse warnings: fs/binfmt_elf_fdpic.c:714:35: warning: incorrect type in argument 1 (different address spaces) fs/binfmt_elf_fdpic.c:714:35: expected void [noderef] <asn:1>*to fs/binfmt_elf_fdpic.c:714:35: got void *<noident> fs/binfmt_elf_fdpic.c:1119:29: warning: incorrect type in argument 1 (different address spaces) fs/binfmt_elf_fdpic.c:1119:29: expected void *to fs/binfmt_elf_fdpic.c:1119:29: got void [noderef] <asn:1>*<noident> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/include/asm/uaccess.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/blackfin/include/asm/uaccess.h b/arch/blackfin/include/asm/uaccess.h
index 90f32c2a65bb..ded2d05847fa 100644
--- a/arch/blackfin/include/asm/uaccess.h
+++ b/arch/blackfin/include/asm/uaccess.h
@@ -256,11 +256,11 @@ static inline long __must_check strlen_user(const char *src)
256 */ 256 */
257 257
258static inline unsigned long __must_check 258static inline unsigned long __must_check
259__clear_user(void *to, unsigned long n) 259__clear_user(void __user *to, unsigned long n)
260{ 260{
261 if (!access_ok(VERIFY_WRITE, to, n)) 261 if (!access_ok(VERIFY_WRITE, to, n))
262 return n; 262 return n;
263 memset(to, 0, n); 263 memset((void __force *)to, 0, n);
264 return 0; 264 return 0;
265} 265}
266 266