linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] headers_check: don't warn about kexec.h
@ 2015-01-13 16:19 Arnd Bergmann
  2015-01-13 17:13 ` Paul Bolle
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-01-13 16:19 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kernel, linux-api, linux-kbuild

We've been getting this warning for ages:

./usr/include/linux/kexec.h:61: userspace cannot reference function or variable defined in the kernel

There is no proper fix for this file, as the declaration is meant for
user space, not for the kernel, so we should work around it the
same way that we treat the seqbuf_dump() definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl
index 62320f93e903..fb051848667c 100755
--- a/scripts/headers_check.pl
+++ b/scripts/headers_check.pl
@@ -69,6 +69,10 @@ sub check_declarations
 	if ($line =~ m/^void seqbuf_dump\(void\);/) {
 		return;
 	}
+	# user-only declaration from kexec.h
+	if ($line =~ m/^extern int kexec_load/) {
+		return;
+	}
 	if ($line =~ m/^(\s*extern|unsigned|char|short|int|long|void)\b/) {
 		printf STDERR "$filename:$lineno: " .
 			      "userspace cannot reference function or " .

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-14  0:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13 16:19 [PATCH] headers_check: don't warn about kexec.h Arnd Bergmann
2015-01-13 17:13 ` Paul Bolle
2015-01-13 20:27   ` Arnd Bergmann
2015-01-13 21:05     ` Paul Bolle
2015-01-14  0:47       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).