patches for DPDK stable branches
 help / color / Atom feed
From: wangyunjian <wangyunjian@huawei.com>
To: Jerin Jacob <jerinjacobk@gmail.com>
Cc: dpdk-dev <dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>,
	"Nithin Dabilpuram" <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>,
	"Lilijun (Jerry)" <jerry.lilijun@huawei.com>,
	xudingke <xudingke@huawei.com>, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/octeontx2: remove logically dead code
Date: Wed, 30 Sep 2020 10:34:35 +0000
Message-ID: <34EFBCA9F01B0748BEB6B629CE643AE60DA7FC46@DGGEMM533-MBX.china.huawei.com> (raw)
In-Reply-To: <CALBAE1O8AxjjHwquHgEBh1DNS6pTU48=ADeuC3Gtf_Xiqh7KOw@mail.gmail.com>

> -----Original Message-----
> From: Jerin Jacob [mailto:jerinjacobk@gmail.com]
> Sent: Wednesday, September 30, 2020 2:15 AM
> To: wangyunjian <wangyunjian@huawei.com>
> Cc: dpdk-dev <dev@dpdk.org>; Jerin Jacob <jerinj@marvell.com>; Nithin
> Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar K
> <kirankumark@marvell.com>; Lilijun (Jerry) <jerry.lilijun@huawei.com>;
> xudingke <xudingke@huawei.com>; dpdk stable <stable@dpdk.org>
> Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: remove logically dead code
> 
> On Wed, Aug 26, 2020 at 4:48 PM wangyunjian <wangyunjian@huawei.com>
> wrote:
> >
> > From: Yunjian Wang <wangyunjian@huawei.com>
> >
> > Coverity issue: 357719
> > Fixes: da138cd47e06 ("net/octeontx2: handle port reconfigure")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> > ---
> >  drivers/net/octeontx2/otx2_ethdev.c | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/net/octeontx2/otx2_ethdev.c
> > b/drivers/net/octeontx2/otx2_ethdev.c
> > index 33b72bd4d..3f9399cc8 100644
> > --- a/drivers/net/octeontx2/otx2_ethdev.c
> > +++ b/drivers/net/octeontx2/otx2_ethdev.c
> > @@ -1355,8 +1355,6 @@ nix_store_queue_cfg_and_then_release(struct
> > rte_eth_dev *eth_dev)
> >  fail:
> 
> See below
> 
> >         if (tx_qconf)
> >                 free(tx_qconf);
> > -       if (rx_qconf)
> > -               free(rx_qconf);
> 
> I think, it is clean and maintainable code have free() if rx_qconf as if we add
> some another exit error case in the future, we simply forget to add this check
> and it will fail. So I prefer to keep as-is for the sake of maintainability as there is
> no harm.

Hi, Jerin

Thanks for your explanation.
According to Stephen's suggestion, is it need to remove unnecessary NULL check?

Thanks,
Yunjian

> 
> 
> >
> >         return -ENOMEM;
> >  }
> > --
> > 2.23.0
> >
> >

  reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26 11:18 wangyunjian
2020-09-29 18:14 ` Jerin Jacob
2020-09-30 10:34   ` wangyunjian [this message]
2020-10-04  8:52     ` Jerin Jacob
2020-09-29 19:57 ` Stephen Hemminger
2020-10-09 12:39 ` [dpdk-stable] [dpdk-dev] [PATCH v2] " wangyunjian
2020-10-11  9:49   ` Jerin Jacob

Reply instructions:

You may reply publically 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=34EFBCA9F01B0748BEB6B629CE643AE60DA7FC46@DGGEMM533-MBX.china.huawei.com \
    --to=wangyunjian@huawei.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=jerinjacobk@gmail.com \
    --cc=jerry.lilijun@huawei.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=xudingke@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

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox