diff options
author | ChenTao <chentao107@huawei.com> | 2020-05-06 13:11:13 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-05-06 16:51:39 -0400 |
commit | 7f6778b11490dbde786bb88a4bb1d648975c621e (patch) | |
tree | 0d0a30c1c1b4e489eedd465e633d7ea5069f728d /drivers/gpu/drm/amd/powerplay | |
parent | fd9a9f8801def3908960312e46bb92126add6b66 (diff) | |
download | linux-stable-7f6778b11490dbde786bb88a4bb1d648975c621e.tar.gz linux-stable-7f6778b11490dbde786bb88a4bb1d648975c621e.tar.bz2 linux-stable-7f6778b11490dbde786bb88a4bb1d648975c621e.zip |
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 <hulkci@huawei.com>
Signed-off-by: ChenTao <chentao107@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c index 2184d247a9f7..0c9be864d072 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, |