Skip to content

Commit

Permalink
Blackfin: fix sparse warnings in copy_to/from_user
Browse files Browse the repository at this point in the history
 Fix argument types for copy_to_user.
 Fix following sparse warnings:
 arch/blackfin/include/asm/uaccess.h:198:14: warning: incorrect type
in argument 2 (different address spaces)
 arch/blackfin/include/asm/uaccess.h:198:14:    expected void const *s
 arch/blackfin/include/asm/uaccess.h:198:14:    got void const
[noderef] <asn:1>*from
 arch/blackfin/include/asm/uaccess.h:208:14: warning: incorrect type
in argument 2 (different address spaces)
 arch/blackfin/include/asm/uaccess.h:208:14:    expected void const *s
 arch/blackfin/include/asm/uaccess.h:208:14:    got void const
[noderef] <asn:1>*from

Signed-off-by: Mikhail Gruzdev <michail.gruzdev@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  • Loading branch information
Mikhail Gruzdev authored and Mike Frysinger committed Oct 25, 2011
1 parent f8b4392 commit c91e09b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/blackfin/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,17 @@ static inline unsigned long __must_check
copy_from_user(void *to, const void __user *from, unsigned long n)
{
if (access_ok(VERIFY_READ, from, n))
memcpy(to, from, n);
memcpy(to, (const void __force *)from, n);
else
return n;
return 0;
}

static inline unsigned long __must_check
copy_to_user(void *to, const void __user *from, unsigned long n)
copy_to_user(void __user *to, const void *from, unsigned long n)
{
if (access_ok(VERIFY_WRITE, to, n))
memcpy(to, from, n);
memcpy((void __force *)to, from, n);
else
return n;
return 0;
Expand Down

0 comments on commit c91e09b

Please sign in to comment.