public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] CodingStyle: Printing numbers in parentheses is fine
@ 2007-09-29 10:25 Jean Delvare
  2007-09-29 10:51 ` Andrew Morton
  0 siblings, 1 reply; 12+ messages in thread
From: Jean Delvare @ 2007-09-29 10:25 UTC (permalink / raw)
  To: LKML; +Cc: Linus Torvalds, Andrew Morton, David Brownell

Remove a not particularly relevant rule from CodingStyle.
Sometimes, printing numbers in parentheses doesn't add value, but in
some (most?) cases it makes the message easier to read. As a matter of
fact, this practice is widely used in the kernel:

linux-2.6.23-rc8$ quilt grep -I '(%l*[du])' | wc -l
3166
linux-2.6.23-rc8$

Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
 Documentation/CodingStyle |    2 --
 1 file changed, 2 deletions(-)

--- linux-2.6.23-rc8.orig/Documentation/CodingStyle	2007-07-23 16:44:32.000000000 +0200
+++ linux-2.6.23-rc8/Documentation/CodingStyle	2007-09-28 23:53:23.000000000 +0200
@@ -638,8 +638,6 @@ concise, clear, and unambiguous.
 
 Kernel messages do not have to be terminated with a period.
 
-Printing numbers in parentheses (%d) adds no value and should be avoided.
-
 There are a number of driver model diagnostic macros in <linux/device.h>
 which you should use to make sure messages are matched to the right device
 and driver, and are tagged with the right level:  dev_err(), dev_warn(),


-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-09-30 10:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-29 10:25 [PATCH] CodingStyle: Printing numbers in parentheses is fine Jean Delvare
2007-09-29 10:51 ` Andrew Morton
2007-09-29 17:19   ` David Brownell
2007-09-29 18:29   ` Randy Dunlap
2007-09-29 18:53     ` David Brownell
2007-09-29 20:13       ` Randy Dunlap
2007-09-29 22:30         ` David Brownell
2007-09-29 22:51           ` Randy Dunlap
2007-09-29 22:55           ` Måns Rullgård
2007-09-30 10:28           ` Jean Delvare
2007-09-30  2:18   ` Valdis.Kletnieks
2007-09-30 10:11   ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox