* [PATCH v3]kernel.h Move preprocessor #warning about using kernel headers in userpsace to types.h
@ 2010-07-01 21:28 Justin P. Mattock
2010-07-11 19:39 ` Jiri Kosina
0 siblings, 1 reply; 3+ messages in thread
From: Justin P. Mattock @ 2010-07-01 21:28 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, arnd, jkosina, Justin P. Mattock
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>
---
include/linux/kernel.h | 6 ------
include/linux/types.h | 5 ++++-
2 files changed, 4 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..331d8ba 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -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>
--
1.6.5.2.180.gc5b3e
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3]kernel.h Move preprocessor #warning about using kernel headers in userpsace to types.h
2010-07-01 21:28 [PATCH v3]kernel.h Move preprocessor #warning about using kernel headers in userpsace to types.h Justin P. Mattock
@ 2010-07-11 19:39 ` Jiri Kosina
2010-07-11 20:07 ` Justin P. Mattock
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Kosina @ 2010-07-11 19:39 UTC (permalink / raw)
To: Justin P. Mattock; +Cc: linux-kernel, akpm, arnd
On Thu, 1 Jul 2010, Justin P. Mattock wrote:
> 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.
I have applied the patch, thanks Justin for your persistence, and thanks
for reviews while I have been offline, Arnd.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3]kernel.h Move preprocessor #warning about using kernel headers in userpsace to types.h
2010-07-11 19:39 ` Jiri Kosina
@ 2010-07-11 20:07 ` Justin P. Mattock
0 siblings, 0 replies; 3+ messages in thread
From: Justin P. Mattock @ 2010-07-11 20:07 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-kernel, akpm, arnd
On 07/11/2010 12:39 PM, Jiri Kosina wrote:
> On Thu, 1 Jul 2010, Justin P. Mattock wrote:
>
>> 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.
>
> I have applied the patch, thanks Justin for your persistence, and thanks
> for reviews while I have been offline, Arnd.
>
cool alright.. was wonder if this was correct or not, from this it seems
it is..(if I see anything I'll send it out..)
Thanks as well for being patient with me..
Justin P. Mattock
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-11 20:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-01 21:28 [PATCH v3]kernel.h Move preprocessor #warning about using kernel headers in userpsace to types.h Justin P. Mattock
2010-07-11 19:39 ` Jiri Kosina
2010-07-11 20:07 ` Justin P. Mattock
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.