Skip to content

Commit 735643e

Browse files
robertpjdaytorvalds
authored andcommitted
Remove "#ifdef __KERNEL__" checks from unexported headers
Remove the "#ifdef __KERNEL__" tests from unexported header files in linux/include whose entire contents are wrapped in that preprocessor test. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 71cc2c2 commit 735643e

41 files changed

Lines changed: 1 addition & 130 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎include/linux/agp_backend.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
#ifndef _AGP_BACKEND_H
3131
#define _AGP_BACKEND_H 1
3232

33-
#ifdef __KERNEL__
34-
3533
#ifndef TRUE
3634
#define TRUE 1
3735
#endif
@@ -111,5 +109,4 @@ extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *);
111109
extern void agp_backend_release(struct agp_bridge_data *);
112110
extern void agp_flush_chipset(struct agp_bridge_data *);
113111

114-
#endif /* __KERNEL__ */
115112
#endif /* _AGP_BACKEND_H */

‎include/linux/cdev.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#ifndef _LINUX_CDEV_H
22
#define _LINUX_CDEV_H
3-
#ifdef __KERNEL__
43

54
#include <linux/kobject.h>
65
#include <linux/kdev_t.h>
@@ -34,4 +33,3 @@ void cd_forget(struct inode *);
3433
extern struct backing_dev_info directly_mappable_cdev_bdi;
3534

3635
#endif
37-
#endif

‎include/linux/coda_fs_i.h‎

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

11-
#ifdef __KERNEL__
1211
#include <linux/types.h>
1312
#include <linux/list.h>
1413
#include <linux/coda.h>
@@ -52,4 +51,3 @@ struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb);
5251
void coda_replace_fid(struct inode *, struct CodaFid *, struct CodaFid *);
5352

5453
#endif
55-
#endif

‎include/linux/concap.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#ifndef _LINUX_CONCAP_H
1010
#define _LINUX_CONCAP_H
11-
#ifdef __KERNEL__
11+
1212
#include <linux/skbuff.h>
1313
#include <linux/netdevice.h>
1414

@@ -110,4 +110,3 @@ extern int concap_nop(struct concap_proto *cprot);
110110
*/
111111
extern int concap_drop_skb(struct concap_proto *cprot, struct sk_buff *skb);
112112
#endif
113-
#endif

‎include/linux/configfs.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
#ifndef _CONFIGFS_H_
3636
#define _CONFIGFS_H_
3737

38-
#ifdef __KERNEL__
39-
4038
#include <linux/kernel.h>
4139
#include <linux/types.h>
4240
#include <linux/list.h>
@@ -194,6 +192,4 @@ void configfs_unregister_subsystem(struct configfs_subsystem *subsys);
194192
int configfs_depend_item(struct configfs_subsystem *subsys, struct config_item *target);
195193
void configfs_undepend_item(struct configfs_subsystem *subsys, struct config_item *target);
196194

197-
#endif /* __KERNEL__ */
198-
199195
#endif /* _CONFIGFS_H_ */

‎include/linux/crc-ccitt.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#ifndef _LINUX_CRC_CCITT_H
22
#define _LINUX_CRC_CCITT_H
3-
#ifdef __KERNEL__
43

54
#include <linux/types.h>
65

@@ -13,5 +12,4 @@ static inline u16 crc_ccitt_byte(u16 crc, const u8 c)
1312
return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff];
1413
}
1514

16-
#endif /* __KERNEL__ */
1715
#endif /* _LINUX_CRC_CCITT_H */

‎include/linux/dcache.h‎

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

4-
#ifdef __KERNEL__
5-
64
#include <asm/atomic.h>
75
#include <linux/list.h>
86
#include <linux/spinlock.h>
@@ -365,6 +363,4 @@ extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
365363

366364
extern int sysctl_vfs_cache_pressure;
367365

368-
#endif /* __KERNEL__ */
369-
370366
#endif /* __LINUX_DCACHE_H */

‎include/linux/device-mapper.h‎

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

11-
#ifdef __KERNEL__
12-
1311
#include <linux/bio.h>
1412

1513
struct dm_target;
@@ -344,5 +342,4 @@ static inline unsigned long to_bytes(sector_t n)
344342
return (n << SECTOR_SHIFT);
345343
}
346344

347-
#endif /* __KERNEL__ */
348345
#endif /* _LINUX_DEVICE_MAPPER_H */

‎include/linux/eventfd.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
#ifndef _LINUX_EVENTFD_H
99
#define _LINUX_EVENTFD_H
1010

11-
12-
#ifdef __KERNEL__
13-
1411
#ifdef CONFIG_EVENTFD
1512

1613
struct file *eventfd_fget(int fd);
@@ -24,7 +21,5 @@ static inline int eventfd_signal(struct file *file, int n)
2421

2522
#endif /* CONFIG_EVENTFD */
2623

27-
#endif /* __KERNEL__ */
28-
2924
#endif /* _LINUX_EVENTFD_H */
3025

‎include/linux/fsl_devices.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* option) any later version.
1515
*/
1616

17-
#ifdef __KERNEL__
1817
#ifndef _FSL_DEVICE_H_
1918
#define _FSL_DEVICE_H_
2019

@@ -127,4 +126,3 @@ struct mpc8xx_pcmcia_ops {
127126
};
128127

129128
#endif /* _FSL_DEVICE_H_ */
130-
#endif /* __KERNEL__ */

0 commit comments

Comments
 (0)