Remove 'type' argument from access_ok() function
diff mbox series

Message ID 20190104092758.4378-1-malat@debian.org
State In Next
Commit 074400a7be61250d9f0ccec07d5c35ffec4d8d22
Headers show
Series
  • Remove 'type' argument from access_ok() function
Related show

Commit Message

Mathieu Malaterre Jan. 4, 2019, 9:27 a.m. UTC
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(-)

Comments

Christophe Leroy Jan. 4, 2019, 5:36 p.m. UTC | #1
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
Linus Torvalds Jan. 4, 2019, 5:54 p.m. UTC | #2
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

Patch
diff mbox series

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()))
 
 /*