[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-ia64-devel] Re: [patch] lindent dom_fw_foo code
Alex Williamson wrote:
> On Thu, 2007-05-24 at 17:46 +0200, Jes Sorensen wrote:
> I strongly prefer Linux indentation style to Xen/BSD and my "fixing"
> of indentation often shows my preference. So far I've only insisted
> that patches should follow the indentation style of the surrounding
> code. For new files, I've been happy to accept Linux style, but have a
> hard time rejecting patches using BSD style simply because it's the
> style the rest of Xen is based on.
I think my objection in this case was that the reformatting happend
as part of a file reorganization and the files were already nicely
formatted and these were files I have actively been looking at over
the last weeks. I think it's ok to reformat something if the file is
really badly formatted, either inconsistently or at a level where
it makes it almost impossible to maintain - like full of if() statements
with the action on the same line etc.
> If we want to decide right now that anything under xen/arch/ia64 or
> xen/include/asm-ia64 uses Linux style formatting, I'm all for it. We
> already have a significant amount of code from Linux which we can't
> reformat to BSD or we'll lose all hope of ever updating it again. I
> also agree with the philosophy that 8 space tabs and 80 columns promotes
> better code by naturally identifying where the nesting gets too deep.
> I'll still require patches to match the style of the surrounding code,
> but all new files should use Linux style and I'll accept patches like
> this one that convert to Linux style. Are there other opinions on this
> before we set a precedent? Thanks,
My personal preference is Linux style too, both from a readability point
but also because it's more efficient in terms of file size. However I
think the key point is that we have large chunks of code carried over
from Linux and it's in our best interest to preserve those files in a
way to make them easy to maintain between both trees.
So I'd vote for Linux style for new files with the excemption that if
a file is owned by someone who is actively maintaining it, he/she
Xen-ia64-devel mailing list