2009-01-26 08:38:41

by Andy Whitcroft

[permalink] [raw]
Subject: Re: checkpatch vs. checkpatch --file (was: Re: [Orinoco-devel] [PATCH] orinoco: checkpatch cleanup)

On Mon, Jan 26, 2009 at 07:13:36AM +0300, Andrey Borzenkov wrote:
> On 26 января 2009 06:46:02 Pavel Roskin wrote:
> >
> > Please run the patch itself through checkpatch. It finds two errors:
> >
> > ERROR: trailing statements should be on next line
> > #163: FILE: drivers/net/wireless/orinoco/hermes.c:65:
> > + printk(stuff); } while (0)
> > + printk(stuff); } while (0)
>
> I ran "checkpatch --file hermes.c" after editing it and it found zero
> errors.
>
> Cc checkpatch maintainer.

Hmmm. Could I have the patch and the file either before or after
application please.

Very strange.

-apw


2009-01-26 16:08:20

by Andrey Borzenkov

[permalink] [raw]
Subject: Re: checkpatch vs. checkpatch --file (was: Re: [Orinoco-devel] [PATCH] orinoco: checkpatch cleanup)

On 26 января 2009 11:38:30 Andy Whitcroft wrote:
> On Mon, Jan 26, 2009 at 07:13:36AM +0300, Andrey Borzenkov wrote:
> > On 26 января 2009 06:46:02 Pavel Roskin wrote:
> > > Please run the patch itself through checkpatch. It finds two
> > > errors:
> > >
> > > ERROR: trailing statements should be on next line
> > > #163: FILE: drivers/net/wireless/orinoco/hermes.c:65:
> > > + printk(stuff); } while (0)
> > > + printk(stuff); } while (0)
> >
> > I ran "checkpatch --file hermes.c" after editing it and it found
> > zero errors.
> >
> > Cc checkpatch maintainer.
>
> Hmmm. Could I have the patch and the file either before or after
> application please.
>

Sure. Here you have file after editing and patch between original and
file you get. File passes all checks, patch generates error:

{pts/2}% ~/src/linux-git/scripts/checkpatch.pl --file hermes.c
total: 0 errors, 0 warnings, 554 lines checked

hermes.c has no obvious style problems and is ready for submission.
{pts/2}% ~/src/linux-git/scripts/checkpatch.pl or/02-orinoco-cleanup-
hermes.c
ERROR: trailing statements should be on next line
#42: FILE: drivers/net/wireless/orinoco/hermes.c:65:
+ printk(stuff); } while (0)
+ printk(stuff); } while (0)
total: 1 errors, 0 warnings, 288 lines checked

or/02-orinoco-cleanup-hermes.c has style problems, please review. If
any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.


Attachments:
(No filename) (0.00 B)
signature.asc (197.00 B)
This is a digitally signed message part.
Download all attachments