RE: [PATCH] drm/amd/powerplay: delete some dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@xxxxxxxxxx]
> Sent: Thursday, March 21, 2019 2:27 PM
> To: Deucher, Alexander <Alexander.Deucher@xxxxxxx>
> Cc: Koenig, Christian <Christian.Koenig@xxxxxxx>; Zhou, David(ChunMing)
> <David1.Zhou@xxxxxxx>; David Airlie <airlied@xxxxxxxx>; Daniel Vetter
> <daniel@xxxxxxxx>; Huang, Ray <Ray.Huang@xxxxxxx>; Wang, Kevin(Yang)
> <Kevin1.Wang@xxxxxxx>; Gao, Likun <Likun.Gao@xxxxxxx>; Gui, Jack
> <Jack.Gui@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx; kernel-
> janitors@xxxxxxxxxxxxxxx
> Subject: [PATCH] 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.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Thanks, will apply it.
Reviewed-by: Huang Rui <ray.huang@xxxxxxx>

> ---
>  drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> index 17143888e37e..b602975563fc 100644
> --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> @@ -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);
> --
> 2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux