Skip to content

Commit 3c0f462

Browse files
Luojiaxing1991robclark
authored andcommitted
drm/msm/dpu: remove unused variables new_cnt and old_cnt in dpu_encoder_phys_vid_vblank_irq()
We found two unused variables new_cnt and old_cnt when build kernel with W=1. So delete it. Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com> Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent 341a361 commit 3c0f462

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ static void dpu_encoder_phys_vid_vblank_irq(void *arg, int irq_idx)
306306
struct dpu_hw_ctl *hw_ctl;
307307
unsigned long lock_flags;
308308
u32 flush_register = 0;
309-
int new_cnt = -1, old_cnt = -1;
310309

311310
hw_ctl = phys_enc->hw_ctl;
312311

@@ -316,7 +315,7 @@ static void dpu_encoder_phys_vid_vblank_irq(void *arg, int irq_idx)
316315
phys_enc->parent_ops->handle_vblank_virt(phys_enc->parent,
317316
phys_enc);
318317

319-
old_cnt = atomic_read(&phys_enc->pending_kickoff_cnt);
318+
atomic_read(&phys_enc->pending_kickoff_cnt);
320319

321320
/*
322321
* only decrement the pending flush count if we've actually flushed
@@ -328,8 +327,7 @@ static void dpu_encoder_phys_vid_vblank_irq(void *arg, int irq_idx)
328327
flush_register = hw_ctl->ops.get_flush_register(hw_ctl);
329328

330329
if (!(flush_register & hw_ctl->ops.get_pending_flush(hw_ctl)))
331-
new_cnt = atomic_add_unless(&phys_enc->pending_kickoff_cnt,
332-
-1, 0);
330+
atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0);
333331
spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags);
334332

335333
/* Signal any waiting atomic commit thread */

0 commit comments

Comments
 (0)