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

Message ID 20230429134601.2688558-1-trix@redhat.com
State New
Headers
Series i3c: ast2600: set variable ast2600_i3c_ops storage-class-specifier to static |

Commit Message

Tom Rix April 29, 2023, 1:46 p.m. UTC
  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.

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

Comments

Jeremy Kerr April 30, 2023, 2:48 a.m. UTC | #1
Hi Tom,

> 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!

Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>

Cheers,


Jeremy
  
Alexandre Belloni April 30, 2023, 9:51 p.m. UTC | #2
On Sat, 29 Apr 2023 09:46:01 -0400, Tom Rix wrote:
> 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,
  

Patch

diff --git a/drivers/i3c/master/ast2600-i3c-master.c b/drivers/i3c/master/ast2600-i3c-master.c
index b72c12c5168f..09ed19d489e9 100644
--- a/drivers/i3c/master/ast2600-i3c-master.c
+++ b/drivers/i3c/master/ast2600-i3c-master.c
@@ -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,
 };