From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 1/2] ALSA: convert "snd_printk(KERN_INFO" to "pr_info(" Date: Wed, 05 Jun 2013 08:16:03 +0200 Message-ID: References: <1370412471.2385.105.camel@joe-AO722> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id EF3E22652BE for ; Wed, 5 Jun 2013 08:15:25 +0200 (CEST) In-Reply-To: <1370412471.2385.105.camel@joe-AO722> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Joe Perches Cc: alsa-devel@alsa-project.org, Alan Stern List-Id: alsa-devel@alsa-project.org At Tue, 04 Jun 2013 23:07:51 -0700, Joe Perches wrote: > > 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 Oh, then shouldn't we define them in other way round? --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -214,9 +214,9 @@ extern void dump_stack(void) __cold; printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) #define pr_err(fmt, ...) \ printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) -#define pr_warning(fmt, ...) \ +#define pr_warn(fmt, ...) \ printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) -#define pr_warn pr_warning +#define pr_warning pr_warn #define pr_notice(fmt, ...) \ printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) #define pr_info(fmt, ...) \ > 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. Right, these would work well. With this addition, we can go rather to remove superfluous prefix from pr_*(). > 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 Yes, another obvious option :) thanks, Takashi