mmc: mmci: Break IRQ status loop when all zero
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 16 Apr 2022 22:45:49 +0000 (00:45 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 26 Apr 2022 12:05:22 +0000 (14:05 +0200)
commitf7ad75041ba9b36d8141a1c0dd527154ed10b96e
tree22d1ed594a3eea53eb3b8ad669b3a932fdd250e0
parent238b638b309093b77852137bcffd98702b95564f
mmc: mmci: Break IRQ status loop when all zero

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>
Link: https://lore.kernel.org/r/20220416224549.627623-1-linus.walleij@linaro.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mmci.c