lkml.org 
[lkml]   [2019]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86/build: provide missing include file for capflags.c
Date
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 ""

\
 
 \ /
  Last update: 2019-12-06 05:36    [W:0.150 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site