Skip to content

Commit

Permalink
Blackfin: Annotate clear_user 'to' parameter with __user
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Bob Liu committed Dec 13, 2012
1 parent aff0663 commit 10dc42b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/blackfin/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ static inline long __must_check strlen_user(const char *src)
*/

static inline unsigned long __must_check
__clear_user(void *to, unsigned long n)
__clear_user(void __user *to, unsigned long n)
{
if (!access_ok(VERIFY_WRITE, to, n))
return n;
memset(to, 0, n);
memset((void __force *)to, 0, n);
return 0;
}

Expand Down

0 comments on commit 10dc42b

Please sign in to comment.