]> Git Repo - linux.git/commitdiff
drm/msm/dpu: remove unused variables new_cnt and old_cnt in dpu_encoder_phys_vid_vbla...
authorLuo Jiaxing <[email protected]>
Wed, 16 Sep 2020 08:51:38 +0000 (16:51 +0800)
committerRob Clark <[email protected]>
Tue, 22 Sep 2020 15:30:57 +0000 (08:30 -0700)
We found two unused variables new_cnt and old_cnt when build kernel with
W=1.

So delete it.

Signed-off-by: Luo Jiaxing <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c

index be11a0c5e60c6fe956123e583db16946e4af3521..805e059b50b71267e6b8aa2c338785b4f55c4a4a 100644 (file)
@@ -306,7 +306,6 @@ static void dpu_encoder_phys_vid_vblank_irq(void *arg, int irq_idx)
        struct dpu_hw_ctl *hw_ctl;
        unsigned long lock_flags;
        u32 flush_register = 0;
-       int new_cnt = -1, old_cnt = -1;
 
        hw_ctl = phys_enc->hw_ctl;
 
@@ -316,7 +315,7 @@ static void dpu_encoder_phys_vid_vblank_irq(void *arg, int irq_idx)
                phys_enc->parent_ops->handle_vblank_virt(phys_enc->parent,
                                phys_enc);
 
-       old_cnt  = atomic_read(&phys_enc->pending_kickoff_cnt);
+       atomic_read(&phys_enc->pending_kickoff_cnt);
 
        /*
         * 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)
                flush_register = hw_ctl->ops.get_flush_register(hw_ctl);
 
        if (!(flush_register & hw_ctl->ops.get_pending_flush(hw_ctl)))
-               new_cnt = atomic_add_unless(&phys_enc->pending_kickoff_cnt,
-                               -1, 0);
+               atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0);
        spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags);
 
        /* Signal any waiting atomic commit thread */
This page took 0.087626 seconds and 4 git commands to generate.