Received: by 10.213.65.68 with SMTP id h4csp21681imn; Fri, 30 Mar 2018 13:19:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/WdjZd3xZEI994k9ARFFE0kMpscG40omaqNvBajGr1Q4r7+0AJAr7+OF8MffJaquVUcRRr X-Received: by 10.99.126.24 with SMTP id z24mr296277pgc.110.1522441157258; Fri, 30 Mar 2018 13:19:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522441157; cv=none; d=google.com; s=arc-20160816; b=WkZyeDJ5wbxuAcpfsymv4fkOaFSF1JOMYk88oUqyF/tc4X1NfW1z9K7R1IWxDhWYSg pKYY6d53kGBBaDAjxPld/cM7k2HgVls4wKQikzv1p9pv8KFg8lxKMD4xzYxB4H1lXlXB ZHyUteEX4H688xoG1qOgHC1C/wSuEeafAAXGkcosMVnP23qfaVpD7jm29UdUMWsxlWz8 UGafty9WIP/EzaLBJzZkzHgj+/TS0KjrgwcS38z49VgyG+0bezgexEjTWwkH0mmHjj+G sYeNSUDE2oEc08M6OHJ8jrBzi8wQsjVrxhIA6B034bBI5AYnH+zZsISm/gNtrEWmHF7E /btw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=7UShp2FisdFFIcLijoZUc/K8uJqc68q6iiekyJolsck=; b=T40g1Njq7WS21PfdReEkzWZeOu1JckQQngY/IYeKoaZUx0gAOcr+a43aLtL1SA3A2u 4+D+o7WxDSMpM6FrxZUQsRZMopd5ZhOwEtYRjwfUy/9ZJYK9XyTfCOdYcGwuYUb05HAe d/DwN5FT80UTvs91fx9yZNOfv4eE/W9Pjoa/LXOJP1GoichwHKUzs7bpFI/Bbpr5+fUP 9WqCX4dgmE4h9jv+KI3dW4kDpIw+KWbm2UEF3y4qzAFDN7jlqofsUR3Ifg6ED6PEmDMB 5TZ/leSU7sSHtT6mDaNk5vOrvAA+dkXFzqRELMj0vOcn+6pSYJNMez5JTP/OBQRtCH1R UlXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a31-v6si9195021pla.322.2018.03.30.13.19.03; Fri, 30 Mar 2018 13:19:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752737AbeC3UR0 (ORCPT + 99 others); Fri, 30 Mar 2018 16:17:26 -0400 Received: from smtprelay0153.hostedemail.com ([216.40.44.153]:35707 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752639AbeC3URZ (ORCPT ); Fri, 30 Mar 2018 16:17:25 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id 7A6D418029581; Fri, 30 Mar 2018 20:17:24 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:960:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3868:3873:4321:5007:6119:10004:10400:10848:11232:11658:11914:12740:12760:12895:13069:13311:13357:13439:14659:21080:21627:30017:30054:30090:30091,0,RBL:172.56.31.163:@perches.com:.lbl8.mailshell.net-62.8.0.190 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:20,LUA_SUMMARY:none X-HE-Tag: day69_63316626b209 X-Filterd-Recvd-Size: 1907 Received: from XPS-9350 (unknown [172.56.31.163]) (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA; Fri, 30 Mar 2018 20:17:22 +0000 (UTC) Message-ID: <1522441039.2210.50.camel@perches.com> Subject: Re: [PATCH] crypto: cavium: zip: Remove unnecessary parentheses From: Joe Perches To: Varsha Rao Cc: Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, cocci Date: Fri, 30 Mar 2018 13:17:19 -0700 In-Reply-To: References: <20180328175736.17360-1-rvarsha016@gmail.com> <1522260676.12357.121.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-03-29 at 21:03 +0530, Varsha Rao wrote: > On Wed, Mar 28, 2018 at 11:41 PM, Joe Perches wrote: > > > > On Wed, 2018-03-28 at 23:27, Varsha Rao wrote: > > > This patch fixes the clang warning of extraneous parentheses, with the > > > following coccinelle script. > > > > > > @@ > > > identifier i; > > > constant c; > > > @@ > > > ( > > > -((i == c)) > > > +i == c > > > > > > > > > > -((i <= c)) > > > +i <= c > > > > Why just the "==" and "<=" cases? > > Why not "<", ">" and ">=" too? > > > > Why not expression instead of constant? > > Initially I had the other cases too and used expression instead of > constant. But the results included only "==" and "<=" cases with > constant. Along with one false positive case. hmm Perhaps you should use something like this? @@ identifier i; constant c; @@ -( \(i == c\|i <= c\|i < c\|i >= c\|i > c\) -)