lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091226042017.GA14921@khazad-dum.debian.net>
Date:	Sat, 26 Dec 2009 02:20:17 -0200
From:	Henrique de Moraes Holschuh <hmh@....eng.br>
To:	Joe Perches <joe@...ches.com>
Cc:	Henrique de Moraes Holschuh <ibm-acpi@....eng.br>,
	Len Brown <len.brown@...el.com>,
	ibm-acpi-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ