* [merged] checkpatch-fix-left-brace-warning.patch removed from -mm tree
@ 2015-09-11 18:12 akpm
0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2015-09-11 18:12 UTC (permalink / raw)
To: ewk, joe, mm-commits
The patch titled
Subject: checkpatch: fix left brace warning
has been removed from the -mm tree. Its filename was
checkpatch-fix-left-brace-warning.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Eddie Kovsky <ewk@edkovsky.org>
Subject: 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;
This patch fixes the warnings by escaping occurrences of the left brace
inside the regular expression.
Signed-off-by: Eddie Kovsky <ewk@edkovsky.org>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
scripts/checkpatch.pl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff -puN scripts/checkpatch.pl~checkpatch-fix-left-brace-warning scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-fix-left-brace-warning
+++ a/scripts/checkpatch.pl
@@ -3571,7 +3571,7 @@ 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=~/}/)) {
+ !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
if (ERROR("OPEN_BRACE",
"open brace '{' following function declarations go on the next line\n" . $herecurr) &&
$fix) {
@@ -4083,8 +4083,8 @@ 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) {
@@ -4531,7 +4531,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*$//;
_
Patches currently in -mm which might be from ewk@edkovsky.org are
^ permalink raw reply [flat|nested] 2+ messages in thread
* [merged] checkpatch-fix-left-brace-warning.patch removed from -mm tree
@ 2016-03-16 19:57 akpm
0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2016-03-16 19:57 UTC (permalink / raw)
To: geyslan, ewk, joe, peter.senna, mm-commits
The patch titled
Subject: checkpatch: fix another left brace warning
has been removed from the -mm tree. Its filename was
checkpatch-fix-left-brace-warning.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Geyslan G. Bem <geyslan@gmail.com>
Subject: 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 <geyslan@gmail.com>
Signed-off-by: Joe Perches <joe@perches.com>
Suggested-by: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Eddie Kovsky <ewk@edkovsky.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN scripts/checkpatch.pl~checkpatch-fix-left-brace-warning scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-fix-left-brace-warning
+++ a/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) &&
_
Patches currently in -mm which might be from geyslan@gmail.com are
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-16 19:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-11 18:12 [merged] checkpatch-fix-left-brace-warning.patch removed from -mm tree akpm
2016-03-16 19:57 akpm
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.