Remove 'type' argument from access_ok() function
[linux-2.6-block.git] / arch / powerpc / include / asm / uaccess.h
index ebc0b916dcf9047b5ec00d597a8d01137aef93de..b31bf45eebd49ddce0c6fa46da8691ffb5a70bf1 100644 (file)
@@ -62,7 +62,7 @@ static inline int __access_ok(unsigned long addr, unsigned long size,
 
 #endif
 
-#define access_ok(type, addr, size)            \
+#define access_ok(addr, size)          \
        (__chk_user_ptr(addr), (void)(type),            \
         __access_ok((__force unsigned long)(addr), (size), get_fs()))
 
@@ -166,7 +166,7 @@ do {                                                                \
        long __pu_err = -EFAULT;                                        \
        __typeof__(*(ptr)) __user *__pu_addr = (ptr);                   \
        might_fault();                                                  \
-       if (access_ok(VERIFY_WRITE, __pu_addr, size))                   \
+       if (access_ok(__pu_addr, size))                 \
                __put_user_size((x), __pu_addr, (size), __pu_err);      \
        __pu_err;                                                       \
 })
@@ -276,7 +276,7 @@ do {                                                                \
        __long_type(*(ptr)) __gu_val = 0;                               \
        __typeof__(*(ptr)) __user *__gu_addr = (ptr);           \
        might_fault();                                                  \
-       if (access_ok(VERIFY_READ, __gu_addr, (size))) {                \
+       if (access_ok(__gu_addr, (size))) {             \
                barrier_nospec();                                       \
                __get_user_size(__gu_val, __gu_addr, (size), __gu_err); \
        }                                                               \
@@ -374,7 +374,7 @@ extern unsigned long __clear_user(void __user *addr, unsigned long size);
 static inline unsigned long clear_user(void __user *addr, unsigned long size)
 {
        might_fault();
-       if (likely(access_ok(VERIFY_WRITE, addr, size)))
+       if (likely(access_ok(addr, size)))
                return __clear_user(addr, size);
        return size;
 }