Commit e12b090e authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Rich Felker

sh: remove __KERNEL__ ifdefs from non-UAPI headers

There is no point in having __KERNEL__ ifdefs in headers not exported to
userspace.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarRich Felker <dalias@libc.org>
parent 582dc536
/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_ADC_H #ifndef __ASM_ADC_H
#define __ASM_ADC_H #define __ASM_ADC_H
#ifdef __KERNEL__
/* /*
* Copyright (C) 2004 Andriy Skulysh * Copyright (C) 2004 Andriy Skulysh
*/ */
...@@ -10,5 +9,4 @@ ...@@ -10,5 +9,4 @@
int adc_single(unsigned int channel); int adc_single(unsigned int channel);
#endif /* __KERNEL__ */
#endif /* __ASM_ADC_H */ #endif /* __ASM_ADC_H */
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
#ifndef __ASM_SH_ADDRSPACE_H #ifndef __ASM_SH_ADDRSPACE_H
#define __ASM_SH_ADDRSPACE_H #define __ASM_SH_ADDRSPACE_H
#ifdef __KERNEL__
#include <cpu/addrspace.h> #include <cpu/addrspace.h>
/* If this CPU supports segmentation, hook up the helpers */ /* If this CPU supports segmentation, hook up the helpers */
...@@ -62,5 +60,4 @@ ...@@ -62,5 +60,4 @@
#define P3_ADDR_MAX P4SEG #define P3_ADDR_MAX P4SEG
#endif #endif
#endif /* __KERNEL__ */
#endif /* __ASM_SH_ADDRSPACE_H */ #endif /* __ASM_SH_ADDRSPACE_H */
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
#ifndef __ASM_SH_BITOPS_H #ifndef __ASM_SH_BITOPS_H
#define __ASM_SH_BITOPS_H #define __ASM_SH_BITOPS_H
#ifdef __KERNEL__
#ifndef _LINUX_BITOPS_H #ifndef _LINUX_BITOPS_H
#error only <linux/bitops.h> can be included directly #error only <linux/bitops.h> can be included directly
#endif #endif
...@@ -71,6 +69,4 @@ static inline unsigned long __ffs(unsigned long word) ...@@ -71,6 +69,4 @@ static inline unsigned long __ffs(unsigned long word)
#include <asm-generic/bitops/__fls.h> #include <asm-generic/bitops/__fls.h>
#include <asm-generic/bitops/fls64.h> #include <asm-generic/bitops/fls64.h>
#endif /* __KERNEL__ */
#endif /* __ASM_SH_BITOPS_H */ #endif /* __ASM_SH_BITOPS_H */
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
*/ */
#ifndef __ASM_SH_CACHE_H #ifndef __ASM_SH_CACHE_H
#define __ASM_SH_CACHE_H #define __ASM_SH_CACHE_H
#ifdef __KERNEL__
#include <linux/init.h> #include <linux/init.h>
#include <cpu/cache.h> #include <cpu/cache.h>
...@@ -44,5 +43,4 @@ struct cache_info { ...@@ -44,5 +43,4 @@ struct cache_info {
unsigned long flags; unsigned long flags;
}; };
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* __ASM_SH_CACHE_H */ #endif /* __ASM_SH_CACHE_H */
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
#ifndef __ASM_SH_CACHEFLUSH_H #ifndef __ASM_SH_CACHEFLUSH_H
#define __ASM_SH_CACHEFLUSH_H #define __ASM_SH_CACHEFLUSH_H
#ifdef __KERNEL__
#include <linux/mm.h> #include <linux/mm.h>
/* /*
...@@ -109,5 +107,4 @@ static inline void *sh_cacheop_vaddr(void *vaddr) ...@@ -109,5 +107,4 @@ static inline void *sh_cacheop_vaddr(void *vaddr)
return vaddr; return vaddr;
} }
#endif /* __KERNEL__ */
#endif /* __ASM_SH_CACHEFLUSH_H */ #endif /* __ASM_SH_CACHEFLUSH_H */
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
*/ */
#ifndef __ASM_SH_DMA_H #ifndef __ASM_SH_DMA_H
#define __ASM_SH_DMA_H #define __ASM_SH_DMA_H
#ifdef __KERNEL__
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/wait.h> #include <linux/wait.h>
...@@ -144,5 +143,4 @@ extern int isa_dma_bridge_buggy; ...@@ -144,5 +143,4 @@ extern int isa_dma_bridge_buggy;
#define isa_dma_bridge_buggy (0) #define isa_dma_bridge_buggy (0)
#endif #endif
#endif /* __KERNEL__ */
#endif /* __ASM_SH_DMA_H */ #endif /* __ASM_SH_DMA_H */
...@@ -90,7 +90,6 @@ typedef struct user_fpu_struct elf_fpregset_t; ...@@ -90,7 +90,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
#endif #endif
#define ELF_ARCH EM_SH #define ELF_ARCH EM_SH
#ifdef __KERNEL__
/* /*
* This is used to ensure we don't load something for the wrong architecture. * This is used to ensure we don't load something for the wrong architecture.
*/ */
...@@ -209,5 +208,4 @@ do { \ ...@@ -209,5 +208,4 @@ do { \
NEW_AUX_ENT(AT_L2_CACHESHAPE, l2_cache_shape); \ NEW_AUX_ENT(AT_L2_CACHESHAPE, l2_cache_shape); \
} while (0) } while (0)
#endif /* __KERNEL__ */
#endif /* __ASM_SH_ELF_H */ #endif /* __ASM_SH_ELF_H */
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
*/ */
#ifndef __ASM_SH_FREQ_H #ifndef __ASM_SH_FREQ_H
#define __ASM_SH_FREQ_H #define __ASM_SH_FREQ_H
#ifdef __KERNEL__
#include <cpu/freq.h> #include <cpu/freq.h>
#endif /* __KERNEL__ */
#endif /* __ASM_SH_FREQ_H */ #endif /* __ASM_SH_FREQ_H */
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
#ifndef __ASM_SH_FUTEX_H #ifndef __ASM_SH_FUTEX_H
#define __ASM_SH_FUTEX_H #define __ASM_SH_FUTEX_H
#ifdef __KERNEL__
#include <linux/futex.h> #include <linux/futex.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/errno.h> #include <asm/errno.h>
...@@ -71,5 +69,4 @@ static inline int arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, ...@@ -71,5 +69,4 @@ static inline int arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval,
return ret; return ret;
} }
#endif /* __KERNEL__ */
#endif /* __ASM_SH_FUTEX_H */ #endif /* __ASM_SH_FUTEX_H */
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/pgtable.h> #include <linux/pgtable.h>
#include <asm-generic/iomap.h> #include <asm-generic/iomap.h>
#ifdef __KERNEL__
#define __IO_PREFIX generic #define __IO_PREFIX generic
#include <asm/io_generic.h> #include <asm/io_generic.h>
#include <asm/io_trapped.h> #include <asm/io_trapped.h>
...@@ -380,6 +379,4 @@ static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; } ...@@ -380,6 +379,4 @@ static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; }
int valid_phys_addr_range(phys_addr_t addr, size_t size); int valid_phys_addr_range(phys_addr_t addr, size_t size);
int valid_mmap_phys_addr_range(unsigned long pfn, size_t size); int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
#endif /* __KERNEL__ */
#endif /* __ASM_SH_IO_H */ #endif /* __ASM_SH_IO_H */
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#ifndef __ASM_SH_MMU_CONTEXT_H #ifndef __ASM_SH_MMU_CONTEXT_H
#define __ASM_SH_MMU_CONTEXT_H #define __ASM_SH_MMU_CONTEXT_H
#ifdef __KERNEL__
#include <cpu/mmu_context.h> #include <cpu/mmu_context.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
...@@ -177,5 +176,4 @@ static inline void disable_mmu(void) ...@@ -177,5 +176,4 @@ static inline void disable_mmu(void)
#define disable_mmu() do { } while (0) #define disable_mmu() do { } while (0)
#endif #endif
#endif /* __KERNEL__ */
#endif /* __ASM_SH_MMU_CONTEXT_H */ #endif /* __ASM_SH_MMU_CONTEXT_H */
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
#ifndef __ASM_SH_MMZONE_H #ifndef __ASM_SH_MMZONE_H
#define __ASM_SH_MMZONE_H #define __ASM_SH_MMZONE_H
#ifdef __KERNEL__
#ifdef CONFIG_NEED_MULTIPLE_NODES #ifdef CONFIG_NEED_MULTIPLE_NODES
#include <linux/numa.h> #include <linux/numa.h>
...@@ -44,5 +42,4 @@ void __init __add_active_range(unsigned int nid, unsigned long start_pfn, ...@@ -44,5 +42,4 @@ void __init __add_active_range(unsigned int nid, unsigned long start_pfn,
/* arch/sh/mm/init.c */ /* arch/sh/mm/init.c */
void __init allocate_pgdat(unsigned int nid); void __init allocate_pgdat(unsigned int nid);
#endif /* __KERNEL__ */
#endif /* __ASM_SH_MMZONE_H */ #endif /* __ASM_SH_MMZONE_H */
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
#ifndef __ASM_SH_PCI_H #ifndef __ASM_SH_PCI_H
#define __ASM_SH_PCI_H #define __ASM_SH_PCI_H
#ifdef __KERNEL__
/* Can be used to override the logic in pci_scan_bus for skipping /* Can be used to override the logic in pci_scan_bus for skipping
already-configured bus numbers - to be used for buggy BIOSes already-configured bus numbers - to be used for buggy BIOSes
or architectures with incomplete PCI setup by the loader */ or architectures with incomplete PCI setup by the loader */
...@@ -96,6 +94,4 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) ...@@ -96,6 +94,4 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
return channel ? 15 : 14; return channel ? 15 : 14;
} }
#endif /* __KERNEL__ */
#endif /* __ASM_SH_PCI_H */ #endif /* __ASM_SH_PCI_H */
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#ifndef __ASM_SH_PROCESSOR_32_H #ifndef __ASM_SH_PROCESSOR_32_H
#define __ASM_SH_PROCESSOR_32_H #define __ASM_SH_PROCESSOR_32_H
#ifdef __KERNEL__
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/linkage.h> #include <linux/linkage.h>
...@@ -203,5 +202,4 @@ static inline void prefetchw(const void *x) ...@@ -203,5 +202,4 @@ static inline void prefetchw(const void *x)
} }
#endif #endif
#endif /* __KERNEL__ */
#endif /* __ASM_SH_PROCESSOR_32_H */ #endif /* __ASM_SH_PROCESSOR_32_H */
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#ifndef __ASM_SH_SPARSEMEM_H #ifndef __ASM_SH_SPARSEMEM_H
#define __ASM_SH_SPARSEMEM_H #define __ASM_SH_SPARSEMEM_H
#ifdef __KERNEL__
/* /*
* SECTION_SIZE_BITS 2^N: how big each section will be * SECTION_SIZE_BITS 2^N: how big each section will be
* MAX_PHYSADDR_BITS 2^N: how much physical address space we have * MAX_PHYSADDR_BITS 2^N: how much physical address space we have
...@@ -12,6 +11,4 @@ ...@@ -12,6 +11,4 @@
#define MAX_PHYSADDR_BITS 32 #define MAX_PHYSADDR_BITS 32
#define MAX_PHYSMEM_BITS 32 #define MAX_PHYSMEM_BITS 32
#endif
#endif /* __ASM_SH_SPARSEMEM_H */ #endif /* __ASM_SH_SPARSEMEM_H */
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
#ifndef __ASM_SH_STRING_H #ifndef __ASM_SH_STRING_H
#define __ASM_SH_STRING_H #define __ASM_SH_STRING_H
#ifdef __KERNEL__
/* /*
* Copyright (C) 1999 Niibe Yutaka * Copyright (C) 1999 Niibe Yutaka
* But consider these trivial functions to be public domain. * But consider these trivial functions to be public domain.
...@@ -127,6 +125,4 @@ extern void *memchr(const void *__s, int __c, size_t __n); ...@@ -127,6 +125,4 @@ extern void *memchr(const void *__s, int __c, size_t __n);
#define __HAVE_ARCH_STRLEN #define __HAVE_ARCH_STRLEN
extern size_t strlen(const char *); extern size_t strlen(const char *);
#endif /* __KERNEL__ */
#endif /* __ASM_SH_STRING_H */ #endif /* __ASM_SH_STRING_H */
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
#ifndef __ASM_SH_SYSCALLS_32_H #ifndef __ASM_SH_SYSCALLS_32_H
#define __ASM_SH_SYSCALLS_32_H #define __ASM_SH_SYSCALLS_32_H
#ifdef __KERNEL__
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -26,5 +24,4 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); ...@@ -26,5 +24,4 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);
asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0, asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0,
unsigned long thread_info_flags); unsigned long thread_info_flags);
#endif /* __KERNEL__ */
#endif /* __ASM_SH_SYSCALLS_32_H */ #endif /* __ASM_SH_SYSCALLS_32_H */
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
* Copyright (C) 2002 David Howells (dhowells@redhat.com) * Copyright (C) 2002 David Howells (dhowells@redhat.com)
* - Incorporating suggestions made by Linus Torvalds and Dave Miller * - Incorporating suggestions made by Linus Torvalds and Dave Miller
*/ */
#ifdef __KERNEL__
#include <asm/page.h> #include <asm/page.h>
/* /*
...@@ -170,7 +168,4 @@ static inline unsigned int get_thread_fault_code(void) ...@@ -170,7 +168,4 @@ static inline unsigned int get_thread_fault_code(void)
} }
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* __ASM_SH_THREAD_INFO_H */ #endif /* __ASM_SH_THREAD_INFO_H */
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
*/ */
#ifndef __ASM_SH_WATCHDOG_H #ifndef __ASM_SH_WATCHDOG_H
#define __ASM_SH_WATCHDOG_H #define __ASM_SH_WATCHDOG_H
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/io.h> #include <linux/io.h>
...@@ -157,5 +156,4 @@ static inline void sh_wdt_write_csr(__u8 val) ...@@ -157,5 +156,4 @@ static inline void sh_wdt_write_csr(__u8 val)
__raw_writew((WTCSR_HIGH << 8) | (__u16)val, WTCSR); __raw_writew((WTCSR_HIGH << 8) | (__u16)val, WTCSR);
} }
#endif /* CONFIG_CPU_SUBTYPE_SH7785 || CONFIG_CPU_SUBTYPE_SH7780 */ #endif /* CONFIG_CPU_SUBTYPE_SH7785 || CONFIG_CPU_SUBTYPE_SH7780 */
#endif /* __KERNEL__ */
#endif /* __ASM_SH_WATCHDOG_H */ #endif /* __ASM_SH_WATCHDOG_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment