Skip to content

Commit 0808da3

Browse files
Sean Andersontiwai
authored andcommitted
ALSA: usb-audio: Don't use printk_ratelimit for debug prints
printk_ratelimit is deprecated, since it shares state with all other printk sites. Additionally, the suppression message is printed at warning level even though the actual messages are printed at debug and are (usually) invisible! This can result in thousands of messages like retire_capture_urb: 4992 callbacks suppressed in the console, and can inhibit debugging since it is unclear what the source of the suppressed callbacks is. Switch to dev_dbg_ratelimited which doesn't print anything unless debug is enabled. Signed-off-by: Sean Anderson <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent df485a4 commit 0808da3

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

sound/usb/pcm.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,11 +1336,10 @@ static void retire_capture_urb(struct snd_usb_substream *subs,
13361336

13371337
for (i = 0; i < urb->number_of_packets; i++) {
13381338
cp = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset + subs->pkt_offset_adj;
1339-
if (urb->iso_frame_desc[i].status && printk_ratelimit()) {
1340-
dev_dbg(&subs->dev->dev, "frame %d active: %d\n",
1341-
i, urb->iso_frame_desc[i].status);
1342-
// continue;
1343-
}
1339+
if (urb->iso_frame_desc[i].status)
1340+
dev_dbg_ratelimited(&subs->dev->dev,
1341+
"frame %d active: %d\n", i,
1342+
urb->iso_frame_desc[i].status);
13441343
bytes = urb->iso_frame_desc[i].actual_length;
13451344
if (subs->stream_offset_adj > 0) {
13461345
unsigned int adj = min(subs->stream_offset_adj, bytes);

0 commit comments

Comments
 (0)