Messages in this thread Patch in this message | | | From | Qiujun Huang <> | Subject | [PATCH] drm/amd/powerplay: remove redundant check in smu_set_soft_freq_range | Date | Tue, 17 Mar 2020 19:56:53 +0800 |
| |
min(max) is type of uint32_t, min < 0(max < 0) is never true. move it.
Addressed-Coverity: ("Unsigned compared against 0") Signed-off-by: Qiujun Huang <hqjagain@gmail.com> --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c index 96e81c7bc266..fdaea0cc2828 100644 --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c @@ -222,9 +222,6 @@ int smu_set_soft_freq_range(struct smu_context *smu, enum smu_clk_type clk_type, { int ret = 0; - if (min < 0 && max < 0) - return -EINVAL; - if (!smu_clk_dpm_is_enabled(smu, clk_type)) return 0; -- 2.17.1
| |