From patchwork Thu May 18 20:30:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13247348 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C874C77B73 for ; Thu, 18 May 2023 20:31:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=GI1i4jRZ0K3fCfyrSC5uo4KPvyuUODLtS/bpLlfucQo=; b=bLAXC+Dlhn6MAV bioMYP8/NlQ2kEkpp4/08mx8SkEykuHAp4cubEOJLA8C3N4S4QXGWEYglFpfgFOwQXRLFVm9/nzi+ 7EKZDSveraKGmvXuyToFmddrXOCscVcKvyom3h7+uWkJk0hW1Ij63CHwweQBzrdfHpSwpQ65JWzoK KUpq5ol45RQoy3UyKdGxKtts2qEMdv83aycgpvEg5wm+nRx/gl9z4UPakzrUMB0DoltkH84RDo8Qn Rna0fdz/QzDX7aC/Kp5yOvkwz0yrLOKUoJRjtHBm6om1DggcuUhRS/AcVXGZSIraCUJduJhwUFaV+ zQcplf6MTwxoK8FbVbUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzkHX-00E6Vq-0N; Thu, 18 May 2023 20:31:27 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pzkHU-00E6Ux-34 for linux-rockchip@lists.infradead.org; Thu, 18 May 2023 20:31:26 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pzkHK-0003fW-Oa; Thu, 18 May 2023 22:31:14 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pzkHI-0019vd-QC; Thu, 18 May 2023 22:31:12 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pzkHI-005l13-1H; Thu, 18 May 2023 22:31:12 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Heiko Stuebner Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH net-next] net: arc: Make arc_emac_remove() return void Date: Thu, 18 May 2023 22:30:49 +0200 Message-Id: <20230518203049.275805-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3231; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=i7bRACr8XsrDpvJ8bE6eLVkYIMKYRoc+4qMA9lSuxN8=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBkZor4CJXvMs9TXqgHgZE5EouRnhESGxz7YJqe7 mM7rpW01B6JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZGaK+AAKCRCPgPtYfRL+ TtybCACT15vZHTZHoZw2wmk/mJ7SJqLap1dZWKuflXUSpEAXhzLlUAj+m2xWbYAKKxq13ygVysa dpR1nlXMsKugf39Lo3k6IrrXJPm/PGuYWFn9vMnqWt+gUNs4rtSYRFCnvVB0x/vh8H9slT/sYjL 94ZPLPyP5nPkz5OLBoetV1htMFvWnK6w8/Uj0ni2BIQ8FkNg3PQaD20tTJYU8PKkJeJIzZ1JT42 wYJGMGOu6FwEdCReeWK/MlopGqpS3HsULDKvKA2Q2Y27RAeytEWrDlP0raL26EdIOUrdS5WttXK uJXUuqMBobcgwg3lFvqPNB+g0u6Sbr/rv5Pczu3e98FOTPoB X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-rockchip@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230518_133124_985568_E1E339CF X-CRM114-Status: GOOD ( 14.41 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Simon Horman --- 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(-) base-commit: ac9a78681b921877518763ba0e89202254349d1b 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 = {