Skip to contentSkip to conversation

mmc: mxcmmc: replace spin_lock_irqsave with spin_lock in ISR

PATCH In review jun qian 3 participants 3 messages Sep 11, 2018 – Sep 17, 2018

Subsystems (2)
lore
Share & tools
lore

jun qian

author
#0 lore raw

PATCH 1/1 mmc: mxcmmc: replace spin_lock_irqsave with spin_lock in ISR

As you are already in ISR, it is unnecessary to call spin_lock_irqsave.

---
 drivers/mmc/host/mxcmmc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/mmc/host/mxcmmc.c +2 -3
index de4e6e5bf304..4d17032d15ee 100644
@@ -728,7 +728,6 @@ static void mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat)
 static irqreturn_t mxcmci_irq(int irq, void *devid)
 {
 	struct mxcmci_host *host = devid;
-	unsigned long flags;
 	bool sdio_irq;
 	u32 stat;
 
@@ -740,9 +739,9 @@ static irqreturn_t mxcmci_irq(int irq, void *devid)
 
 	dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat);
 
-	spin_lock_irqsave(&host->lock, flags);
+	spin_lock(&host->lock);
 	sdio_irq = (stat & STATUS_SDIO_INT_ACTIVE) && host->use_sdio;
-	spin_unlock_irqrestore(&host->lock, flags);
+	spin_unlock(&host->lock);
 
 	if (mxcmci_use_dma(host) && (stat & (STATUS_WRITE_OP_DONE)))
 		mxcmci_writel(host, STATUS_WRITE_OP_DONE, MMC_REG_STATUS);
Signature · 1 line
2.17.1
#2 lore raw
In reply to jun qian
Quoted 3 lines · jun qian

As you are already in ISR, it is unnecessary to call spin_lock_irqsave.

Applied for next, thanks!

Kind regards
Uffe

Quoted 33 lines
---
 drivers/mmc/host/mxcmmc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/mmc/host/mxcmmc.c +2 -4
index de4e6e5bf304..4d17032d15ee 100644
@@ -728,7 +728,6 @@ static void mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat)
 static irqreturn_t mxcmci_irq(int irq, void *devid)
 {
        struct mxcmci_host *host = devid;
-       unsigned long flags;
        bool sdio_irq;
        u32 stat;
 
@@ -740,9 +739,9 @@ static irqreturn_t mxcmci_irq(int irq, void *devid)
 
        dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat);
 
-       spin_lock_irqsave(&host->lock, flags);
+       spin_lock(&host->lock);
        sdio_irq = (stat & STATUS_SDIO_INT_ACTIVE) && host->use_sdio;
-       spin_unlock_irqrestore(&host->lock, flags);
+       spin_unlock(&host->lock);
 
        if (mxcmci_use_dma(host) && (stat & (STATUS_WRITE_OP_DONE)))
                mxcmci_writel(host, STATUS_WRITE_OP_DONE, MMC_REG_STATUS);
--

2.17.1