Skip to contentSkip to conversation

drm/amd/pm: remove dead code in smu_get_power_limit

PATCH In review Jesse Zhang 1 participant 1 message Jun 3, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 6/12 drm/amd/pm: remove dead code in smu_get_power_limit

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.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -2
index 6f742d88867d..0b4193639e65 100644
@@ -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;
 		}
 	}
 
Signature · 1 line
2.25.1