From: Joe Perches Date: Thu, 7 Nov 2013 19:55:15 +0000 (-0800) Subject: ALSA: hda_intel: ratelimit "spurious response" message X-Git-Tag: upstream/snapshot3+hdmi~3891^2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b70a67da0bebca02a130eff8084eee457a2b836;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ALSA: hda_intel: ratelimit "spurious response" message dmesg here has a 100+ consecutive lines of: [ 1464.219446] hda-intel 0000:00:14.2: spurious response 0x0:0x0, last cmd=0x170500 [ 1464.219451] hda-intel 0000:00:14.2: spurious response 0x0:0x0, last cmd=0x170500 [ 1464.219454] hda-intel 0000:00:14.2: spurious response 0x0:0x0, last cmd=0x170500 ... Ratelimit the message to reduce the dmesg log noise. Coalesce the format while at it. Signed-off-by: Joe Perches Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 17f4aa8..7a09404 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -914,12 +914,12 @@ static void azx_update_rirb(struct azx *chip) chip->rirb.res[addr] = res; smp_wmb(); chip->rirb.cmds[addr]--; - } else - snd_printk(KERN_ERR SFX "%s: spurious response %#x:%#x, " - "last cmd=%#08x\n", + } else if (printk_ratelimit()) { + snd_printk(KERN_ERR SFX "%s: spurious response %#x:%#x, last cmd=%#08x\n", pci_name(chip->pci), res, res_ex, chip->last_cmd[addr]); + } } }