public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] Add PR_PREFIX to pr_xyz macros.
Date: Wed, 12 Nov 2008 20:59:02 +0100	[thread overview]
Message-ID: <1226519942.2222.4.camel@localhost> (raw)
In-Reply-To: <alpine.LFD.2.00.0811121144400.3468@nehalem.linux-foundation.org>

On Wed, 2008-11-12 at 11:48 -0800, Linus Torvalds wrote:
> 
> On Wed, 12 Nov 2008, Martin Schwidefsky wrote:
> >
> > +#ifndef PR_PREFIX
> > +#define pr_fmt(format) format 
> > +#else
> > +#define pr_fmt(format) PR_PREFIX ": " format
> > +#endif
> > +
> > +#define pr_emerg(fmt, ...) \
> > +        printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
> 
> So, why can't people just define their pr_fmt() macro directly, something 
> like
> 
> 	#define pr_fmt(fmt) \
> 		"%s:%d " fmt, __FILE__, __LINE__
> 
> which seems to be much more useful and generic than forcing them to use 
> "PR_PREFIX"?

Even better - much better. With that define a lot more printk wrappers
could be replaced. I'll come up with a patch.

-- 
blue skies,
  Martin.

"Reality continues to ruin my life." - Calvin.



  reply	other threads:[~2008-11-12 20:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 17:35 [RFC] Add PR_PREFIX to pr_xyz macros Martin Schwidefsky
2008-11-12 19:48 ` Linus Torvalds
2008-11-12 19:59   ` Martin Schwidefsky [this message]
2008-11-12 20:16   ` Martin Schwidefsky
2008-11-14 21:32     ` Andrew Morton
2008-11-15  8:58       ` Martin Schwidefsky

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=1226519942.2222.4.camel@localhost \
    --to=schwidefsky@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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