Skip to content

Commit 8e65986

Browse files
committed
xtensa: drop ifdef __KERNEL__ from kernel-only headers
These headers are not exported to userspace, so they're never used without __KERNEL__ defined. Drop these ifdef statements. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
1 parent fd58015 commit 8e65986

7 files changed

Lines changed: 0 additions & 24 deletions

File tree

‎arch/xtensa/include/asm/atomic.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
#include <linux/stringify.h>
1717
#include <linux/types.h>
18-
19-
#ifdef __KERNEL__
2018
#include <asm/processor.h>
2119
#include <asm/cmpxchg.h>
2220
#include <asm/barrier.h>
@@ -200,6 +198,4 @@ ATOMIC_OPS(xor)
200198
#define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
201199
#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
202200

203-
#endif /* __KERNEL__ */
204-
205201
#endif /* _XTENSA_ATOMIC_H */

‎arch/xtensa/include/asm/bitops.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
#ifndef _XTENSA_BITOPS_H
1414
#define _XTENSA_BITOPS_H
1515

16-
#ifdef __KERNEL__
17-
1816
#ifndef _LINUX_BITOPS_H
1917
#error only <linux/bitops.h> can be included directly
2018
#endif
@@ -232,6 +230,4 @@ test_and_change_bit(unsigned int bit, volatile unsigned long *p)
232230
#include <asm-generic/bitops/lock.h>
233231
#include <asm-generic/bitops/sched.h>
234232

235-
#endif /* __KERNEL__ */
236-
237233
#endif /* _XTENSA_BITOPS_H */

‎arch/xtensa/include/asm/futex.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#ifndef _ASM_XTENSA_FUTEX_H
1616
#define _ASM_XTENSA_FUTEX_H
1717

18-
#ifdef __KERNEL__
19-
2018
#include <linux/futex.h>
2119
#include <linux/uaccess.h>
2220
#include <linux/errno.h>
@@ -123,5 +121,4 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
123121
return ret;
124122
}
125123

126-
#endif /* __KERNEL__ */
127124
#endif /* _ASM_XTENSA_FUTEX_H */

‎arch/xtensa/include/asm/io.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#ifndef _XTENSA_IO_H
1212
#define _XTENSA_IO_H
1313

14-
#ifdef __KERNEL__
1514
#include <asm/byteorder.h>
1615
#include <asm/page.h>
1716
#include <asm/vectors.h>
@@ -78,8 +77,6 @@ static inline void iounmap(volatile void __iomem *addr)
7877

7978
#endif /* CONFIG_MMU */
8079

81-
#endif /* __KERNEL__ */
82-
8380
#include <asm-generic/io.h>
8481

8582
#endif /* _XTENSA_IO_H */

‎arch/xtensa/include/asm/pci-bridge.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#ifndef _XTENSA_PCI_BRIDGE_H
1212
#define _XTENSA_PCI_BRIDGE_H
1313

14-
#ifdef __KERNEL__
15-
1614
struct device_node;
1715
struct pci_controller;
1816

@@ -84,5 +82,4 @@ int early_write_config_byte(struct pci_controller*, int, int, int, u8);
8482
int early_write_config_word(struct pci_controller*, int, int, int, u16);
8583
int early_write_config_dword(struct pci_controller*, int, int, int, u32);
8684

87-
#endif /* __KERNEL__ */
8885
#endif /* _XTENSA_PCI_BRIDGE_H */

‎arch/xtensa/include/asm/pci.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#ifndef _XTENSA_PCI_H
1212
#define _XTENSA_PCI_H
1313

14-
#ifdef __KERNEL__
15-
1614
/* Can be used to override the logic in pci_scan_bus for skipping
1715
* already-configured bus numbers - to be used for buggy BIOSes
1816
* or architectures with incomplete PCI setup by the loader
@@ -45,8 +43,6 @@
4543
#define ARCH_GENERIC_PCI_MMAP_RESOURCE 1
4644
#define arch_can_pci_mmap_io() 1
4745

48-
#endif /* __KERNEL__ */
49-
5046
/* Generic PCI */
5147
#include <asm-generic/pci.h>
5248

‎arch/xtensa/include/asm/pgalloc.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#ifndef _XTENSA_PGALLOC_H
1212
#define _XTENSA_PGALLOC_H
1313

14-
#ifdef __KERNEL__
15-
1614
#include <linux/highmem.h>
1715
#include <linux/slab.h>
1816

@@ -79,5 +77,4 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
7977
}
8078
#define pmd_pgtable(pmd) pmd_page(pmd)
8179

82-
#endif /* __KERNEL__ */
8380
#endif /* _XTENSA_PGALLOC_H */

0 commit comments

Comments
 (0)