linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] spi: spi-tegra20-sflash: remove redundant irqsave and irqrestore in hardIRQ
@ 2020-09-26  0:16 Barry Song
  2020-09-26  0:16 ` [PATCH 2/2] spi: spi-stm32: " Barry Song
  2020-10-01 22:47 ` [PATCH 1/2] spi: spi-tegra20-sflash: " Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Barry Song @ 2020-09-26  0:16 UTC (permalink / raw)
  To: broonie, linux-spi; +Cc: Barry Song

Running in hardIRQ, disabling IRQ is redundant.

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
---
 drivers/spi/spi-tegra20-sflash.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c
index 02cf5f463ba6..b59015c7c8a8 100644
--- a/drivers/spi/spi-tegra20-sflash.c
+++ b/drivers/spi/spi-tegra20-sflash.c
@@ -359,9 +359,8 @@ static int tegra_sflash_transfer_one_message(struct spi_master *master,
 static irqreturn_t handle_cpu_based_xfer(struct tegra_sflash_data *tsd)
 {
 	struct spi_transfer *t = tsd->curr_xfer;
-	unsigned long flags;
 
-	spin_lock_irqsave(&tsd->lock, flags);
+	spin_lock(&tsd->lock);
 	if (tsd->tx_status || tsd->rx_status || (tsd->status_reg & SPI_BSY)) {
 		dev_err(tsd->dev,
 			"CpuXfer ERROR bit set 0x%x\n", tsd->status_reg);
@@ -391,7 +390,7 @@ static irqreturn_t handle_cpu_based_xfer(struct tegra_sflash_data *tsd)
 	tegra_sflash_calculate_curr_xfer_param(tsd->cur_spi, tsd, t);
 	tegra_sflash_start_cpu_based_transfer(tsd, t);
 exit:
-	spin_unlock_irqrestore(&tsd->lock, flags);
+	spin_unlock(&tsd->lock);
 	return IRQ_HANDLED;
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-01 22:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-26  0:16 [PATCH 1/2] spi: spi-tegra20-sflash: remove redundant irqsave and irqrestore in hardIRQ Barry Song
2020-09-26  0:16 ` [PATCH 2/2] spi: spi-stm32: " Barry Song
2020-10-01 22:47 ` [PATCH 1/2] spi: spi-tegra20-sflash: " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).