linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] openrisc: fix __user in raw_copy_to_user()'s prototype
@ 2020-06-22 12:11 Luc Van Oostenryck
  2020-06-25 21:11 ` Stafford Horne
  0 siblings, 1 reply; 2+ messages in thread
From: Luc Van Oostenryck @ 2020-06-22 12:11 UTC (permalink / raw)
  To: Jonas Bonn, Stefan Kristiansson, Stafford Horne
  Cc: openrisc, linux-kernel, Luc Van Oostenryck, kernel test robot

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@intel.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@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.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] openrisc: fix __user in raw_copy_to_user()'s prototype
  2020-06-22 12:11 [PATCH] openrisc: fix __user in raw_copy_to_user()'s prototype Luc Van Oostenryck
@ 2020-06-25 21:11 ` Stafford Horne
  0 siblings, 0 replies; 2+ messages in thread
From: Stafford Horne @ 2020-06-25 21:11 UTC (permalink / raw)
  To: Luc Van Oostenryck
  Cc: Jonas Bonn, Stefan Kristiansson, openrisc, linux-kernel,
	kernel test robot

On Mon, Jun 22, 2020 at 02:11:24PM +0200, Luc Van Oostenryck wrote:
> 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

> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@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);
>  }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-25 21:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22 12:11 [PATCH] openrisc: fix __user in raw_copy_to_user()'s prototype Luc Van Oostenryck
2020-06-25 21:11 ` Stafford Horne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).