Skip to contentSkip to conversation

openrisc: fix __user in raw_copy_to_user()'s prototype

PATCH In review Luc Van Oostenryck 2 participants 2 messages Jun 22, 2020 – Jun 25, 2020 Openrisc architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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'.

---
 arch/openrisc/include/asm/uaccess.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/openrisc/include/asm/uaccess.h +1 -1
index 17c24f14615f..46e31bb4a9ad 100644
@@ -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);
 }
Signature · 1 line
2.27.0
maintainer
#1 lore raw
Quoted 5 lines · Luc Van Oostenryck

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'.

Thank you,

I have queued this for 5.9. If you think its more urgent let me know.

-Stafford

Quoted 19 lines
---
 arch/openrisc/include/asm/uaccess.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/openrisc/include/asm/uaccess.h +1 -1
index 17c24f14615f..46e31bb4a9ad 100644
@@ -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);
 }