mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Joe Perches <joe@perches.com>
Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
	Len Brown <len.brown@intel.com>,
	ibm-acpi-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] thinkpad_acpi.c: Remove #define TPACPI_<level>s for printks
Date: Sat, 26 Dec 2009 02:20:17 -0200	[thread overview]
Message-ID: <20091226042017.GA14921@khazad-dum.debian.net> (raw)
In-Reply-To: <1261797801.2568.69.camel@Joe-Laptop.home>

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

  reply	other threads:[~2009-12-26  4:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-26  3:23 Joe Perches
2009-12-26  4:20 ` Henrique de Moraes Holschuh [this message]
2009-12-26  4:42   ` Joe Perches
2009-12-27  0:29     ` Henrique de Moraes Holschuh
2009-12-27  1:07       ` Joe Perches
2009-12-27  1:10         ` Henrique de Moraes Holschuh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091226042017.GA14921@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=ibm-acpi@hmh.eng.br \
    --cc=joe@perches.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®