aboutsummaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-12-18 12:59:31 +0000
committerMichael Tokarev <mjt@tls.msk.ru>2016-01-11 11:39:28 +0300
commit8f32510f1ca72332b9a662579e951f67d636142e (patch)
tree808872356cd2084199a5b19af4bb28bc29acfc0b /scripts/checkpatch.pl
parenta2a645d9678797ea833197d0daf2e330ea75908a (diff)
scripts/checkpatch.pl: Don't allow special cases of unspaced operators
The checkpatch.pl script has a special case to permit the following operators to have no spaces around them: << >> & ^ | + - * / % QEMU style prefers all operators to consistently have spacing around them, so remove this special case handling. This avoids reviewers having to manually note it during code review. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl13
1 files changed, 0 insertions, 13 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b0f6e113c5..efca817b9b 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1890,19 +1890,6 @@ sub process {
ERROR("space prohibited after that '$op' $at\n" . $hereptr);
}
-
- # << and >> may either have or not have spaces both sides
- } elsif ($op eq '<<' or $op eq '>>' or
- $op eq '&' or $op eq '^' or $op eq '|' or
- $op eq '+' or $op eq '-' or
- $op eq '*' or $op eq '/' or
- $op eq '%')
- {
- if ($ctx =~ /Wx[^WCE]|[^WCE]xW/) {
- ERROR("need consistent spacing around '$op' $at\n" .
- $hereptr);
- }
-
# A colon needs no spaces before when it is
# terminating a case value or a label.
} elsif ($opv eq ':C' || $opv eq ':L') {