LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* checkpatch.pl print the line twice when trailing statements in the same line
@ 2008-10-20 18:51 Dotan Barak
  2008-10-31  8:24 ` Andy Whitcroft
  0 siblings, 1 reply; 4+ messages in thread
From: Dotan Barak @ 2008-10-20 18:51 UTC (permalink / raw)
  To: apw; +Cc: linux-kernel

Hi.

I executed checkpatch.pl version 0.24 on a file and i noticed that when
a tailing statement is being declared at the same line with "while, checkpatch
prints the erroneous line twice.

Here is an example of the output:

ERROR: trailing statements should be on next line
#651: FILE: idbm.c:651:
+               while (*nl && isspace(c = *nl)) nl++;
+               while (*nl && isspace(c = *nl)) nl++;

Is this is the expected behavior?

Thanks
Dotan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: checkpatch.pl print the line twice when trailing statements in the same line
  2008-10-20 18:51 checkpatch.pl print the line twice when trailing statements in the same line Dotan Barak
@ 2008-10-31  8:24 ` Andy Whitcroft
  2008-11-12 13:54   ` Andy Whitcroft
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Whitcroft @ 2008-10-31  8:24 UTC (permalink / raw)
  To: Dotan Barak; +Cc: linux-kernel, apw

On Mon, Oct 20, 2008 at 08:51:38PM +0200, Dotan Barak wrote:
> Hi.
> 
> I executed checkpatch.pl version 0.24 on a file and i noticed that when
> a tailing statement is being declared at the same line with "while, checkpatch
> prints the erroneous line twice.
> 
> Here is an example of the output:
> 
> ERROR: trailing statements should be on next line
> #651: FILE: idbm.c:651:
> +               while (*nl && isspace(c = *nl)) nl++;
> +               while (*nl && isspace(c = *nl)) nl++;
> 
> Is this is the expected behavior?

No that would definintaly not be expected.  Will add it to my TODO list.

Thanks for the report.

-apw

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: checkpatch.pl print the line twice when trailing statements in the same line
  2008-10-31  8:24 ` Andy Whitcroft
@ 2008-11-12 13:54   ` Andy Whitcroft
  2008-11-12 15:38     ` Dotan Barak
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Whitcroft @ 2008-11-12 13:54 UTC (permalink / raw)
  To: Dotan Barak; +Cc: linux-kernel

On Fri, Oct 31, 2008 at 08:24:14AM +0000, Andy Whitcroft wrote:
> On Mon, Oct 20, 2008 at 08:51:38PM +0200, Dotan Barak wrote:
> > Hi.
> > 
> > I executed checkpatch.pl version 0.24 on a file and i noticed that when
> > a tailing statement is being declared at the same line with "while, checkpatch
> > prints the erroneous line twice.
> > 
> > Here is an example of the output:
> > 
> > ERROR: trailing statements should be on next line
> > #651: FILE: idbm.c:651:
> > +               while (*nl && isspace(c = *nl)) nl++;
> > +               while (*nl && isspace(c = *nl)) nl++;
> > 
> > Is this is the expected behavior?
> 
> No that would definintaly not be expected.  Will add it to my TODO list.

Ok, this is now fixed up and should be in my next batch of updates.

-apw

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: checkpatch.pl print the line twice when trailing statements in the same line
  2008-11-12 13:54   ` Andy Whitcroft
@ 2008-11-12 15:38     ` Dotan Barak
  0 siblings, 0 replies; 4+ messages in thread
From: Dotan Barak @ 2008-11-12 15:38 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: linux-kernel

Thanks.

I noticed another issue:

for the code line:
 return (int)0;

I get the following error message:
 ERROR: return is not a function, parentheses are not required.

Thanks
Dotan

On Wed, Nov 12, 2008 at 3:54 PM, Andy Whitcroft <apw@shadowen.org> wrote:
> On Fri, Oct 31, 2008 at 08:24:14AM +0000, Andy Whitcroft wrote:
>> On Mon, Oct 20, 2008 at 08:51:38PM +0200, Dotan Barak wrote:
>> > Hi.
>> >
>> > I executed checkpatch.pl version 0.24 on a file and i noticed that when
>> > a tailing statement is being declared at the same line with "while, checkpatch
>> > prints the erroneous line twice.
>> >
>> > Here is an example of the output:
>> >
>> > ERROR: trailing statements should be on next line
>> > #651: FILE: idbm.c:651:
>> > +               while (*nl && isspace(c = *nl)) nl++;
>> > +               while (*nl && isspace(c = *nl)) nl++;
>> >
>> > Is this is the expected behavior?
>>
>> No that would definintaly not be expected.  Will add it to my TODO list.
>
> Ok, this is now fixed up and should be in my next batch of updates.
>
> -apw
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-12 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-20 18:51 checkpatch.pl print the line twice when trailing statements in the same line Dotan Barak
2008-10-31  8:24 ` Andy Whitcroft
2008-11-12 13:54   ` Andy Whitcroft
2008-11-12 15:38     ` Dotan Barak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).