Re: [PATCH 06/14] [media] cx18: Use current logging styles
From: Andy Walls <awalls@md.metrocast.net>
Date: 2011-08-27 17:23:42
Also in:
lkml
Joe Perches [off-list ref] wrote:
On Sat, 2011-08-27 at 09:28 -0400, Andy Walls wrote:quoted
On Wed, 2011-08-24 at 14:42 -0700, Joe Perches wrote:quoted
On Wed, 2011-08-24 at 06:34 -0400, Andy Walls wrote:quoted
On Sun, 2011-08-21 at 15:56 -0700, Joe Perches wrote:quoted
Add pr_fmt. Convert printks to pr_<level>. Convert printks without KERN_<level> to appropriate pr_<level>. Removed embedded prefixes when pr_fmt was added. Use ##__VA_ARGS__ for variadic macros. Coalesce format strings.1. It is important to preserve the per-card prefixes emitted bythequoted
quoted
quoted
driver: cx18-0, cx18-1, cx18-2, etc. With a quick skim, I thinkyourquoted
quoted
quoted
change preserves the format of all output messages (exceptremovingquoted
quoted
quoted
periods). Can you confirm this?Here's the output diff of strings built-in.o | grep "^<.>" | sort new and old[]quoted
Yuck.quoted
quoted
2. PLease don't add a pr_fmt() #define to exevry file. Just putonequoted
quoted
quoted
where all the other CX18_*() macros are defined. Every filepicks thosequoted
quoted
quoted
up.It's not the first #include of every file. printk.h has a default #define pr_fmt(fmt) fmtWell then don't use "pr_fmt(fmt)" in cx18, if it overloads a define somewhere else in the kernel and has a dependency on its orderrelativequoted
to #include statements. That sort of thing just ups maintenancehoursquoted
later. That's not a good trade off for subjectively better log messages. Won't redifining the 'pr_fmt(fmt)' generate preprocessor warnings anyway?No. Andy, I fully understand how this stuff works. You apparently don't (yet). Look at include/linux/printk.h #ifndef pr_fmt #define pr_fmt(fmt) fmt #endif A default empty define is used when one is not specified before printk.h is included. kernel.h includes printk.h v4l2_<level> uses the "name" of the video device in its output. That name may not be the same name as the module. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Joe, I don't need to fully understand it. This is a happy to glad change with no functional nor performance benefit. It adds unneeded lines of code to the driver and mangles some of the log messages. I see no benefit from my perspective. Regards, Andy