Skip to contentSkip to conversation

powerpc/pseries: Make symbol '__pcpu_scope_hcall_stats' static

PATCH Applied Bixuan Cui 2 participants 2 messages Apr 9, 2021 – Apr 19, 2021

Subsystems (2)
lore
Share & tools
lore

Bixuan Cui

author
#0 lore raw

PATCH 1/1 powerpc/pseries: Make symbol '__pcpu_scope_hcall_stats' static

The sparse tool complains as follows:

arch/powerpc/platforms/pseries/hvCall_inst.c:29:1: warning:
symbol '__pcpu_scope_hcall_stats' was not declared. Should it be static?

This symbol is not used outside of hvCall_inst.c, so this commit marks it static.

---
 arch/powerpc/platforms/pseries/hvCall_inst.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/pseries/hvCall_inst.c +1 -1
index 2c59b4986ea5..3a50612a78db 100644
@@ -26,7 +26,7 @@ struct hcall_stats {
 };
 #define HCALL_STAT_ARRAY_SIZE	((MAX_HCALL_OPCODE >> 2) + 1)
 
-DEFINE_PER_CPU(struct hcall_stats[HCALL_STAT_ARRAY_SIZE], hcall_stats);
+static DEFINE_PER_CPU(struct hcall_stats[HCALL_STAT_ARRAY_SIZE], hcall_stats);
 
 /*
  * Routines for displaying the statistics in debugfs
#1 lore raw
Quoted 7 lines · Bixuan Cui

The sparse tool complains as follows:

arch/powerpc/platforms/pseries/hvCall_inst.c:29:1: warning:
symbol '__pcpu_scope_hcall_stats' was not declared. Should it be static?

This symbol is not used outside of hvCall_inst.c, so this commit marks it static.

Applied to powerpc/next.

[1/1] powerpc/pseries: Make symbol '__pcpu_scope_hcall_stats' static

      https://git.kernel.org/powerpc/c/193e4cd8ed9dd01092d01df7706a6b344c946af4

cheers