dma: xilinx_dpdma: Remove unnecessary use of irqsave/restore
authorSean Anderson <sean.anderson@linux.dev>
Fri, 8 Mar 2024 21:00:33 +0000 (16:00 -0500)
committerVinod Koul <vkoul@kernel.org>
Sun, 7 Apr 2024 11:38:19 +0000 (17:08 +0530)
xilinx_dpdma_chan_done_irq and xilinx_dpdma_chan_vsync_irq are always
called with IRQs disabled from xilinx_dpdma_irq_handler. Therefore we
don't need to save/restore the IRQ flags.

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://lore.kernel.org/r/20240308210034.3634938-3-sean.anderson@linux.dev
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/xilinx/xilinx_dpdma.c

index b82815e64d24e8352ac025bc1bd52de497530d66..bc27a0ca86aff66e4d119bf8d8c241d45b5e1ad2 100644 (file)
@@ -1042,9 +1042,8 @@ static int xilinx_dpdma_chan_stop(struct xilinx_dpdma_chan *chan)
 static void xilinx_dpdma_chan_done_irq(struct xilinx_dpdma_chan *chan)
 {
        struct xilinx_dpdma_tx_desc *active;
-       unsigned long flags;
 
-       spin_lock_irqsave(&chan->lock, flags);
+       spin_lock(&chan->lock);
 
        xilinx_dpdma_debugfs_desc_done_irq(chan);
 
@@ -1056,7 +1055,7 @@ static void xilinx_dpdma_chan_done_irq(struct xilinx_dpdma_chan *chan)
                         "chan%u: DONE IRQ with no active descriptor!\n",
                         chan->id);
 
-       spin_unlock_irqrestore(&chan->lock, flags);
+       spin_unlock(&chan->lock);
 }
 
 /**
@@ -1071,10 +1070,9 @@ static void xilinx_dpdma_chan_vsync_irq(struct  xilinx_dpdma_chan *chan)
 {
        struct xilinx_dpdma_tx_desc *pending;
        struct xilinx_dpdma_sw_desc *sw_desc;
-       unsigned long flags;
        u32 desc_id;
 
-       spin_lock_irqsave(&chan->lock, flags);
+       spin_lock(&chan->lock);
 
        pending = chan->desc.pending;
        if (!chan->running || !pending)
@@ -1105,7 +1103,7 @@ static void xilinx_dpdma_chan_vsync_irq(struct  xilinx_dpdma_chan *chan)
        xilinx_dpdma_chan_queue_transfer(chan);
 
 out:
-       spin_unlock_irqrestore(&chan->lock, flags);
+       spin_unlock(&chan->lock);
 }
 
 /**