drm/amd/pm: fix the compile warning
Subsystems (3)
PATCH v2 1/1 drm/amd/pm: fix the compile warning
Fix the compile warning below:drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1641kv_get_acp_boot_level() warn: always true condition '(table->entries[i]->clk >= 0) => (0-u32max >= 0)'
Reported-by kernel test robot <[email protected]>
CC Alex Deucher <[email protected]>
Signed-off-by Evan Quan <[email protected]>
Change-Id If4985252017023d6711b4d7eb1192a397baff813
--v1->v2:
- drop dead code(Alex)
--- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c +1 -13
@@ -1623,19 +1623,7 @@ static int kv_update_samu_dpm(struct amdgpu_device *adev, bool gate)static u8 kv_get_acp_boot_level (struct amdgpu_device *adev) { -u8 i; -struct amdgpu_clock_voltage_dependency_table *table = - &adev->pm.dpm.dyn_state.acp_clock_voltage_dependency_table; - -for (i =0 ; i < table->count; i++) { -if (table->entries[i].clk >=0 )/* XXX */ -break ; - } - -if (i >= table->count) - i = table->count -1 ; - -return i; +return 0 ; }static void kv_update_acp_boot_level (struct amdgpu_device *adev)
Signature · 1 line
2.29.0
Quoted 8 lines · Evan Quan
Fix the compile warning below:
drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1641kv_get_acp_boot_level()warn: always true condition '(table->entries[i]->clk >= 0) => (0-u32max >= 0)'Reported-by kernel test robot <[email protected]>CC Alex Deucher <[email protected]>Signed-off-by Evan Quan <[email protected]>
Reviewed-by Alex Deucher <[email protected]>
Quoted 36 lines
Change-Id: If4985252017023d6711b4d7eb1192a397baff813 --
v1->v2:
- drop dead code(Alex)--- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c +1
-14@@ -1623,19 +1623,7 @@ static int kv_update_samu_dpm(struct amdgpu_device *adev, bool gate)static u8 kv_get_acp_boot_level (struct amdgpu_device *adev) { -u8 i; -struct amdgpu_clock_voltage_dependency_table *table = - &adev->pm.dpm.dyn_state.acp_clock_voltage_dependency_table; - -for (i =0 ; i < table->count; i++) { -if (table->entries[i].clk >=0 )/* XXX */ -break ; - } - -if (i >= table->count) - i = table->count -1 ; - -return i; +return 0 ; }static void kv_update_acp_boot_level (struct amdgpu_device *adev) --2.29.0