From 3958f28d9ed5940dc76a57365228b834d58e368a Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 10 Jun 2022 01:03:18 +0000 Subject: [PATCH] drm/amd/pm: fix the compile warning From Evan Quan ae488dafe074e420ccf361b2633f7fbc314eaedf in linux 5.15.y/5.15.46 555238d92ac32dbad2d77ad2bafc48d17391990c in mainline linux --- sys/dev/pci/drm/amd/pm/powerplay/amdgpu_kv_dpm.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/sys/dev/pci/drm/amd/pm/powerplay/amdgpu_kv_dpm.c b/sys/dev/pci/drm/amd/pm/powerplay/amdgpu_kv_dpm.c index bcae42cef37..6ba4c2ae69a 100644 --- a/sys/dev/pci/drm/amd/pm/powerplay/amdgpu_kv_dpm.c +++ b/sys/dev/pci/drm/amd/pm/powerplay/amdgpu_kv_dpm.c @@ -1609,19 +1609,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.20.1