[PATCH 06/12] drm/amd/pm: remove dead code in smu_get_power_limit

Jesse Zhang jesse.zhang at amd.com
Mon Jun 3 08:47:57 UTC 2024


At the start it checks limit_level.
When switching on limit_level, the value of limit_level must be between -1 and 2.
The switch governing value limit_level cannot reach the default case.

Signed-off-by: Jesse Zhang <Jesse.Zhang at amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 6f742d88867d..0b4193639e65 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -2754,8 +2754,6 @@ int smu_get_power_limit(void *handle,
 		case SMU_PPT_LIMIT_MIN:
 			*limit = smu->min_power_limit;
 			break;
-		default:
-			return -EINVAL;
 		}
 	}
 
-- 
2.25.1



More information about the amd-gfx mailing list