Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp225562rdb; Mon, 18 Sep 2023 13:06:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6MqQHlMVsa07zCT8QCebz8gNMU0tUWrv+VC5CVU6W5Bdg69yf7LN9gINu/X2VA9v0XCsp X-Received: by 2002:a05:6a00:13a8:b0:68b:e29c:b69 with SMTP id t40-20020a056a0013a800b0068be29c0b69mr714625pfg.9.1695067572071; Mon, 18 Sep 2023 13:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695067572; cv=none; d=google.com; s=arc-20160816; b=lgQQ2G6YRazjr+06RI2tF/4JjPOmsQP3Cf1oTcpcu2Am6lx9p6V+oDpgaEd1ioG1kK ESGvHb+V+JW5CUHorD0mFDZhQhh20q3VRq2/sIWsvZxLQll3uET4XdWK8hjmSt3LAnIB R64IKFmQNGmV/292mB5QqxhwIySI1uqx9JTR3ZOgQT5nPB8OKInitkWsqr/t6idXGaNl wEdW93xS+QWMZdOBWXRqFb9a07d6kuGo4Iiitpruj1abs5EsFVJHDkHIVwMZmwYWKgnw m/ADhOeNJ1QYsH314bVbzF0i0+OQ3vMGuXnE3atD2OQaJ4LpLnTtLLCZ5IzmQsD26A0l spcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=oc7VWdjZZ8VtCXZ6zMkkgmt7ZXvt1QDQz+GRP+EyO0g=; fh=UZ329nBpra7mB1BIR8jRJO4AMyEYTgxkzvDNxCZOPhs=; b=IdMr+ml6MuihtgZGf2ZFH6KBHY9R8/B5K/5x7weBTssb1NU/I7q1tggslKXmnSzn7R 5rHr/qdRi5MROmDHrpcHijc1OgNVj1JrbP5EWmF5ydWcZ1YK2OTv+LagC5z7T5MSZFEW TVqSZKy0uHn/jwt3dK9E5BVTqOpUZipKinMl14hH4U4YRpuS5R4Q8v6utkGg2LbQrwd7 eyj/KrTtLBwLk1oCEHWDkMms9kZR3UeAF18nwNTSvrN6+bQnP2VHjr71ScsujJhqUzSK 9qEnVOCWHsYHnAHWE+mw4tHRGUXlKbmPdDm4K6NReiswIrcfrWwNj7z4ruAO/mTo8d1/ T2BQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id q65-20020a632a44000000b005740eeadb59si8222362pgq.518.2023.09.18.13.06.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 13:06:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8A1E081B8964; Mon, 18 Sep 2023 12:51:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbjIRTvy (ORCPT + 99 others); Mon, 18 Sep 2023 15:51:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229625AbjIRTvh (ORCPT ); Mon, 18 Sep 2023 15:51:37 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B834118 for ; Mon, 18 Sep 2023 12:51:32 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qiKHA-0003tb-JB; Mon, 18 Sep 2023 21:51:20 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qiKHA-007I99-5V; Mon, 18 Sep 2023 21:51:20 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qiKH9-002mCo-SC; Mon, 18 Sep 2023 21:51:19 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Andrew Lunn , Heiner Kallweit Cc: Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 13/19] net: mdio: mux-meson-g12a: Convert to platform remove callback returning void Date: Mon, 18 Sep 2023 21:50:56 +0200 Message-Id: <20230918195102.1302746-14-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230918195102.1302746-1-u.kleine-koenig@pengutronix.de> References: <20230918195102.1302746-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1826; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=EzJFBBjWak83XqZfwXAmsPeATMXEasxL4vEIaynihO4=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlCKoPKfUwDQDhH8du0OvFGHGy/cy/8NHJo8l/V BExs0+U2kmJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZQiqDwAKCRCPgPtYfRL+ TnypCACUDyS5DHFzFzNuBt/1GnxBHxRj+FItq3pn9j1bAuTt0BtINBnJ2FVOxKZ+HWIeM5lgJXy G1MK3iGEBVHvLVu6TLS8UpA8aJ5rUdfFO3KyFKmViyoLkQpusyo4wqA9wj0QSdZ5wk/jDXrHivX cgIYGngVkHSzlzeMTA8nJNmdcDDQHc4g5iJ9fzVmJODorwn06JAs7ttSAbkRsqQU6kGicXkCcLU dN5nz/WyYw8xn3PgbaN9bGDo1kfVAwTDN3Tm6VW5zVS4ief9o7IcZ+66f5i9W5oxUIjQoC5Z+tJ Jk5GHCetMEO5hxLCA1MdOapxlaZcEa7htdOFyd+X5q7ze+ZL X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: 8bit 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.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 18 Sep 2023 12:51:57 -0700 (PDT) The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- drivers/net/mdio/mdio-mux-meson-g12a.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/mdio/mdio-mux-meson-g12a.c b/drivers/net/mdio/mdio-mux-meson-g12a.c index 910e5cf74e89..754b0f2cf15b 100644 --- a/drivers/net/mdio/mdio-mux-meson-g12a.c +++ b/drivers/net/mdio/mdio-mux-meson-g12a.c @@ -336,7 +336,7 @@ static int g12a_mdio_mux_probe(struct platform_device *pdev) return ret; } -static int g12a_mdio_mux_remove(struct platform_device *pdev) +static void g12a_mdio_mux_remove(struct platform_device *pdev) { struct g12a_mdio_mux *priv = platform_get_drvdata(pdev); @@ -344,13 +344,11 @@ static int g12a_mdio_mux_remove(struct platform_device *pdev) if (__clk_is_enabled(priv->pll)) clk_disable_unprepare(priv->pll); - - return 0; } static struct platform_driver g12a_mdio_mux_driver = { .probe = g12a_mdio_mux_probe, - .remove = g12a_mdio_mux_remove, + .remove_new = g12a_mdio_mux_remove, .driver = { .name = "g12a-mdio_mux", .of_match_table = g12a_mdio_mux_match, -- 2.40.1