Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Joe Perches <joe@perches.com>
Cc: alsa-devel@alsa-project.org, Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH 1/2] ALSA: convert "snd_printk(KERN_INFO" to "pr_info("
Date: Wed, 05 Jun 2013 08:16:03 +0200	[thread overview]
Message-ID: <s5hmwr5rskc.wl%tiwai@suse.de> (raw)
In-Reply-To: <1370412471.2385.105.camel@joe-AO722>

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

  reply	other threads:[~2013-06-05  6:15 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 20:18 [PATCH] ALSA: get rid of CONFIG_SND_VERBOSE_PRINTK Alan Stern
2013-06-03 20:24 ` Joe Perches
2013-06-03 20:40   ` Alan Stern
2013-06-03 20:49     ` Joe Perches
2013-06-04  9:13 ` Takashi Iwai
2013-06-04 14:49   ` Alan Stern
2013-06-04 15:03     ` Takashi Iwai
2013-06-04 17:20       ` [PATCH 1/2] ALSA: convert "snd_printk(KERN_INFO" to "pr_info(" Alan Stern
2013-06-05  5:52         ` Takashi Iwai
2013-06-05  6:07           ` Joe Perches
2013-06-05  6:16             ` Takashi Iwai [this message]
2013-06-06 20:54           ` Alan Stern
2013-06-07  5:41             ` Takashi Iwai
2013-06-07 15:51               ` Alan Stern
2013-06-04 17:20       ` [PATCH 2/2 v.2] ALSA: get rid of CONFIG_SND_VERBOSE_PRINTK Alan Stern
2013-06-04 19:32       ` [PATCH] " Alan Stern
2013-06-04 19:45         ` Joe Perches
2013-06-04 20:54           ` Alan Stern
2013-06-04 21:19             ` Joe Perches
2013-06-06 20:42               ` Alan Stern
2013-06-06 20:59                 ` Joe Perches
2013-06-07 14:40                   ` Alan Stern
2013-06-07 16:10                     ` Joe Perches
2013-06-05  6:04             ` Takashi Iwai
2013-06-05  6:15               ` Joe Perches
2013-06-05  6:32                 ` Takashi Iwai
2013-06-05  6:52                   ` Joe Perches
2013-06-05  6:54                     ` Takashi Iwai
2013-06-05  7:07                       ` Joe Perches
2013-06-05  7:22                         ` Takashi Iwai
2013-06-05  7:34                           ` Joe Perches
2013-06-05  7:47                             ` CONFIG_SND_DEBUG (was: Re: [alsa-devel] [PATCH] ALSA: get rid of CONFIG_SND_VERBOSE_PRINTK) David Henningsson
2013-06-05  8:46                               ` CONFIG_SND_DEBUG (was: " Takashi Iwai
2013-06-05 10:53                               ` CONFIG_SND_DEBUG (was: Re: [alsa-devel] " Andy Whitcroft
2013-06-05 11:38                                 ` CONFIG_SND_DEBUG David Henningsson
2013-06-05 11:43                                   ` CONFIG_SND_DEBUG Takashi Iwai
2013-06-05 14:11                                     ` CONFIG_SND_DEBUG Alan Stern
2013-06-05 14:28                                       ` CONFIG_SND_DEBUG Takashi Iwai
2013-06-05 14:47                                         ` CONFIG_SND_DEBUG Alan Stern
2013-06-06 21:28               ` [PATCH] ALSA: get rid of CONFIG_SND_VERBOSE_PRINTK Alan Stern
2013-06-06 21:50                 ` Joe Perches
2013-06-07  5:57                   ` Takashi Iwai
2013-06-07 15:34                     ` Alan Stern
2013-06-07  5:53                 ` 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=s5hmwr5rskc.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=joe@perches.com \
    --cc=stern@rowland.harvard.edu \
    /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