From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7923BC7EE2F for ; Thu, 25 May 2023 18:46:23 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 48100E72; Thu, 25 May 2023 20:45:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 48100E72 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685040381; bh=+oO6bpqcYeXO6bktMa0a6PFzXc3pzJxUUHvttW1CPjY=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=WXcbzLvLtaK21ZNvYDk1EFiG4P25wyJYsRUNbJs/2Xfi9AQoshMoD6KM2tc7S8NBr STlCTSaRNdgC+S8iNPZt9BPWoD/tKTs5XhEk2XGktMFNuRpMEe6g91XhQal8/hE8Ud zgEpoN5optfCG+GbrMClhmTHrbfZ5mke0JtBYSdE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 02F73F8016A; Thu, 25 May 2023 20:45:30 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A28CDF80553; Thu, 25 May 2023 20:45:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ED5B8F80548; Thu, 25 May 2023 20:45:26 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 750F3F80425 for ; Thu, 25 May 2023 20:45:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 750F3F80425 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=nokgsD0W Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 60ECE60E96; Thu, 25 May 2023 18:45:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A995DC433D2; Thu, 25 May 2023 18:45:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685040323; bh=+oO6bpqcYeXO6bktMa0a6PFzXc3pzJxUUHvttW1CPjY=; h=From:To:Cc:Subject:Date:From; b=nokgsD0WojN2fVX1BqMPjVc7dJhYWRKR9wwTn99MYdNvqDBGoR5Iim4tBA1CJKuoO Sifll2u++Ee/0QNRaCQtAGOfjGDEC1Oh5EId+EMUrF/nuKsqM5JEthplWXPu0ESDHo O4020MnPlhCQSBIA/7OWsH1eeTWgWkWH86RHniifEWJkmqyG4EUR2olFlMEeIxhgYc IykGYCpXOmVKu1p+VrRUAAVZ8HUGS1clAfmgeW8yzlwCxqQFouHJdenA9vUDJQZ39/ r7Vkmpo5Y9k4ALP/wdQN4GPvvZHvQM3YnxLpBm1ueGV/qVx7vtKmcT90ROlz7/MIp7 0xXcpYcY/iK6A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Maxim Kochetkov , Sasha Levin , lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, ckeepax@opensource.cirrus.com, u.kleine-koenig@pengutronix.de, alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 4.14 01/20] ASoC: dwc: limit the number of overrun messages Date: Thu, 25 May 2023 14:44:57 -0400 Message-Id: <20230525184520.2004878-1-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Message-ID-Hash: OF62QM6PH53WPF4KDQGRPDA7B2LBB6YZ X-Message-ID-Hash: OF62QM6PH53WPF4KDQGRPDA7B2LBB6YZ X-MailFrom: sashal@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Maxim Kochetkov [ 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 --- sound/soc/dwc/dwc-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c index e27e21f8569a0..e6a0ec3c0e764 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; } } -- 2.39.2