checkpatch: fix perl v5.20 warning: useless use of greediness modifier
PATCH 1/1 checkpatch: fix perl v5.20 warning: useless use of greediness modifier
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}'.
--- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -1
@@ -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/) {} }
Signature · 1 line
2.0.0
Joe Perches
maintainerQuoted 8 lines · Roman Pen
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.plline 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}'.
Thanks Roman, it's already fixed in -next.