drm/msm/dpu: remove unused refcount for encoder_phys_wb

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: d7d0e73f7d ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/483919/
Link: https://lore.kernel.org/r/1651169759-29760-1-git-send-email-quic_abhinavk@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
Abhinav Kumar 2022-04-28 11:15:59 -07:00 committed by Dmitry Baryshkov
parent c102e9fcc2
commit 92b5eff9c5

View File

@ -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(