diff options
| author | Cyril Bur <cyrilbur@gmail.com> | 2017-07-10 18:52:21 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-10 19:32:35 -0400 |
| commit | 8d81ae05d0176da1c54aeaed697fa34be5c5575e (patch) | |
| tree | 781f8d3544c128392ea0fa168040de1b835736f5 /scripts/checkpatch.pl | |
| parent | a0ad75964e58cd7d9b6910e2bbb8a7e8656c0f51 (diff) | |
checkpatch: silence perl 5.26.0 unescaped left brace warnings
As of perl 5, version 26, subversion 0 (v5.26.0) some new warnings have
occurred when running checkpatch.
Unescaped left brace in regex is deprecated here (and will be fatal in
Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.\s*){
<-- HERE \s*/ at scripts/checkpatch.pl line 3544.
Unescaped left brace in regex is deprecated here (and will be fatal in
Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.\s*){
<-- HERE \s*/ at scripts/checkpatch.pl line 3885.
Unescaped left brace in regex is deprecated here (and will be fatal in
Perl 5.30), passed through in regex; marked by <-- HERE in
m/^(\+.*(?:do|\))){ <-- HERE / at scripts/checkpatch.pl line 4374.
It seems perfectly reasonable to do as the warning suggests and simply
escape the left brace in these three locations.
Link: http://lkml.kernel.org/r/20170607060135.17384-1-cyrilbur@gmail.com
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Acked-by: Joe Perches <joe@perches.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a103f4fc30a2..ab12e3040abb 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -3555,7 +3555,7 @@ sub process { | |||
| 3555 | $fixedline =~ s/\s*=\s*$/ = {/; | 3555 | $fixedline =~ s/\s*=\s*$/ = {/; |
| 3556 | fix_insert_line($fixlinenr, $fixedline); | 3556 | fix_insert_line($fixlinenr, $fixedline); |
| 3557 | $fixedline = $line; | 3557 | $fixedline = $line; |
| 3558 | $fixedline =~ s/^(.\s*){\s*/$1/; | 3558 | $fixedline =~ s/^(.\s*)\{\s*/$1/; |
| 3559 | fix_insert_line($fixlinenr, $fixedline); | 3559 | fix_insert_line($fixlinenr, $fixedline); |
| 3560 | } | 3560 | } |
| 3561 | } | 3561 | } |
| @@ -3896,7 +3896,7 @@ sub process { | |||
| 3896 | my $fixedline = rtrim($prevrawline) . " {"; | 3896 | my $fixedline = rtrim($prevrawline) . " {"; |
| 3897 | fix_insert_line($fixlinenr, $fixedline); | 3897 | fix_insert_line($fixlinenr, $fixedline); |
| 3898 | $fixedline = $rawline; | 3898 | $fixedline = $rawline; |
| 3899 | $fixedline =~ s/^(.\s*){\s*/$1\t/; | 3899 | $fixedline =~ s/^(.\s*)\{\s*/$1\t/; |
| 3900 | if ($fixedline !~ /^\+\s*$/) { | 3900 | if ($fixedline !~ /^\+\s*$/) { |
| 3901 | fix_insert_line($fixlinenr, $fixedline); | 3901 | fix_insert_line($fixlinenr, $fixedline); |
| 3902 | } | 3902 | } |
| @@ -4385,7 +4385,7 @@ sub process { | |||
| 4385 | if (ERROR("SPACING", | 4385 | if (ERROR("SPACING", |
| 4386 | "space required before the open brace '{'\n" . $herecurr) && | 4386 | "space required before the open brace '{'\n" . $herecurr) && |
| 4387 | $fix) { | 4387 | $fix) { |
| 4388 | $fixed[$fixlinenr] =~ s/^(\+.*(?:do|\))){/$1 {/; | 4388 | $fixed[$fixlinenr] =~ s/^(\+.*(?:do|\)))\{/$1 {/; |
| 4389 | } | 4389 | } |
| 4390 | } | 4390 | } |
| 4391 | 4391 | ||
