drm/amd/powerplay: Remove unnecessary comparison statement
Subsystems (2)
PATCH 1/1 drm/amd/powerplay: Remove unnecessary comparison statement
size contain non-negative value since it is declared as uint32_t. So below statement is always false.
if (size < 0)
Remove unnecessary comparison.
--- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/powerplay/navi10_ppt.c +0 -3
@@ -1134,9 +1134,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 , (void *)(&activity_monitor), false);
Signature · 1 line
2.6.2
Best Regards,
Kevin
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Austin Kim <[email protected]>
Sent: Monday, September 9, 2019 12:31 PM
To: Deucher, Alexander <[email protected]>; [email protected] <[email protected]>; daniel-/[email protected] <daniel-/[email protected]>
Cc: Zhou, David(ChunMing) <[email protected]>; amd-gfx-PD4FTy7X32lNgt0PjOBp9/[email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; Koenig, Christian <[email protected]>
Subject: [PATCH] drm/amd/powerplay: Remove unnecessary comparison statement
size contain non-negative value since it is declared as uint32_t. So below statement is always false.
if (size < 0)
Remove unnecessary comparison.
--- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/powerplay/navi10_ppt.c +0 -3
@@ -1134,9 +1134,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 , (void *)(&activity_monitor), false);
--
2.6.2
_______________________________________________
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