On Fri, Jul 17, 2020 at 06:40:11PM +0200, Christoph Hellwig wrote:
As far as I can tell the sparse annotations in the openrisc headers
are all messed up, and this is caused by that (just as the other one).
Can you guys drop openriscv sparse runs for now?
Or can the openrisc maintainers tries to fix up the sparse annotations
in their uaccess macros?
I will have a look at it. I have this patch on my queue that fixes one issue,
not sure if its fixes "all" issues, I never used sparse until now.
I was planning to send this during the 5.9 merge window, but I can send now if
its urgent.
-Stafford
From 1024e6bf431fab6b7ada5244b570e91e33190257 Mon Sep 17 00:00:00 2001
From: Luc Van Oostenryck <luc.vanoostenryck(a)gmail.com>
Date: Mon, 22 Jun 2020 14:11:24 +0200
Subject: [PATCH] openrisc: fix __user in raw_copy_to_user()'s prototype
raw_copy_to_user()'s prototype seems to be a copy & paste of
raw_copy_from_user() and as such has the __user annotation
in the 'from' argument instead of the 'to'.
So, move the __user annotation in the prototype to the 'to'.
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck(a)gmail.com>
Signed-off-by: Stafford Horne <shorne(a)gmail.com>
---
arch/openrisc/include/asm/uaccess.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/openrisc/include/asm/uaccess.h
b/arch/openrisc/include/asm/uaccess.h
index 17c24f14615f..46e31bb4a9ad 100644
--- a/arch/openrisc/include/asm/uaccess.h
+++ b/arch/openrisc/include/asm/uaccess.h
@@ -241,7 +241,7 @@ raw_copy_from_user(void *to, const void __user *from,
unsigned long size)
return __copy_tofrom_user(to, (__force const void *)from, size);
}
static inline unsigned long
-raw_copy_to_user(void *to, const void __user *from, unsigned long size)
+raw_copy_to_user(void __user *to, const void *from, unsigned long size)
{
return __copy_tofrom_user((__force void *)to, from, size);
}
--
2.26.2