mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Justin P. Mattock" <justinmattock@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, arnd@arndb.de, jkosina@suse.cz,
	"Justin P. Mattock" <justinmattock@gmail.com>
Subject: [PATCH]kernel.h Move warning message about using kernel headers for userspace to types.h
Date: Wed, 30 Jun 2010 15:09:45 -0700	[thread overview]
Message-ID: <1277935785-6023-1-git-send-email-justinmattock@gmail.com> (raw)

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@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


             reply	other threads:[~2010-06-30 22:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30 22:09 Justin P. Mattock [this message]
2010-07-01  7:58 ` Arnd Bergmann
2010-07-01 13:34   ` Justin P. Mattock
2010-07-01 15:07     ` Arnd Bergmann
2010-07-01 15:57       ` Justin P. Mattock
2010-07-01 17:20       ` Justin P. Mattock
2010-07-01 20:38         ` Arnd Bergmann
2010-07-01 21:31           ` Justin P. Mattock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1277935785-6023-1-git-send-email-justinmattock@gmail.com \
    --to=justinmattock@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®