Re: [PATCH] thinkpad_acpi.c: Remove #define TPACPI_<level>s forprintks
From: Henrique de Moraes Holschuh
Date: Fri Dec 25 2009 - 23:20:38 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/