drm/amd/powerplay: delete some dead code
Subsystems (3)
PATCH 1/1 drm/amd/powerplay: delete some dead code
The "size" variable is unsigned. We never pass invalid sizes to this function and we already used it as an array offset earlier so it's too late to check here.
--- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +0 -3
@@ -1668,9 +1668,6 @@ static int smu_v11_0_set_power_profile_mode(struct smu_context *smu, long *input }if (smu->power_profile_mode ==PP_SMC_POWER_PROFILE_CUSTOM ) { -if (size <0 ) -return -EINVAL ; - ret =smu_v11_0_get_activity_monitor_coeff (smu, (uint8_t *)(&activity_monitor),WORKLOAD_PPLIB_CUSTOM_BIT );
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 12 lines
-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Thursday, March 21, 2019 2:27 PM
To: Deucher, Alexander <[email protected]>
Cc: Koenig, Christian <[email protected]>; Zhou, David(ChunMing) <[email protected]>; David Airlie <[email protected]>; Daniel Vetter <[email protected]>; Huang, Ray <[email protected]>; Wang, Kevin(Yang) <[email protected]>; Gao, Likun <[email protected]>; Gui, Jack <[email protected]>; [email protected]; kernel- [email protected]
Subject: [PATCH] drm/amd/powerplay: delete some dead code
Quoted 4 lines
The "size" variable is unsigned. We never pass invalid sizes to this function and we already used it as an array offset earlier so it's too late to check here.
Signed-off-by Dan Carpenter <[email protected]>
Thanks, will apply it.
Quoted 23 lines
--- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 3 --- 1 file changed, 3 deletions(-)drivers/gpu/drm/amd/powerplay/smu_v11_0.c +0
-0@@ -1668,9 +1668,6 @@ static intsmu_v11_0_set_power_profile_mode(struct
smu_context*smu, long *inputdrivers/gpu/drm/amd/powerplay/smu_v11_0.c +0
-0} if (smu->power_profile_mode ==
PP_SMC_POWER_PROFILE_CUSTOM) {drivers/gpu/drm/amd/powerplay/smu_v11_0.c +0
-3-if (size <0 ) -return -EINVAL ; - ret = smu_v11_0_get_activity_monitor_coeff(smu, (uint8_t*)(&activity_monitor),
Quoted 3 lines
WORKLOAD_PPLIB_CUSTOM_BIT);
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx