On 28/04/2022 21:15, Abhinav Kumar wrote:
Remove the unused local variable refcount for encoder_phys_wb
as the one part of wb_enc is used directly.
changes in v2:
- remove usage of ret variable also
- remove the if (ret) code as it was dead-code anyway
Fixes: 0ce51f19453e ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback")
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 15 +++------------
1 file changed, 3 insertions(+), 12 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..f4a79715a02e 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
@@ -406,22 +406,13 @@ 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) {
+ if (enable && atomic_inc_return(&wb_enc->wbirq_refcount) == 1)
dpu_core_irq_register_callback(phys->dpu_kms,
phys->irq[INTR_IDX_WB_DONE], dpu_encoder_phys_wb_done_irq, phys);
- if (ret)
- atomic_dec_return(&wb_enc->wbirq_refcount);
- } else if (!enable &&
- atomic_dec_return(&wb_enc->wbirq_refcount) == 0) {
+ else if (!enable &&
+ atomic_dec_return(&wb_enc->wbirq_refcount) == 0)
dpu_core_irq_unregister_callback(phys->dpu_kms, phys->irq[INTR_IDX_WB_DONE]);
- if (ret)
- atomic_inc_return(&wb_enc->wbirq_refcount);
- }
}
static void dpu_encoder_phys_wb_atomic_mode_set(
--
With best wishes
Dmitry