Re: checkpatch and kernel/sched.c

Ingo Molnar
2007-10-01T10:44:28Z

* Andrew Morton <akpm@linux-foundation.org> wrote:

> > > WARNING: braces {} are not necessary for single statement blocks
> > > #5706: FILE: home/apw/git/linux-2.6/kernel/sched.c:5703:
> > > + if (parent->groups == parent->groups->next) {
> > > + pflags &= ~(SD_LOAD_BALANCE |
> > > + SD_BALANCE_NEWIDLE |
> > > + SD_BALANCE_FORK |
> > > + SD_BALANCE_EXEC |
> > > + SD_SHARE_CPUPOWER |
> > > + SD_SHARE_PKG_RESOURCES);
> > > + }
> > >
> > > Ok, this one is "correct" at least for the rules as I have them.
> > > Perhaps the message should not be emitted for very long blocks?
> >
> > If a statement is not single-line, then braces _are_ fine. Where does
> > CodingStyle say that it's not fine?
>
> I'd disagree with checkpatch there. Again, it might be hard to fix.
> Wanna rename it to checkpatch-and-suggest-stuff-to-think-about.pl?

i think checkpatch.pl is quite close to its most useful purpose and
role: that of a reliable tool that i can use in an automated fashion
too, with only very rare false positive - and not the current 50%-80%
false positives rate. (And i'm fighting hard for Andy to realize the
true scope and purpose of this script ;-)

Ingo