]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
uaccess: drop pointless ifdefs
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 27 Dec 2016 23:19:09 +0000 (18:19 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 6 Mar 2017 02:57:58 +0000 (21:57 -0500)
None of those file is ever included from uapi stuff, so __KERNEL__
is always defined.  None of them is ever included from assembler
(they are only pulled from linux/uaccess.h, which _can't_ be
included from assembler), so __ASSEMBLY__ is never defined.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/cris/include/asm/uaccess.h
arch/microblaze/include/asm/uaccess.h
arch/powerpc/include/asm/uaccess.h
arch/sparc/include/asm/uaccess_32.h
arch/sparc/include/asm/uaccess_64.h

index bb3004a2b2f76c1dd0fafae24f4eeb868469641b..c2462ef04eaf5dde9db8e5b5db18d6bbeff9abc7 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef _CRIS_UACCESS_H
 #define _CRIS_UACCESS_H
 
-#ifndef __ASSEMBLY__
 #include <asm/processor.h>
 #include <asm/page.h>
 
@@ -411,6 +410,4 @@ __generic_clear_user_nocheck(void __user *to, unsigned long n)
 
 #define strlen_user(str)       strnlen_user((str), 0x7ffffffe)
 
-#endif  /* __ASSEMBLY__ */
-
 #endif /* _CRIS_UACCESS_H */
index a3c0a06d784807737fdc647b04bad6e20f680304..b132cd301e6672f9fbbac8ab74a7e990936dc701 100644 (file)
@@ -11,9 +11,6 @@
 #ifndef _ASM_MICROBLAZE_UACCESS_H
 #define _ASM_MICROBLAZE_UACCESS_H
 
-#ifdef __KERNEL__
-#ifndef __ASSEMBLY__
-
 #include <linux/kernel.h>
 #include <linux/mm.h>
 
@@ -417,7 +414,4 @@ static inline long strnlen_user(const char __user *src, long n)
        return __strnlen_user(src, n);
 }
 
-#endif  /* __ASSEMBLY__ */
-#endif /* __KERNEL__ */
-
 #endif /* _ASM_MICROBLAZE_UACCESS_H */
index 2ec70aa1cc5dae4fc883cf26024e8e3020c8f5f4..3904040a3542bba47f5844b24ee0ccf523de7309 100644 (file)
@@ -1,9 +1,6 @@
 #ifndef _ARCH_POWERPC_UACCESS_H
 #define _ARCH_POWERPC_UACCESS_H
 
-#ifdef __KERNEL__
-#ifndef __ASSEMBLY__
-
 #include <asm/asm-compat.h>
 #include <asm/ppc_asm.h>
 #include <asm/processor.h>
@@ -417,7 +414,4 @@ extern long strncpy_from_user(char *dst, const char __user *src, long count);
 extern __must_check long strlen_user(const char __user *str);
 extern __must_check long strnlen_user(const char __user *str, long n);
 
-#endif  /* __ASSEMBLY__ */
-#endif /* __KERNEL__ */
-
 #endif /* _ARCH_POWERPC_UACCESS_H */
index b10f7d626f0e65df76c810c30787b8ff9e401c77..952d512a64f21ffb32fdfe8d23eed79a1e22fabc 100644 (file)
@@ -7,12 +7,8 @@
 #ifndef _ASM_UACCESS_H
 #define _ASM_UACCESS_H
 
-#ifdef __KERNEL__
 #include <linux/compiler.h>
 #include <linux/string.h>
-#endif
-
-#ifndef __ASSEMBLY__
 
 #include <asm/processor.h>
 
@@ -307,6 +303,4 @@ static inline unsigned long clear_user(void __user *addr, unsigned long n)
 __must_check long strlen_user(const char __user *str);
 __must_check long strnlen_user(const char __user *str, long n);
 
-#endif  /* __ASSEMBLY__ */
-
 #endif /* _ASM_UACCESS_H */
index d76362cad80f199dd422d3ec3deb637a213bdc1f..7afb4f64553f9b0ac0b0cee88ed8b5cd51b55204 100644 (file)
@@ -5,16 +5,12 @@
  * User space memory access functions
  */
 
-#ifdef __KERNEL__
 #include <linux/compiler.h>
 #include <linux/string.h>
 #include <asm/asi.h>
 #include <asm/spitfire.h>
 #include <asm-generic/uaccess-unaligned.h>
 #include <asm/extable_64.h>
-#endif
-
-#ifndef __ASSEMBLY__
 
 #include <asm/processor.h>
 
@@ -229,6 +225,4 @@ unsigned long compute_effective_address(struct pt_regs *,
                                        unsigned int insn,
                                        unsigned int rd);
 
-#endif  /* __ASSEMBLY__ */
-
 #endif /* _ASM_UACCESS_H */