From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=+JR3pYNpITSBuBS6NK3yFLm0ybUyl9aTdWwU8I3fDeE=; b=TfH0Q843tbPLEFk/oPS4OrNzZQUm0Sm+vhNxj31e3aWMxo9vudfUUTKwLbM7sld4PJ yFqx65E7zTFAaYmeIA6db39HQ6YHdq4jOPx68mei+EDb7hL9JUOJFRhH1ZSKncG1xpqg UX96+j7BlMznLqfSoejCT/5VwZtuzdLqP+HcufralJNy9n3D8GKmq/W/p9VeCHCdo3Rw 0w6govl85trfGxlUrRnUPK+c3/GdGJIpuKrZDdN+xThnl0252b3Pfd0NueKavI9Y6UVL Su53pLZ0xFQrKpwTZhyfqWcP6UPYXgRKcvDaao8wqgMvYMRuqZEaNmuydVe8TS3lpWKo K/Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=+JR3pYNpITSBuBS6NK3yFLm0ybUyl9aTdWwU8I3fDeE=; b=aBTnCZLJOKv3nASNN9r5e7Ka7AkEFUXZYsuydG3QGE9Y/PgKzOH7ZRkXxyUTLB/mz/ 78poE2RQDJlsybrbB+zo5eGkYjbBfE8oP09RcUiPVwqdg3egvEJmdb1TaWMIOmyqrvQb C5gZT26hmEog1h1zM2JxlRwxwKcOo5/0koKfrvmZEWfXPIfVeOZ5l2ZZoGXSXMWDxPol rm62Isod/W/pyQNBKCsK2Ibo5o8TC0GommCLsEoopgpH8RQuT3LoaFPOhj6t4TQDmZGE lXhIhb8oqROW00WfVkr6oJF/xFtglEyFuhoTErl4bvgDLxuhBzso7lfuF9UCVb4wu0tl FVXA== X-Gm-Message-State: AG10YORv4ZlVxBhpzEqp/+wnmSyQ0G+vsforiAdFakmKcN3h35zxS5kDQ6KOQYT4lfouvvBl X-Received: by 10.28.194.69 with SMTP id s66mr1669751wmf.93.1453968346114; Thu, 28 Jan 2016 00:05:46 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id e14sm1600781wmi.21.2016.01.28.00.05.45 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jan 2016 00:05:45 -0800 (PST) From: Thomas Monjalon To: "Xie, Huawei" Date: Thu, 28 Jan 2016 09:04:35 +0100 Message-ID: <10119337.4qkYhnRbX6@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1451872319-30737-1-git-send-email-huawei.xie@intel.com> <9204020.3pEC1ROqZC@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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:05:46 -0000 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