public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	debian-kernel@lists.debian.org, linux-m68k@vger.kernel.org,
	Thorsten Glaser <tg@debian.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] m68k/irq: don't use pr_crit in an header
Date: Sun, 18 Dec 2011 09:06:47 -0800	[thread overview]
Message-ID: <1324228007.14500.4.camel@joe2Laptop> (raw)
In-Reply-To: <20111218104248.GS24496@pengutronix.de>

On Sun, 2011-12-18 at 11:42 +0100, Uwe Kleine-König wrote:
> On Sun, Dec 18, 2011 at 11:32:21AM +0100, Geert Uytterhoeven wrote:
> > 2011/12/17 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> > > Using pr_crit in an header results in funny messages. Consider
> > >        #define pr_fmt(fmt) "mydriver: " fmt
> > >        #include <linux/hardirq.h>
> > > which makes the message from ack_bad_irq
> > >        mydriver: unexpected IRQ trap...
> > > so better use plain printk with KERN_CRIT directly.

Why or when is that inappropriate?

> I only wondered if it is also desirable to
> have messages in headers modified depending on the module the header is
> included in.
[]
> > Nack. Nowadays pr_crit(...) is recommended over "printk(KERN_CRIT ...)".
> I know that, I just wonder if the proponents of this recommendation are
> aware of the issue when using pr_* in headers. Joe?

I believe it to be a feature rather than a defect.

For instance:  commit 256ee435b9a9ee9cca69602fe8046b27ca99fbee

    netdevice: Convert printk to pr_info in netif_tx_stop_queue
    
    This allows any caller to be prefaced by any specific
    pr_fmt to better identify which device driver is using
    this function inappropriately. 

cheers, Joe


      reply	other threads:[~2011-12-18 17:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.BSM.4.64L.1112161437090.856@herc.mirbsd.org>
     [not found] ` <1324152592-1718-1-git-send-email-u.kleine-koenig@pengutronix.de>
2011-12-18 10:32   ` [PATCH] m68k/irq: don't use pr_crit in an header Geert Uytterhoeven
2011-12-18 10:42     ` Uwe Kleine-König
2011-12-18 17:06       ` Joe Perches [this message]

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=1324228007.14500.4.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=debian-kernel@lists.debian.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=tg@debian.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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