From: Phil Reid <preid@electromag.com.au>
To: andrew@lunn.ch, vivien.didelot@savoirfairelinux.com,
f.fainelli@gmail.com, preid@electromag.com.au,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bianpan2016@163.com, stable@vger.kernel.org
Subject: [PATCH 1/2] net: dsa: lan9303: make lan9303_handle_reset() a void function
Date: Mon, 13 Nov 2017 16:07:52 +0800 [thread overview]
Message-ID: <1510560473-26727-2-git-send-email-preid@electromag.com.au> (raw)
In-Reply-To: <1510560473-26727-1-git-send-email-preid@electromag.com.au>
lan9303_handle_reset never returns anything other than success.
So there's not need for it to return an error code.
Signed-off-by: Phil Reid <preid@electromag.com.au>
---
drivers/net/dsa/lan9303-core.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index b471413..cc00308 100644
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
@@ -550,18 +550,16 @@ static int lan9303_separate_ports(struct lan9303 *chip)
LAN9303_SWE_PORT_STATE_BLOCKING_PORT2);
}
-static int lan9303_handle_reset(struct lan9303 *chip)
+static void lan9303_handle_reset(struct lan9303 *chip)
{
if (!chip->reset_gpio)
- return 0;
+ return;
if (chip->reset_duration != 0)
msleep(chip->reset_duration);
/* release (deassert) reset and activate the device */
gpiod_set_value_cansleep(chip->reset_gpio, 0);
-
- return 0;
}
/* stop processing packets for all ports */
@@ -855,9 +853,7 @@ int lan9303_probe(struct lan9303 *chip, struct device_node *np)
lan9303_probe_reset_gpio(chip, np);
- ret = lan9303_handle_reset(chip);
- if (ret)
- return ret;
+ lan9303_handle_reset(chip);
ret = lan9303_check_device(chip);
if (ret)
--
1.8.3.1
next prev parent reply other threads:[~2017-11-13 8:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 8:07 [PATCH 0/2] net: dsa: lan9303: check error value from devm_gpiod_get_optional() Phil Reid
2017-11-13 8:07 ` Phil Reid [this message]
2017-11-13 8:07 ` [PATCH 2/2] " Phil Reid
2017-11-13 11:32 ` [PATCH 0/2] " Egil Hjelmeland
2018-01-06 16:54 ` Egil Hjelmeland
2018-01-09 8:38 ` Phil Reid
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=1510560473-26727-2-git-send-email-preid@electromag.com.au \
--to=preid@electromag.com.au \
--cc=andrew@lunn.ch \
--cc=bianpan2016@163.com \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/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