qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 14/19] scripts/checkpatch.pl: Don't allow special cas


From: Michael Tokarev
Subject: [Qemu-devel] [PULL 14/19] scripts/checkpatch.pl: Don't allow special cases of unspaced operators
Date: Mon, 11 Jan 2016 11:41:53 +0300

From: Peter Maydell <address@hidden>

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 <address@hidden>
Reviewed-by: Stefan Weil <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
 scripts/checkpatch.pl | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b0f6e11..efca817 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') {
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]