Skip to contentSkip to conversation

drm/amd/display: set variable dccg314_init storage-class-specifier to static

PATCH Applied Tom Rix 2 participants 2 messages Apr 15, 2023 – Apr 17, 2023

Subsystems (3)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 drm/amd/display: set variable dccg314_init storage-class-specifier to static

smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_dccg.c:277:6: warning: symbol
'dccg314_init' was not declared. Should it be static?

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

---
 drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c +1 -1
index 6f879265ad9c..de7bfba2c179 100644
@@ -274,7 +274,7 @@ static void dccg314_set_dpstreamclk(
 	}
 }
 
-void dccg314_init(struct dccg *dccg)
+static void dccg314_init(struct dccg *dccg)
 {
 	int otg_inst;
 
Signature · 1 line
2.27.0
#1 lore raw
Quoted 7 lines · Tom Rix

smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_dccg.c:277:6: warning: symbol
'dccg314_init' was not declared. Should it be static?

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

Applied, thanks!

Quoted 17 lines
---
  drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c +1 -1
index 6f879265ad9c..de7bfba2c179 100644
@@ -274,7 +274,7 @@ static void dccg314_set_dpstreamclk(
  	}
  }
 
-void dccg314_init(struct dccg *dccg)
+static void dccg314_init(struct dccg *dccg)
  {
  	int otg_inst;
 
Signature · 1 line
Hamza