Skip to contentSkip to conversation

drm/amd/display: set variables aperture_default_system and context0_default_system storage-class-specifier to static

PATCH Applied Tom Rix 2 participants 2 messages Apr 6, 2023 – Apr 10, 2023

Subsystems (3)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 drm/amd/display: set variables aperture_default_system and context0_default_system storage-class-specifier to static

smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hubp.c:758:10: warning: symbol
'aperture_default_system' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hubp.c:759:10: warning: symbol
'context0_default_system' was not declared. Should it be static?

These variables are only used in one file so should be static.

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c +2 -2
index a142a00bc432..bf399819ca80 100644
@@ -755,8 +755,8 @@ bool hubp1_is_flip_pending(struct hubp *hubp)
 	return false;
 }
 
-uint32_t aperture_default_system = 1;
-uint32_t context0_default_system; /* = 0;*/
+static uint32_t aperture_default_system = 1;
+static uint32_t context0_default_system; /* = 0;*/
 
 static void hubp1_set_vm_system_aperture_settings(struct hubp *hubp,
 		struct vm_system_aperture_param *apt)
Signature · 1 line
2.27.0
#1 lore raw
Quoted 9 lines · Tom Rix

smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hubp.c:758:10: warning: symbol
'aperture_default_system' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hubp.c:759:10: warning: symbol
'context0_default_system' was not declared. Should it be static?

These variables are only used in one file so should be static.

Applied, thanks!

Quoted 19 lines
---
  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c +2 -2
index a142a00bc432..bf399819ca80 100644
@@ -755,8 +755,8 @@ bool hubp1_is_flip_pending(struct hubp *hubp)
  	return false;
  }
 
-uint32_t aperture_default_system = 1;
-uint32_t context0_default_system; /* = 0;*/
+static uint32_t aperture_default_system = 1;
+static uint32_t context0_default_system; /* = 0;*/
 
  static void hubp1_set_vm_system_aperture_settings(struct hubp *hubp,
  		struct vm_system_aperture_param *apt)
Signature · 1 line
Hamza