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

dmaengine: moxart-dma: 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>
Link: https://lore.kernel.org/r/20201027215252.25820-9-song.bao.hua@hisilicon.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Barry Song and committed by
Vinod Koul
8c94b83e d9c8d4b2

+2 -3
+2 -3
drivers/dma/moxart-dma.c
··· 524 524 struct moxart_dmadev *mc = devid; 525 525 struct moxart_chan *ch = &mc->slave_chans[0]; 526 526 unsigned int i; 527 - unsigned long flags; 528 527 u32 ctrl; 529 528 530 529 dev_dbg(chan2dev(&ch->vc.chan), "%s\n", __func__); ··· 540 541 if (ctrl & APB_DMA_FIN_INT_STS) { 541 542 ctrl &= ~APB_DMA_FIN_INT_STS; 542 543 if (ch->desc) { 543 - spin_lock_irqsave(&ch->vc.lock, flags); 544 + spin_lock(&ch->vc.lock); 544 545 if (++ch->sgidx < ch->desc->sglen) { 545 546 moxart_dma_start_sg(ch, ch->sgidx); 546 547 } else { 547 548 vchan_cookie_complete(&ch->desc->vd); 548 549 moxart_dma_start_desc(&ch->vc.chan); 549 550 } 550 - spin_unlock_irqrestore(&ch->vc.lock, flags); 551 + spin_unlock(&ch->vc.lock); 551 552 } 552 553 } 553 554