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

spi: lantiq: remove redundant irqsave and irqrestore in hardIRQ

Running in hardIRQ, disabling irq is redundant.

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Link: https://lore.kernel.org/r/20200916101042.21860-1-song.bao.hua@hisilicon.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Barry Song and committed by
Mark Brown
7349201d 985be7eb

+5 -7
+5 -7
drivers/spi/spi-lantiq-ssc.c
··· 625 625 struct lantiq_ssc_spi *spi = data; 626 626 const struct lantiq_ssc_hwcfg *hwcfg = spi->hwcfg; 627 627 u32 val = lantiq_ssc_readl(spi, hwcfg->irncr); 628 - unsigned long flags; 629 628 630 - spin_lock_irqsave(&spi->lock, flags); 629 + spin_lock(&spi->lock); 631 630 if (hwcfg->irq_ack) 632 631 lantiq_ssc_writel(spi, val, hwcfg->irncr); 633 632 ··· 651 652 } 652 653 } 653 654 654 - spin_unlock_irqrestore(&spi->lock, flags); 655 + spin_unlock(&spi->lock); 655 656 return IRQ_HANDLED; 656 657 657 658 completed: 658 659 queue_work(spi->wq, &spi->work); 659 - spin_unlock_irqrestore(&spi->lock, flags); 660 + spin_unlock(&spi->lock); 660 661 661 662 return IRQ_HANDLED; 662 663 } ··· 667 668 const struct lantiq_ssc_hwcfg *hwcfg = spi->hwcfg; 668 669 u32 stat = lantiq_ssc_readl(spi, LTQ_SPI_STAT); 669 670 u32 val = lantiq_ssc_readl(spi, hwcfg->irncr); 670 - unsigned long flags; 671 671 672 672 if (!(stat & LTQ_SPI_STAT_ERRORS)) 673 673 return IRQ_NONE; 674 674 675 - spin_lock_irqsave(&spi->lock, flags); 675 + spin_lock(&spi->lock); 676 676 if (hwcfg->irq_ack) 677 677 lantiq_ssc_writel(spi, val, hwcfg->irncr); 678 678 ··· 695 697 if (spi->master->cur_msg) 696 698 spi->master->cur_msg->status = -EIO; 697 699 queue_work(spi->wq, &spi->work); 698 - spin_unlock_irqrestore(&spi->lock, flags); 700 + spin_unlock(&spi->lock); 699 701 700 702 return IRQ_HANDLED; 701 703 }