From: Roman Pen <r.peniaev@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Roman Pen <r.peniaev@gmail.com>,
Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/1] checkpatch: fix perl v5.20 warning: useless use of greediness modifier
Date: Tue, 16 Sep 2014 00:12:50 +0900 [thread overview]
Message-ID: <1410793970-22778-1-git-send-email-r.peniaev@gmail.com> (raw)
on my perl v5.20 I got:
Useless use of greediness modifier '+' in regex; marked by
<-- HERE in m/(^\+.*) {8,8}+ <-- HERE \t/ at ./scripts/checkpatch.pl line 2427.
greediness modifier '+' in construction '\s{8,8}+' does not make
any sense, because we already specify how many chars do we expect.
Also we can avoid second ',8' and use simple '\s{8}'.
Signed-off-by: Roman Pen <r.peniaev@gmail.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4d08b39..ccd3234 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2424,7 +2424,7 @@ sub process {
"please, no space before tabs\n" . $herevet) &&
$fix) {
while ($fixed[$fixlinenr] =~
- s/(^\+.*) {8,8}+\t/$1\t\t/) {}
+ s/(^\+.*) {8}\t/$1\t\t/) {}
while ($fixed[$fixlinenr] =~
s/(^\+.*) +\t/$1\t/) {}
}
--
2.0.0
next reply other threads:[~2014-09-15 15:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-15 15:12 Roman Pen [this message]
2014-09-15 15:19 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410793970-22778-1-git-send-email-r.peniaev@gmail.com \
--to=r.peniaev@gmail.com \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®