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

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

 





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@xxxxxxxxx>
Signed-off-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
---
  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.




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux