Skip to contentSkip to conversation

thunderbolt: set variable tmu_params storage class specifier to static

PATCH Applied Tom Rix 2 participants 2 messages Jul 2, 2023 – Jul 31, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 thunderbolt: set variable tmu_params storage class specifier to static

smatch reports drivers/thunderbolt/tmu.c:30:3: warning: symbol
'tmu_params' was not declared. Should it be static?

This variable is only used in its defining file so should be static.

---
 drivers/thunderbolt/tmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thunderbolt/tmu.c +1 -1
index 1269f417515b..c789024d7ffe 100644
@@ -19,7 +19,7 @@ static const unsigned int tmu_rates[] = {
 	[TB_SWITCH_TMU_MODE_MEDRES_ENHANCED_UNI] = 16,
 };
 
-const struct {
+static const struct {
 	unsigned int freq_meas_window;
 	unsigned int avg_const;
 	unsigned int delta_avg_const;
Signature · 1 line
2.27.0
#1 lore raw
Quoted 7 lines · Tom Rix

smatch reports drivers/thunderbolt/tmu.c:30:3: warning: symbol
'tmu_params' was not declared. Should it be static?

This variable is only used in its defining file so should be static.

Applied, thanks!