]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dmaengine: sh: rz-dmac: Drop unnecessary local_irq_save() call
authorClaudiu Beznea <claudiu.beznea@tuxon.dev>
Mon, 16 Mar 2026 13:32:49 +0000 (15:32 +0200)
committerVinod Koul <vkoul@kernel.org>
Tue, 17 Mar 2026 10:42:11 +0000 (16:12 +0530)
rz_dmac_enable_hw() calls local_irq_save()/local_irq_restore(), but
this is not needed because the callers of rz_dmac_enable_hw() already
protect the critical section using
spin_lock_irqsave()/spin_lock_irqrestore().

Remove the local_irq_save()/local_irq_restore() calls.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20260316133252.240348-6-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sh/rz-dmac.c

index 6c9bfe39a11ef17f34bfd68aefed4ba4d4e64161..eca62d9e9772a20b289580b70867e20e7394b6d9 100644 (file)
@@ -272,15 +272,12 @@ static void rz_dmac_enable_hw(struct rz_dmac_chan *channel)
 {
        struct dma_chan *chan = &channel->vc.chan;
        struct rz_dmac *dmac = to_rz_dmac(chan->device);
-       unsigned long flags;
        u32 nxla;
        u32 chctrl;
        u32 chstat;
 
        dev_dbg(dmac->dev, "%s channel %d\n", __func__, channel->index);
 
-       local_irq_save(flags);
-
        rz_dmac_lmdesc_recycle(channel);
 
        nxla = channel->lmdesc.base_dma +
@@ -295,8 +292,6 @@ static void rz_dmac_enable_hw(struct rz_dmac_chan *channel)
                rz_dmac_ch_writel(channel, CHCTRL_SWRST, CHCTRL, 1);
                rz_dmac_ch_writel(channel, chctrl, CHCTRL, 1);
        }
-
-       local_irq_restore(flags);
 }
 
 static void rz_dmac_disable_hw(struct rz_dmac_chan *channel)