From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A577EA05D3 for ; Thu, 23 May 2019 04:27:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BD7761B945; Thu, 23 May 2019 04:27:14 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id AC66D2B9E; Thu, 23 May 2019 04:27:12 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2019 19:27:11 -0700 X-ExtLoop1: 1 Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 22 May 2019 19:27:11 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 22 May 2019 19:27:10 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.33]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.150]) with mapi id 14.03.0415.000; Thu, 23 May 2019 10:27:08 +0800 From: "Xu, Rosen" To: "Pei, Andy" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH] net/ipn3ke: delete identical branch Thread-Index: AQHVEGqqzLFZz5lb3kimf9EuhKP1qqZ3/Ojg Date: Thu, 23 May 2019 02:27:08 +0000 Message-ID: <0E78D399C70DA940A335608C6ED296D73A76EABF@SHSMSX104.ccr.corp.intel.com> References: <1558507482-350757-1-git-send-email-andy.pei@intel.com> In-Reply-To: <1558507482-350757-1-git-send-email-andy.pei@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjYyZjhjM2QtMTViYS00ZTU3LTgwMGYtZGE0N2NkZjUxYjRkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiXC9odmgwSkZXdXpBYTR3WjBzcnFhY0dQeHRmeGNcL2NVeFRjK2JPWEZVUm9UY2RvK0NrTHQ0YnphTE9qTUxncWF5In0= 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] [PATCH] net/ipn3ke: delete identical branch 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: Pei, Andy > Sent: Wednesday, May 22, 2019 14:45 > To: dev@dpdk.org > Cc: Pei, Andy ; Xu, Rosen ; > stable@dpdk.org > Subject: [PATCH] net/ipn3ke: delete identical branch >=20 > Whether the if statement is ture or not, the operation is identical. > It is unnecessary to check the if statement, so just delete the if statem= ent. >=20 > Coverity issue: 337928 > Fixes: c820468ac99c ("net/ipn3ke: support TM") > Cc: rosen.xu@intel.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Andy Pei > --- > drivers/net/ipn3ke/ipn3ke_tm.c | 15 ++------------- > 1 file changed, 2 insertions(+), 13 deletions(-) >=20 > diff --git a/drivers/net/ipn3ke/ipn3ke_tm.c > b/drivers/net/ipn3ke/ipn3ke_tm.c index 4bcf3aa..39c49bc 100644 > --- a/drivers/net/ipn3ke/ipn3ke_tm.c > +++ b/drivers/net/ipn3ke/ipn3ke_tm.c > @@ -1541,23 +1541,12 @@ struct ipn3ke_tm_shaper_params_range_type > ipn3ke_tm_shaper_params_rang[] =3D { > NULL, > rte_strerror(EINVAL)); > } > - } else if (n->node_state =3D=3D > - IPN3KE_TM_NODE_STATE_CONFIGURED_DEL) { > - if (n->level !=3D IPN3KE_TM_NODE_LEVEL_VT || > - n->n_children !=3D 0) { > - return -rte_tm_error_set(error, > - EINVAL, > - > RTE_TM_ERROR_TYPE_UNSPECIFIED, > - NULL, > - rte_strerror(EINVAL)); > - } else { > - return -rte_tm_error_set(error, > + } else if (n->node_state =3D=3D > IPN3KE_TM_NODE_STATE_CONFIGURED_DEL) > + return -rte_tm_error_set(error, > EINVAL, >=20 > RTE_TM_ERROR_TYPE_UNSPECIFIED, > NULL, > rte_strerror(EINVAL)); > - } > - } > } >=20 > n =3D tm->h.port_commit_node; > -- > 1.8.3.1 Acked-by: Rosen Xu