From: Justin P. Mattock on
Hopefully correct, as request move the function that checks
if userspace is using kernel headers, from kernel.h to types.h.
(Please check.)

Signed-off-by: Justin P. Mattock <justinmattock(a)gmail.com>

---
include/linux/kernel.h | 6 ------
include/linux/types.h | 6 ++++++
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 8317ec4..bd8501a 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -728,12 +728,6 @@ extern int do_sysinfo(struct sysinfo *info);

#endif /* __KERNEL__ */

-#ifndef __EXPORTED_HEADERS__
-#ifndef __KERNEL__
-#warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders
-#endif /* __KERNEL__ */
-#endif /* __EXPORTED_HEADERS__ */
-
#define SI_LOAD_SHIFT 16
struct sysinfo {
long uptime; /* Seconds since boot */
diff --git a/include/linux/types.h b/include/linux/types.h
index 23d237a..41fe43d 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -179,6 +179,12 @@ typedef __u32 __bitwise __wsum;
typedef unsigned __bitwise__ gfp_t;
typedef unsigned __bitwise__ fmode_t;

+#ifndef __EXPORTED_HEADERS__
+#ifndef __KERNEL__
+#warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
+#endif /* __KERNEL__ */
+#endif /* __EXPORTED_HEADERS__ */
+
#ifdef CONFIG_PHYS_ADDR_T_64BIT
typedef u64 phys_addr_t;
#else
--
1.6.5.2.180.gc5b3e

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/