lkml.org 
[lkml]   [2007]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: latest checkpatch
On Thu, Oct 18, 2007 at 10:51:47PM +0200, Ingo Molnar wrote:
>
> * Avi Kivity <avi@qumranet.com> wrote:
>
> > >> if (foo)
> > >> bar();
> > >> baz();
> > >> one();
> > >>
> > >
> > > detecting that would be awesome - it's often the sign of a real bug
> > > because the intent is often to have bar() and baz() in the conditional
> > > block.
> >
> > This is more useful operating on an entire file, so the script can see
> > all the context.
>
> there's "checkpatch --file" for complete files, so it can see the full
> context if the user passes it in.

Indeed so. checkpatch uses all the context it can when making a
decision. Often 3 lines carries enough history to figure this out.

-apw
-
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-19 11:05    [W:0.381 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site