From: Takashi Iwai <tiwai@suse.de>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Fengguang Wu <fengguang.wu@intel.com>,
alsa-devel@alsa-project.org,
Nick Bowler <nbowler@elliptictech.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Keith Packard <keithp@keithp.com>
Subject: Re: [PATCH] alsa: hide HDMI/ELD printks unless in debug kernels
Date: Tue, 10 Apr 2012 08:08:56 +0200 [thread overview]
Message-ID: <s5hty0sunif.wl%tiwai@suse.de> (raw)
In-Reply-To: <4F82FC6C.1090501@wwwdotorg.org>
At Mon, 09 Apr 2012 09:12:44 -0600,
Stephen Warren wrote:
>
> On 04/08/2012 08:15 PM, Fengguang Wu wrote:
> > These trivial messages will show up repeatedly on hot plug as well as
> > video mode changes, which could be annoying.
> >
> > Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
>
> Those messages are very useful for end-users to diagnose problems with
> HDMI audio. Is there a way to make the messages dynamic, so users can
> get them if they want, without recompiling their kernel?
We can define a new macro like below, add call like _snd_printd(2,
....) instead of snd_printd().
(Yes, the number 2 can be replaced better in an enum, too.)
In future, we should move to the standard dynamic_printk, but a patch
like this would be a good compromise for merging to 3.4 kernel, IMO.
Takashi
---
diff --git a/include/sound/core.h b/include/sound/core.h
index b6e0f57..442f822 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -354,6 +354,8 @@ void __snd_printk(unsigned int level, const char *file, int line,
*/
#define snd_printd(fmt, args...) \
__snd_printk(1, __FILE__, __LINE__, fmt, ##args)
+#define _snd_printd(level, fmt, args...) \
+ __snd_printk(level, __FILE__, __LINE__, fmt, ##args)
/**
* snd_BUG - give a BUG warning message and stack trace
@@ -383,6 +385,7 @@ void __snd_printk(unsigned int level, const char *file, int line,
#else /* !CONFIG_SND_DEBUG */
#define snd_printd(fmt, args...) do { } while (0)
+#define _snd_printd(level, fmt, args...) do { } while (0)
#define snd_BUG() do { } while (0)
static inline int __snd_bug_on(int cond)
{
next prev parent reply other threads:[~2012-04-10 6:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-09 2:15 [PATCH] alsa: hide HDMI/ELD printks unless in debug kernels Fengguang Wu
2012-04-09 15:12 ` Stephen Warren
2012-04-10 6:08 ` Takashi Iwai [this message]
2012-04-10 9:00 ` Fengguang Wu
2012-04-10 12:56 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hty0sunif.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=fengguang.wu@intel.com \
--cc=keithp@keithp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nbowler@elliptictech.com \
--cc=swarren@wwwdotorg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).