diff options
author | Joe Perches <joe@perches.com> | 2018-05-25 17:48:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-25 21:12:11 -0400 |
commit | d41362ed12b6402f0bba044037653f916757c3b2 (patch) | |
tree | b32cc8bd91caa435797dabc7d4b95d420dc1c10e /scripts | |
parent | ae67d58d0546ad3e1ef323d69de6c3708022791f (diff) |
checkpatch: fix macro argument precedence test
checkpatch's macro argument precedence test is broken so fix it.
Link: http://lkml.kernel.org/r/5dd900e9197febc1995604bb33c23c136d8b33ce.camel@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e16d6713f236..2d42eb9cd1a5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -5041,7 +5041,7 @@ sub process { | |||
5041 | $tmp_stmt =~ s/\b(typeof|__typeof__|__builtin\w+|typecheck\s*\(\s*$Type\s*,|\#+)\s*\(*\s*$arg\s*\)*\b//g; | 5041 | $tmp_stmt =~ s/\b(typeof|__typeof__|__builtin\w+|typecheck\s*\(\s*$Type\s*,|\#+)\s*\(*\s*$arg\s*\)*\b//g; |
5042 | $tmp_stmt =~ s/\#+\s*$arg\b//g; | 5042 | $tmp_stmt =~ s/\#+\s*$arg\b//g; |
5043 | $tmp_stmt =~ s/\b$arg\s*\#\#//g; | 5043 | $tmp_stmt =~ s/\b$arg\s*\#\#//g; |
5044 | my $use_cnt = $tmp_stmt =~ s/\b$arg\b//g; | 5044 | my $use_cnt = () = $tmp_stmt =~ /\b$arg\b/g; |
5045 | if ($use_cnt > 1) { | 5045 | if ($use_cnt > 1) { |
5046 | CHK("MACRO_ARG_REUSE", | 5046 | CHK("MACRO_ARG_REUSE", |
5047 | "Macro argument reuse '$arg' - possible side-effects?\n" . "$herectx"); | 5047 | "Macro argument reuse '$arg' - possible side-effects?\n" . "$herectx"); |