From patchwork Mon Jan 11 08:41:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 59446 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1974462lbb; Mon, 11 Jan 2016 00:47:53 -0800 (PST) X-Received: by 10.141.0.4 with SMTP id b4mr53273988qhd.23.1452502073337; Mon, 11 Jan 2016 00:47:53 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 75si76410857qgm.43.2016.01.11.00.47.53 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 11 Jan 2016 00:47:53 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:52532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIY8n-0001mR-01 for patch@linaro.org; Mon, 11 Jan 2016 03:47:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIY8A-00012t-Qn for qemu-devel@nongnu.org; Mon, 11 Jan 2016 03:47:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIY86-00027d-Ni for qemu-devel@nongnu.org; Mon, 11 Jan 2016 03:47:14 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:42143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIY86-00027M-Fy; Mon, 11 Jan 2016 03:47:10 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 543D0403E8; Mon, 11 Jan 2016 11:47:08 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 5453FADE; Mon, 11 Jan 2016 11:42:01 +0300 (MSK) Received: (nullmailer pid 28794 invoked by uid 1000); Mon, 11 Jan 2016 08:42:00 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Mon, 11 Jan 2016 11:41:53 +0300 Message-Id: <8f32510f1ca72332b9a662579e951f67d636142e.1452501577.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Subject: [Qemu-devel] [PULL 14/19] scripts/checkpatch.pl: Don't allow special cases of unspaced operators X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell 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 Reviewed-by: Stefan Weil Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- scripts/checkpatch.pl | 13 ------------- 1 file changed, 13 deletions(-) -- 2.1.4 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') {