From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 6F6DEC3A4 for ; Thu, 28 Jan 2016 09:39:13 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 28 Jan 2016 00:39:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,357,1449561600"; d="scan'208";a="890844175" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 28 Jan 2016 00:39:12 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 28 Jan 2016 00:39:12 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 28 Jan 2016 00:39:11 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.215]) by shsmsx102.ccr.corp.intel.com ([169.254.2.172]) with mapi id 14.03.0248.002; Thu, 28 Jan 2016 16:38:47 +0800 From: "Xie, Huawei" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v2] fix checkpatch errors Thread-Index: AdFZeU0rtCsp1avaS8GV1jeVhOwlbw== Date: Thu, 28 Jan 2016 08:38:46 +0000 Message-ID: References: <1451872319-30737-1-git-send-email-huawei.xie@intel.com> <9204020.3pEC1ROqZC@xps13> <10119337.4qkYhnRbX6@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.4.80] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2] fix checkpatch errors X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2016 08:39:13 -0000 On 1/28/2016 4:06 PM, Thomas Monjalon wrote:=0A= > 2016-01-28 03:09, Xie, Huawei:=0A= >> On 1/28/2016 2:17 AM, Thomas Monjalon wrote:=0A= >>> 2016-01-27 01:26, Huawei Xie:=0A= >>>> v2 changes:=0A= >>>> add missed commit message in v1=0A= >>>>=0A= >>>> fix the error reported by checkpatch:=0A= >>>> "ERROR: return is not a function, parentheses are not required"=0A= >>>>=0A= >>>> also removed other extra parentheses like:=0A= >>>> "return val =3D=3D 0"=0A= >>>> "return (rte_mempool_lookup(...))"=0A= >>> How these examples are differents from above checkpatch error?=0A= >> Don't get it.=0A= > Me too ;)=0A= > I don't understand which paren you removed in "return val =3D=3D 0"=0A= > and why you say "also removed other...", meaning it is different=0A= > from the checkpatch error.=0A= =0A= Got you. I thought your example means DPDK examples.=0A= I mean i also removed paren in "return (val =3D=3D 0)". But checkpatch=0A= doesn't report "return (logical expression)" as error. I think it is=0A= also not necessary, so removed some of them. That is why i listed them=0A= seperately.=0A= =0A= >>> Please add Fixes: 6307b909b8e0 ("lib: remove extra parenthesis after re= turn")=0A= >>>=0A= >>> This is the second run after above commit but I still see a lot of them= .=0A= >>> Please check git grep 'return *('=0A= >>>=0A= >>>=0A= >> Not a lot of them, just 44 including the document, and all of them are= =0A= >> "return (logical expressions)", which check patch doesn't report as=0A= >> errors, so i chose to ignor them in the previous patch. I can send new= =0A= >> one which also fixes those code styles.=0A= >> Btw, is there any reason using this style?=0A= >> return (a*d < b*c)=0A= > I think there is no reason. Yes you can remove the parens here.=0A= > Thanks=0A= >=0A= =0A=