drm/amd/pm: remove unused num_of_active_display variable
Subsystems (3)
PATCH 1/1 drm/amd/pm: remove unused num_of_active_display variable
clang with W=1 reports drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:1700:6: error: variable
'num_of_active_display' set but not used [-Werror,-Wunused-but-set-variable]
int num_of_active_display = 0;
^This variable is not used so remove it.
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -7
@@ -1696,8 +1696,6 @@ static int smu_display_configuration_change(void *handle, const struct amd_pp_display_configuration *display_config) {struct smu_context *smu = handle; -int index =0 ; -int num_of_active_display =0 ;if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled)return -EOPNOTSUPP ;
@@ -1708,11 +1706,6 @@ static int smu_display_configuration_change(void *handle,smu_set_min_dcef_deep_sleep (smu, display_config->min_dcef_deep_sleep_set_clk /100 ); -for (index =0 ; index < display_config->num_path_including_non_display; index++) { -if (display_config->displays[index].controller_id !=0 ) - num_of_active_display++; - } -return 0 ; }
Signature · 1 line
2.27.0
Quoted 9 lines · Tom Rix
clang with W=1 reports
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:1700:6: error: variable
'num_of_active_display' set but not used [-Werror,-Wunused-but-set-variable]int num_of_active_display = 0; ^This variable is not used so remove it.
Signed-off-by Tom Rix <[email protected]>
Thanks for the patch!
stale interfaces")
Quoted 32 lines
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 7 ------- 1 file changed, 7 deletions(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0
-8@@ -1696,8 +1696,6 @@ static int smu_display_configuration_change(void *handle, const struct amd_pp_display_configuration *display_config) {struct smu_context *smu = handle; -int index =0 ; -int num_of_active_display =0 ;if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled)return -EOPNOTSUPP ;@@ -1708,11 +1706,6 @@ static int smu_display_configuration_change(void *handle,smu_set_min_dcef_deep_sleep (smu, display_config->min_dcef_deep_sleep_set_clk /100 ); -for (index =0 ; index < display_config->num_path_including_non_display; index++) { -if (display_config->displays[index].controller_id !=0 ) - num_of_active_display++; - } -return 0 ; } --2.27.0
Signature · 2 lines
Thanks, ~Nick Desaulniers
[AMD Official Use Only - General]
Quoted 63 lines
-----Original Message-----
From: Tom Rix <[email protected]>
Sent: Saturday, April 1, 2023 12:41 AM
To: Quan, Evan <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Zhang, Hawking <[email protected]>; Feng, Kenneth <[email protected]>; Lazar, Lijo <[email protected]>; Wang, Yang(Kevin) <[email protected]>; Huang, Tim <[email protected]>; [email protected]; Liu, Kun <[email protected]>; Limonciello, Mario <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]; Tom Rix <[email protected]>
Subject: [PATCH] drm/amd/pm: remove unusednum_of_active_displayvariableclang with W=1 reports
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:1700:6: error:
variable
'num_of_active_display' set but not used [-Werror,-Wunused-but-set-
variable]int num_of_active_display = 0; ^This variable is not used so remove it.
Signed-off-by Tom Rix <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 7 ------- 1 file changed, 7 deletions(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0
-2@@ -1696,8 +1696,6 @@ static int smu_display_configuration_change(void *handle, const struct amd_pp_display_configuration *display_config) {struct smu_context *smu = handle; -int index =0 ; -int num_of_active_display =0 ;if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0
-5return -EOPNOTSUPP ;@@ -1708,11 +1706,6 @@ static int smu_display_configuration_change(void *handle,smu_set_min_dcef_deep_sleep (smu, display_config- >min_dcef_deep_sleep_set_clk / 100); - for (index = 0; index < display_config- >num_path_including_non_display; index++) { -if (display_config->displays[index].controller_id !=0 ) - num_of_active_display++; - } -return 0;
}--
2.27.0
Alex Deucher
AppliedApplied. Thanks!
Quoted 68 lines · Evan
[AMD Official Use Only - General]
Reviewed-by Evan Quan <[email protected]>Quoted 63 lines
-----Original Message-----
From: Tom Rix <[email protected]>
Sent: Saturday, April 1, 2023 12:41 AM
To: Quan, Evan <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Zhang, Hawking <[email protected]>; Feng, Kenneth <[email protected]>; Lazar, Lijo <[email protected]>; Wang, Yang(Kevin) <[email protected]>; Huang, Tim <[email protected]>; [email protected]; Liu, Kun <[email protected]>; Limonciello, Mario <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]; Tom Rix <[email protected]>
Subject: [PATCH] drm/amd/pm: remove unusednum_of_active_displayvariableclang with W=1 reports
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:1700:6: error:
variable
'num_of_active_display' set but not used [-Werror,-Wunused-but-set-
variable]int num_of_active_display = 0; ^This variable is not used so remove it.
Signed-off-by Tom Rix <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 7 ------- 1 file changed, 7 deletions(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0
-2@@ -1696,8 +1696,6 @@ static int smu_display_configuration_change(void *handle, const struct amd_pp_display_configuration *display_config) {struct smu_context *smu = handle; -int index =0 ; -int num_of_active_display =0 ;if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled)return -EOPNOTSUPP;drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0
-5@@ -1708,11 +1706,6 @@ static int smu_display_configuration_change(void *handle,smu_set_min_dcef_deep_sleep (smu, display_config- >min_dcef_deep_sleep_set_clk / 100); - for (index = 0; index < display_config- >num_path_including_non_display; index++) { -if (display_config->displays[index].controller_id !=0 ) - num_of_active_display++; - } -return 0;}
--
2.27.0