From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: netdev@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Subject: [PATCH 2/3] sh_eth: no need for *else* after *goto*
Date: Wed, 04 Jan 2017 15:10:50 +0300 [thread overview]
Message-ID: <2432748.6uHGRc6GHQ@wasted.cogentembedded.com> (raw)
In-Reply-To: <64514012.uUvlhX0YRQ@wasted.cogentembedded.com>
Well, checkpatch.pl complains about *else* after *return* and *break* but
not after *goto*... and it probably should have complained about the code
in sh_eth_error(). Win couple LoCs by removing that *else*. :-)
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
drivers/net/ethernet/renesas/sh_eth.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
Index: renesas/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- renesas.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ renesas/drivers/net/ethernet/renesas/sh_eth.c
@@ -1542,13 +1542,11 @@ static void sh_eth_error(struct net_devi
ndev->stats.tx_carrier_errors++;
if (felic_stat & ECSR_LCHNG) {
/* Link Changed */
- if (mdp->cd->no_psr || mdp->no_ether_link) {
+ if (mdp->cd->no_psr || mdp->no_ether_link)
goto ignore_link;
- } else {
- link_stat = (sh_eth_read(ndev, PSR));
- if (mdp->ether_link_active_low)
- link_stat = ~link_stat;
- }
+ link_stat = sh_eth_read(ndev, PSR);
+ if (mdp->ether_link_active_low)
+ link_stat = ~link_stat;
if (!(link_stat & PHY_ST_LINK)) {
sh_eth_rcv_snd_disable(ndev);
} else {
next prev parent reply other threads:[~2017-01-04 12:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-04 12:09 [PATCH 0/2] sh_eth: E-MAC interrupt handler cleanups Sergei Shtylyov
2017-01-04 12:10 ` [PATCH 1/3] sh_eth: handle only enabled E-MAC interrupts Sergei Shtylyov
2017-01-04 12:10 ` Sergei Shtylyov [this message]
2017-01-04 12:11 ` [PATCH 3/3] sh_eth: factor out sh_eth_emac_interrupt() Sergei Shtylyov
2017-01-04 12:13 ` Sergei Shtylyov
2017-01-04 12:20 ` Sergei Shtylyov
2017-01-04 18:48 ` [PATCH 0/2] sh_eth: E-MAC interrupt handler cleanups David Miller
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=2432748.6uHGRc6GHQ@wasted.cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.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).