public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/build: provide missing include file for capflags.c
@ 2019-12-06  4:35 Valdis Klētnieks
  2019-12-07 23:10 ` kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Valdis Klētnieks @ 2019-12-06  4:35 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar; +Cc: x86, linux-kernel

When building with C=2, sparse warns about missing definitions:

  CHECK   arch/x86/kernel/cpu/capflags.c
arch/x86/kernel/cpu/capflags.c:5:12: warning: symbol 'x86_cap_flags' was not declared. Should it be static?
arch/x86/kernel/cpu/capflags.c:261:12: warning: symbol 'x86_bug_flags' was not declared. Should it be static?

Make the script that generates the C file create the needed #include.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>

diff --git a/arch/x86/kernel/cpu/mkcapflags.sh b/arch/x86/kernel/cpu/mkcapflags.sh
index aed45b8895d5..f26caa6b6f2d 100644
--- a/arch/x86/kernel/cpu/mkcapflags.sh
+++ b/arch/x86/kernel/cpu/mkcapflags.sh
@@ -56,6 +56,10 @@ trap 'rm "$OUT"' EXIT
 	echo "#include <asm/cpufeatures.h>"
 	echo "#endif"
 	echo ""
+	echo "#ifndef _ASM_X86_CPUFEATURE_H"
+	echo "#include <asm/cpufeature.h>"
+	echo "#endif"
+	echo ""
 
 	dump_array "x86_cap_flags" "NCAPINTS*32" "X86_FEATURE_" ""
 	echo ""



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

end of thread, other threads:[~2019-12-07 23:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-06  4:35 [PATCH] x86/build: provide missing include file for capflags.c Valdis Klētnieks
2019-12-07 23:10 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox