From: ChenTao Date: Wed, 6 May 2020 05:11:13 +0000 (+0800) Subject: drm/amdgpu/navi10: fix unsigned comparison with 0 X-Git-Tag: baikal/mips/sdk5.9~13559^2~11^2~24 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=dfa7d9a5332c1b4ac3896f6239b8228aaec252a0;p=kernel.git drm/amdgpu/navi10: fix unsigned comparison with 0 Fixes warning because size is uint32_t and can never be negtative drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:1296:12: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (size < 0) Reported-by: Hulk Robot Signed-off-by: ChenTao Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c index 2184d247a9f7a..0c9be864d072e 100644 --- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c +++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c @@ -1293,8 +1293,6 @@ static int navi10_set_power_profile_mode(struct smu_context *smu, long *input, u } if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_CUSTOM) { - if (size < 0) - return -EINVAL; ret = smu_update_table(smu, SMU_TABLE_ACTIVITY_MONITOR_COEFF, WORKLOAD_PPLIB_CUSTOM_BIT,