All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-mmc@vger.kernel.org
Subject: Re: [PATCH] mmc: mmci: Break IRQ status loop when all zero
Date: Thu, 21 Apr 2022 15:54:39 +0200	[thread overview]
Message-ID: <CAPDyKFo_SLzycgMYytfizkqRcEzYYB4epp1UD6Gp6ZczYB_MKw@mail.gmail.com> (raw)
In-Reply-To: <20220416224549.627623-1-linus.walleij@linaro.org>

On Sun, 17 Apr 2022 at 00:47, Linus Walleij <linus.walleij@linaro.org> wrote:
>
> We iterate an extra time through the IRQ status handling
> loop despite nothing had fired. Enabling the debug prints:
>
> mmci-pl18x 80005000.mmc: op 01 arg 00000000 flags 000000e1
> mmci-pl18x 80005000.mmc: irq0 (data+cmd) 00000001
> mmci-pl18x 80005000.mmc: irq0 (data+cmd) 00000000
> mmci-pl18x 80005000.mmc: op 01 arg 40ff8080 flags 000000e1
> mmci-pl18x 80005000.mmc: irq0 (data+cmd) 00000001
> mmci-pl18x 80005000.mmc: irq0 (data+cmd) 00000000
>
> It is pointless to loop through the function when status
> is zero. Just break the loop if the status is zero.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/mmci.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> index 45b8608c935c..f3cf3152a397 100644
> --- a/drivers/mmc/host/mmci.c
> +++ b/drivers/mmc/host/mmci.c
> @@ -1619,6 +1619,8 @@ static irqreturn_t mmci_irq(int irq, void *dev_id)
>
>         do {
>                 status = readl(host->base + MMCISTATUS);
> +               if (!status)
> +                       break;
>
>                 if (host->singleirq) {
>                         if (status & host->mask1_reg)
> --
> 2.35.1
>

      reply	other threads:[~2022-04-21 13:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-16 22:45 [PATCH] mmc: mmci: Break IRQ status loop when all zero Linus Walleij
2022-04-21 13:54 ` Ulf Hansson [this message]

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=CAPDyKFo_SLzycgMYytfizkqRcEzYYB4epp1UD6Gp6ZczYB_MKw@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-mmc@vger.kernel.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 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.