Skip to content

Commit e69c373

Browse files
Tom Rixalexdeucher
authored andcommitted
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. Fixes: 75145aa ("drm/amdgpu/swsmu: clean up a bunch of stale interfaces") Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 6246059 commit e69c373

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,8 +1712,6 @@ static int smu_display_configuration_change(void *handle,
17121712
const struct amd_pp_display_configuration *display_config)
17131713
{
17141714
struct smu_context *smu = handle;
1715-
int index = 0;
1716-
int num_of_active_display = 0;
17171715

17181716
if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled)
17191717
return -EOPNOTSUPP;
@@ -1724,11 +1722,6 @@ static int smu_display_configuration_change(void *handle,
17241722
smu_set_min_dcef_deep_sleep(smu,
17251723
display_config->min_dcef_deep_sleep_set_clk / 100);
17261724

1727-
for (index = 0; index < display_config->num_path_including_non_display; index++) {
1728-
if (display_config->displays[index].controller_id != 0)
1729-
num_of_active_display++;
1730-
}
1731-
17321725
return 0;
17331726
}
17341727

0 commit comments

Comments
 (0)