From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 2C747DE5 for ; Wed, 8 Feb 2017 15:43:41 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 08 Feb 2017 06:43:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="818498710" Received: from kmsmsx155.gar.corp.intel.com ([172.21.73.106]) by FMSMGA003.fm.intel.com with ESMTP; 08 Feb 2017 06:43:39 -0800 Received: from pgsmsx106.gar.corp.intel.com ([169.254.9.9]) by KMSMSX155.gar.corp.intel.com ([169.254.15.241]) with mapi id 14.03.0248.002; Wed, 8 Feb 2017 22:43:38 +0800 From: "Dai, Wei" To: "Ananyev, Konstantin" , Stephen Hemminger , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 6/7] ixgbe: remove useless return Thread-Index: AQHSatCkp41EvzyVCEuz1VGC7Fid0qFT+DGAgAtlAaA= Date: Wed, 8 Feb 2017 14:43:38 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D63A359318@PGSMSX106.gar.corp.intel.com> References: <20170109233022.31154-1-stephen@networkplumber.org> <20170109233022.31154-7-stephen@networkplumber.org> <2601191342CEEE43887BDE71AB9772583F10FFC2@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772583F10FFC2@irsmsx105.ger.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDIzZmY5MGQtODgxNC00NGI3LTk2ZjEtNTJmMjg4OTU1MjAyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik8xYzBLampxd2VkQVwvcVMyZ0NUUWVBTnB2QjJ3djBxRzQ1XC9tXC9wdXhkeDQ9In0= x-ctpclassification: CTP_IC x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 6/7] ixgbe: remove useless return 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: , X-List-Received-Date: Wed, 08 Feb 2017 14:43:42 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev, Konstantin > Sent: Thursday, February 2, 2017 12:41 AM > To: Stephen Hemminger ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 6/7] ixgbe: remove useless return Subject line had better be net/ixgbe: remove useless return >=20 >=20 >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hemminger > > Sent: Monday, January 9, 2017 11:30 PM > > To: dev@dpdk.org > > Cc: Stephen Hemminger > > Subject: [dpdk-dev] [PATCH 6/7] ixgbe: remove useless return > > > > If all goto's lead to a return, then better to get rid of goto. > > > > Signed-off-by: Stephen Hemminger > > --- > > drivers/net/ixgbe/ixgbe_82599_bypass.c | 10 ++++------ > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/net/ixgbe/ixgbe_82599_bypass.c > > b/drivers/net/ixgbe/ixgbe_82599_bypass.c > > index de9fa5a7..af55cc0a 100644 > > --- a/drivers/net/ixgbe/ixgbe_82599_bypass.c > > +++ b/drivers/net/ixgbe/ixgbe_82599_bypass.c > > @@ -73,7 +73,7 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, > ixgbe_link_speed speed) > > &eeprom_data); > > if (status) { > > PMD_DRV_LOG(ERR, "Failed to read Rx Rate Select RS0"); > > - goto out; > > + return; > > } > > > > eeprom_data =3D (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK) & > rs; > > @@ -83,7 +83,7 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, > ixgbe_link_speed speed) > > eeprom_data); > > if (status) { > > PMD_DRV_LOG(ERR, "Failed to write Rx Rate Select RS0"); > > - goto out; > > + return; > > } > > > > /* Set RS1 */ > > @@ -92,7 +92,7 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, > ixgbe_link_speed speed) > > &eeprom_data); > > if (status) { > > PMD_DRV_LOG(ERR, "Failed to read Rx Rate Select RS1"); > > - goto out; > > + return; > > } > > > > eeprom_data =3D (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK) & > rs; > > @@ -102,10 +102,8 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, > ixgbe_link_speed speed) > > eeprom_data); > > if (status) { > > PMD_DRV_LOG(ERR, "Failed to write Rx Rate Select RS1"); > > - goto out; > > + return; This return is also not needed. :-) > > } > > -out: > > - return; > > } > > > > /** > > -- >=20 > Acked-by: Konstantin Ananyev Acked-by: Wei Dai >=20 > > 2.11.0