[Freedreno] [PATCH] drm/msm/dpu: remove unused refcount for encoder_phys_wb
Abhinav Kumar
quic_abhinavk at quicinc.com
Thu Apr 28 17:50:33 UTC 2022
On 4/28/2022 8:58 AM, Dmitry Baryshkov wrote:
> 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?
>
Yes, we dont need ret here, its a void function.
So we dont need to handle the if (ret) cases as we would never hit them.
I will update this and post v2. I have re-tested this too.
>
More information about the Freedreno
mailing list