]> www.infradead.org Git - users/hch/uuid.git/commitdiff
dmaengine: qcom: gpi: clean up the IRQ disable/enable in gpi_reset_chan()
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 9 May 2024 11:02:11 +0000 (14:02 +0300)
committerVinod Koul <vkoul@kernel.org>
Tue, 11 Jun 2024 18:25:34 +0000 (23:55 +0530)
The calls write_lock/unlock_irq() disables and re-enables the IRQs.
Calling spin_lock_irqsave() and spin_lock_restore() when the IRQs are
already disabled doesn't do anything and just makes the code confusing.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/8be473eb-65e0-42b4-b574-e61c3a7f62d8@moroto.mountain
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/qcom/gpi.c

index 639ab304db9b1243c88c58bf6364046af5bdab08..e6ebd688d746304ce74edc6bba27fb6a3e59e840 100644 (file)
@@ -1191,7 +1191,6 @@ static int gpi_reset_chan(struct gchan *gchan, enum gpi_cmd gpi_cmd)
 {
        struct gpii *gpii = gchan->gpii;
        struct gpi_ring *ch_ring = &gchan->ch_ring;
-       unsigned long flags;
        LIST_HEAD(list);
        int ret;
 
@@ -1214,9 +1213,9 @@ static int gpi_reset_chan(struct gchan *gchan, enum gpi_cmd gpi_cmd)
        gpi_mark_stale_events(gchan);
 
        /* remove all async descriptors */
-       spin_lock_irqsave(&gchan->vc.lock, flags);
+       spin_lock(&gchan->vc.lock);
        vchan_get_all_descriptors(&gchan->vc, &list);
-       spin_unlock_irqrestore(&gchan->vc.lock, flags);
+       spin_unlock(&gchan->vc.lock);
        write_unlock_irq(&gpii->pm_lock);
        vchan_dma_desc_free_list(&gchan->vc, &list);