[alsa-devel] [PATCH] ALSA: get rid of CONFIG_SND_VERBOSE_PRINTK
Alan Stern
stern at rowland.harvard.edu
Mon Jun 3 22:40:43 CEST 2013
On Mon, 3 Jun 2013, Joe Perches wrote:
> On Mon, 2013-06-03 at 16:18 -0400, Alan Stern wrote:
> > According to Takashi Iwai, CONFIG_SND_VERBOSE_PRINTK is "useless". All
> > it does is add filenames and line numbers to certain log messages.
> > This patch gets rid of it.
> []
> > Updating all the snd_printk() and snd_printd() calls will be a huge
> > job. Getting rid of the verbose logging is a lot easier, so that's
> > where I'm starting.
>
> cocci and emacs can make this pretty simple.
I wish they could, but I sincerely doubt that this conversion can be
mechanized. At least, not if it is to be done correctly.
> > --- usb-3.10.orig/include/sound/core.h
> []
> > -#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
> > +#if defined(CONFIG_SND_DEBUG)
> > __printf(4, 5)
> > void __snd_printk(unsigned int level, const char *file, int line,
> > const char *format, ...);
> > @@ -349,7 +349,7 @@ void __snd_printk(unsigned int level, co
> > * @fmt: format string
> > *
> > * Works like printk() but prints the file and the line of the caller
> > - * when configured with CONFIG_SND_VERBOSE_PRINTK.
> > + * when configured with CONFIG_SND_DEBUG.
> > */
> > #define snd_printk(fmt, args...) \
> > __snd_printk(0, __FILE__, __LINE__, fmt, ##args)
>
> Please change the __snd_printk macros to remove __FILE__ and
> __LINE__ (or 0, and 0) to remove some text from the objects.
Will do. I should have realized that originally...
Alan Stern
More information about the Alsa-devel
mailing list