login
Header Space

 
 

Re: [patch] bkl2mtd: cleanup

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Al Viro <viro@...>
Cc: J?rn Engel <joern@...>, David Miller <davem@...>, <jirislaby@...>, <joe@...>, <tglx@...>, <linux-kernel@...>, Andy Whitcroft <apw@...>
Date: Wednesday, March 26, 2008 - 7:10 am

* Al Viro <viro@ZenIV.linux.org.uk> wrote:


(yep, that's odd.)


these are really nuances, so unless you are interested in such nuances 
nowhere found in CodingStyle, stop reading here :-)

i personally try to minimize the number and complexity of function 
prototype patterns, while still trying to keep the linecount low. So if 
a function prototype wants to be multi-line, it's not a "simple one-line 
function prototype" anymore, so i use the same template for everything:

 type
 function_name(vars ...
               more vars ...)
 {

[ having the 'type' separately makes it easy to judge the return type of 
  a function (especially with syntax highlighting active). Aligned 
  variables are an efficient extension of the 'line' concept that does 
  not mix the function_name with the variables. ]

incidentally, a natural simplified variant of that is the following:

 type
 function_name(vars...)
 {

which tends to stay cleanly 2-line and looks tidier and shorter than 
the:

 type function_name(vars...
                    more vars ...)
 {

form. The preferred form is of course:

 type function_name(vars...)

	Ingo
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 109/148] include/asm-x86/serial.h: checkpatch cle..., Christoph Hellwig, (Wed Mar 26, 7:09 am)
[patch] bkl2mtd: cleanup, Ingo Molnar, (Wed Mar 26, 6:14 am)
Re: [patch] bkl2mtd: cleanup, Al Viro, (Wed Mar 26, 6:48 am)
Re: [patch] bkl2mtd: cleanup, Ingo Molnar, (Wed Mar 26, 7:10 am)
Re: [patch] bkl2mtd: cleanup, Joe Perches, (Wed Mar 26, 12:30 pm)
Re: [patch] bkl2mtd: cleanup, Jiri Slaby, (Wed Mar 26, 7:14 am)
Re: [patch] bkl2mtd: cleanup, Ingo Molnar, (Wed Mar 26, 7:02 am)
Re: [patch] bkl2mtd: cleanup, Ingo Molnar, (Wed Mar 26, 7:00 am)
Re: [patch] bkl2mtd: cleanup, Jörn, (Wed Mar 26, 6:57 am)
speck-geostationary