From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4DA07A04B7 for ; Sun, 4 Oct 2020 10:53:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B53BD1BDFD; Sun, 4 Oct 2020 10:53:00 +0200 (CEST) Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id EFF701BA9F; Sun, 4 Oct 2020 10:52:56 +0200 (CEST) Received: by mail-il1-f194.google.com with SMTP id c5so5167136ilk.11; Sun, 04 Oct 2020 01:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GNRlvRvU8yLyLqNQbHBB3ftgjeUH8K0s8omBQT9grH4=; b=ikjt8iUY1srY8I7eqha9EW8WbkmG1YTLveLprhKXQ1u/qHwlTbpo+nOPe3zB6UvfYV DyPxUhTm286+IrM1rMwkUivVe7YrIbBUA4ndnCY6mShEW+EkVj9AuuQ7Y3HYd6sJp5+G WBFkzofxvdImxrowhoRf5QcPnHwreIYHBj6AVP69b/qwxLr7ID20NDTBCPwCiF217JxE i3cECdG2qtEtR5Zd3AIocHDnwlBLrpFkvRH+F0vwkzQpmHfbrEBO9e5D3Y/Shx19yvwx /nV+qJZPP+Xv/kbP0YUzeYnFnP+0/P04Nl7jhjjrS1IUXdIdow18mlFIuIREwF7eRyed wvzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GNRlvRvU8yLyLqNQbHBB3ftgjeUH8K0s8omBQT9grH4=; b=QXSenApoeUkCRLFh8G/+fHdE7pIRSxoN6vojxkjbLGxa3fyN8Ko70YG0rPAYU1eBDe 2CxeszobUQQZjv+nR017fy59DkkbUzHNn7ZcOqmy7H2Bk1JGagRgUL/bVz8oUHCiRB+5 5sYv5Mq2TNLv6s7rBCpe6nCys5hs+pPQM3dlD7NOdarIbOQK1o6dFzZ7VxHAYkOALkPW So/Gf3exswBHH+ffz2px2ozYqQENxbXXczRLh/4glKB4f+cly/NjF7+JKavDB+tn/nqd TrHvieiEwmKErlHfmV3q2ByYvdUl6kDcN9QJZmTPmRoOFuODAfwlBO2TWRhyHs8AD72U V1Gg== X-Gm-Message-State: AOAM532R6eP2lLG6xlFOWFZVLnesg0iCm4UuILsKgQWjSGmpXevyrYYU chbOebQ0CF0SrNG2toFjLFlLvzptG7qEqXXgbVEx5oZbIp8= X-Google-Smtp-Source: ABdhPJy0ikFfbOgxL5XG21HdfLLIGwCDElQyaOHySXHstiGoK6LSuxYCFvScPTbmkA+gmHfYUfm8lNiLsWuSAV0ToIU= X-Received: by 2002:a92:c00c:: with SMTP id q12mr7764020ild.294.1601801575403; Sun, 04 Oct 2020 01:52:55 -0700 (PDT) MIME-Version: 1.0 References: <34EFBCA9F01B0748BEB6B629CE643AE60DA7FC46@DGGEMM533-MBX.china.huawei.com> In-Reply-To: <34EFBCA9F01B0748BEB6B629CE643AE60DA7FC46@DGGEMM533-MBX.china.huawei.com> From: Jerin Jacob Date: Sun, 4 Oct 2020 14:22:39 +0530 Message-ID: To: wangyunjian Cc: dpdk-dev , Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K , "stephen@networkplumber.org" , "Lilijun (Jerry)" , xudingke , dpdk stable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/octeontx2: remove logically dead code X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Wed, Sep 30, 2020 at 4:04 PM wangyunjian wrote: > > > -----Original Message----- > > From: Jerin Jacob [mailto:jerinjacobk@gmail.com] > > Sent: Wednesday, September 30, 2020 2:15 AM > > To: wangyunjian > > Cc: dpdk-dev ; Jerin Jacob ; Nithin > > Dabilpuram ; Kiran Kumar K > > ; Lilijun (Jerry) ; > > xudingke ; dpdk stable > > Subject: Re: [dpdk-dev] [PATCH] net/octeontx2: remove logically dead code > > > > On Wed, Aug 26, 2020 at 4:48 PM wangyunjian > > wrote: > > > > > > From: Yunjian Wang > > > > > > Coverity issue: 357719 > > > Fixes: da138cd47e06 ("net/octeontx2: handle port reconfigure") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Yunjian Wang > > > --- > > > 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? Yes. Makes sense to remove if check. > > Thanks, > Yunjian > > > > > > > > > > > return -ENOMEM; > > > } > > > -- > > > 2.23.0 > > > > > >