Commit 735643ee authored by Robert P. J. Day's avatar Robert P. J. Day Committed by Linus Torvalds

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: default avatarRobert P. J. Day <rpjday@crashcourse.ca>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 71cc2c21
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
#ifndef _AGP_BACKEND_H #ifndef _AGP_BACKEND_H
#define _AGP_BACKEND_H 1 #define _AGP_BACKEND_H 1
#ifdef __KERNEL__
#ifndef TRUE #ifndef TRUE
#define TRUE 1 #define TRUE 1
#endif #endif
...@@ -111,5 +109,4 @@ extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); ...@@ -111,5 +109,4 @@ extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *);
extern void agp_backend_release(struct agp_bridge_data *); extern void agp_backend_release(struct agp_bridge_data *);
extern void agp_flush_chipset(struct agp_bridge_data *); extern void agp_flush_chipset(struct agp_bridge_data *);
#endif /* __KERNEL__ */
#endif /* _AGP_BACKEND_H */ #endif /* _AGP_BACKEND_H */
#ifndef _LINUX_CDEV_H #ifndef _LINUX_CDEV_H
#define _LINUX_CDEV_H #define _LINUX_CDEV_H
#ifdef __KERNEL__
#include <linux/kobject.h> #include <linux/kobject.h>
#include <linux/kdev_t.h> #include <linux/kdev_t.h>
...@@ -34,4 +33,3 @@ void cd_forget(struct inode *); ...@@ -34,4 +33,3 @@ void cd_forget(struct inode *);
extern struct backing_dev_info directly_mappable_cdev_bdi; extern struct backing_dev_info directly_mappable_cdev_bdi;
#endif #endif
#endif
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#ifndef _LINUX_CODA_FS_I #ifndef _LINUX_CODA_FS_I
#define _LINUX_CODA_FS_I #define _LINUX_CODA_FS_I
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/coda.h> #include <linux/coda.h>
...@@ -52,4 +51,3 @@ struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb); ...@@ -52,4 +51,3 @@ struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb);
void coda_replace_fid(struct inode *, struct CodaFid *, struct CodaFid *); void coda_replace_fid(struct inode *, struct CodaFid *, struct CodaFid *);
#endif #endif
#endif
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#ifndef _LINUX_CONCAP_H #ifndef _LINUX_CONCAP_H
#define _LINUX_CONCAP_H #define _LINUX_CONCAP_H
#ifdef __KERNEL__
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
...@@ -110,4 +110,3 @@ extern int concap_nop(struct concap_proto *cprot); ...@@ -110,4 +110,3 @@ extern int concap_nop(struct concap_proto *cprot);
*/ */
extern int concap_drop_skb(struct concap_proto *cprot, struct sk_buff *skb); extern int concap_drop_skb(struct concap_proto *cprot, struct sk_buff *skb);
#endif #endif
#endif
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
#ifndef _CONFIGFS_H_ #ifndef _CONFIGFS_H_
#define _CONFIGFS_H_ #define _CONFIGFS_H_
#ifdef __KERNEL__
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/list.h> #include <linux/list.h>
...@@ -194,6 +192,4 @@ void configfs_unregister_subsystem(struct configfs_subsystem *subsys); ...@@ -194,6 +192,4 @@ void configfs_unregister_subsystem(struct configfs_subsystem *subsys);
int configfs_depend_item(struct configfs_subsystem *subsys, struct config_item *target); int configfs_depend_item(struct configfs_subsystem *subsys, struct config_item *target);
void configfs_undepend_item(struct configfs_subsystem *subsys, struct config_item *target); void configfs_undepend_item(struct configfs_subsystem *subsys, struct config_item *target);
#endif /* __KERNEL__ */
#endif /* _CONFIGFS_H_ */ #endif /* _CONFIGFS_H_ */
#ifndef _LINUX_CRC_CCITT_H #ifndef _LINUX_CRC_CCITT_H
#define _LINUX_CRC_CCITT_H #define _LINUX_CRC_CCITT_H
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
...@@ -13,5 +12,4 @@ static inline u16 crc_ccitt_byte(u16 crc, const u8 c) ...@@ -13,5 +12,4 @@ static inline u16 crc_ccitt_byte(u16 crc, const u8 c)
return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff]; return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff];
} }
#endif /* __KERNEL__ */
#endif /* _LINUX_CRC_CCITT_H */ #endif /* _LINUX_CRC_CCITT_H */
#ifndef __LINUX_DCACHE_H #ifndef __LINUX_DCACHE_H
#define __LINUX_DCACHE_H #define __LINUX_DCACHE_H
#ifdef __KERNEL__
#include <asm/atomic.h> #include <asm/atomic.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
...@@ -365,6 +363,4 @@ extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); ...@@ -365,6 +363,4 @@ extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
extern int sysctl_vfs_cache_pressure; extern int sysctl_vfs_cache_pressure;
#endif /* __KERNEL__ */
#endif /* __LINUX_DCACHE_H */ #endif /* __LINUX_DCACHE_H */
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#ifndef _LINUX_DEVICE_MAPPER_H #ifndef _LINUX_DEVICE_MAPPER_H
#define _LINUX_DEVICE_MAPPER_H #define _LINUX_DEVICE_MAPPER_H
#ifdef __KERNEL__
#include <linux/bio.h> #include <linux/bio.h>
struct dm_target; struct dm_target;
...@@ -344,5 +342,4 @@ static inline unsigned long to_bytes(sector_t n) ...@@ -344,5 +342,4 @@ static inline unsigned long to_bytes(sector_t n)
return (n << SECTOR_SHIFT); return (n << SECTOR_SHIFT);
} }
#endif /* __KERNEL__ */
#endif /* _LINUX_DEVICE_MAPPER_H */ #endif /* _LINUX_DEVICE_MAPPER_H */
...@@ -8,9 +8,6 @@ ...@@ -8,9 +8,6 @@
#ifndef _LINUX_EVENTFD_H #ifndef _LINUX_EVENTFD_H
#define _LINUX_EVENTFD_H #define _LINUX_EVENTFD_H
#ifdef __KERNEL__
#ifdef CONFIG_EVENTFD #ifdef CONFIG_EVENTFD
struct file *eventfd_fget(int fd); struct file *eventfd_fget(int fd);
...@@ -24,7 +21,5 @@ static inline int eventfd_signal(struct file *file, int n) ...@@ -24,7 +21,5 @@ static inline int eventfd_signal(struct file *file, int n)
#endif /* CONFIG_EVENTFD */ #endif /* CONFIG_EVENTFD */
#endif /* __KERNEL__ */
#endif /* _LINUX_EVENTFD_H */ #endif /* _LINUX_EVENTFD_H */
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
* option) any later version. * option) any later version.
*/ */
#ifdef __KERNEL__
#ifndef _FSL_DEVICE_H_ #ifndef _FSL_DEVICE_H_
#define _FSL_DEVICE_H_ #define _FSL_DEVICE_H_
...@@ -127,4 +126,3 @@ struct mpc8xx_pcmcia_ops { ...@@ -127,4 +126,3 @@ struct mpc8xx_pcmcia_ops {
}; };
#endif /* _FSL_DEVICE_H_ */ #endif /* _FSL_DEVICE_H_ */
#endif /* __KERNEL__ */
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
* (C) Copyright 2005 Robert Love * (C) Copyright 2005 Robert Love
*/ */
#ifdef __KERNEL__
#include <linux/dnotify.h> #include <linux/dnotify.h>
#include <linux/inotify.h> #include <linux/inotify.h>
#include <linux/audit.h> #include <linux/audit.h>
...@@ -296,6 +294,4 @@ static inline void fsnotify_oldname_free(const char *old_name) ...@@ -296,6 +294,4 @@ static inline void fsnotify_oldname_free(const char *old_name)
#endif /* ! CONFIG_INOTIFY */ #endif /* ! CONFIG_INOTIFY */
#endif /* __KERNEL__ */
#endif /* _LINUX_FS_NOTIFY_H */ #endif /* _LINUX_FS_NOTIFY_H */
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#ifndef LINUX_HWRANDOM_H_ #ifndef LINUX_HWRANDOM_H_
#define LINUX_HWRANDOM_H_ #define LINUX_HWRANDOM_H_
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/list.h> #include <linux/list.h>
...@@ -46,5 +45,4 @@ extern int hwrng_register(struct hwrng *rng); ...@@ -46,5 +45,4 @@ extern int hwrng_register(struct hwrng *rng);
/** Unregister a Hardware Random Number Generator driver. */ /** Unregister a Hardware Random Number Generator driver. */
extern void hwrng_unregister(struct hwrng *rng); extern void hwrng_unregister(struct hwrng *rng);
#endif /* __KERNEL__ */
#endif /* LINUX_HWRANDOM_H_ */ #endif /* LINUX_HWRANDOM_H_ */
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
#ifndef _I2O_H #ifndef _I2O_H
#define _I2O_H #define _I2O_H
#ifdef __KERNEL__ /* This file to be included by kernel only */
#include <linux/i2o-dev.h> #include <linux/i2o-dev.h>
/* How many different OSM's are we allowing */ /* How many different OSM's are we allowing */
...@@ -1255,5 +1253,4 @@ extern void i2o_dump_message(struct i2o_message *); ...@@ -1255,5 +1253,4 @@ extern void i2o_dump_message(struct i2o_message *);
extern void i2o_dump_hrt(struct i2o_controller *c); extern void i2o_dump_hrt(struct i2o_controller *c);
extern void i2o_debug_state(struct i2o_controller *c); extern void i2o_debug_state(struct i2o_controller *c);
#endif /* __KERNEL__ */
#endif /* _I2O_H */ #endif /* _I2O_H */
#ifndef _LINUX_IF_MACVLAN_H #ifndef _LINUX_IF_MACVLAN_H
#define _LINUX_IF_MACVLAN_H #define _LINUX_IF_MACVLAN_H
#ifdef __KERNEL__
extern struct sk_buff *(*macvlan_handle_frame_hook)(struct sk_buff *); extern struct sk_buff *(*macvlan_handle_frame_hook)(struct sk_buff *);
#endif /* __KERNEL__ */
#endif /* _LINUX_IF_MACVLAN_H */ #endif /* _LINUX_IF_MACVLAN_H */
...@@ -42,11 +42,9 @@ ...@@ -42,11 +42,9 @@
#ifndef _LINUX_INET_H #ifndef _LINUX_INET_H
#define _LINUX_INET_H #define _LINUX_INET_H
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
extern __be32 in_aton(const char *str); extern __be32 in_aton(const char *str);
extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end); extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end); extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
#endif
#endif /* _LINUX_INET_H */ #endif /* _LINUX_INET_H */
#ifndef _LINUX_ISICOM_H #ifndef _LINUX_ISICOM_H
#define _LINUX_ISICOM_H #define _LINUX_ISICOM_H
/*#define ISICOM_DEBUG*/
/*#define ISICOM_DEBUG_DTR_RTS*/
#ifdef __KERNEL__
#define YES 1 #define YES 1
#define NO 0 #define NO 0
...@@ -85,6 +80,4 @@ ...@@ -85,6 +80,4 @@
#define ISI_TXOK 0x0001 #define ISI_TXOK 0x0001
#endif /* __KERNEL__ */
#endif /* ISICOM_H */ #endif /* ISICOM_H */
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#ifndef _LINUX_KFIFO_H #ifndef _LINUX_KFIFO_H
#define _LINUX_KFIFO_H #define _LINUX_KFIFO_H
#ifdef __KERNEL__
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
...@@ -151,7 +149,4 @@ static inline unsigned int kfifo_len(struct kfifo *fifo) ...@@ -151,7 +149,4 @@ static inline unsigned int kfifo_len(struct kfifo *fifo)
return ret; return ret;
} }
#else
#warning "don't include kernel headers in userspace"
#endif /* __KERNEL__ */
#endif #endif
#ifdef __KERNEL__
#include <linux/mutex.h> #include <linux/mutex.h>
typedef struct kobject *kobj_probe_t(dev_t, int *, void *); typedef struct kobject *kobj_probe_t(dev_t, int *, void *);
...@@ -10,5 +8,3 @@ int kobj_map(struct kobj_map *, dev_t, unsigned long, struct module *, ...@@ -10,5 +8,3 @@ int kobj_map(struct kobj_map *, dev_t, unsigned long, struct module *,
void kobj_unmap(struct kobj_map *, dev_t, unsigned long); void kobj_unmap(struct kobj_map *, dev_t, unsigned long);
struct kobject *kobj_lookup(struct kobj_map *, dev_t, int *); struct kobject *kobj_lookup(struct kobj_map *, dev_t, int *);
struct kobj_map *kobj_map_init(kobj_probe_t *, struct mutex *); struct kobj_map *kobj_map_init(kobj_probe_t *, struct mutex *);
#endif
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#ifndef _KOBJECT_H_ #ifndef _KOBJECT_H_
#define _KOBJECT_H_ #define _KOBJECT_H_
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/sysfs.h> #include <linux/sysfs.h>
...@@ -224,5 +222,4 @@ static inline int kobject_action_type(const char *buf, size_t count, ...@@ -224,5 +222,4 @@ static inline int kobject_action_type(const char *buf, size_t count,
{ return -EINVAL; } { return -EINVAL; }
#endif #endif
#endif /* __KERNEL__ */
#endif /* _KOBJECT_H_ */ #endif /* _KOBJECT_H_ */
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
#ifndef _KREF_H_ #ifndef _KREF_H_
#define _KREF_H_ #define _KREF_H_
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <asm/atomic.h> #include <asm/atomic.h>
...@@ -29,5 +27,4 @@ void kref_init(struct kref *kref); ...@@ -29,5 +27,4 @@ void kref_init(struct kref *kref);
void kref_get(struct kref *kref); void kref_get(struct kref *kref);
int kref_put(struct kref *kref, void (*release) (struct kref *kref)); int kref_put(struct kref *kref, void (*release) (struct kref *kref));
#endif /* __KERNEL__ */
#endif /* _KREF_H_ */ #endif /* _KREF_H_ */
#ifndef _LINUX_LIST_H #ifndef _LINUX_LIST_H
#define _LINUX_LIST_H #define _LINUX_LIST_H
#ifdef __KERNEL__
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/poison.h> #include <linux/poison.h>
#include <linux/prefetch.h> #include <linux/prefetch.h>
...@@ -983,7 +981,4 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, ...@@ -983,7 +981,4 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev,
({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
pos = rcu_dereference(pos->next)) pos = rcu_dereference(pos->next))
#else
#warning "don't include kernel headers in userspace"
#endif /* __KERNEL__ */
#endif #endif
#ifndef _LINUX_MMZONE_H #ifndef _LINUX_MMZONE_H
#define _LINUX_MMZONE_H #define _LINUX_MMZONE_H
#ifdef __KERNEL__
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifndef __GENERATING_BOUNDS_H #ifndef __GENERATING_BOUNDS_H
...@@ -1005,5 +1004,4 @@ unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long); ...@@ -1005,5 +1004,4 @@ unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long);
#endif /* !__GENERATING_BOUNDS.H */ #endif /* !__GENERATING_BOUNDS.H */
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _LINUX_MMZONE_H */ #endif /* _LINUX_MMZONE_H */
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
*/ */
#ifndef _LINUX_MOUNT_H #ifndef _LINUX_MOUNT_H
#define _LINUX_MOUNT_H #define _LINUX_MOUNT_H
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/list.h> #include <linux/list.h>
...@@ -114,5 +113,4 @@ extern void mark_mounts_for_expiry(struct list_head *mounts); ...@@ -114,5 +113,4 @@ extern void mark_mounts_for_expiry(struct list_head *mounts);
extern spinlock_t vfsmount_lock; extern spinlock_t vfsmount_lock;
extern dev_t name_to_dev_t(char *name); extern dev_t name_to_dev_t(char *name);
#endif
#endif /* _LINUX_MOUNT_H */ #endif /* _LINUX_MOUNT_H */
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#ifndef _LINUX_NCP_FS_I #ifndef _LINUX_NCP_FS_I
#define _LINUX_NCP_FS_I #define _LINUX_NCP_FS_I
#ifdef __KERNEL__
/* /*
* This is the ncpfs part of the inode structure. This must contain * This is the ncpfs part of the inode structure. This must contain
* all the information we need to work with an inode after creation. * all the information we need to work with an inode after creation.
...@@ -28,6 +26,4 @@ struct ncp_inode_info { ...@@ -28,6 +26,4 @@ struct ncp_inode_info {
struct inode vfs_inode; struct inode vfs_inode;
}; };
#endif /* __KERNEL__ */
#endif /* _LINUX_NCP_FS_I */ #endif /* _LINUX_NCP_FS_I */
#ifndef _LINUX_OF_DEVICE_H #ifndef _LINUX_OF_DEVICE_H
#define _LINUX_OF_DEVICE_H #define _LINUX_OF_DEVICE_H
#ifdef __KERNEL__
#include <linux/device.h> #include <linux/device.h>
#include <linux/of.h> #include <linux/of.h>
...@@ -25,5 +24,4 @@ static inline void of_device_free(struct of_device *dev) ...@@ -25,5 +24,4 @@ static inline void of_device_free(struct of_device *dev)
of_release_dev(&dev->dev); of_release_dev(&dev->dev);
} }
#endif /* __KERNEL__ */
#endif /* _LINUX_OF_DEVICE_H */ #endif /* _LINUX_OF_DEVICE_H */
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#ifndef _LINUX_PM_H #ifndef _LINUX_PM_H
#define _LINUX_PM_H #define _LINUX_PM_H
#ifdef __KERNEL__
#include <linux/list.h> #include <linux/list.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/errno.h> #include <asm/errno.h>
...@@ -225,6 +223,4 @@ extern unsigned int pm_flags; ...@@ -225,6 +223,4 @@ extern unsigned int pm_flags;
#define PM_APM 1 #define PM_APM 1
#define PM_ACPI 2 #define PM_ACPI 2
#endif /* __KERNEL__ */
#endif /* _LINUX_PM_H */ #endif /* _LINUX_PM_H */
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
#ifndef _LINUX_PNP_H #ifndef _LINUX_PNP_H
#define _LINUX_PNP_H #define _LINUX_PNP_H
#ifdef __KERNEL__
#include <linux/device.h> #include <linux/device.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -466,6 +464,4 @@ static inline void pnp_unregister_driver(struct pnp_driver *drv) { } ...@@ -466,6 +464,4 @@ static inline void pnp_unregister_driver(struct pnp_driver *drv) { }
#define pnp_dbg(format, arg...) do {} while (0) #define pnp_dbg(format, arg...) do {} while (0)
#endif #endif
#endif /* __KERNEL__ */
#endif /* _LINUX_PNP_H */ #endif /* _LINUX_PNP_H */
#ifndef _LINUX_PROFILE_H #ifndef _LINUX_PROFILE_H
#define _LINUX_PROFILE_H #define _LINUX_PROFILE_H
#ifdef __KERNEL__
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/cpumask.h> #include <linux/cpumask.h>
...@@ -118,6 +116,4 @@ static inline void unregister_timer_hook(int (*hook)(struct pt_regs *)) ...@@ -118,6 +116,4 @@ static inline void unregister_timer_hook(int (*hook)(struct pt_regs *))
#endif /* CONFIG_PROFILING */ #endif /* CONFIG_PROFILING */
#endif /* __KERNEL__ */
#endif /* _LINUX_PROFILE_H */ #endif /* _LINUX_PROFILE_H */
...@@ -33,8 +33,6 @@ ...@@ -33,8 +33,6 @@
#ifndef __LINUX_RCUCLASSIC_H #ifndef __LINUX_RCUCLASSIC_H
#define __LINUX_RCUCLASSIC_H #define __LINUX_RCUCLASSIC_H
#ifdef __KERNEL__
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/threads.h> #include <linux/threads.h>
...@@ -163,5 +161,4 @@ extern long rcu_batches_completed_bh(void); ...@@ -163,5 +161,4 @@ extern long rcu_batches_completed_bh(void);
#define rcu_enter_nohz() do { } while (0) #define rcu_enter_nohz() do { } while (0)
#define rcu_exit_nohz() do { } while (0) #define rcu_exit_nohz() do { } while (0)
#endif /* __KERNEL__ */
#endif /* __LINUX_RCUCLASSIC_H */ #endif /* __LINUX_RCUCLASSIC_H */
...@@ -33,8 +33,6 @@ ...@@ -33,8 +33,6 @@
#ifndef __LINUX_RCUPDATE_H #ifndef __LINUX_RCUPDATE_H
#define __LINUX_RCUPDATE_H #define __LINUX_RCUPDATE_H
#ifdef __KERNEL__
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/threads.h> #include <linux/threads.h>
...@@ -245,5 +243,4 @@ extern long rcu_batches_completed_bh(void); ...@@ -245,5 +243,4 @@ extern long rcu_batches_completed_bh(void);
extern void rcu_init(void); extern void rcu_init(void);
extern int rcu_needs_cpu(int cpu); extern int rcu_needs_cpu(int cpu);
#endif /* __KERNEL__ */
#endif /* __LINUX_RCUPDATE_H */ #endif /* __LINUX_RCUPDATE_H */
...@@ -33,8 +33,6 @@ ...@@ -33,8 +33,6 @@
#ifndef __LINUX_RCUPREEMPT_H #ifndef __LINUX_RCUPREEMPT_H
#define __LINUX_RCUPREEMPT_H #define __LINUX_RCUPREEMPT_H
#ifdef __KERNEL__
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/threads.h> #include <linux/threads.h>
...@@ -104,5 +102,4 @@ static inline void rcu_exit_nohz(void) ...@@ -104,5 +102,4 @@ static inline void rcu_exit_nohz(void)
#define rcu_exit_nohz() do { } while (0) #define rcu_exit_nohz() do { } while (0)
#endif /* CONFIG_NO_HZ */ #endif /* CONFIG_NO_HZ */
#endif /* __KERNEL__ */
#endif /* __LINUX_RCUPREEMPT_H */ #endif /* __LINUX_RCUPREEMPT_H */
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#ifndef __LINUX_RCUPREEMPT_TRACE_H #ifndef __LINUX_RCUPREEMPT_TRACE_H
#define __LINUX_RCUPREEMPT_TRACE_H #define __LINUX_RCUPREEMPT_TRACE_H
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -95,5 +94,4 @@ extern void rcupreempt_trace_done_remove(struct rcupreempt_trace *trace); ...@@ -95,5 +94,4 @@ extern void rcupreempt_trace_done_remove(struct rcupreempt_trace *trace);
extern void rcupreempt_trace_invoke(struct rcupreempt_trace *trace); extern void rcupreempt_trace_invoke(struct rcupreempt_trace *trace);
extern void rcupreempt_trace_next_add(struct rcupreempt_trace *trace); extern void rcupreempt_trace_next_add(struct rcupreempt_trace *trace);
#endif /* __KERNEL__ */
#endif /* __LINUX_RCUPREEMPT_TRACE_H */ #endif /* __LINUX_RCUPREEMPT_TRACE_H */
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#ifndef LINUX_RIO_H #ifndef LINUX_RIO_H
#define LINUX_RIO_H #define LINUX_RIO_H
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/list.h> #include <linux/list.h>
...@@ -331,5 +329,4 @@ extern void rio_close_inb_mbox(struct rio_mport *, int); ...@@ -331,5 +329,4 @@ extern void rio_close_inb_mbox(struct rio_mport *, int);
extern int rio_open_outb_mbox(struct rio_mport *, void *, int, int); extern int rio_open_outb_mbox(struct rio_mport *, void *, int, int);
extern void rio_close_outb_mbox(struct rio_mport *, int); extern void rio_close_outb_mbox(struct rio_mport *, int);
#endif /* __KERNEL__ */
#endif /* LINUX_RIO_H */ #endif /* LINUX_RIO_H */
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
#ifndef LINUX_RIO_DRV_H #ifndef LINUX_RIO_DRV_H
#define LINUX_RIO_DRV_H #define LINUX_RIO_DRV_H
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/list.h> #include <linux/list.h>
...@@ -465,5 +463,4 @@ extern struct rio_dev *rio_get_device(u16 vid, u16 did, struct rio_dev *from); ...@@ -465,5 +463,4 @@ extern struct rio_dev *rio_get_device(u16 vid, u16 did, struct rio_dev *from);
extern struct rio_dev *rio_get_asm(u16 vid, u16 did, u16 asm_vid, u16 asm_did, extern struct rio_dev *rio_get_asm(u16 vid, u16 did, u16 asm_vid, u16 asm_did,
struct rio_dev *from); struct rio_dev *from);
#endif /* __KERNEL__ */
#endif /* LINUX_RIO_DRV_H */ #endif /* LINUX_RIO_DRV_H */
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -90,5 +88,4 @@ extern void up_read_non_owner(struct rw_semaphore *sem); ...@@ -90,5 +88,4 @@ extern void up_read_non_owner(struct rw_semaphore *sem);
# define up_read_non_owner(sem) up_read(sem) # define up_read_non_owner(sem) up_read(sem)
#endif #endif
#endif /* __KERNEL__ */
#endif /* _LINUX_RWSEM_H */ #endif /* _LINUX_RWSEM_H */
#ifndef _LINUX_SEQ_FILE_H #ifndef _LINUX_SEQ_FILE_H
#define _LINUX_SEQ_FILE_H #define _LINUX_SEQ_FILE_H
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/string.h> #include <linux/string.h>
...@@ -69,4 +68,3 @@ extern struct list_head *seq_list_next(void *v, struct list_head *head, ...@@ -69,4 +68,3 @@ extern struct list_head *seq_list_next(void *v, struct list_head *head,
loff_t *ppos); loff_t *ppos);
#endif #endif
#endif
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#ifndef _LINUX_SLAB_H #ifndef _LINUX_SLAB_H
#define _LINUX_SLAB_H #define _LINUX_SLAB_H
#ifdef __KERNEL__
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -283,5 +281,4 @@ extern const struct seq_operations slabinfo_op; ...@@ -283,5 +281,4 @@ extern const struct seq_operations slabinfo_op;
ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *);
#endif #endif
#endif /* __KERNEL__ */
#endif /* _LINUX_SLAB_H */ #endif /* _LINUX_SLAB_H */
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#ifndef _LINUX_SMB_FS_I #ifndef _LINUX_SMB_FS_I
#define _LINUX_SMB_FS_I #define _LINUX_SMB_FS_I
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/fs.h> #include <linux/fs.h>
...@@ -36,4 +35,3 @@ struct smb_inode_info { ...@@ -36,4 +35,3 @@ struct smb_inode_info {
}; };
#endif #endif
#endif
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#ifndef _SMB_FS_SB #ifndef _SMB_FS_SB
#define _SMB_FS_SB #define _SMB_FS_SB
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/smb.h> #include <linux/smb.h>
...@@ -96,6 +94,4 @@ smb_unlock_server(struct smb_sb_info *server) ...@@ -96,6 +94,4 @@ smb_unlock_server(struct smb_sb_info *server)
up(&(server->sem)); up(&(server->sem));
} }
#endif /* __KERNEL__ */
#endif #endif
#ifndef _LINUX_SVGA_H #ifndef _LINUX_SVGA_H
#define _LINUX_SVGA_H #define _LINUX_SVGA_H
#ifdef __KERNEL__
#include <linux/pci.h> #include <linux/pci.h>
#include <video/vga.h> #include <video/vga.h>
...@@ -122,6 +120,5 @@ void svga_set_timings(const struct svga_timing_regs *tm, struct fb_var_screeninf ...@@ -122,6 +120,5 @@ void svga_set_timings(const struct svga_timing_regs *tm, struct fb_var_screeninf
int svga_match_format(const struct svga_fb_format *frm, struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix); int svga_match_format(const struct svga_fb_format *frm, struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix);
#endif /* __KERNEL__ */
#endif /* _LINUX_SVGA_H */ #endif /* _LINUX_SVGA_H */
#ifndef __LINUX_TEXTSEARCH_H #ifndef __LINUX_TEXTSEARCH_H
#define __LINUX_TEXTSEARCH_H #define __LINUX_TEXTSEARCH_H
#ifdef __KERNEL__
#include <linux/types.h> #include <linux/types.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -177,6 +175,4 @@ static inline void *ts_config_priv(struct ts_config *conf) ...@@ -177,6 +175,4 @@ static inline void *ts_config_priv(struct ts_config *conf)
return ((u8 *) conf + TS_PRIV_ALIGN(sizeof(struct ts_config))); return ((u8 *) conf + TS_PRIV_ALIGN(sizeof(struct ts_config)));
} }
#endif /* __KERNEL__ */
#endif #endif
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