Commit 7f6778b1 authored by ChenTao's avatar ChenTao Committed by Alex Deucher

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarChenTao <chentao107@huawei.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fd9a9f88
...@@ -1293,8 +1293,6 @@ static int navi10_set_power_profile_mode(struct smu_context *smu, long *input, u ...@@ -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 (smu->power_profile_mode == PP_SMC_POWER_PROFILE_CUSTOM) {
if (size < 0)
return -EINVAL;
ret = smu_update_table(smu, ret = smu_update_table(smu,
SMU_TABLE_ACTIVITY_MONITOR_COEFF, WORKLOAD_PPLIB_CUSTOM_BIT, SMU_TABLE_ACTIVITY_MONITOR_COEFF, WORKLOAD_PPLIB_CUSTOM_BIT,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment