]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.60/alsa-usb-audio-apply-rate-limit-to-warning-messages-in-urb-complete-callback.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.14.60 / alsa-usb-audio-apply-rate-limit-to-warning-messages-in-urb-complete-callback.patch
1 From foo@baz Sat Jul 28 10:25:26 CEST 2018
2 From: Takashi Iwai <tiwai@suse.de>
3 Date: Wed, 16 May 2018 20:07:18 +0200
4 Subject: ALSA: usb-audio: Apply rate limit to warning messages in URB complete callback
5
6 From: Takashi Iwai <tiwai@suse.de>
7
8 [ Upstream commit 377a879d9832f4ba69bd6a1fc996bb4181b1e504 ]
9
10 retire_capture_urb() may print warning messages when the given URB
11 doesn't align, and this may flood the system log easily.
12 Put the rate limit to the message for avoiding it.
13
14 Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1093485
15 Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18 ---
19 sound/usb/pcm.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22 --- a/sound/usb/pcm.c
23 +++ b/sound/usb/pcm.c
24 @@ -1311,7 +1311,7 @@ static void retire_capture_urb(struct sn
25 if (bytes % (runtime->sample_bits >> 3) != 0) {
26 int oldbytes = bytes;
27 bytes = frames * stride;
28 - dev_warn(&subs->dev->dev,
29 + dev_warn_ratelimited(&subs->dev->dev,
30 "Corrected urb data len. %d->%d\n",
31 oldbytes, bytes);
32 }