From: Joe Perches <joe@perches.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Jason Baron <jbaron@redhat.com>,
Jim Cromie <jim.cromie@gmail.com>, Liam Girdwood <lrg@ti.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [RFC] Remove most all #define pr_fmt(fmt) lines
Date: Wed, 28 Mar 2012 01:03:40 -0700 [thread overview]
Message-ID: <1332921820.16535.32.camel@joe2Laptop> (raw)
In-Reply-To: <CAMuHMdWOw+UgdL7H9MLm6LLEFBkuqecrc4urHMYi7E7eTGWz4w@mail.gmail.com>
On Wed, 2012-03-28 at 09:42 +0200, Geert Uytterhoeven wrote:
> On Tue, Mar 27, 2012 at 19:23, Joe Perches <joe@perches.com> wrote:
> > #ifndef pr_fmt
> > +
> > +#ifndef pr_fmt_std
> > +#define pr_fmt_std(fmt) KBUILD_MODNAME ": " fmt
> > +#endif
> > +#ifndef pr_fmt_dbg
> > +#define pr_fmt_dbg(fmt) fmt
> > +#endif
> > #define pr_fmt(fmt) fmt
>
> What's the rationale behind the above line?
> I had expected
>
> #define pr_fmt(fmt) pr_fmt_std(fmt)
Keeping current pr_debug output as similar to
possible to the output produced by this patch.
pr_debug predates pr_fmt by quite awhile, it
dates back from kernel version 2.0 days, and
there are _many_ instances of pr_debug in files
without a pr_fmt define.
The other defines of pr_<level> were introduced
more or less the same time as pr_fmt so there
aren't _too_ many that couldn't reasonably be
prefixed.
commit d091c2f58ba32029495a933b721e8e02fbd12caa
Author: Martin Schwidefsky <schwidefsky@de.ibm.com>
Date: Wed Nov 12 21:16:43 2008 +0100
Add 'pr_fmt()' format modifier to pr_xyz macros.
commit 1f7c8234c7a68c2ccc2a33f3b7d48057980e7c35
Author: Emil Medve <Emilian.Medve@Freescale.com>
Date: Tue Oct 16 23:29:48 2007 -0700
Make the pr_*() family of macros in kernel.h complete
> > +#ifndef pr_fmt_std
> > +#define pr_fmt_std(fmt...) pr_fmt(fmt)
>
> Why the "fmt..." here, and "fmt" in the definitions above?
Where pr_fmt is already defined, these pr_fmt_std and _dbg
macros must work with pr_fmt defines like:
#define pr_fmt(fmt) "my special prefix:%s:%d", __func__, __LINE__
prev parent reply other threads:[~2012-03-28 8:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-27 17:23 Joe Perches
2012-03-28 7:27 ` Clemens Ladisch
2012-03-28 7:30 ` Joe Perches
2012-03-28 9:46 ` Mark Brown
2012-03-28 16:22 ` Joe Perches
2012-03-28 16:33 ` Mark Brown
2012-03-28 7:42 ` Geert Uytterhoeven
2012-03-28 8:03 ` 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=1332921820.16535.32.camel@joe2Laptop \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=geert@linux-m68k.org \
--cc=jbaron@redhat.com \
--cc=jim.cromie@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
/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
Powered by JetHome