* [BUG] checkpatch: unescaped left brace in regex is deprecated
@ 2015-12-07 22:53 Geyslan G. Bem
2015-12-07 23:06 ` Joe Perches
0 siblings, 1 reply; 8+ messages in thread
From: Geyslan G. Bem @ 2015-12-07 22:53 UTC (permalink / raw)
To: Robo Bot, Joe Perches, LKML; +Cc: Peter Senna Tschudin
Hello,
Follow checkpatch output using perl 5.22.0.
geyslan@hb ~/Projects/linux $ scripts/checkpatch.pl -f
drivers/usb/host/ehci-hub.c
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/\((?^x:
(?^x:
(?:(?^:(?:(?^x:
const|
__percpu|
__nocast|
__safe|
__bitwise__|
__packed__|
__packed2__|
__naked|
__maybe_unused|
__always_unused|
__noreturn|
__used|
__cold|
__pure|
__noclone|
__deprecated|
__read_mostly|
__kprobes|
(?^:(?^:(?^:__(?:mem|cpu|dev|net_|))(?:initdata\b))|(?^:(?^:__(?:mem|cpu|dev|net_|))(?:initconst\b))|(?^:(?^:__(?:mem|cpu|dev|net_|))(?:init\b)))|
____cacheline_aligned|
____cacheline_aligned_in_smp|
____cacheline_internodealigned_in_smp|
__weak
...
geyslan@hb ~/Projects/linux $ perl --version
This is perl 5, version 22, subversion 0 (v5.22.0) built for
x86_64-linux-thread-multi
--
Regards,
Geyslan G. Bem
hackingbits.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] checkpatch: unescaped left brace in regex is deprecated
2015-12-07 22:53 [BUG] checkpatch: unescaped left brace in regex is deprecated Geyslan G. Bem
@ 2015-12-07 23:06 ` Joe Perches
2015-12-07 23:36 ` Geyslan G. Bem
0 siblings, 1 reply; 8+ messages in thread
From: Joe Perches @ 2015-12-07 23:06 UTC (permalink / raw)
To: Geyslan G. Bem, Robo Bot, LKML; +Cc: Peter Senna Tschudin
On Mon, 2015-12-07 at 19:53 -0300, Geyslan G. Bem wrote:
> Hello,
hello.
> Follow checkpatch output using perl 5.22.0.
>
> geyslan@hb ~/Projects/linux $ scripts/checkpatch.pl -f
> drivers/usb/host/ehci-hub.c
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/\((?^x:
>
No HERE here. Are you using linux-next?
There have been patches applied for this warning already.
see:
commit 4e5d56bdf892e18832a6540b63ebf709966bce2a
Author: Eddie Kovsky <ewk@edkovsky.org>
Date: Wed Sep 9 15:37:52 2015 -0700
checkpatch: fix left brace warning
Using checkpatch.pl with Perl 5.22.0 generates the following warning:
Unescaped left brace in regex is deprecated, passed through in regex;
5.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] checkpatch: unescaped left brace in regex is deprecated
2015-12-07 23:06 ` Joe Perches
@ 2015-12-07 23:36 ` Geyslan G. Bem
[not found] ` <CAGG-pUQsUnAx2rTTgoX4WhUHNGo3R=9siqAVhaOsqB=P9eqnSg@mail.gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Geyslan G. Bem @ 2015-12-07 23:36 UTC (permalink / raw)
To: Joe Perches; +Cc: Robo Bot, LKML, Peter Senna Tschudin
2015-12-07 20:06 GMT-03:00 Joe Perches <joe@perches.com>:
> On Mon, 2015-12-07 at 19:53 -0300, Geyslan G. Bem wrote:
>> Hello,
>
> hello.
>
>> Follow checkpatch output using perl 5.22.0.
>>
>> geyslan@hb ~/Projects/linux $ scripts/checkpatch.pl -f
>> drivers/usb/host/ehci-hub.c
>> Unescaped left brace in regex is deprecated, passed through in regex;
>> marked by <-- HERE in m/\((?^x:
>>
>
> No HERE here. Are you using linux-next?
Yep,
geyslan@hb ~/Projects/linux $ git branch -a
* (HEAD detached from linux-next/master)
...
geyslan@hb ~/Projects/linux $ git remote update
Fetching linux
Fetching linux-next
Fetching linux-staging
>
> There have been patches applied for this warning already.
>
> see:
>
> commit 4e5d56bdf892e18832a6540b63ebf709966bce2a
> Author: Eddie Kovsky <ewk@edkovsky.org>
> Date: Wed Sep 9 15:37:52 2015 -0700
>
> checkpatch: fix left brace warning
>
> Using checkpatch.pl with Perl 5.22.0 generates the following warning:
>
> Unescaped left brace in regex is deprecated, passed through in regex;
> 5.
Indeed. But here the error continues.
geyslan@hb ~/Projects/linux $ git log 4e5d56bdf892e -1
commit 4e5d56bdf892e18832a6540b63ebf709966bce2a
Author: Eddie Kovsky <ewk@edkovsky.org>
Date: Wed Sep 9 15:37:52 2015 -0700
checkpatch: fix left brace warning
Using checkpatch.pl with Perl 5.22.0 generates the following warning:
...
geyslan@hb ~/Projects/linux $ git blame scripts/checkpatch.pl | grep 4e5d56b
3599:4e5d56bdf89 (Eddie Kovsky 2015-09-09 15:37:52 -0700
3599) !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
4111:4e5d56bdf89 (Eddie Kovsky 2015-09-09 15:37:52 -0700
4111) if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
4112:4e5d56bdf89 (Eddie Kovsky 2015-09-09 15:37:52 -0700
4112) $line =~ /do\{/) {
4589:4e5d56bdf89 (Eddie Kovsky 2015-09-09 15:37:52 -0700
4589) $dstat !~ /^\(\{/ && # ({...
It missed some regexes, maybe?
--
Regards,
Geyslan G. Bem
hackingbits.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] checkpatch: unescaped left brace in regex is deprecated
[not found] ` <CAGG-pUQsUnAx2rTTgoX4WhUHNGo3R=9siqAVhaOsqB=P9eqnSg@mail.gmail.com>
@ 2015-12-10 11:24 ` Geyslan G. Bem
2015-12-15 23:58 ` Geyslan G. Bem
0 siblings, 1 reply; 8+ messages in thread
From: Geyslan G. Bem @ 2015-12-10 11:24 UTC (permalink / raw)
To: Joe Perches; +Cc: Robo Bot, LKML, Peter Senna Tschudin
2015-12-09 19:59 GMT-03:00 Geyslan G. Bem <geyslan@gmail.com>:
>
>
> 2015-12-07 20:36 GMT-03:00 Geyslan G. Bem <geyslan@gmail.com>:
>>
>> 2015-12-07 20:06 GMT-03:00 Joe Perches <joe@perches.com>:
>> > On Mon, 2015-12-07 at 19:53 -0300, Geyslan G. Bem wrote:
>> >> Hello,
>> >
>> > hello.
>> >
>> >> Follow checkpatch output using perl 5.22.0.
>> >>
>> >> geyslan@hb ~/Projects/linux $ scripts/checkpatch.pl -f
>> >> drivers/usb/host/ehci-hub.c
>> >> Unescaped left brace in regex is deprecated, passed through in regex;
>> >> marked by <-- HERE in m/\((?^x:
>> >>
>> >
>> > No HERE here. Are you using linux-next?
>> Yep,
>>
>> geyslan@hb ~/Projects/linux $ git branch -a
>> * (HEAD detached from linux-next/master)
>> ...
>>
>> geyslan@hb ~/Projects/linux $ git remote update
>> Fetching linux
>> Fetching linux-next
>> Fetching linux-staging
>>
>> >
>> > There have been patches applied for this warning already.
>> >
>> > see:
>> >
>> > commit 4e5d56bdf892e18832a6540b63ebf709966bce2a
>> > Author: Eddie Kovsky <ewk@edkovsky.org>
>> > Date: Wed Sep 9 15:37:52 2015 -0700
>> >
>> > checkpatch: fix left brace warning
>> >
>> > Using checkpatch.pl with Perl 5.22.0 generates the following
>> > warning:
>> >
>> > Unescaped left brace in regex is deprecated, passed through in
>> > regex;
>> > 5.
>>
>> Indeed. But here the error continues.
>>
>> geyslan@hb ~/Projects/linux $ git log 4e5d56bdf892e -1
>> commit 4e5d56bdf892e18832a6540b63ebf709966bce2a
>> Author: Eddie Kovsky <ewk@edkovsky.org>
>> Date: Wed Sep 9 15:37:52 2015 -0700
>>
>> checkpatch: fix left brace warning
>>
>> Using checkpatch.pl with Perl 5.22.0 generates the following warning:
>> ...
>>
>> geyslan@hb ~/Projects/linux $ git blame scripts/checkpatch.pl | grep
>> 4e5d56b
>> 3599:4e5d56bdf89 (Eddie Kovsky 2015-09-09 15:37:52 -0700
>> 3599) !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
>> 4111:4e5d56bdf89 (Eddie Kovsky 2015-09-09 15:37:52 -0700
>> 4111) if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
>> 4112:4e5d56bdf89 (Eddie Kovsky 2015-09-09 15:37:52 -0700
>> 4112) $line =~ /do\{/) {
>> 4589:4e5d56bdf89 (Eddie Kovsky 2015-09-09 15:37:52 -0700
>> 4589) $dstat !~ /^\(\{/ && # ({...
>>
>> It missed some regexes, maybe?
>
>
> Joe, I found the culprit (copy & paste, tabs not preserved):
>
> geyslan@hb ~/Projects/linux $ git diff
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index d4960f7..3e11a30 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -4108,7 +4108,7 @@ sub process {
> ## }
>
> #need space before brace following if, while, etc
> - if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
> + if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
> $line =~ /do\{/) {
> if (ERROR("SPACING",
> "space required before the open brace
> '{'\n" . $herecurr) &&
>
Suggested-by: Peter Senna Tschudin <peter.senna@gmail.com>
Reported-by: Geyslan G. Bem <geyslan@gmail.com>
>
>
> Do you think that these could be other not treated cases?
>
> geyslan@hb ~/Projects/linux $ grep "{/" scripts/checkpatch.pl
> 1233: $stmt =~ s/^\s*{//;
> 3109: if ($ctx !~ /{\s*/ && defined($lines[$ctx_ln - 1]) &&
> $lines[$ctx_ln - 1] =~ /^\+\s*{/) {
> 3160: $s =~ s/^\s*{//;
> 3266: if ($line =~ /^.\s*{/ &&
> 3274: $fixedline =~ s/\s*=\s*$/ = {/;
> 3289: if ($path =~ m{//}) {
> 3300: if ($line =~ m{//}) {
> 3412: if ($line =~
> /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
> 3598: if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
> 3599: !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
> 3617: if ($line =~ /^.\s*{/ &&
> 4111: if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
> 4112: $line =~ /do\{/) {
> 4116: $fixed[$fixlinenr] =~ s/^(\+.*(?:do|\))){/$1 {/;
> 4588: $dstat !~ /^do\s*{/ && # do {...
> 4589: $dstat !~ /^\(\{/ && # ({...
> 4726: $seen++ if ($block =~ /^\s*{/);
> 4796: if ($block =~ /^\s*\{/) {
> 4801: if ($level == 0 && $block =~ /^\s*\{/ && !$allowed) {
>
>
>
>>
>>
>> --
>> Regards,
>>
>> Geyslan G. Bem
>> hackingbits.com
>
>
>
>
> --
> Regards,
>
> Geyslan G. Bem
> hackingbits.com
--
Regards,
Geyslan G. Bem
hackingbits.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] checkpatch: unescaped left brace in regex is deprecated
2015-12-10 11:24 ` Geyslan G. Bem
@ 2015-12-15 23:58 ` Geyslan G. Bem
2015-12-16 0:13 ` Joe Perches
0 siblings, 1 reply; 8+ messages in thread
From: Geyslan G. Bem @ 2015-12-15 23:58 UTC (permalink / raw)
To: Joe Perches; +Cc: Robo Bot, LKML, Peter Senna Tschudin
2015-12-10 8:24 GMT-03:00 Geyslan G. Bem <geyslan@gmail.com>:
> 2015-12-09 19:59 GMT-03:00 Geyslan G. Bem <geyslan@gmail.com>:
>>
>>
>> 2015-12-07 20:36 GMT-03:00 Geyslan G. Bem <geyslan@gmail.com>:
>>>
>>> 2015-12-07 20:06 GMT-03:00 Joe Perches <joe@perches.com>:
>>> > On Mon, 2015-12-07 at 19:53 -0300, Geyslan G. Bem wrote:
>>> >> Hello,
>>> >
>>> > hello.
>>> >
>>> >> Follow checkpatch output using perl 5.22.0.
>>> >>
>>> >> geyslan@hb ~/Projects/linux $ scripts/checkpatch.pl -f
>>> >> drivers/usb/host/ehci-hub.c
>>> >> Unescaped left brace in regex is deprecated, passed through in regex;
>>> >> marked by <-- HERE in m/\((?^x:
>>> >>
>>> >
>>> > No HERE here. Are you using linux-next?
>>> Yep,
>>>
>>> geyslan@hb ~/Projects/linux $ git branch -a
>>> * (HEAD detached from linux-next/master)
>>> ...
>>>
>>> geyslan@hb ~/Projects/linux $ git remote update
>>> Fetching linux
>>> Fetching linux-next
>>> Fetching linux-staging
>>>
>>> >
>>> > There have been patches applied for this warning already.
>>> >
>>> > see:
>>> >
>>> > commit 4e5d56bdf892e18832a6540b63ebf709966bce2a
>>> > Author: Eddie Kovsky <ewk@edkovsky.org>
>>> > Date: Wed Sep 9 15:37:52 2015 -0700
>>> >
>>> > checkpatch: fix left brace warning
>>> >
>>> > Using checkpatch.pl with Perl 5.22.0 generates the following
>>> > warning:
>>> >
>>> > Unescaped left brace in regex is deprecated, passed through in
>>> > regex;
>>> > 5.
>>>
>>> Indeed. But here the error continues.
>>>
>>> geyslan@hb ~/Projects/linux $ git log 4e5d56bdf892e -1
>>> commit 4e5d56bdf892e18832a6540b63ebf709966bce2a
>>> Author: Eddie Kovsky <ewk@edkovsky.org>
>>> Date: Wed Sep 9 15:37:52 2015 -0700
>>>
>>> checkpatch: fix left brace warning
>>>
>>> Using checkpatch.pl with Perl 5.22.0 generates the following warning:
>>> ...
>>>
>>> geyslan@hb ~/Projects/linux $ git blame scripts/checkpatch.pl | grep
>>> 4e5d56b
>>> 3599:4e5d56bdf89 (Eddie Kovsky 2015-09-09 15:37:52 -0700
>>> 3599) !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
>>> 4111:4e5d56bdf89 (Eddie Kovsky 2015-09-09 15:37:52 -0700
>>> 4111) if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
>>> 4112:4e5d56bdf89 (Eddie Kovsky 2015-09-09 15:37:52 -0700
>>> 4112) $line =~ /do\{/) {
>>> 4589:4e5d56bdf89 (Eddie Kovsky 2015-09-09 15:37:52 -0700
>>> 4589) $dstat !~ /^\(\{/ && # ({...
>>>
>>> It missed some regexes, maybe?
>>
>>
>> Joe, I found the culprit (copy & paste, tabs not preserved):
>>
>> geyslan@hb ~/Projects/linux $ git diff
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index d4960f7..3e11a30 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -4108,7 +4108,7 @@ sub process {
>> ## }
>>
>> #need space before brace following if, while, etc
>> - if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
>> + if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
>> $line =~ /do\{/) {
>> if (ERROR("SPACING",
>> "space required before the open brace
>> '{'\n" . $herecurr) &&
>>
> Suggested-by: Peter Senna Tschudin <peter.senna@gmail.com>
> Reported-by: Geyslan G. Bem <geyslan@gmail.com>
>
Joe, do you applied this patch? If not, would I send it?
Tks.
>>
>>
>> Do you think that these could be other not treated cases?
>>
>> geyslan@hb ~/Projects/linux $ grep "{/" scripts/checkpatch.pl
>> 1233: $stmt =~ s/^\s*{//;
>> 3109: if ($ctx !~ /{\s*/ && defined($lines[$ctx_ln - 1]) &&
>> $lines[$ctx_ln - 1] =~ /^\+\s*{/) {
>> 3160: $s =~ s/^\s*{//;
>> 3266: if ($line =~ /^.\s*{/ &&
>> 3274: $fixedline =~ s/\s*=\s*$/ = {/;
>> 3289: if ($path =~ m{//}) {
>> 3300: if ($line =~ m{//}) {
>> 3412: if ($line =~
>> /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
>> 3598: if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
>> 3599: !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
>> 3617: if ($line =~ /^.\s*{/ &&
>> 4111: if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
>> 4112: $line =~ /do\{/) {
>> 4116: $fixed[$fixlinenr] =~ s/^(\+.*(?:do|\))){/$1 {/;
>> 4588: $dstat !~ /^do\s*{/ && # do {...
>> 4589: $dstat !~ /^\(\{/ && # ({...
>> 4726: $seen++ if ($block =~ /^\s*{/);
>> 4796: if ($block =~ /^\s*\{/) {
>> 4801: if ($level == 0 && $block =~ /^\s*\{/ && !$allowed) {
>>
>>
>>
>>>
>>>
>>> --
>>> Regards,
>>>
>>> Geyslan G. Bem
>>> hackingbits.com
>>
>>
>>
>>
>> --
>> Regards,
>>
>> Geyslan G. Bem
>> hackingbits.com
>
>
>
> --
> Regards,
>
> Geyslan G. Bem
> hackingbits.com
--
Regards,
Geyslan G. Bem
hackingbits.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] checkpatch: unescaped left brace in regex is deprecated
2015-12-15 23:58 ` Geyslan G. Bem
@ 2015-12-16 0:13 ` Joe Perches
2015-12-16 11:21 ` Geyslan G. Bem
0 siblings, 1 reply; 8+ messages in thread
From: Joe Perches @ 2015-12-16 0:13 UTC (permalink / raw)
To: Geyslan G. Bem; +Cc: Robo Bot, LKML, Peter Senna Tschudin
On Tue, 2015-12-15 at 20:58 -0300, Geyslan G. Bem wrote:
> 2015-12-10 8:24 GMT-03:00 Geyslan G. Bem <geyslan@gmail.com>:
> > Suggested-by: Peter Senna Tschudin <peter.senna@gmail.com>
> > Reported-by: Geyslan G. Bem <geyslan@gmail.com>
> >
>
> Joe, do you applied this patch? If not, would I send it?
You can resend, but I believe there are a few more instances
of this that might need fixing too.
I don't have perl 5.22 so it's difficult for me to test.
Here's a grep with some possible false positives
and maybe missing some too.
$ git grep -n "=[\!~].*{" scripts/checkpatch.pl|grep -vw qr|grep -vP '{$|{\s*#|\${|\\{|{[\d$]'
scripts/checkpatch.pl:1143: $remainder =~ /^(else)(?:\s|{)/ &&
scripts/checkpatch.pl:1233: $stmt =~ s/^\s*{//;
scripts/checkpatch.pl:2458: if ($file =~ m{^(.*?)(?::\d+)+:?$} &&
scripts/checkpatch.pl:2802: if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
scripts/checkpatch.pl:3015: $s =~ s/{.*$//s;
scripts/checkpatch.pl:3168: $s =~ s/^\s*{//;
scripts/checkpatch.pl:3274: if ($line =~ /^.\s*{/ &&
scripts/checkpatch.pl:3282: $fixedline =~ s/\s*=\s*$/ = {/;
scripts/checkpatch.pl:3285: $fixedline =~ s/^(.\s*){\s*/$1/;
scripts/checkpatch.pl:3606: if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
scripts/checkpatch.pl:3613: $fixed_line =~ /(^..*$Type\s*$Ident\(.*\)\s*){(.*)$/;
scripts/checkpatch.pl:3625: if ($line =~ /^.\s*{/ &&
scripts/checkpatch.pl:3635: $fixedline =~ s/^(.\s*){\s*/$1\t/;
scripts/checkpatch.pl:4104:## if ($line =~ /^.\s*$Type\s+$Ident(?:\s*=[^,{]*)?\s*,\s*$Ident.*/ &&
scripts/checkpatch.pl:4124: $fixed[$fixlinenr] =~ s/^(\+.*(?:do|\))){/$1 {/;
scripts/checkpatch.pl:4734: $seen++ if ($block =~ /^\s*{/);
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] checkpatch: unescaped left brace in regex is deprecated
2015-12-16 0:13 ` Joe Perches
@ 2015-12-16 11:21 ` Geyslan G. Bem
2015-12-30 15:52 ` Geyslan G. Bem
0 siblings, 1 reply; 8+ messages in thread
From: Geyslan G. Bem @ 2015-12-16 11:21 UTC (permalink / raw)
To: Joe Perches; +Cc: Robo Bot, LKML, Peter Senna Tschudin
2015-12-15 21:13 GMT-03:00 Joe Perches <joe@perches.com>:
> On Tue, 2015-12-15 at 20:58 -0300, Geyslan G. Bem wrote:
>> 2015-12-10 8:24 GMT-03:00 Geyslan G. Bem <geyslan@gmail.com>:
>> > Suggested-by: Peter Senna Tschudin <peter.senna@gmail.com>
>> > Reported-by: Geyslan G. Bem <geyslan@gmail.com>
>> >
>>
>> Joe, do you applied this patch? If not, would I send it?
>
> You can resend, but I believe there are a few more instances
> of this that might need fixing too.
>
> I don't have perl 5.22 so it's difficult for me to test.
>
> Here's a grep with some possible false positives
> and maybe missing some too.
Ok, I'll try to trigger them before make the patch.
>
> $ git grep -n "=[\!~].*{" scripts/checkpatch.pl|grep -vw qr|grep -vP '{$|{\s*#|\${|\\{|{[\d$]'
> scripts/checkpatch.pl:1143: $remainder =~ /^(else)(?:\s|{)/ &&
> scripts/checkpatch.pl:1233: $stmt =~ s/^\s*{//;
> scripts/checkpatch.pl:2458: if ($file =~ m{^(.*?)(?::\d+)+:?$} &&
> scripts/checkpatch.pl:2802: if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
> scripts/checkpatch.pl:3015: $s =~ s/{.*$//s;
> scripts/checkpatch.pl:3168: $s =~ s/^\s*{//;
> scripts/checkpatch.pl:3274: if ($line =~ /^.\s*{/ &&
> scripts/checkpatch.pl:3282: $fixedline =~ s/\s*=\s*$/ = {/;
> scripts/checkpatch.pl:3285: $fixedline =~ s/^(.\s*){\s*/$1/;
> scripts/checkpatch.pl:3606: if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
> scripts/checkpatch.pl:3613: $fixed_line =~ /(^..*$Type\s*$Ident\(.*\)\s*){(.*)$/;
> scripts/checkpatch.pl:3625: if ($line =~ /^.\s*{/ &&
> scripts/checkpatch.pl:3635: $fixedline =~ s/^(.\s*){\s*/$1\t/;
> scripts/checkpatch.pl:4104:## if ($line =~ /^.\s*$Type\s+$Ident(?:\s*=[^,{]*)?\s*,\s*$Ident.*/ &&
> scripts/checkpatch.pl:4124: $fixed[$fixlinenr] =~ s/^(\+.*(?:do|\))){/$1 {/;
> scripts/checkpatch.pl:4734: $seen++ if ($block =~ /^\s*{/);
>
--
Regards,
Geyslan G. Bem
hackingbits.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] checkpatch: unescaped left brace in regex is deprecated
2015-12-16 11:21 ` Geyslan G. Bem
@ 2015-12-30 15:52 ` Geyslan G. Bem
0 siblings, 0 replies; 8+ messages in thread
From: Geyslan G. Bem @ 2015-12-30 15:52 UTC (permalink / raw)
To: Joe Perches; +Cc: Robo Bot, LKML, Peter Senna Tschudin
2015-12-16 8:21 GMT-03:00 Geyslan G. Bem <geyslan@gmail.com>:
> 2015-12-15 21:13 GMT-03:00 Joe Perches <joe@perches.com>:
>> On Tue, 2015-12-15 at 20:58 -0300, Geyslan G. Bem wrote:
>>> 2015-12-10 8:24 GMT-03:00 Geyslan G. Bem <geyslan@gmail.com>:
>>> > Suggested-by: Peter Senna Tschudin <peter.senna@gmail.com>
>>> > Reported-by: Geyslan G. Bem <geyslan@gmail.com>
>>> >
>>>
>>> Joe, do you applied this patch? If not, would I send it?
>>
>> You can resend, but I believe there are a few more instances
>> of this that might need fixing too.
Only one regex from that list triggered the warning. Patch sent.
>>
>> I don't have perl 5.22 so it's difficult for me to test.
>>
>> Here's a grep with some possible false positives
>> and maybe missing some too.
> Ok, I'll try to trigger them before make the patch.
>
>>
>> $ git grep -n "=[\!~].*{" scripts/checkpatch.pl|grep -vw qr|grep -vP '{$|{\s*#|\${|\\{|{[\d$]'
>> scripts/checkpatch.pl:1143: $remainder =~ /^(else)(?:\s|{)/ &&
>> scripts/checkpatch.pl:1233: $stmt =~ s/^\s*{//;
>> scripts/checkpatch.pl:2458: if ($file =~ m{^(.*?)(?::\d+)+:?$} &&
>> scripts/checkpatch.pl:2802: if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
>> scripts/checkpatch.pl:3015: $s =~ s/{.*$//s;
>> scripts/checkpatch.pl:3168: $s =~ s/^\s*{//;
>> scripts/checkpatch.pl:3274: if ($line =~ /^.\s*{/ &&
>> scripts/checkpatch.pl:3282: $fixedline =~ s/\s*=\s*$/ = {/;
>> scripts/checkpatch.pl:3285: $fixedline =~ s/^(.\s*){\s*/$1/;
>> scripts/checkpatch.pl:3606: if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
>> scripts/checkpatch.pl:3613: $fixed_line =~ /(^..*$Type\s*$Ident\(.*\)\s*){(.*)$/;
>> scripts/checkpatch.pl:3625: if ($line =~ /^.\s*{/ &&
>> scripts/checkpatch.pl:3635: $fixedline =~ s/^(.\s*){\s*/$1\t/;
>> scripts/checkpatch.pl:4104:## if ($line =~ /^.\s*$Type\s+$Ident(?:\s*=[^,{]*)?\s*,\s*$Ident.*/ &&
>> scripts/checkpatch.pl:4124: $fixed[$fixlinenr] =~ s/^(\+.*(?:do|\))){/$1 {/;
>> scripts/checkpatch.pl:4734: $seen++ if ($block =~ /^\s*{/);
>>
>
>
>
> --
> Regards,
>
> Geyslan G. Bem
> hackingbits.com
--
Regards,
Geyslan G. Bem
hackingbits.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-12-30 15:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-07 22:53 [BUG] checkpatch: unescaped left brace in regex is deprecated Geyslan G. Bem
2015-12-07 23:06 ` Joe Perches
2015-12-07 23:36 ` Geyslan G. Bem
[not found] ` <CAGG-pUQsUnAx2rTTgoX4WhUHNGo3R=9siqAVhaOsqB=P9eqnSg@mail.gmail.com>
2015-12-10 11:24 ` Geyslan G. Bem
2015-12-15 23:58 ` Geyslan G. Bem
2015-12-16 0:13 ` Joe Perches
2015-12-16 11:21 ` Geyslan G. Bem
2015-12-30 15:52 ` Geyslan G. Bem
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.