Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: ste_dma40: remove redundant irqsave and irqrestore in hardIRQ

Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled
IRQ. This patch removes the irqsave and irqstore to save some instruction
cycles.

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20201027215252.25820-10-song.bao.hua@hisilicon.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Barry Song and committed by
Vinod Koul
618a8e38 8c94b83e

+2 -3
+2 -3
drivers/dma/ste_dma40.c
··· 1643 1643 u32 row; 1644 1644 long chan = -1; 1645 1645 struct d40_chan *d40c; 1646 - unsigned long flags; 1647 1646 struct d40_base *base = data; 1648 1647 u32 *regs = base->regs_interrupt; 1649 1648 struct d40_interrupt_lookup *il = base->gen_dmac.il; 1650 1649 u32 il_size = base->gen_dmac.il_size; 1651 1650 1652 - spin_lock_irqsave(&base->interrupt_lock, flags); 1651 + spin_lock(&base->interrupt_lock); 1653 1652 1654 1653 /* Read interrupt status of both logical and physical channels */ 1655 1654 for (i = 0; i < il_size; i++) ··· 1693 1694 spin_unlock(&d40c->lock); 1694 1695 } 1695 1696 1696 - spin_unlock_irqrestore(&base->interrupt_lock, flags); 1697 + spin_unlock(&base->interrupt_lock); 1697 1698 1698 1699 return IRQ_HANDLED; 1699 1700 }