[PATCH] drm/msm/dpu: remove unused refcount for encoder_phys_wb

Dmitry Baryshkov dmitry.baryshkov at linaro.org
Thu Apr 28 15:58:51 UTC 2022


On 28/04/2022 18:34, Abhinav Kumar wrote:
> Remove the unused local variable refcount for encoder_phys_wb
> as the one part of wb_enc is used directly.
> 
> Fixes: 0ce51f19453e ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback")
> Reported-by: kernel test robot <lkp at intel.com>
> Signed-off-by: Abhinav Kumar <quic_abhinavk at quicinc.com>
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
> index cb5c7da53c29..904124a3477e 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
> @@ -407,9 +407,6 @@ static void dpu_encoder_phys_wb_irq_ctrl(
>   
>   	struct dpu_encoder_phys_wb *wb_enc = to_dpu_encoder_phys_wb(phys);
>   	int ret = 0;
> -	int refcount;
> -
> -	refcount = atomic_read(&wb_enc->wbirq_refcount);
>   
>   	if (enable && atomic_inc_return(&wb_enc->wbirq_refcount) == 1) {
>   		dpu_core_irq_register_callback(phys->dpu_kms,

As I glanced onto this function, it seems you miss updating `ret` here. 
Could you please fix that too?


-- 
With best wishes
Dmitry


More information about the dri-devel mailing list