From: Saeed Mahameed <saeedm@mellanox.com>
To: "zhongjiang@huawei.com" <zhongjiang@huawei.com>,
"davem@davemloft.net" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"leon@kernel.org" <leon@kernel.org>
Subject: Re: [PATCH] net/mlx5: Use PTR_ERR_OR_ZERO rather than its implementation
Date: Wed, 4 Sep 2019 23:29:16 +0000 [thread overview]
Message-ID: <0832b2b0c5b6ab21ef9a2f6f81c44b5985c9b20b.camel@mellanox.com> (raw)
In-Reply-To: <797f3807c00a52ea923301b4859f24145f0a291a.camel@mellanox.com>
On Tue, 2019-09-03 at 20:08 +0000, Saeed Mahameed wrote:
> On Tue, 2019-09-03 at 14:56 +0800, zhong jiang wrote:
> > PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better
> > to use it directly. hence just replace it.
> >
> > Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> > ---
> > drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 5 +----
> > 1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> > b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> > index 5581a80..2e0b467 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> > @@ -989,10 +989,7 @@ static void mlx5e_hairpin_flow_del(struct
> > mlx5e_priv *priv,
> > &flow_act, dest, dest_ix);
> > mutex_unlock(&priv->fs.tc.t_lock);
> >
> > - if (IS_ERR(flow->rule[0]))
> > - return PTR_ERR(flow->rule[0]);
> > -
> > - return 0;
> > + return PTR_ERR_OR_ZERO(flow->rule[0]);
> > }
> >
> > static void mlx5e_tc_del_nic_flow(struct mlx5e_priv *priv,
>
> Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Applied to net-next-mlx5 as i have a cleanup series coming up soon.
Thanks,
Saeed.
prev parent reply other threads:[~2019-09-04 23:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 6:56 zhong jiang
2019-09-03 20:08 ` Saeed Mahameed
2019-09-04 23:29 ` Saeed Mahameed [this message]
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=0832b2b0c5b6ab21ef9a2f6f81c44b5985c9b20b.camel@mellanox.com \
--to=saeedm@mellanox.com \
--cc=davem@davemloft.net \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=zhongjiang@huawei.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
all inboxes | Powered by JetHome®