lkml.org 
[lkml]   [2007]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: coding style


Cyrill wrote:
>> err = foo(arg_a, arg_b, arg_c,
>> arg_d);
1 23 4

(note: monospace font needed)


Dave wrote:
> The Documentation/CodingStyle says:
>
> Outside of comments, documentation and except in Kconfig, spaces are never
> used for indentation, and the above example is deliberately broken.

Everything is right. The indent only goes from "1" to "2" [see above],
"3" to "4" is called

Cyrill wrote:
>> [spaces only for] alignment

Cyrill wrote:
>> so which one is preferred for the kernel?

err = very_long_function_name(lots_of_arguments,
less,
less,
less,
less,
even_more_arguments,
more_of_this,
more_of_that,
more,
more,
more);

IMO, preferred:

err = very_long_function_name(lots_of_arguments, less, less, less, less,
even_more_arguments, more_of_this, more_of_that, more, more, more);

YMMV.


Jan
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-15 11:19    [W:0.073 / U:1.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site