Skip to content

Commit 28ccf02

Browse files
Sean Andersonvinodkoul
authored andcommitted
dma: xilinx_dpdma: Remove unnecessary use of irqsave/restore
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>
1 parent a20f10d commit 28ccf02

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

drivers/dma/xilinx/xilinx_dpdma.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,9 +1042,8 @@ static int xilinx_dpdma_chan_stop(struct xilinx_dpdma_chan *chan)
10421042
static void xilinx_dpdma_chan_done_irq(struct xilinx_dpdma_chan *chan)
10431043
{
10441044
struct xilinx_dpdma_tx_desc *active;
1045-
unsigned long flags;
10461045

1047-
spin_lock_irqsave(&chan->lock, flags);
1046+
spin_lock(&chan->lock);
10481047

10491048
xilinx_dpdma_debugfs_desc_done_irq(chan);
10501049

@@ -1056,7 +1055,7 @@ static void xilinx_dpdma_chan_done_irq(struct xilinx_dpdma_chan *chan)
10561055
"chan%u: DONE IRQ with no active descriptor!\n",
10571056
chan->id);
10581057

1059-
spin_unlock_irqrestore(&chan->lock, flags);
1058+
spin_unlock(&chan->lock);
10601059
}
10611060

10621061
/**
@@ -1071,10 +1070,9 @@ static void xilinx_dpdma_chan_vsync_irq(struct xilinx_dpdma_chan *chan)
10711070
{
10721071
struct xilinx_dpdma_tx_desc *pending;
10731072
struct xilinx_dpdma_sw_desc *sw_desc;
1074-
unsigned long flags;
10751073
u32 desc_id;
10761074

1077-
spin_lock_irqsave(&chan->lock, flags);
1075+
spin_lock(&chan->lock);
10781076

10791077
pending = chan->desc.pending;
10801078
if (!chan->running || !pending)
@@ -1105,7 +1103,7 @@ static void xilinx_dpdma_chan_vsync_irq(struct xilinx_dpdma_chan *chan)
11051103
xilinx_dpdma_chan_queue_transfer(chan);
11061104

11071105
out:
1108-
spin_unlock_irqrestore(&chan->lock, flags);
1106+
spin_unlock(&chan->lock);
11091107
}
11101108

11111109
/**

0 commit comments

Comments
 (0)