Thread (30 messages) 30 messages, 7 authors, 2011-09-04

Re: [PATCH 14/14] [media] gspca: Use current logging styles

From: Joe Perches <joe@perches.com>
Date: 2011-08-22 15:20:36
Also in: lkml

On Mon, 2011-08-22 at 10:50 +0200, Jean-Francois Moine wrote:
On Sun, 21 Aug 2011 15:56:57 -0700
Joe Perches [off-list ref] wrote:
quoted
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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help