[alsa-devel] [PATCH 1/2] ALSA: convert "snd_printk(KERN_INFO" to "pr_info("

Joe Perches joe at perches.com
Wed Jun 5 08:07:51 CEST 2013


On Wed, 2013-06-05 at 07:52 +0200, Takashi Iwai wrote:
> At Tue, 4 Jun 2013 13:20:40 -0400 (EDT),

> > --- usb-3.10.orig/sound/isa/opti9xx/miro.c
[]
> > -			snd_printk(KERN_INFO "unknown miro aci id\n");
> > +			pr_info("unknown miro aci id\n");
[]
> need proper prefix, and should be rather pr_warning().

pr_warn should be preferred over pr_warning
and most everything should have a
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
added.  Another option would be to add
ccflags-y += -D "pr_fmt(fmt)=KBUILD_MODNAME \": \" fmt" 
to the top level sound makefile.

Some eon son I'll actually submit this
https://lkml.org/lkml/2012/3/27/247
and most all of the #define pr_fmt(...
will be unncessary.

> > --- usb-3.10.orig/sound/pci/emu10k1/emu10k1x.c
[]
> >  #if 0
> > -	snd_printk(KERN_INFO "IRQ: position = 0x%x, period = 0x%x, size = 0x%x\n",
> > +	pr_info("IRQ: position = 0x%x, period = 0x%x, size = 0x%x\n",
> >  		   epcm->substream->ops->pointer(epcm->substream),
> >  		   snd_pcm_lib_period_bytes(epcm->substream),
> >  		   snd_pcm_lib_buffer_bytes(epcm->substream));
> 
> Should be pr_debug().

Or the block deleted




More information about the Alsa-devel mailing list