Skip to contentSkip to conversation

arch/x86/lib/cpu-c - missing prototypes

PATCH New Valdis Klētnieks 1 participant 1 message Aug 8, 2019 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/x86/lib/cpu-c - missing prototypes

When building with W=1, we get warnings about missing prototypes:

CC arch/x86/lib/cpu.o
arch/x86/lib/cpu.c:5:14: warning: no previous prototype for 'x86_family' [-Wmissing-prototypes]
5 | unsigned int x86_family(unsigned int sig)
| ^~~~~~~~~~
arch/x86/lib/cpu.c:18:14: warning: no previous prototype for 'x86_model' [-Wmissing-prototypes]
18 | unsigned int x86_model(unsigned int sig)

      |              ^~~~~~~~~
arch/x86/lib/cpu.c:33:14: warning: no previous prototype for 'x86_stepping' [-Wmissing-prototypes]
   33 | unsigned int x86_stepping(unsigned int sig)
      |              ^~~~~~~~~~~~

Add the proper include file so the prototypes are there.

arch/x86/lib/cpu.c +1 -0
index 04967cdce5d1..7ad68917a51e 100644
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #include <linux/types.h>
 #include <linux/export.h>
+#include <asm/cpu.h>
 
 unsigned int x86_family(unsigned int sig)
 {