From: Justin P. Mattock on 1 Jul 2010 13:20 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. Signed-off-by: Justin P. Mattock <justinmattock(a)gmail.com> --- include/linux/kernel.h | 6 ------ include/linux/types.h | 7 ++++++- 2 files changed, 6 insertions(+), 7 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..1be69b8 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -8,7 +8,12 @@ #define DECLARE_BITMAP(name,bits) \ unsigned long name[BITS_TO_LONGS(bits)] - +#else +#ifndef __EXPORTED_HEADERS__ +#ifndef __KERNEL__ +#warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders" +#endif /* __KERNEL__ */ +#endif /* __EXPORTED_HEADERS__ */ #endif #include <linux/posix_types.h> -- 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/
|
Pages: 1 Prev: dspbridge: add mmufault support Next: mm: iommu: The Virtual Contiguous Memory Manager |