Re: [PATCH v8 5/8] dmaengine: sh: rz-dmac: Drop unnecessary local_irq_save() call

From: Frank Li

Date: Wed Feb 25 2026 - 11:24:57 EST


On Tue, Jan 20, 2026 at 03:33:27PM +0200, Claudiu wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
>
> 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.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
> ---
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
>
> Changes in v8:
> - none
>
> Changes in v7:
> - none
>
> Changes in v6:
> - none
>
> Changes in v5:
> - none, this patch is new
>
> drivers/dma/sh/rz-dmac.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/dma/sh/rz-dmac.c b/drivers/dma/sh/rz-dmac.c
> index cc540b35dc29..1d2b50d6273b 100644
> --- a/drivers/dma/sh/rz-dmac.c
> +++ b/drivers/dma/sh/rz-dmac.c
> @@ -273,15 +273,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 +
> @@ -296,8 +293,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)
> --
> 2.43.0
>