diff options
author | Mikhail Gruzdev <michail.gruzdev@gmail.com> | 2011-08-06 02:44:51 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-10-25 19:51:35 -0400 |
commit | c91e09b6838f514a9a162a715a75241214258270 (patch) | |
tree | 2968f33057f7fb03dcaa53af697f2dbc5b1f653e /arch/blackfin | |
parent | f8b4392091e1a699a1402b66d578ab9a05bf7d44 (diff) |
Blackfin: fix sparse warnings in copy_to/from_user
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>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/include/asm/uaccess.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/blackfin/include/asm/uaccess.h b/arch/blackfin/include/asm/uaccess.h index 1c0d190adaef..5cc111502822 100644 --- a/arch/blackfin/include/asm/uaccess.h +++ b/arch/blackfin/include/asm/uaccess.h | |||
@@ -195,17 +195,17 @@ static inline unsigned long __must_check | |||
195 | copy_from_user(void *to, const void __user *from, unsigned long n) | 195 | copy_from_user(void *to, const void __user *from, unsigned long n) |
196 | { | 196 | { |
197 | if (access_ok(VERIFY_READ, from, n)) | 197 | if (access_ok(VERIFY_READ, from, n)) |
198 | memcpy(to, from, n); | 198 | memcpy(to, (const void __force *)from, n); |
199 | else | 199 | else |
200 | return n; | 200 | return n; |
201 | return 0; | 201 | return 0; |
202 | } | 202 | } |
203 | 203 | ||
204 | static inline unsigned long __must_check | 204 | static inline unsigned long __must_check |
205 | copy_to_user(void *to, const void __user *from, unsigned long n) | 205 | copy_to_user(void __user *to, const void *from, unsigned long n) |
206 | { | 206 | { |
207 | if (access_ok(VERIFY_WRITE, to, n)) | 207 | if (access_ok(VERIFY_WRITE, to, n)) |
208 | memcpy(to, from, n); | 208 | memcpy((void __force *)to, from, n); |
209 | else | 209 | else |
210 | return n; | 210 | return n; |
211 | return 0; | 211 | return 0; |