lkml.org 
[lkml]   [2007]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: checkpatch and kernel/sched.c

* 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
-
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-10-01 12:47    [W:0.098 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site