2008-10-21 11:25:25

by Tetsuo Handa

[permalink] [raw]
Subject: asterisk-slash sequence in quoted string confuses checkpatch.pl

[Reposting since the webmail system broke the code by adding backslashes. ]

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.


2008-10-23 14:14:49

by Andy Whitcroft

[permalink] [raw]
Subject: Re: asterisk-slash sequence in quoted string confuses checkpatch.pl

On Tue, Oct 21, 2008 at 08:25:09PM +0900, Tetsuo Handa wrote:
> [Reposting since the webmail system broke the code by adding backslashes. ]
>
> 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/\\$/");

We believe that this is fixed in the latest release, and indeed I believe
you have acked. But I'll reply again here for completeness.

-apw

2008-10-23 21:36:32

by Tetsuo Handa

[permalink] [raw]
Subject: Re: asterisk-slash sequence in quoted string confuses checkpatch.pl

Andy Whitcroft wrote:
> We believe that this is fixed in the latest release, and indeed I believe
> you have acked. But I'll reply again here for completeness.
Yes. You figured out that "Most of these \'s are extraneous" before
you notice this reposting.

Thanks.