From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] fix checkpatch errors Date: Thu, 28 Jan 2016 09:04:35 +0100 Message-ID: <10119337.4qkYhnRbX6@xps13> References: <1451872319-30737-1-git-send-email-huawei.xie@intel.com> <9204020.3pEC1ROqZC@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: "Xie, Huawei" Return-path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 50B29C394 for ; Thu, 28 Jan 2016 09:05:46 +0100 (CET) Received: by mail-wm0-f51.google.com with SMTP id p63so12671496wmp.1 for ; Thu, 28 Jan 2016 00:05:46 -0800 (PST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-01-28 03:09, Xie, Huawei: > On 1/28/2016 2:17 AM, Thomas Monjalon wrote: > > 2016-01-27 01:26, Huawei Xie: > >> v2 changes: > >> add missed commit message in v1 > >> > >> fix the error reported by checkpatch: > >> "ERROR: return is not a function, parentheses are not required" > >> > >> also removed other extra parentheses like: > >> "return val == 0" > >> "return (rte_mempool_lookup(...))" > > How these examples are differents from above checkpatch error? > > Don't get it. Me too ;) I don't understand which paren you removed in "return val == 0" and why you say "also removed other...", meaning it is different from the checkpatch error. > > Please add Fixes: 6307b909b8e0 ("lib: remove extra parenthesis after return") > > > > This is the second run after above commit but I still see a lot of them. > > Please check git grep 'return *(' > > > > > > Not a lot of them, just 44 including the document, and all of them are > "return (logical expressions)", which check patch doesn't report as > errors, so i chose to ignor them in the previous patch. I can send new > one which also fixes those code styles. > Btw, is there any reason using this style? > return (a*d < b*c) I think there is no reason. Yes you can remove the parens here. Thanks