Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Tian Tao <tiantao6@hisilicon.com>
Cc: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, p.zabel@pengutronix.de,
	afaerber@suse.de, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mmc: owl-mmc: replace spin_lock_irqsave by spin_lock in hard IRQ
Date: Mon, 2 Nov 2020 21:24:03 +0530	[thread overview]
Message-ID: <20201102155403.GB4009@Mani-XPS-13-9360> (raw)
In-Reply-To: <1604278337-55624-1-git-send-email-tiantao6@hisilicon.com>

On Mon, Nov 02, 2020 at 08:52:17AM +0800, Tian Tao wrote:
> The code has been in a irq-disabled context since it is hard IRQ. There
> is no necessity to do it again.
> 

Ah, yes. This should save few cycles!

> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  drivers/mmc/host/owl-mmc.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c
> index ccf214a..82d2bad 100644
> --- a/drivers/mmc/host/owl-mmc.c
> +++ b/drivers/mmc/host/owl-mmc.c
> @@ -134,10 +134,9 @@ static void owl_mmc_update_reg(void __iomem *reg, unsigned int val, bool state)
>  static irqreturn_t owl_irq_handler(int irq, void *devid)
>  {
>  	struct owl_mmc_host *owl_host = devid;
> -	unsigned long flags;
>  	u32 state;
>  
> -	spin_lock_irqsave(&owl_host->lock, flags);
> +	spin_lock(&owl_host->lock);
>  
>  	state = readl(owl_host->base + OWL_REG_SD_STATE);
>  	if (state & OWL_SD_STATE_TEI) {
> @@ -147,7 +146,7 @@ static irqreturn_t owl_irq_handler(int irq, void *devid)
>  		complete(&owl_host->sdc_complete);
>  	}
>  
> -	spin_unlock_irqrestore(&owl_host->lock, flags);
> +	spin_unlock(&owl_host->lock);
>  
>  	return IRQ_HANDLED;
>  }
> -- 
> 2.7.4
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-11-02 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02  0:52 [PATCH] mmc: owl-mmc: replace spin_lock_irqsave by spin_lock in hard IRQ Tian Tao
2020-11-02 15:54 ` Manivannan Sadhasivam [this message]
2020-11-05 12:59 ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201102155403.GB4009@Mani-XPS-13-9360 \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=afaerber@suse.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=tiantao6@hisilicon.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox