Messages in this thread | | | Date | Wed, 26 Mar 2008 12:23:11 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH 109/148] include/asm-x86/serial.h: checkpatch cleanups - formatting only |
| |
* Jörn Engel <joern@logfs.org> wrote:
> > > (foo*) should be (foo *) > > > What does that extra space gain us? > > > > It really gains us nothing, however that is not really the point. > > The point is that consistancy is good, with the space is the more > > normal 'C' usage, without for 'C++'; something to do with the > > implication that (foo *) is a pointer to a foo (separate things), > > and (foo*) is a thing of type pointer to foo (one thing) which is > > more object oriented. > > > > The "norm" is with and so it makes sense to maintain it that way. A > > lot of the layout and style choises are arbitrary, and disliked by > > many of us, but we follow the style to maintain that common feel. > > Then I'll happily ignore it. Not having the space gains me one > column. It is absolutely minimal, sure. But when the alternative is > based on pure whim...
you seem to be confused here. Consistency is not a 'whim', and it is often just about "arbitrary" choices that also have some ergonomic component as well (but sometimes not). The following form:
if(x) { MyFunction1(); MyFunction2(); }
can be argued to be just as clean (and just as ergonomic) as:
if (x) { my_function_1(); my_function_2(); }
if you use it consistently throughout the _whole_ codebase.
what does not make sense is to _mix_ different coding styles, especially within the same source code block - which you do in that specific file.
or is it your argument that consistent coding style is bad? That argument has been settled long ago with the creation of Documentation/CodingStyle. All kernel code is supposed to follow that style, unless the resulting line of code looks clearly _wrong_. Your arguments seem to center around "hey, my way it looks similarly good so i'll do that instead because i'm the maintainer" - and that argument does not fly. CodingStyle is definitely not gospel and common sense should be applied, but _arbitrarily_ and _intentionally_ deviating from it is considered bad manners and hurts Linux as a whole.
granted, especially in the driver space, where there's a lack of maintenance resources, all such secondary rules are weaker - because a somewhat quirky maintainer is still much better to Linux than no maintainer. But the closer you get to the core kernel, the higher the code quality stakes get, and the stricter (and the more consistent) these style requirements become as well.
Ingo -- 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/
| |