diff mbox series

thunderbolt: set variable tmu_params storage class specifier to static

Message ID 20230702190608.3441704-1-trix@redhat.com (mailing list archive)
State Accepted
Commit 6dacc6db4628af3fdc0627dca6dd6104ec9138ed
Headers show
Series thunderbolt: set variable tmu_params storage class specifier to static | expand

Commit Message

Tom Rix July 2, 2023, 7:06 p.m. UTC
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.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/thunderbolt/tmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mika Westerberg July 31, 2023, 11:14 a.m. UTC | #1
On Sun, Jul 02, 2023 at 03:06:08PM -0400, Tom Rix wrote:
> 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.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Applied, thanks!
diff mbox series

Patch

diff --git a/drivers/thunderbolt/tmu.c b/drivers/thunderbolt/tmu.c
index 1269f417515b..c789024d7ffe 100644
--- a/drivers/thunderbolt/tmu.c
+++ b/drivers/thunderbolt/tmu.c
@@ -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;