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 5A130A04B4; Fri, 8 Nov 2019 15:49:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 300BC1C204; Fri, 8 Nov 2019 15:49:38 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id CBE031C12D; Fri, 8 Nov 2019 15:49:35 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2019 06:49:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,281,1569308400"; d="scan'208";a="286509538" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 08 Nov 2019 06:49:34 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 Nov 2019 06:49:32 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 8 Nov 2019 06:49:32 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.127]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.60]) with mapi id 14.03.0439.000; Fri, 8 Nov 2019 22:49:31 +0800 From: "Xu, Rosen" To: Kevin Traynor , "dev@dpdk.org" CC: "david.marchand@redhat.com" , "stable@dpdk.org" Thread-Topic: [v2 PATCH 4/8] net/ipn3ke: remove useless if statement Thread-Index: AQHVlNTIKxcr+7V72EarYSFMOaCyh6eBXb2g Date: Fri, 8 Nov 2019 14:49:30 +0000 Message-ID: <0E78D399C70DA940A335608C6ED296D73AB39350@SHSMSX104.ccr.corp.intel.com> References: <20191001125315.6191-1-ktraynor@redhat.com> <20191106190203.10750-1-ktraynor@redhat.com> <20191106190203.10750-5-ktraynor@redhat.com> In-Reply-To: <20191106190203.10750-5-ktraynor@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmYxMGQxODktMzM0Zi00YTQ2LWFlZjEtNzczZDNmYzdkZGE2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicENzbytVOXVraHJEK0FTdk96b2JZbjJxTUZjb0MzQUhTVTJxVzZnTTlvekQyK09iVnNGOVJ4Z0k2Tm82MWhVbCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [v2 PATCH 4/8] net/ipn3ke: remove useless if statement X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, > -----Original Message----- > From: Kevin Traynor [mailto:ktraynor@redhat.com] > Sent: Thursday, November 07, 2019 3:02 > To: dev@dpdk.org > Cc: david.marchand@redhat.com; Kevin Traynor ; > Xu, Rosen ; stable@dpdk.org > Subject: [v2 PATCH 4/8] net/ipn3ke: remove useless if statement >=20 > Coverity complains that this statement is not needed as the goto label is= on > the next line anyway. Remove the if statement. >=20 > 653 ret =3D ipn3ke_cfg_parse_i40e_pf_ethdev(afu_name, pf_name); > CID 337930 (#1 of 1): Identical code for different branches > (IDENTICAL_BRANCHES)identical_branches: The same code is executed > when the condition ret is true or false, because the code in the > if-then branch and after the if statement is identical. Should > the if statement be removed? > 654 if (ret) > 655 goto end; > implicit_else: The code from the above if-then branch is identical > to the code after the if statement. > 656end: >=20 > Coverity issue: 337930 > Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver") > Cc: rosen.xu@intel.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Kevin Traynor > Reviewed-by: David Marchand > --- > drivers/net/ipn3ke/ipn3ke_ethdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c > b/drivers/net/ipn3ke/ipn3ke_ethdev.c > index 28d8aaf2d..af87fda6b 100644 > --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c > +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c > @@ -738,6 +738,5 @@ ipn3ke_cfg_probe(struct rte_vdev_device *dev) >=20 > ret =3D ipn3ke_cfg_parse_i40e_pf_ethdev(afu_name, pf_name); > - if (ret) > - goto end; > + > end: > if (kvlist) > -- > 2.21.0 Reviewed-by: Rosen Xu