Skip to content

Commit e12b090

Browse files
Christoph HellwigRich Felker
authored andcommitted
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: Christoph Hellwig <[email protected]> Signed-off-by: Rich Felker <[email protected]>
1 parent 582dc53 commit e12b090

19 files changed

+0
-54
lines changed

arch/sh/include/asm/adc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
22
#ifndef __ASM_ADC_H
33
#define __ASM_ADC_H
4-
#ifdef __KERNEL__
54
/*
65
* Copyright (C) 2004 Andriy Skulysh
76
*/
@@ -10,5 +9,4 @@
109

1110
int adc_single(unsigned int channel);
1211

13-
#endif /* __KERNEL__ */
1412
#endif /* __ASM_ADC_H */

arch/sh/include/asm/addrspace.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
#ifndef __ASM_SH_ADDRSPACE_H
88
#define __ASM_SH_ADDRSPACE_H
99

10-
#ifdef __KERNEL__
11-
1210
#include <cpu/addrspace.h>
1311

1412
/* If this CPU supports segmentation, hook up the helpers */
@@ -62,5 +60,4 @@
6260
#define P3_ADDR_MAX P4SEG
6361
#endif
6462

65-
#endif /* __KERNEL__ */
6663
#endif /* __ASM_SH_ADDRSPACE_H */

arch/sh/include/asm/bitops.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#ifndef __ASM_SH_BITOPS_H
33
#define __ASM_SH_BITOPS_H
44

5-
#ifdef __KERNEL__
6-
75
#ifndef _LINUX_BITOPS_H
86
#error only <linux/bitops.h> can be included directly
97
#endif
@@ -71,6 +69,4 @@ static inline unsigned long __ffs(unsigned long word)
7169
#include <asm-generic/bitops/__fls.h>
7270
#include <asm-generic/bitops/fls64.h>
7371

74-
#endif /* __KERNEL__ */
75-
7672
#endif /* __ASM_SH_BITOPS_H */

arch/sh/include/asm/cache.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*/
99
#ifndef __ASM_SH_CACHE_H
1010
#define __ASM_SH_CACHE_H
11-
#ifdef __KERNEL__
1211

1312
#include <linux/init.h>
1413
#include <cpu/cache.h>
@@ -44,5 +43,4 @@ struct cache_info {
4443
unsigned long flags;
4544
};
4645
#endif /* __ASSEMBLY__ */
47-
#endif /* __KERNEL__ */
4846
#endif /* __ASM_SH_CACHE_H */

arch/sh/include/asm/cacheflush.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#ifndef __ASM_SH_CACHEFLUSH_H
33
#define __ASM_SH_CACHEFLUSH_H
44

5-
#ifdef __KERNEL__
6-
75
#include <linux/mm.h>
86

97
/*
@@ -109,5 +107,4 @@ static inline void *sh_cacheop_vaddr(void *vaddr)
109107
return vaddr;
110108
}
111109

112-
#endif /* __KERNEL__ */
113110
#endif /* __ASM_SH_CACHEFLUSH_H */

arch/sh/include/asm/dma.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
#ifndef __ASM_SH_DMA_H
88
#define __ASM_SH_DMA_H
9-
#ifdef __KERNEL__
109

1110
#include <linux/spinlock.h>
1211
#include <linux/wait.h>
@@ -144,5 +143,4 @@ extern int isa_dma_bridge_buggy;
144143
#define isa_dma_bridge_buggy (0)
145144
#endif
146145

147-
#endif /* __KERNEL__ */
148146
#endif /* __ASM_SH_DMA_H */

arch/sh/include/asm/elf.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
9090
#endif
9191
#define ELF_ARCH EM_SH
9292

93-
#ifdef __KERNEL__
9493
/*
9594
* This is used to ensure we don't load something for the wrong architecture.
9695
*/
@@ -209,5 +208,4 @@ do { \
209208
NEW_AUX_ENT(AT_L2_CACHESHAPE, l2_cache_shape); \
210209
} while (0)
211210

212-
#endif /* __KERNEL__ */
213211
#endif /* __ASM_SH_ELF_H */

arch/sh/include/asm/freq.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
*/
77
#ifndef __ASM_SH_FREQ_H
88
#define __ASM_SH_FREQ_H
9-
#ifdef __KERNEL__
109

1110
#include <cpu/freq.h>
1211

13-
#endif /* __KERNEL__ */
1412
#endif /* __ASM_SH_FREQ_H */

arch/sh/include/asm/futex.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#ifndef __ASM_SH_FUTEX_H
33
#define __ASM_SH_FUTEX_H
44

5-
#ifdef __KERNEL__
6-
75
#include <linux/futex.h>
86
#include <linux/uaccess.h>
97
#include <asm/errno.h>
@@ -71,5 +69,4 @@ static inline int arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval,
7169
return ret;
7270
}
7371

74-
#endif /* __KERNEL__ */
7572
#endif /* __ASM_SH_FUTEX_H */

arch/sh/include/asm/io.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include <linux/pgtable.h>
2121
#include <asm-generic/iomap.h>
2222

23-
#ifdef __KERNEL__
2423
#define __IO_PREFIX generic
2524
#include <asm/io_generic.h>
2625
#include <asm/io_trapped.h>
@@ -380,6 +379,4 @@ static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; }
380379
int valid_phys_addr_range(phys_addr_t addr, size_t size);
381380
int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
382381

383-
#endif /* __KERNEL__ */
384-
385382
#endif /* __ASM_SH_IO_H */

0 commit comments

Comments
 (0)