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

* Re: [PATCH] x86/build: provide missing include file for capflags.c
  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
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-12-07 23:10 UTC (permalink / raw)
  To: Valdis Klētnieks
  Cc: kbuild-all, Thomas Gleixner, Ingo Molnar, x86, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1378 bytes --]

Hi "Valdis,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/auto-latest]
[also build test ERROR on tip/x86/core v5.4 next-20191207]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Valdis-Kl-tnieks/x86-build-provide-missing-include-file-for-capflags-c/20191207-215013
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 462ca02d04c308fedabcce250dc10f59e5cb1a80
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/x86/boot/mkcpustr.c:18:0:
>> ./arch/x86/boot/../kernel/cpu/capflags.c:6:10: fatal error: asm/cpufeature.h: No such file or directory
    #include <asm/cpufeature.h>
             ^~~~~~~~~~~~~~~~~~
   compilation terminated.

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28249 bytes --]

^ permalink raw reply	[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