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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux