
According to Takashi Iwai, CONFIG_SND_VERBOSE_PRINTK is "useless". All it does is add filenames and line numbers to certain log messages. If these messages are supposed to have filenames and line numbers, they should have them all the time. (These messages are all errors and warnings, anyway.)
This patch gets rid of the symbol, acting as though it is always enabled.
Signed-off-by: Alan Stern stern@rowland.harvard.edu CC: Joe Perches joe@perches.com
v.2: Enable the filenames and line numbers always, rather than eliminating them.
---
[as1688b]
Documentation/DocBook/writing-an-alsa-driver.tmpl | 3 +-- arch/arm/configs/eseries_pxa_defconfig | 1 - arch/arm/configs/omap2plus_defconfig | 1 - arch/arm/configs/s3c2410_defconfig | 1 - arch/arm/configs/trizeps4_defconfig | 1 - arch/ia64/configs/generic_defconfig | 1 - arch/ia64/configs/gensparse_defconfig | 1 - arch/mips/configs/pnx8335_stb225_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - arch/sh/configs/edosk7760_defconfig | 1 - arch/sh/configs/sh7785lcr_32bit_defconfig | 1 - include/sound/core.h | 8 +------- sound/core/Kconfig | 9 --------- sound/core/misc.c | 10 ---------- sound/pci/hda/hda_intel.c | 4 ---- 15 files changed, 2 insertions(+), 42 deletions(-)
Index: usb-3.10/Documentation/DocBook/writing-an-alsa-driver.tmpl =================================================================== --- usb-3.10.orig/Documentation/DocBook/writing-an-alsa-driver.tmpl +++ usb-3.10/Documentation/DocBook/writing-an-alsa-driver.tmpl @@ -6087,8 +6087,7 @@ struct _snd_pcm_runtime { <title><function>snd_printk()</function> and friends</title> <para> ALSA provides a verbose version of the - <function>printk()</function> function. If a kernel config - <constant>CONFIG_SND_VERBOSE_PRINTK</constant> is set, this + <function>printk()</function> function. This function prints the given message together with the file name and the line of the caller. The <constant>KERN_XXX</constant> prefix is processed as Index: usb-3.10/arch/arm/configs/eseries_pxa_defconfig =================================================================== --- usb-3.10.orig/arch/arm/configs/eseries_pxa_defconfig +++ usb-3.10/arch/arm/configs/eseries_pxa_defconfig @@ -90,7 +90,6 @@ CONFIG_SND=m CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m CONFIG_SND_DYNAMIC_MINORS=y -CONFIG_SND_VERBOSE_PRINTK=y # CONFIG_SND_PCMCIA is not set CONFIG_SND_SOC=m CONFIG_SND_PXA2XX_SOC=m Index: usb-3.10/arch/arm/configs/omap2plus_defconfig =================================================================== --- usb-3.10.orig/arch/arm/configs/omap2plus_defconfig +++ usb-3.10/arch/arm/configs/omap2plus_defconfig @@ -192,7 +192,6 @@ CONFIG_SOUND=m CONFIG_SND=m CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m -CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_USB_AUDIO=m CONFIG_SND_SOC=m Index: usb-3.10/arch/arm/configs/s3c2410_defconfig =================================================================== --- usb-3.10.orig/arch/arm/configs/s3c2410_defconfig +++ usb-3.10/arch/arm/configs/s3c2410_defconfig @@ -315,7 +315,6 @@ CONFIG_SND_SEQUENCER=m CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_VERBOSE_PRINTK=y # CONFIG_SND_DRIVERS is not set # CONFIG_SND_ARM is not set # CONFIG_SND_SPI is not set Index: usb-3.10/arch/arm/configs/trizeps4_defconfig =================================================================== --- usb-3.10.orig/arch/arm/configs/trizeps4_defconfig +++ usb-3.10/arch/arm/configs/trizeps4_defconfig @@ -159,7 +159,6 @@ CONFIG_SND=y CONFIG_SND_SEQUENCER=y CONFIG_SND_MIXER_OSS=y CONFIG_SND_PCM_OSS=y -CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_PXA2XX_AC97=y CONFIG_SND_USB_AUDIO=m Index: usb-3.10/arch/ia64/configs/generic_defconfig =================================================================== --- usb-3.10.orig/arch/ia64/configs/generic_defconfig +++ usb-3.10/arch/ia64/configs/generic_defconfig @@ -127,7 +127,6 @@ CONFIG_SND_SEQ_DUMMY=m CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DUMMY=m CONFIG_SND_VIRMIDI=m CONFIG_SND_MTPAV=m Index: usb-3.10/arch/ia64/configs/gensparse_defconfig =================================================================== --- usb-3.10.orig/arch/ia64/configs/gensparse_defconfig +++ usb-3.10/arch/ia64/configs/gensparse_defconfig @@ -115,7 +115,6 @@ CONFIG_SND_SEQ_DUMMY=m CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DUMMY=m CONFIG_SND_VIRMIDI=m CONFIG_SND_MTPAV=m Index: usb-3.10/arch/mips/configs/pnx8335_stb225_defconfig =================================================================== --- usb-3.10.orig/arch/mips/configs/pnx8335_stb225_defconfig +++ usb-3.10/arch/mips/configs/pnx8335_stb225_defconfig @@ -73,7 +73,6 @@ CONFIG_SND_SEQUENCER=m CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_EXT2_FS=m # CONFIG_DNOTIFY is not set Index: usb-3.10/arch/powerpc/configs/ppc6xx_defconfig =================================================================== --- usb-3.10.orig/arch/powerpc/configs/ppc6xx_defconfig +++ usb-3.10/arch/powerpc/configs/ppc6xx_defconfig @@ -870,7 +870,6 @@ CONFIG_SND_PCM_OSS=m CONFIG_SND_SEQUENCER_OSS=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_DEBUG_VERBOSE=y CONFIG_SND_PCM_XRUN_DEBUG=y Index: usb-3.10/arch/sh/configs/edosk7760_defconfig =================================================================== --- usb-3.10.orig/arch/sh/configs/edosk7760_defconfig +++ usb-3.10/arch/sh/configs/edosk7760_defconfig @@ -90,7 +90,6 @@ CONFIG_SOUND=y CONFIG_SND=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set -CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_SOC=y # CONFIG_HID_SUPPORT is not set # CONFIG_USB_SUPPORT is not set Index: usb-3.10/arch/sh/configs/sh7785lcr_32bit_defconfig =================================================================== --- usb-3.10.orig/arch/sh/configs/sh7785lcr_32bit_defconfig +++ usb-3.10/arch/sh/configs/sh7785lcr_32bit_defconfig @@ -105,7 +105,6 @@ CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set -CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_DEBUG_VERBOSE=y # CONFIG_SND_DRIVERS is not set Index: usb-3.10/sound/core/Kconfig =================================================================== --- usb-3.10.orig/sound/core/Kconfig +++ usb-3.10/sound/core/Kconfig @@ -173,15 +173,6 @@ config SND_VERBOSE_PROCFS useful information to developers when a problem occurs). On the other side, it makes the ALSA subsystem larger.
-config SND_VERBOSE_PRINTK - bool "Verbose printk" - help - Say Y here to enable verbose log messages. These messages - will help to identify source file and position containing - printed messages. - - You don't need this unless you're debugging ALSA. - config SND_DEBUG bool "Debug" help Index: usb-3.10/sound/pci/hda/hda_intel.c =================================================================== --- usb-3.10.orig/sound/pci/hda/hda_intel.c +++ usb-3.10/sound/pci/hda/hda_intel.c @@ -189,11 +189,7 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6}, "{ULI, M5461}}"); MODULE_DESCRIPTION("Intel HDA driver");
-#ifdef CONFIG_SND_VERBOSE_PRINTK #define SFX /* nop */ -#else -#define SFX "hda-intel " -#endif
#if defined(CONFIG_PM) && defined(CONFIG_VGA_SWITCHEROO) #ifdef CONFIG_SND_HDA_CODEC_HDMI Index: usb-3.10/include/sound/core.h =================================================================== --- usb-3.10.orig/include/sound/core.h +++ usb-3.10/include/sound/core.h @@ -335,21 +335,15 @@ enum { SND_PR_VERBOSE, };
-#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) __printf(4, 5) void __snd_printk(unsigned int level, const char *file, int line, const char *format, ...); -#else -#define __snd_printk(level, file, line, format, args...) \ - printk(format, ##args) -#endif
/** * snd_printk - printk wrapper * @fmt: format string * - * Works like printk() but prints the file and the line of the caller - * when configured with CONFIG_SND_VERBOSE_PRINTK. + * Works like printk() but prints the file and the line of the caller. */ #define snd_printk(fmt, args...) \ __snd_printk(0, __FILE__, __LINE__, fmt, ##args) Index: usb-3.10/sound/core/misc.c =================================================================== --- usb-3.10.orig/sound/core/misc.c +++ usb-3.10/sound/core/misc.c @@ -51,7 +51,6 @@ void release_and_free_resource(struct re
EXPORT_SYMBOL(release_and_free_resource);
-#ifdef CONFIG_SND_VERBOSE_PRINTK /* strip the leading path if the given path is absolute */ static const char *sanity_file_name(const char *path) { @@ -60,18 +59,14 @@ static const char *sanity_file_name(cons else return path; } -#endif
-#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) void __snd_printk(unsigned int level, const char *path, int line, const char *format, ...) { va_list args; -#ifdef CONFIG_SND_VERBOSE_PRINTK int kern_level; struct va_format vaf; char verbose_fmt[] = KERN_DEFAULT "ALSA %s:%d %pV"; -#endif
#ifdef CONFIG_SND_DEBUG if (debug < level) @@ -79,7 +74,6 @@ void __snd_printk(unsigned int level, co #endif
va_start(args, format); -#ifdef CONFIG_SND_VERBOSE_PRINTK vaf.fmt = format; vaf.va = &args;
@@ -92,13 +86,9 @@ void __snd_printk(unsigned int level, co memcpy(verbose_fmt, KERN_DEBUG, sizeof(KERN_DEBUG) - 1); printk(verbose_fmt, sanity_file_name(path), line, &vaf);
-#else - vprintk(format, args); -#endif va_end(args); } EXPORT_SYMBOL_GPL(__snd_printk); -#endif
#ifdef CONFIG_PCI #include <linux/pci.h>