lkml.org 
[lkml]   [2011]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 14/14] [media] gspca: Use current logging styles
From
Date
On Mon, 2011-08-22 at 10:50 +0200, Jean-Francois Moine wrote:
> On Sun, 21 Aug 2011 15:56:57 -0700
> Joe Perches <joe@perches.com> wrote:
> > Add pr_fmt.
> > Convert usb style logging macros to pr_<level>.
> > Remove now unused old usb style logging macros.
> Hi Joe,

Hello Jean-Francois.

> Sorry, but I do not see the advantages of your patch.

The primary current advantage is style standardization
both in code and dmesg output.

Future changes to printk.h will reduce object sizes
by centralizing the prefix to a singleton and
emitting it only in pr_<level>.

> For gspca, the source files are bigger, and the only visible change is
> the display of the real module name instead of the name defined by hand
> (this change may have been done just in gspca.h).

No, not really. gspca.h is not the first #include
for all sources.

Using #define pr_fmt before any #include avoids
possible redefinition of the pr_<level> prefix.

$ grep -rP --include=*.[ch] -l "gspca\.h" drivers/media | \
xargs grep -m1 "#\s*include"

> Also, I think that defining 'pr_fmt' in each source file is not a good
> idea...

That's temporary for another year or so.
After changes to printk are introduced, all
of the uses of
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
could/should be removed.

cheers, Joe




\
 
 \ /
  Last update: 2011-08-22 17:23    [W:0.113 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site