From: "Dai, Wei" <wei.dai@intel.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
Stephen Hemminger <stephen@networkplumber.org>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 6/7] ixgbe: remove useless return
Date: Wed, 8 Feb 2017 14:43:38 +0000 [thread overview]
Message-ID: <49759EB36A64CF4892C1AFEC9231E8D63A359318@PGSMSX106.gar.corp.intel.com> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB9772583F10FFC2@irsmsx105.ger.corp.intel.com>
> -----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 <stephen@networkplumber.org>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 6/7] ixgbe: remove useless return
Subject line had better be net/ixgbe: remove useless return
>
>
>
> > -----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 <stephen@networkplumber.org>
> > 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 <stephen@networkplumber.org>
> > ---
> > 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 = (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 = (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;
> > }
> >
> > /**
> > --
>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
>
> > 2.11.0
next prev parent reply other threads:[~2017-02-08 14:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 23:30 [dpdk-dev] [PATCH v2 0/7] minor cleanup Stephen Hemminger
2017-01-09 23:30 ` [dpdk-dev] [PATCH 1/7] bonding, malloc, bitmap: remove useless return Stephen Hemminger
2017-01-09 23:30 ` [dpdk-dev] [PATCH 2/7] ethdev: reduce goto's in attach/detach Stephen Hemminger
2017-01-10 8:40 ` Thomas Monjalon
2017-02-01 17:26 ` Ferruh Yigit
2017-01-09 23:30 ` [dpdk-dev] [PATCH 3/7] bnx2x: remove useless return's Stephen Hemminger
2017-01-09 23:30 ` [dpdk-dev] [PATCH 4/7] kni: remove useless return statements Stephen Hemminger
2017-01-11 17:36 ` Ferruh Yigit
2017-01-09 23:30 ` [dpdk-dev] [PATCH 5/7] i40e: remove useless return Stephen Hemminger
2017-01-09 23:30 ` [dpdk-dev] [PATCH 6/7] ixgbe: " Stephen Hemminger
2017-02-01 16:40 ` Ananyev, Konstantin
2017-02-08 14:43 ` Dai, Wei [this message]
2017-01-09 23:30 ` [dpdk-dev] [PATCH 7/7] igb: remove useless return's Stephen Hemminger
Reply instructions:
You may reply publicly 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=49759EB36A64CF4892C1AFEC9231E8D63A359318@PGSMSX106.gar.corp.intel.com \
--to=wei.dai@intel.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
--cc=stephen@networkplumber.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).