aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSam Bobroff <sam.bobroff@au1.ibm.com>2015-04-16 15:44:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-17 09:03:58 -0400
commitd7fe8065ad891a2ad38b73ff10b97d08f0fb3b0b (patch)
tree1eddfca597a479fc88586df29e399e6d96a6c85e /scripts
parentb598b67060f14eb8c34d0cef1db4727dab56ef91 (diff)
checkpatch: improve operator spacing check
Code such as: x = timercmp(&now, &end, <); Will currently trigger a checkpatch error. e.g. ERROR: spaces required around that '<' This is because the "Ignore operators passed as parameters" check looks only for a comma following the operator. Improve the check by also looking for a close parenthesis. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Cc: 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-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 6c11cb61e9f4..78a951f80706 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3652,7 +3652,7 @@ sub process {
3652 3652
3653 # Ignore operators passed as parameters. 3653 # Ignore operators passed as parameters.
3654 if ($op_type ne 'V' && 3654 if ($op_type ne 'V' &&
3655 $ca =~ /\s$/ && $cc =~ /^\s*,/) { 3655 $ca =~ /\s$/ && $cc =~ /^\s*[,\)]/) {
3656 3656
3657# # Ignore comments 3657# # Ignore comments
3658# } elsif ($op =~ /^$;+$/) { 3658# } elsif ($op =~ /^$;+$/) {