drm/amd/powerplay: remove a less than zero uint32_t check
Subsystems (3)
PATCH 1/1 drm/amd/powerplay: remove a less than zero uint32_t check
From: Colin Ian King <[email protected]>
The check to see if the uint32_t variable 'size' is less than zero is redundant as it is unsigned and can never be less than zero. Remove this redundant check.
Addresses-Coverity: ("Unsigned compared to zero")
--- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/powerplay/navi10_ppt.c +0 -3
@@ -1043,9 +1043,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 <<16 , (void *)(&activity_monitor), false);
Signature · 1 line
2.7.4
A message that is not in the archive (sent off-list or not yet received): 20190628152804.16954-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org
Abramov, Slava
Acked-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Colin King <[email protected]>
Sent: Friday, June 28, 2019 11:28:04 AM
To: Rex Zhu; Quan, Evan; Deucher, Alexander; Koenig, Christian; Zhou, David(ChunMing); David Airlie; Daniel Vetter; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH][next] drm/amd/powerplay: remove a less than zero uint32_t check
From: Colin Ian King <[email protected]>
The check to see if the uint32_t variable 'size' is less than zero is redundant as it is unsigned and can never be less than zero. Remove this redundant check.
Addresses-Coverity: ("Unsigned compared to zero")
--- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/powerplay/navi10_ppt.c +0 -3
@@ -1043,9 +1043,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 <<16 , (void *)(&activity_monitor), false);
--
2.7.4
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx