DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: "Xie, Huawei" <huawei.xie@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] fix checkpatch errors
Date: Thu, 28 Jan 2016 09:04:35 +0100	[thread overview]
Message-ID: <10119337.4qkYhnRbX6@xps13> (raw)
In-Reply-To: <C37D651A908B024F974696C65296B57B4C5B4942@SHSMSX101.ccr.corp.intel.com>

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

  reply	other threads:[~2016-01-28  8:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04  1:51 [dpdk-dev] [PATCH] " Huawei Xie
2016-01-05  2:21 ` Tan, Jianfeng
2016-01-05  2:27   ` Yuanhan Liu
2016-01-05  2:43   ` Xie, Huawei
2016-01-05 10:21   ` Mcnamara, John
2016-01-05 16:20     ` Xie, Huawei
2016-01-26 17:26 ` [dpdk-dev] [PATCH v2] " Huawei Xie
2016-01-27 18:16   ` Thomas Monjalon
2016-01-28  3:09     ` Xie, Huawei
2016-01-28  8:04       ` Thomas Monjalon [this message]
2016-01-28  8:38         ` Xie, Huawei
2016-01-28  9:43           ` Panu Matilainen
2016-01-27 13:58 ` [dpdk-dev] [PATCH v3] remove extra parentheses in return statement Huawei Xie
2016-02-10 14:50   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10119337.4qkYhnRbX6@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).