linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Remove 'type' argument from access_ok() function
@ 2019-01-04  9:27 Mathieu Malaterre
  2019-01-04 12:57 ` Michael Ellerman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mathieu Malaterre @ 2019-01-04  9:27 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Mathieu Malaterre, Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev, linux-kernel

In commit 05a4ab823983 ("powerpc/uaccess: fix warning/error with
access_ok()") an attempt was made to remove a warning by referencing the
variable `type`, however in commit 96d4f267e40f ("Remove 'type' argument
from access_ok() function") the variable `type` has been removed.

Revert commit 05a4ab823983 ("powerpc/uaccess: fix warning/error with
access_ok()") to fix the following compilation error:

  arch/powerpc/include/asm/uaccess.h:66:32: error: ‘type’ undeclared (first use in this function)

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/powerpc/include/asm/uaccess.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h
index b31bf45eebd4..5f0c98e511a0 100644
--- a/arch/powerpc/include/asm/uaccess.h
+++ b/arch/powerpc/include/asm/uaccess.h
@@ -63,7 +63,7 @@ static inline int __access_ok(unsigned long addr, unsigned long size,
 #endif
 
 #define access_ok(addr, size)		\
-	(__chk_user_ptr(addr), (void)(type),		\
+	(__chk_user_ptr(addr),			\
 	 __access_ok((__force unsigned long)(addr), (size), get_fs()))
 
 /*
-- 
2.19.2


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

* Re: Remove 'type' argument from access_ok() function
  2019-01-04  9:27 [PATCH] Remove 'type' argument from access_ok() function Mathieu Malaterre
@ 2019-01-04 12:57 ` Michael Ellerman
  2019-01-04 17:36 ` [PATCH] " LEROY Christophe
  2019-01-04 17:54 ` Linus Torvalds
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2019-01-04 12:57 UTC (permalink / raw)
  To: Mathieu Malaterre
  Cc: Mathieu Malaterre, Paul Mackerras, linuxppc-dev, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

On Fri, 2019-01-04 at 09:27:58 UTC, Mathieu Malaterre wrote:
> In commit 05a4ab823983 ("powerpc/uaccess: fix warning/error with
> access_ok()") an attempt was made to remove a warning by referencing the
> variable `type`, however in commit 96d4f267e40f ("Remove 'type' argument
> from access_ok() function") the variable `type` has been removed.
> 
> Revert commit 05a4ab823983 ("powerpc/uaccess: fix warning/error with
> access_ok()") to fix the following compilation error:
> 
>   arch/powerpc/include/asm/uaccess.h:66:32: error: ‘type’ undeclared (first use in this function)
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/074400a7be61250d9f0ccec07d5c35

cheers

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

* Re: [PATCH] Remove 'type' argument from access_ok() function
  2019-01-04  9:27 [PATCH] Remove 'type' argument from access_ok() function Mathieu Malaterre
  2019-01-04 12:57 ` Michael Ellerman
@ 2019-01-04 17:36 ` LEROY Christophe
  2019-01-04 17:54 ` Linus Torvalds
  2 siblings, 0 replies; 4+ messages in thread
From: LEROY Christophe @ 2019-01-04 17:36 UTC (permalink / raw)
  To: sparclinux, Mathieu Malaterre
  Cc: linux-kernel, linuxppc-dev, Paul Mackerras, Michael Ellerman

Mathieu Malaterre <malat@debian.org> a écrit :

> In commit 05a4ab823983 ("powerpc/uaccess: fix warning/error with
> access_ok()") an attempt was made to remove a warning by referencing the
> variable `type`, however in commit 96d4f267e40f ("Remove 'type' argument
> from access_ok() function") the variable `type` has been removed.
>
> Revert commit 05a4ab823983 ("powerpc/uaccess: fix warning/error with
> access_ok()") to fix the following compilation error:
>
>   arch/powerpc/include/asm/uaccess.h:66:32: error: ‘type’ undeclared  
> (first use in this function)
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

Should you add a Fixes:  96d4f267e40f ?

Note that sparc arch will have the same issue.

Christophe

> ---
>  arch/powerpc/include/asm/uaccess.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/include/asm/uaccess.h  
> b/arch/powerpc/include/asm/uaccess.h
> index b31bf45eebd4..5f0c98e511a0 100644
> --- a/arch/powerpc/include/asm/uaccess.h
> +++ b/arch/powerpc/include/asm/uaccess.h
> @@ -63,7 +63,7 @@ static inline int __access_ok(unsigned long addr,  
> unsigned long size,
>  #endif
>
>  #define access_ok(addr, size)		\
> -	(__chk_user_ptr(addr), (void)(type),		\
> +	(__chk_user_ptr(addr),			\
>  	 __access_ok((__force unsigned long)(addr), (size), get_fs()))
>
>  /*
> --
> 2.19.2



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

* Re: [PATCH] Remove 'type' argument from access_ok() function
  2019-01-04  9:27 [PATCH] Remove 'type' argument from access_ok() function Mathieu Malaterre
  2019-01-04 12:57 ` Michael Ellerman
  2019-01-04 17:36 ` [PATCH] " LEROY Christophe
@ 2019-01-04 17:54 ` Linus Torvalds
  2 siblings, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2019-01-04 17:54 UTC (permalink / raw)
  To: Mathieu Malaterre
  Cc: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev, Linux List Kernel Mailing

On Fri, Jan 4, 2019 at 1:28 AM Mathieu Malaterre <malat@debian.org> wrote:
>
> Revert commit 05a4ab823983 ("powerpc/uaccess: fix warning/error with
> access_ok()") to fix the following compilation error:

Gaah. I even *looked* at the powerpc use of 'type', but then when I
was actually going through my manual editing I forgot all about it.

So this wasn't a case of "the powerpc change was recent and clashed".
This was purely a case of "Linus screwed up".

Sorry.

              Linus

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

end of thread, other threads:[~2019-01-04 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04  9:27 [PATCH] Remove 'type' argument from access_ok() function Mathieu Malaterre
2019-01-04 12:57 ` Michael Ellerman
2019-01-04 17:36 ` [PATCH] " LEROY Christophe
2019-01-04 17:54 ` Linus Torvalds

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