* [PATCH net-next] net: arc: Make arc_emac_remove() return void
@ 2023-05-18 20:30 Uwe Kleine-König
2023-05-19 7:02 ` Simon Horman
2023-05-19 12:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2023-05-18 20:30 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Heiko Stuebner
Cc: netdev, linux-arm-kernel, linux-rockchip, kernel
The function returns zero unconditionally. Change it to return void instead
which simplifies its callers as error handing becomes unnecessary.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/arc/emac.h | 2 +-
drivers/net/ethernet/arc/emac_arc.c | 6 +++---
drivers/net/ethernet/arc/emac_main.c | 4 +---
drivers/net/ethernet/arc/emac_rockchip.c | 5 ++---
4 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/arc/emac.h b/drivers/net/ethernet/arc/emac.h
index d820ae03a966..0e244f0e25fd 100644
--- a/drivers/net/ethernet/arc/emac.h
+++ b/drivers/net/ethernet/arc/emac.h
@@ -220,6 +220,6 @@ static inline void arc_reg_clr(struct arc_emac_priv *priv, int reg, int mask)
int arc_mdio_probe(struct arc_emac_priv *priv);
int arc_mdio_remove(struct arc_emac_priv *priv);
int arc_emac_probe(struct net_device *ndev, int interface);
-int arc_emac_remove(struct net_device *ndev);
+void arc_emac_remove(struct net_device *ndev);
#endif /* ARC_EMAC_H */
diff --git a/drivers/net/ethernet/arc/emac_arc.c b/drivers/net/ethernet/arc/emac_arc.c
index 800620b8f10d..ce3147e886a1 100644
--- a/drivers/net/ethernet/arc/emac_arc.c
+++ b/drivers/net/ethernet/arc/emac_arc.c
@@ -61,11 +61,11 @@ static int emac_arc_probe(struct platform_device *pdev)
static int emac_arc_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
- int err;
- err = arc_emac_remove(ndev);
+ arc_emac_remove(ndev);
free_netdev(ndev);
- return err;
+
+ return 0;
}
static const struct of_device_id emac_arc_dt_ids[] = {
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
index ba0646b3b122..2b427d8a1831 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -1008,7 +1008,7 @@ int arc_emac_probe(struct net_device *ndev, int interface)
}
EXPORT_SYMBOL_GPL(arc_emac_probe);
-int arc_emac_remove(struct net_device *ndev)
+void arc_emac_remove(struct net_device *ndev)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
@@ -1019,8 +1019,6 @@ int arc_emac_remove(struct net_device *ndev)
if (!IS_ERR(priv->clk))
clk_disable_unprepare(priv->clk);
-
- return 0;
}
EXPORT_SYMBOL_GPL(arc_emac_remove);
diff --git a/drivers/net/ethernet/arc/emac_rockchip.c b/drivers/net/ethernet/arc/emac_rockchip.c
index 1c9ca3bcb871..509101112279 100644
--- a/drivers/net/ethernet/arc/emac_rockchip.c
+++ b/drivers/net/ethernet/arc/emac_rockchip.c
@@ -248,9 +248,8 @@ static int emac_rockchip_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct rockchip_priv_data *priv = netdev_priv(ndev);
- int err;
- err = arc_emac_remove(ndev);
+ arc_emac_remove(ndev);
clk_disable_unprepare(priv->refclk);
@@ -261,7 +260,7 @@ static int emac_rockchip_remove(struct platform_device *pdev)
clk_disable_unprepare(priv->macclk);
free_netdev(ndev);
- return err;
+ return 0;
}
static struct platform_driver emac_rockchip_driver = {
base-commit: ac9a78681b921877518763ba0e89202254349d1b
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next] net: arc: Make arc_emac_remove() return void
2023-05-18 20:30 [PATCH net-next] net: arc: Make arc_emac_remove() return void Uwe Kleine-König
@ 2023-05-19 7:02 ` Simon Horman
2023-05-19 12:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-05-19 7:02 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Heiko Stuebner, netdev, linux-arm-kernel, linux-rockchip, kernel
On Thu, May 18, 2023 at 10:30:49PM +0200, Uwe Kleine-König wrote:
> The function returns zero unconditionally. Change it to return void instead
> which simplifies its callers as error handing becomes unnecessary.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: arc: Make arc_emac_remove() return void
2023-05-18 20:30 [PATCH net-next] net: arc: Make arc_emac_remove() return void Uwe Kleine-König
2023-05-19 7:02 ` Simon Horman
@ 2023-05-19 12:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-19 12:40 UTC (permalink / raw)
To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig_=3Cu=2Ekleine-koenig=40pengutronix=2Ede=3E?=
Cc: davem, edumazet, kuba, pabeni, heiko, netdev, linux-arm-kernel,
linux-rockchip, kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:
On Thu, 18 May 2023 22:30:49 +0200 you wrote:
> The function returns zero unconditionally. Change it to return void instead
> which simplifies its callers as error handing becomes unnecessary.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/net/ethernet/arc/emac.h | 2 +-
> drivers/net/ethernet/arc/emac_arc.c | 6 +++---
> drivers/net/ethernet/arc/emac_main.c | 4 +---
> drivers/net/ethernet/arc/emac_rockchip.c | 5 ++---
> 4 files changed, 7 insertions(+), 10 deletions(-)
>
> [...]
Here is the summary with links:
- [net-next] net: arc: Make arc_emac_remove() return void
https://git.kernel.org/netdev/net-next/c/20d5e0ef252a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-19 12:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-18 20:30 [PATCH net-next] net: arc: Make arc_emac_remove() return void Uwe Kleine-König
2023-05-19 7:02 ` Simon Horman
2023-05-19 12:40 ` patchwork-bot+netdevbpf
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).