From c91e09b6838f514a9a162a715a75241214258270 Mon Sep 17 00:00:00 2001 From: Mikhail Gruzdev Date: Sat, 6 Aug 2011 10:44:51 +0400 Subject: [PATCH] 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] *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] *from Signed-off-by: Mikhail Gruzdev Signed-off-by: Mike Frysinger --- arch/blackfin/include/asm/uaccess.h | 6 +++--- 1 file 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 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; -- 2.20.1