]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/blobdiff - arch/nds32/include/asm/uaccess.h
Remove 'type' argument from access_ok() function
[mirror_ubuntu-disco-kernel.git] / arch / nds32 / include / asm / uaccess.h
index 362a32d9bd16871e1db6c45d544eb2c4450bfeb5..53dcb49b0b12f5b8a85dd1858f71d3b4a0f23939 100644 (file)
@@ -13,9 +13,6 @@
 #include <asm/types.h>
 #include <linux/mm.h>
 
-#define VERIFY_READ    0
-#define VERIFY_WRITE   1
-
 #define __asmeq(x, y)  ".ifnc " x "," y " ; .err ; .endif\n\t"
 
 /*
@@ -53,7 +50,7 @@ static inline void set_fs(mm_segment_t fs)
 
 #define __range_ok(addr, size) (size <= get_fs() && addr <= (get_fs() -size))
 
-#define access_ok(type, addr, size)    \
+#define access_ok(addr, size)  \
        __range_ok((unsigned long)addr, (unsigned long)size)
 /*
  * Single-value transfer routines.  They automatically use the right
@@ -94,7 +91,7 @@ static inline void set_fs(mm_segment_t fs)
 ({                                                                     \
        const __typeof__(*(ptr)) __user *__p = (ptr);                   \
        might_fault();                                                  \
-       if (access_ok(VERIFY_READ, __p, sizeof(*__p))) {                \
+       if (access_ok(__p, sizeof(*__p))) {             \
                __get_user_err((x), __p, (err));                        \
        } else {                                                        \
                (x) = 0; (err) = -EFAULT;                               \
@@ -189,7 +186,7 @@ do {                                                                        \
 ({                                                                     \
        __typeof__(*(ptr)) __user *__p = (ptr);                         \
        might_fault();                                                  \
-       if (access_ok(VERIFY_WRITE, __p, sizeof(*__p))) {               \
+       if (access_ok(__p, sizeof(*__p))) {             \
                __put_user_err((x), __p, (err));                        \
        } else  {                                                       \
                (err) = -EFAULT;                                        \
@@ -279,7 +276,7 @@ extern unsigned long __arch_copy_to_user(void __user * to, const void *from,
 #define INLINE_COPY_TO_USER
 static inline unsigned long clear_user(void __user * to, unsigned long n)
 {
-       if (access_ok(VERIFY_WRITE, to, n))
+       if (access_ok(to, n))
                n = __arch_clear_user(to, n);
        return n;
 }