lkml.org 
[lkml]   [2010]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drivers/hwmon: Use pr_fmt and pr_<level>
From
Date
On Wed, 2010-10-20 at 21:38 +0200, Jean Delvare wrote:
> On Wed, 20 Oct 2010 16:19:46 -0300, Davidlohr Bueso wrote:
> > Well we do have this:
> > #ifndef pr_fmt
> > #define pr_fmt(fmt) fmt
> > #endif
> I can read the code, thank you. My point is that what we have is
> insufficient, as Joe is proposing to use a different pr_fmt definition
> for pretty much all drivers in the kernel tree.

No, I'm proposing to use a uniform pr_fmt definition for
files that want a prefix on their logging messages.

At some point, the files that do not want a prefix
should be converted to use #define pr_fmt(fmt) fmt.

Repeating from another email, there are ~1500 files that
use pr_<level> without using pr_fmt. There are 335 files
that #define pr_fmt.

So I'm not saying that point in time is now.

Another way to do this would be to standardize
hwmon.h so it would add:
"#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt"
in only 1 place.

So perhaps add this to include/linux/hwmon.h instead:

#if defined pr_fmt
#undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#endif




\
 
 \ /
  Last update: 2010-10-20 21:55    [W:2.793 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site