diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-03-28 06:51:43 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-03-28 22:43:44 +0200 |
commit | 3fb50075284433093eba7c43e75b16eaa36eeabd (patch) | |
tree | ecb3e9670cbf3dec94b48ba1f8f604df774c9af1 /include/asm-generic | |
parent | new helper: uaccess_kernel() (diff) | |
download | linux-3fb50075284433093eba7c43e75b16eaa36eeabd.tar.xz linux-3fb50075284433093eba7c43e75b16eaa36eeabd.zip |
asm-generic/uaccess.h: don't mess with __copy_{to,from}_user
only h8300 actually used those; might as well define them there.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/uaccess.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h index 4b4f4a7f22c6..b048246a606b 100644 --- a/include/asm-generic/uaccess.h +++ b/include/asm-generic/uaccess.h @@ -48,69 +48,6 @@ static inline int __access_ok(unsigned long addr, unsigned long size) #endif /* - * architectures with an MMU should override these two - */ -#ifndef __copy_from_user -static inline __must_check long __copy_from_user(void *to, - const void __user * from, unsigned long n) -{ - if (__builtin_constant_p(n)) { - switch(n) { - case 1: - *(u8 *)to = *(u8 __force *)from; - return 0; - case 2: - *(u16 *)to = *(u16 __force *)from; - return 0; - case 4: - *(u32 *)to = *(u32 __force *)from; - return 0; -#ifdef CONFIG_64BIT - case 8: - *(u64 *)to = *(u64 __force *)from; - return 0; -#endif - default: - break; - } - } - - memcpy(to, (const void __force *)from, n); - return 0; -} -#endif - -#ifndef __copy_to_user -static inline __must_check long __copy_to_user(void __user *to, - const void *from, unsigned long n) -{ - if (__builtin_constant_p(n)) { - switch(n) { - case 1: - *(u8 __force *)to = *(u8 *)from; - return 0; - case 2: - *(u16 __force *)to = *(u16 *)from; - return 0; - case 4: - *(u32 __force *)to = *(u32 *)from; - return 0; -#ifdef CONFIG_64BIT - case 8: - *(u64 __force *)to = *(u64 *)from; - return 0; -#endif - default: - break; - } - } - - memcpy((void __force *)to, from, n); - return 0; -} -#endif - -/* * These are the main single-value transfer routines. They automatically * use the right size if we just have the right pointer type. * This version just falls back to copy_{from,to}_user, which should |