lkml.org 
[lkml]   [2008]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Distributed storage release.
On Oct 13, 2008  17:38 +0400, Evgeniy Polyakov wrote:
> There are two types of errors: long lines, which are actually comments
> on the same line as structure members or a little bit more than 80;
> and things like spaces and braces. All other errors should be already
> fixed, but stuff like this: for (i = 0; i < 10; ++i) are not, since we
> can argue forever if this is better than for (i=0; i<10; ++i) or
> int (* iterator) (struct dst_crypto_engine *e, vs
> int (*iterator) (struct dst_crypto_engine *e,
> :)
> Also braces on the same line with the structure definition does not look
> good imho, and it is reported as error by checkpatch.

While it is true that one coding style vs. another could be argued for
a long time - the right answer is that the _right_ coding style for code
added to the Linux kernel is Linus' CodingStyle document.

Whether you think the braces here or there look better - consistency
with other code in the same project is very important, and any changes
you get to your code will come in the Linus CodingStyle and this will
result in code that is a mix between your personal style and the official
style and it will be a mess...

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.



\
 
 \ /
  Last update: 2008-10-14 17:55    [W:0.051 / U:31.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site