Skip to contentSkip to conversation

parisc: Define access_ok() as macro

PATCH New Helge Deller 1 participant 1 message Jan 29, 2017 PA-RISC architecture

lore
Share & tools
lore

Helge Deller

author maintainer
#0 lore raw

PATCH 1/1 parisc: Define access_ok() as macro

Define access_ok() as macro instead of static function. This fixes build warnings in code where the second parameter is given as unsigned long.

arch/parisc/include/asm/uaccess.h +1 -5
index 9a2aee1..fb4382c 100644
@@ -32,11 +32,7 @@
  * that put_user is the same as __put_user, etc.
  */
 
-static inline long access_ok(int type, const void __user * addr,
-		unsigned long size)
-{
-	return 1;
-}
+#define access_ok(type, uaddr, size) (1)
 
 #define put_user __put_user
 #define get_user __get_user