lkml.org 
[lkml]   [2009]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] thinkpad_acpi.c: Remove #define TPACPI_<level>s for printks
On Fri, 25 Dec 2009, Joe Perches wrote:
> The use of printk(TPACPI_<level> is unusual.
> Make it a bit more kernel normal style.

NAK.

This is likely purely a taste thing, but I completely fail to see how this:

> - printk(TPACPI_DEBUG "%s: access by process with PID %d\n",
> - what, task_tgid_vnr(current));
> + printk(KERN_DEBUG pr_fmt("%s: access by process with PID %d\n"),
> + what, task_tgid_vnr(current));

is a good thing at all. Maybe you could convince me to change my mind about
it but I dislike the resuling uglyness, so I will need a good technical
reason to even consider it.

Why would I want a parameter macro instead of a straightforward bunch of
#defines ? It is not like the #defines are harder to understand than this
pr_fmt thing.

> if (!*fmt) {
> - printk(TPACPI_ERR "acpi_evalf() called with empty format\n");
> + pr_err("acpi_evalf() called with empty format\n");
> return 0;

I am with Peter Zijlstra on this one. I don't want the pr_foo() siliness in
code I maintain. You could perhaps convince me to change what is inside the
printk(), but the fact that my printk helpers end with "_printk" is not a
coincidence.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh


\
 
 \ /
  Last update: 2009-12-26 05:23    [W:0.042 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site