powerpc/perf: Add declarations to fix sparse warnings
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Sep 2020 11:56:37 +0000 (21:56 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 18 Sep 2020 09:59:43 +0000 (19:59 +1000)
Sparse warns about all the init functions:
  symbol init_ppc970_pmu was not declared. Should it be static?
  symbol init_power5p_pmu was not declared. Should it be static?
  symbol init_power5_pmu was not declared. Should it be static?
  symbol init_power6_pmu was not declared. Should it be static?
  symbol init_power7_pmu was not declared. Should it be static?
  symbol init_power9_pmu was not declared. Should it be static?
  symbol init_power8_pmu was not declared. Should it be static?
  symbol init_generic_compat_pmu was not declared. Should it be static?

They're already declared in internal.h, so just make sure all the C
files include that directly or indirectly.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://lore.kernel.org/r/20200916115637.3100484-2-mpe@ellerman.id.au
arch/powerpc/perf/isa207-common.h
arch/powerpc/perf/power10-pmu.c
arch/powerpc/perf/power5+-pmu.c
arch/powerpc/perf/power5-pmu.c
arch/powerpc/perf/power6-pmu.c
arch/powerpc/perf/power7-pmu.c
arch/powerpc/perf/ppc970-pmu.c

index 044de65e96b92877bac58cc8a4432589f11cae07..7025de5e60e7d8ac31a7b613412c893c298d0220 100644 (file)
@@ -13,6 +13,8 @@
 #include <asm/firmware.h>
 #include <asm/cputable.h>
 
+#include "internal.h"
+
 #define EVENT_EBB_MASK         1ull
 #define EVENT_EBB_SHIFT                PERF_EVENT_CONFIG_EBB_SHIFT
 #define EVENT_BHRB_MASK                1ull
index 83148656b5241e7b3956eb685fe4bf30d7401519..9dbe8f9b89b4f262f2255708d5741630486ca2c9 100644 (file)
@@ -9,7 +9,6 @@
 #define pr_fmt(fmt)    "power10-pmu: " fmt
 
 #include "isa207-common.h"
-#include "internal.h"
 
 /*
  * Raw event encoding for Power10:
index a62b2cd7914fd92ee376b78fc4293023d497fdd7..3e64b4a1511f66c5f967443d67872d154599d5ad 100644 (file)
@@ -10,6 +10,8 @@
 #include <asm/reg.h>
 #include <asm/cputable.h>
 
+#include "internal.h"
+
 /*
  * Bits in event code for POWER5+ (POWER5 GS) and POWER5++ (POWER5 GS DD3)
  */
index 8732b587cf71d17848d2e3cecc8890c14f46035f..017bb19b73fbbc1bcfa8f511ffc23a81a1b70924 100644 (file)
@@ -10,6 +10,8 @@
 #include <asm/reg.h>
 #include <asm/cputable.h>
 
+#include "internal.h"
+
 /*
  * Bits in event code for POWER5 (not POWER5++)
  */
index 0e318cf87129daa15a4f578bf6718bac9813d806..189974478e9fcce8d59d7d9c89aebd1c039028a3 100644 (file)
@@ -10,6 +10,8 @@
 #include <asm/reg.h>
 #include <asm/cputable.h>
 
+#include "internal.h"
+
 /*
  * Bits in event code for POWER6
  */
index 5e0bf09cf077d109a290031ea03e38ffeb5bed1b..bacfab104a1a15128ea991303100471f3612bd6d 100644 (file)
@@ -10,6 +10,8 @@
 #include <asm/reg.h>
 #include <asm/cputable.h>
 
+#include "internal.h"
+
 /*
  * Bits in event code for POWER7
  */
index d35223fb112c064722a3d861757482bb362eff82..7d78df97f2721c1da9bb84eadd5128b2f0056b88 100644 (file)
@@ -9,6 +9,8 @@
 #include <asm/reg.h>
 #include <asm/cputable.h>
 
+#include "internal.h"
+
 /*
  * Bits in event code for PPC970
  */