Re: latest checkpatch

2007-10-19 Thread Ilpo Järvinen
On Thu, 18 Oct 2007, Ingo Molnar wrote: > > * Andy Whitcroft <[EMAIL PROTECTED]> wrote: > > > > it's perfectly legitimate, in fact more robust. So if checkpatch.pl > > > wants to make any noise about such constructs it should warn about > > > the _lack_ of curly braces in every multi-line cond

Re: latest checkpatch

2007-10-19 Thread Andy Whitcroft
On Thu, Oct 18, 2007 at 10:51:47PM +0200, Ingo Molnar wrote: > > * Avi Kivity <[EMAIL PROTECTED]> wrote: > > > >> if (foo) > > >> bar(); > > >> baz(); > > >> one(); > > >> > > > > > > detecting that would be awesome - it's often the sign of a real bug > > > because the i

Re: latest checkpatch

2007-10-18 Thread Andi Kleen
Avi Kivity <[EMAIL PROTECTED]> writes: > This is more useful operating on an entire file, so the script can see > all the context. > > A 'gcc -Windentation-contradicts-codeflow -Werror' would be nice. I had a tool long ago on the Amiga which did exactly that. It double checked that the indentatio

Re: latest checkpatch

2007-10-18 Thread Randy Dunlap
On Thu, 18 Oct 2007 16:57:49 -0400 Jeff Garzik wrote: > Ingo Molnar wrote: > > there's "checkpatch --file" for complete files, so it can see the full > > context if the user passes it in. > > This is new, I guess? > > [EMAIL PROTECTED] linux-2.6]$ scripts/checkpatch.pl --file > drivers/ata/li

Re: latest checkpatch

2007-10-18 Thread Jeff Garzik
Ingo Molnar wrote: there's "checkpatch --file" for complete files, so it can see the full context if the user passes it in. This is new, I guess? [EMAIL PROTECTED] linux-2.6]$ scripts/checkpatch.pl --file drivers/ata/libata-eh.c Unknown option: file Such an option would be quite useful, bu

Re: latest checkpatch

2007-10-18 Thread Ingo Molnar
* Avi Kivity <[EMAIL PROTECTED]> 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. > >

Re: latest checkpatch

2007-10-18 Thread Avi Kivity
Ingo Molnar wrote: > * Andy Whitcroft <[EMAIL PROTECTED]> wrote: > > >>> it's perfectly legitimate, in fact more robust. So if checkpatch.pl >>> wants to make any noise about such constructs it should warn about >>> the _lack_ of curly braces in every multi-line condition block >>> _except_ t

Re: latest checkpatch

2007-10-18 Thread Ingo Molnar
* Andy Whitcroft <[EMAIL PROTECTED]> wrote: > > > + SD_BALANCE_FORK | > > > + SD_BALANCE_EXEC | > > > + SD_SHARE_CPUPOWER | > > > + SD_SHARE_PKG_RESOURCES); > > > +

Re: latest checkpatch

2007-10-18 Thread Andy Whitcroft
On Thu, Oct 18, 2007 at 08:25:21PM +0100, Andy Whitcroft wrote: > On Thu, Oct 18, 2007 at 01:13:52PM +0200, Ingo Molnar wrote: > > > > latest checkpatch.pl works really well on sched.c. > > > > there's only one problem left, this bogus false positive warning > > reappeared: > > > > WARNING: b

Re: latest checkpatch

2007-10-18 Thread Ingo Molnar
* Andy Whitcroft <[EMAIL PROTECTED]> wrote: > > it's perfectly legitimate, in fact more robust. So if checkpatch.pl > > wants to make any noise about such constructs it should warn about > > the _lack_ of curly braces in every multi-line condition block > > _except_ the only safe single-line s

Re: latest checkpatch

2007-10-18 Thread Andy Whitcroft
On Thu, Oct 18, 2007 at 01:13:52PM +0200, Ingo Molnar wrote: > > latest checkpatch.pl works really well on sched.c. > > there's only one problem left, this bogus false positive warning > reappeared: > > WARNING: braces {} are not necessary for single statement blocks > #5710: FILE: sched.c: