Skip to contentSkip to conversation

Remove 'type' argument from access_ok() function

PATCH Applied Mathieu Malaterre 4 participants 4 messages Jan 4, 2019 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove 'type' argument from access_ok() function

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)

---
 arch/powerpc/include/asm/uaccess.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/uaccess.h +1 -1
index b31bf45eebd4..5f0c98e511a0 100644
@@ -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()))
 
 /*
Signature · 1 line
2.19.2
#1 lore raw
Quoted 11 lines · Mathieu Malaterre

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)

Applied to powerpc fixes, thanks.

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

cheers

#2 lore raw
In reply to Mathieu Malaterre

Mathieu Malaterre <[email protected]> a écrit :

Quoted 5 lines

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.

Quoted 7 lines

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)

Should you add a Fixes: 96d4f267e40f ?

Note that sparc arch will have the same issue.

Christophe

Quoted 21 lines
---
 arch/powerpc/include/asm/uaccess.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/uaccess.h +1 -1
index b31bf45eebd4..5f0c98e511a0 100644
@@ -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

#3 lore raw
In reply to Mathieu Malaterre
Quoted 3 lines · Mathieu Malaterre

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