Skip to contentSkip to conversation

arch/x86/events/intel/lbr.c - make variable static

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

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/x86/events/intel/lbr.c - make variable static

When compiling with C=2, sparse warns:

CHECK arch/x86/events/intel/lbr.c
arch/x86/events/intel/lbr.c:276:1: warning: symbol 'lbr_from_quirk_key' was not declared. Should it be static?

And yes, it can be static.

arch/x86/events/intel/lbr.c +1 -1
index 6f814a27416b..ea54634eabf3 100644
@@ -273,7 +273,7 @@ static inline bool lbr_from_signext_quirk_needed(void)
 	return !tsx_support && (lbr_desc[lbr_format] & LBR_TSX);
 }
 
-DEFINE_STATIC_KEY_FALSE(lbr_from_quirk_key);
+static DEFINE_STATIC_KEY_FALSE(lbr_from_quirk_key);
 
 /* If quirk is enabled, ensure sign extension is 63 bits: */
 inline u64 lbr_from_signext_quirk_wr(u64 val)