Skip to contentSkip to conversation

i3c: ast2600: set variable ast2600_i3c_ops storage-class-specifier to static

PATCH Applied Tom Rix 3 participants 3 messages Apr 29, 2023 – Apr 30, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 i3c: ast2600: set variable ast2600_i3c_ops storage-class-specifier to static

smatch reports drivers/i3c/master/ast2600-i3c-master.c:121:34: warning: symbol
'ast2600_i3c_ops' was not declared. Should it be static?

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

---
 drivers/i3c/master/ast2600-i3c-master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i3c/master/ast2600-i3c-master.c +1 -1
index b72c12c5168f..09ed19d489e9 100644
@@ -118,7 +118,7 @@ static void ast2600_i3c_set_dat_ibi(struct dw_i3c_master *i3c,
 	}
 }
 
-const struct dw_i3c_platform_ops ast2600_i3c_ops = {
+static const struct dw_i3c_platform_ops ast2600_i3c_ops = {
 	.init = ast2600_i3c_init,
 	.set_dat_ibi = ast2600_i3c_set_dat_ibi,
 };
Signature · 1 line
2.27.0
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi Tom,

Quoted 6 lines

smatch reports drivers/i3c/master/ast2600-i3c-master.c:121:34: warning: symbol 'ast2600_i3c_ops' was not declared. Should it be static?

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

Super, thanks!

Cheers,

Jeremy

maintainer Applied
#2 lore raw
In reply to Tom Rix
Quoted 8 lines · Tom Rix

smatch reports drivers/i3c/master/ast2600-i3c-master.c:121:34: warning: symbol
'ast2600_i3c_ops' was not declared. Should it be static?

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

[...]

Applied, thanks!

[1/1] i3c: ast2600: set variable ast2600_i3c_ops storage-class-specifier to static

      commit: 6b496a94c5905fca7879bc0dc438a47de40b7d4f

Best regards,

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com