2020-10-30 01:30:20

by Tian Tao

[permalink] [raw]
Subject: [PATCH] mmc: moxart: replace spin_lock_irqsave by spin_lock in hard IRQ

The code has been in a irq-disabled context since it is hard IRQ. There
is no necessity to do it again.

Signed-off-by: Tian Tao <[email protected]>
---
drivers/mmc/host/moxart-mmc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c
index f25079b..89bff4e 100644
--- a/drivers/mmc/host/moxart-mmc.c
+++ b/drivers/mmc/host/moxart-mmc.c
@@ -465,9 +465,8 @@ static irqreturn_t moxart_irq(int irq, void *devid)
{
struct moxart_host *host = (struct moxart_host *)devid;
u32 status;
- unsigned long flags;

- spin_lock_irqsave(&host->lock, flags);
+ spin_lock(&host->lock);

status = readl(host->base + REG_STATUS);
if (status & CARD_CHANGE) {
@@ -484,7 +483,7 @@ static irqreturn_t moxart_irq(int irq, void *devid)
if (status & (FIFO_ORUN | FIFO_URUN) && host->mrq)
moxart_transfer_pio(host);

- spin_unlock_irqrestore(&host->lock, flags);
+ spin_unlock(&host->lock);

return IRQ_HANDLED;
}
--
2.7.4


2020-11-05 13:02:06

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH] mmc: moxart: replace spin_lock_irqsave by spin_lock in hard IRQ

On Fri, 30 Oct 2020 at 02:28, Tian Tao <[email protected]> wrote:
>
> The code has been in a irq-disabled context since it is hard IRQ. There
> is no necessity to do it again.
>
> Signed-off-by: Tian Tao <[email protected]>

Applied for next, thanks!

Kind regards
Uffe


> ---
> drivers/mmc/host/moxart-mmc.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c
> index f25079b..89bff4e 100644
> --- a/drivers/mmc/host/moxart-mmc.c
> +++ b/drivers/mmc/host/moxart-mmc.c
> @@ -465,9 +465,8 @@ static irqreturn_t moxart_irq(int irq, void *devid)
> {
> struct moxart_host *host = (struct moxart_host *)devid;
> u32 status;
> - unsigned long flags;
>
> - spin_lock_irqsave(&host->lock, flags);
> + spin_lock(&host->lock);
>
> status = readl(host->base + REG_STATUS);
> if (status & CARD_CHANGE) {
> @@ -484,7 +483,7 @@ static irqreturn_t moxart_irq(int irq, void *devid)
> if (status & (FIFO_ORUN | FIFO_URUN) && host->mrq)
> moxart_transfer_pio(host);
>
> - spin_unlock_irqrestore(&host->lock, flags);
> + spin_unlock(&host->lock);
>
> return IRQ_HANDLED;
> }
> --
> 2.7.4
>