lkml.org 
[lkml]   [2008]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: */ in string confuses checkpatch.pl
On Wed, Oct 22, 2008 at 08:56:17AM +0100, Andy Whitcroft wrote:
> On Tue, Oct 21, 2008 at 09:57:26AM +0900, penguin-kernel@i-love.sakura.ne.jp wrote:
> > Hello.
> >
> > The below code confuses checkpatch.pl ver 0.21.
> >
> > Regards.
> > ----------
> > # cat /tmp/foo.c
> > void foo(void)
> > {
> > bar(\" /proc/\\\\*/\");
> > bar(\" /proc/\\\\$/\");
> > }
> > # /usr/src/vanilla/linux-2.6.27.2/scripts/checkpatch.pl --file /tmp/foo.c
> > ERROR: need consistent spacing around \'/\' (ctx:WxV)
> > #4: FILE: tmp/foo.c:4:
> > + bar(\" /proc/\\\\$/\");
> > ^
> >
> > total: 1 errors, 0 warnings, 5 lines checked
> >
> > /tmp/foo.c has style problems, please review. If any of these errors
> > are false positives report them to the maintainer, see
> > CHECKPATCH in MAINTAINERS.

Ok, I can see whats happened here. Most of these \'s are extraneous.
Without those I can reproduce this. Its a bug in the 'comment is open
at the start of hunk' detection. I think I have updated this heuristic
to cope wit this. Could you try your original patch (I assume there was
one) with the version below:

http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-testing

Thanks for your report.

-apw


\
 
 \ /
  Last update: 2008-10-22 10:35    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean