All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: mxcmmc: replace spin_lock_irqsave with spin_lock in ISR
@ 2018-09-11 14:47 jun qian
  2018-09-11 16:00 ` Vladimir Zapolskiy
  2018-09-17 18:35 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: jun qian @ 2018-09-11 14:47 UTC (permalink / raw)
  To: Ulf Hansson, Kees Cook, Allen
  Cc: Randy Dunlap, linux-mmc, linux-kernel, jun qian

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

Signed-off-by: jun qian <hangdianqj@163.com>
---
 drivers/mmc/host/mxcmmc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index de4e6e5bf304..4d17032d15ee 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -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




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

* Re: [PATCH] mmc: mxcmmc: replace spin_lock_irqsave with spin_lock in ISR
  2018-09-11 14:47 [PATCH] mmc: mxcmmc: replace spin_lock_irqsave with spin_lock in ISR jun qian
@ 2018-09-11 16:00 ` Vladimir Zapolskiy
  2018-09-17 18:35 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Vladimir Zapolskiy @ 2018-09-11 16:00 UTC (permalink / raw)
  To: jun qian, Ulf Hansson, Kees Cook, Allen
  Cc: Randy Dunlap, linux-mmc, linux-kernel

On 09/11/2018 05:47 PM, jun qian wrote:
> As you are already in ISR, it is unnecessary to call spin_lock_irqsave.
> 
> Signed-off-by: jun qian <hangdianqj@163.com>

Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>

---
Best wishes,
Vladimir

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

* Re: [PATCH] mmc: mxcmmc: replace spin_lock_irqsave with spin_lock in ISR
  2018-09-11 14:47 [PATCH] mmc: mxcmmc: replace spin_lock_irqsave with spin_lock in ISR jun qian
  2018-09-11 16:00 ` Vladimir Zapolskiy
@ 2018-09-17 18:35 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2018-09-17 18:35 UTC (permalink / raw)
  To: jun qian
  Cc: Kees Cook, Allen, Randy Dunlap, linux-mmc, Linux Kernel Mailing List

On 11 September 2018 at 16:47, jun qian <hangdianqj@163.com> wrote:
> As you are already in ISR, it is unnecessary to call spin_lock_irqsave.
>
> Signed-off-by: jun qian <hangdianqj@163.com>

Applied for next, thanks!

Kind regards
Uffe

> ---
>  drivers/mmc/host/mxcmmc.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> index de4e6e5bf304..4d17032d15ee 100644
> --- a/drivers/mmc/host/mxcmmc.c
> +++ b/drivers/mmc/host/mxcmmc.c
> @@ -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
>
>
>

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

end of thread, other threads:[~2018-09-17 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 14:47 [PATCH] mmc: mxcmmc: replace spin_lock_irqsave with spin_lock in ISR jun qian
2018-09-11 16:00 ` Vladimir Zapolskiy
2018-09-17 18:35 ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.