fix #warning about using kernel headers in userpsace
authorJustin P. Mattock <justinmattock@gmail.com>
Thu, 1 Jul 2010 21:28:27 +0000 (14:28 -0700)
committerJiri Kosina <jkosina@suse.cz>
Sun, 11 Jul 2010 19:38:56 +0000 (21:38 +0200)
Move the preprocessor #warning message:
warning: #warning Attempt to use kernel headers from user space,
see http://kernelnewbies.org/KernelHeaders
from kernel.h to types.h.

And also fixe the #warning message due to the preprocessor not being able to
read the web address due to it thinking it was the start of a comment.  also
remove the extra #ifndef _KERNEL_ since it's already there.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
include/linux/kernel.h
include/linux/types.h

index 8317ec4b9f3b4bbe615109073e7bd8ad9b946c1b..bd8501a8ca1c92e1ca85d0b3a98b7f0d1e5afe42 100644 (file)
@@ -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 */
index 23d237a075e21ce2635f8ce2b5a15dfd2fcde9a7..331d8baabcf29e285dc060d91d6363614008a20f 100644 (file)
@@ -8,7 +8,10 @@
 
 #define DECLARE_BITMAP(name,bits) \
        unsigned long name[BITS_TO_LONGS(bits)]
-
+#else
+#ifndef __EXPORTED_HEADERS__
+#warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
+#endif /* __EXPORTED_HEADERS__ */
 #endif
 
 #include <linux/posix_types.h>