checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22
PATCH 1/1 checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22
This patch fixes a bunch of deprecation warings that show up when using checkpatch.pl with Perl 5.22.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at ./scripts/checkpatch.pl line 2829.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\(.*\){ <-- HERE / at ./scripts/checkpatch.pl line 3262.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/do{ <-- HERE / at ./scripts/checkpatch.pl line 3263.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\({ <-- HERE / at ./scripts/checkpatch.pl line 3636.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?^x:
--- scripts/checkpatch.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
scripts/checkpatch.pl +6 -6
@@ -2825,8 +2825,8 @@ sub process { # function brace can't be on same line, except for #defines of do while, # or if closed on same line - if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and - !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) { + if (($line=~/$Type\s*$Ident\(.*\).*\s\{/) and + !($line=~/\#\s*define.*do\s\{/) and !($line=~/\}/)) { ERROR("OPEN_BRACE", "open brace '{' following function declarations go on the next line\n" . $herecurr); }
@@ -3259,12 +3259,12 @@ sub process { ## } #need space before brace following if, while, etc - if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) || - $line =~ /do{/) { + if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) || + $line =~ /do\{/) { if (ERROR("SPACING", "space required before the open brace '{'\n" . $herecurr) && $fix) { - $fixed[$linenr - 1] =~ s/^(\+.*(?:do|\))){/$1 {/; + $fixed[$linenr - 1] =~ s/^(\+.*(?:do|\)))\{/$1 {/; } }
@@ -3633,7 +3633,7 @@ sub process { $dstat !~ /^for\s*$Constant$/ && # for (...) $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar() $dstat !~ /^do\s*{/ && # do {... - $dstat !~ /^\({/ && # ({... + $dstat !~ /^\(\{/ && # ({... $ctx !~ /^.\s*#\s*define\s+TRACE_(?:SYSTEM|INCLUDE_FILE|INCLUDE_PATH)\b/) { $ctx =~ s/\n*$//;
Signature · 1 line
2.5.1
Joe Perches
maintainerPATCH 1/1 checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22
Quoted 2 lines · Moritz Fischer
This patch fixes a bunch of deprecation warings that show up when using checkpatch.pl with Perl 5.22.
Thanks.
I believe these are all fixed in linux-next and
should be resolved when v4.3 is released.
commit 09165246126819ca19b47103d28392364bb599f1
Author: Eddie Kovsky <[email protected]> Date: Tue Aug 25 14:21:30 2015 +1000
PATCH 1/1 checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22
In reply to Moritz FischerHi Moritz,
Quoted 15 lines · Moritz Fischer
This patch fixes a bunch of deprecation warings that show up when using checkpatch.pl with Perl 5.22.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at
./scripts/checkpatch.plline 2829.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\(.*\){ <-- HERE / at
./scripts/checkpatch.plline 3262.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/do{ <-- HERE / at
./scripts/checkpatch.plline 3263.
Quoted 8 lines
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\({ <-- HERE / at
./scripts/checkpatch.plline 3636.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?^x:
Signed-off-by Moritz Fischer <[email protected]>
Please submit this and have it accepted in the Linux tree. We will then pull it in here once it is accepted there.
Thanks,
-Joe
PATCH 1/1 checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22
Hi Joe,
Quoted 22 lines · Joe Hershberger
Hi Moritz,
Quoted 19 lines · Moritz Fischer
This patch fixes a bunch of deprecation warings that show up when using checkpatch.pl with Perl 5.22.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at
./scripts/checkpatch.plline 2829.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\(.*\){ <-- HERE / at
./scripts/checkpatch.plline 3262.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/do{ <-- HERE / at
./scripts/checkpatch.plline 3263.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\({ <-- HERE / at
./scripts/checkpatch.plline 3636.
Quoted 7 lines
Quoted 4 lines
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?^x:
Signed-off-by Moritz Fischer <[email protected]>Please submit this and have it accepted in the Linux tree. We will then pull it in here once it is accepted there.
Similar fix is already in Linus' master tree, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4e5d56bdf892e18832a6540b63ebf709966bce2a
Also note:
[1] That commit from Linux tree won't apply cleanly on U-Boot due to a bit different context.
[2] Even if manually tweaked it looks like it is incomplete:
------------------->8-------------------
)\(.*\).*\s{ <-- HERE /@scripts/checkpatch.pl line 2828.
------------------->8-------------------So with above in mind could you please apply that patch posted by Moritz?
This fixes checkpatch in Fedora 23 - in current state it is way too noisy.
-Alexey
PATCH 1/1 checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22
Quoted 40 lines · Alexey Brodkin
Hi Joe,
Quoted 22 lines · Joe Hershberger
Hi Moritz,
Quoted 19 lines · Moritz Fischer
This patch fixes a bunch of deprecation warings that show up when using checkpatch.pl with Perl 5.22.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at
./scripts/checkpatch.plline 2829.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\(.*\){ <-- HERE / at
./scripts/checkpatch.plline 3262.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/do{ <-- HERE / at
./scripts/checkpatch.plline 3263.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\({ <-- HERE / at
./scripts/checkpatch.plline 3636.Quoted 7 lines
Quoted 4 lines
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?^x:
Signed-off-by Moritz Fischer <[email protected]>Please submit this and have it accepted in the Linux tree. We will then pull it in here once it is accepted there.
Similar fix is already in Linus' master tree, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4e5d56bdf892e18832a6540b63ebf709966bce2aAlso note:
[1] That commit from Linux tree won't apply cleanly on U-Boot due to a bit different context.
[2] Even if manually tweaked it looks like it is incomplete:
Quoted 8 lines
------------------->8------------------- )\(.*\).*\s{ <-- HERE /@scripts/checkpatch.pl line 2828. ------------------->8-------------------So with above in mind could you please apply that patch posted by Moritz?
This fixes checkpatch in Fedora 23 - in current state it is way too noisy.
Maybe we just need to re-sync again?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151130/10631883/attachment.sig>
PATCH 1/1 checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22
Hi Tom,
Quoted 45 lines · Tom Rini
Quoted 44 lines · Alexey Brodkin
Hi Joe,
Quoted 22 lines · Joe Hershberger
Hi Moritz,
Quoted 19 lines · Moritz Fischer
This patch fixes a bunch of deprecation warings that show up when using checkpatch.pl with Perl 5.22.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at
./scripts/checkpatch.plline 2829.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\(.*\){ <-- HERE / at
./scripts/checkpatch.plline 3262.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/do{ <-- HERE / at
./scripts/checkpatch.plline 3263.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\({ <-- HERE / at
./scripts/checkpatch.plline 3636.Quoted 7 lines
Quoted 4 lines
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?^x:
Signed-off-by Moritz Fischer <[email protected]>Please submit this and have it accepted in the Linux tree. We will then pull it in here once it is accepted there.
Similar fix is already in Linus' master tree, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4e5d56bdf892e18832a6540b63ebf709966bce2aAlso note:
[1] That commit from Linux tree won't apply cleanly on U-Boot due to a bit different context.
[2] Even if manually tweaked it looks like it is incomplete:------------------->8------------------- )\(.*\).*\s{ <-- HERE /@scripts/checkpatch.pl line 2828. ------------------->8-------------------
Quoted 7 lines
Quoted 4 lines
So with above in mind could you please apply that patch posted by Moritz?
This fixes checkpatch in Fedora 23 - in current state it is way too noisy.
Maybe we just need to re-sync again?
Do you mean to copy entire checkpatch.pl over from Linux to U-Boot?
-Alexey
PATCH 1/1 checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22
Quoted 51 lines · Alexey Brodkin
Hi Tom,
Quoted 48 lines · Tom Rini
Quoted 47 lines · Alexey Brodkin
Hi Joe,
Quoted 22 lines · Joe Hershberger
Hi Moritz,
Quoted 19 lines · Moritz Fischer
This patch fixes a bunch of deprecation warings that show up when using checkpatch.pl with Perl 5.22.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at
./scripts/checkpatch.plline 2829.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\(.*\){ <-- HERE / at
./scripts/checkpatch.plline 3262.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/do{ <-- HERE / at
./scripts/checkpatch.plline 3263.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\({ <-- HERE / at
./scripts/checkpatch.plline 3636.Quoted 7 lines
Quoted 4 lines
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?^x:
Signed-off-by Moritz Fischer <[email protected]>Please submit this and have it accepted in the Linux tree. We will then pull it in here once it is accepted there.
Similar fix is already in Linus' master tree, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4e5d56bdf892e18832a6540b63ebf709966bce2aAlso note:
[1] That commit from Linux tree won't apply cleanly on U-Boot due to a bit different context.
[2] Even if manually tweaked it looks like it is incomplete:------------------->8------------------- )\(.*\).*\s{ <-- HERE /@scripts/checkpatch.pl line 2828. ------------------->8-------------------So with above in mind could you please apply that patch posted by Moritz?
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
This fixes checkpatch in Fedora 23 - in current state it is way too noisy.
Maybe we just need to re-sync again?
Do you mean to copy entire checkpatch.pl over from Linux to U-Boot?
Not quite blindly, we have an intentional change or two (I _think_ the change for __packed detection / warning was rejected upstream, memory is hazy) but by and large yes, it's just an import from the kernel anyhow.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151130/85f0686b/attachment.sig>
PATCH 1/1 checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22
Hi Tom,
Quoted 55 lines · Tom Rini
Quoted 54 lines · Alexey Brodkin
Hi Tom,
Quoted 51 lines · Tom Rini
Quoted 49 lines · Alexey Brodkin
Hi Joe,
Quoted 22 lines · Joe Hershberger
Hi Moritz,
Quoted 19 lines · Moritz Fischer
This patch fixes a bunch of deprecation warings that show up when using checkpatch.pl with Perl 5.22.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at
./scripts/checkpatch.plline 2829.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\(.*\){ <-- HERE / at
./scripts/checkpatch.plline 3262.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/do{ <-- HERE / at
./scripts/checkpatch.plline 3263.Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\({ <-- HERE / at
./scripts/checkpatch.plline 3636.Quoted 7 lines
Quoted 4 lines
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?^x:
Signed-off-by Moritz Fischer <[email protected]>Please submit this and have it accepted in the Linux tree. We will then pull it in here once it is accepted there.
Similar fix is already in Linus' master tree, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4e5d56bdf892e18832a6540b63ebf709966bce
2aAlso note:
[1] That commit from Linux tree won't apply cleanly on U-Boot due to a bit different context.
[2] Even if manually tweaked it looks like it is incomplete:------------------->8------------------- )\(.*\).*\s{ <-- HERE /@scripts/checkpatch.pl line 2828. ------------------->8-------------------So with above in mind could you please apply that patch posted by Moritz?
This fixes checkpatch in Fedora 23 - in current state it is way too noisy.
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
Maybe we just need to re-sync again?
Do you mean to copy entire checkpatch.pl over from Linux to U-Boot?
Not quite blindly, we have an intentional change or two (I _think_ the change for
__packeddetection / warning was rejected upstream, memory is hazy) but by and large yes, it's just an import from the kernel anyhow.
I'm fine with that but not sure if I may do it myself - at least I havent's tried it :) Volunteers?
-Alexey
Joe Perches
maintainerPATCH 1/1 checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22
In reply to Tom RiniQuoted 1 line · Tom Rini
On Mon, Nov 30, 2015 at 10:23:20AM +0000, Alexey Brodkin wrote:
[]
Quoted 12 lines
Quoted 12 lines
Similar fix is already in Linus' master tree, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/comm
it/?id=4e5d56bdf892e18832a6540b63ebf709966bce2aAlso note:
[1] That commit from Linux tree won't apply cleanly on U-Boot due to a bit different context.
[2] Even if manually tweaked it looks like it is incomplete:------------------->8------------------- )\(.*\).*\s{ <-- HERE /@scripts/checkpatch.pl line 2828. ------------------->8-------------------
Quoted 7 lines
Quoted 5 lines
So with above in mind could you please apply that patch posted by Moritz?
This fixes checkpatch in Fedora 23 - in current state it is way too noisy.
Maybe we just need to re-sync again?
I don't track u-boot.
Are there any u-boot specific changes made to checkpatch that are inappropriate for the linux-kernel?
If there aren't, maybe whatever u-boot changes that have been made to checkpatch should be pulled into the kernel version.
PATCH 1/1 checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22
Quoted 23 lines · Joe Perches
Quoted 1 line · Tom Rini
On Mon, Nov 30, 2015 at 10:23:20AM +0000, Alexey Brodkin wrote:
[]
Quoted 12 lines
Quoted 12 lines
Similar fix is already in Linus' master tree, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/comm
it/?id=4e5d56bdf892e18832a6540b63ebf709966bce2aAlso note:
[1] That commit from Linux tree won't apply cleanly on U-Boot due to a bit different context.
[2] Even if manually tweaked it looks like it is incomplete:------------------->8------------------- )\(.*\).*\s{ <-- HERE /@scripts/checkpatch.pl line 2828. ------------------->8-------------------Quoted 7 lines
Quoted 5 lines
So with above in mind could you please apply that patch posted by Moritz?
This fixes checkpatch in Fedora 23 - in current state it is way too noisy.
Maybe we just need to re-sync again?
Quoted 8 lines
I don't track u-boot.
Are there any u-boot specific changes made to checkpatch that are inappropriate for the linux-kernel?
If there aren't, maybe whatever u-boot changes that have been made to checkpatch should be pulled into the kernel version.
My memory is hazy, sorry, so I dug this up:
https://lkml.org/lkml/2014/2/24/542 and then re-read most of it. I had a newer version of the __packed check that I didn't post (I'm pretty sure) since the general feedback seemed to be that it wasn't wanted for the kernel. Other than that (and some other tiny things that are easy to fixup) no, we don't have local changes.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151130/1770a909/attachment.sig>