From: Geyslan G. Bem Date: Tue, 15 Mar 2016 21:58:09 +0000 (-0700) Subject: checkpatch: fix another left brace warning X-Git-Tag: v4.6~365^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b8c69e4384b0bcf1936c2137804840212daaf69;p=platform%2Fkernel%2Flinux-amlogic.git checkpatch: fix another left brace warning This patch escapes a regex that uses left brace. Using checkpatch.pl with Perl 5.22.0 generates the warning: "Unescaped left brace in regex is deprecated, passed through in regex;" Comment from regcomp.c in Perl source: "Currently we don't warn when the lbrace is at the start of a construct. This catches it in the middle of a literal string, or when it's the first thing after something like "\b"." This works as a complement to 4e5d56bd ("checkpatch: fix left brace warning"). Signed-off-by: Geyslan G. Bem Signed-off-by: Joe Perches Suggested-by: Peter Senna Tschudin Cc: Eddie Kovsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b7f44b2..c64e604 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4132,7 +4132,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) &&