summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kochetkov <fido_max@inbox.ru>2023-05-05 09:28:20 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-06-09 11:22:49 +0300
commit7ebdb487886f49ad5eab83b886226d6b7ef647bc (patch)
tree555490f97ae4894e2213dbcffec52bbdbef55342
parenta542d6b68c75098bb9782a006e5c6607e43eda1d (diff)
downloadlinux-7ebdb487886f49ad5eab83b886226d6b7ef647bc.tar.xz
ASoC: dwc: limit the number of overrun messages
[ Upstream commit ab6ecfbf40fccf74b6ec2ba7ed6dd2fc024c3af2 ] On slow CPU (FPGA/QEMU emulated) printing overrun messages from interrupt handler to uart console may leads to more overrun errors. So use dev_err_ratelimited to limit the number of error messages. Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru Link: https://lore.kernel.org/r/20230505062820.21840-1-fido_max@inbox.ru Signed-off-by: Mark Brown <broonie@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--sound/soc/dwc/dwc-i2s.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c
index e27e21f8569a..e6a0ec3c0e76 100644
--- a/sound/soc/dwc/dwc-i2s.c
+++ b/sound/soc/dwc/dwc-i2s.c
@@ -132,13 +132,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
/* Error Handling: TX */
if (isr[i] & ISR_TXFO) {
- dev_err(dev->dev, "TX overrun (ch_id=%d)\n", i);
+ dev_err_ratelimited(dev->dev, "TX overrun (ch_id=%d)\n", i);
irq_valid = true;
}
/* Error Handling: TX */
if (isr[i] & ISR_RXFO) {
- dev_err(dev->dev, "RX overrun (ch_id=%d)\n", i);
+ dev_err_ratelimited(dev->dev, "RX overrun (ch_id=%d)\n", i);
irq_valid = true;
}
}