Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp225647rdb; Mon, 18 Sep 2023 13:06:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1IVuWYRLp7TuohI4/99A+GIl4TM9hX37mPgQXq9Pq+gNzwX1+93b9/Oh1zHymJ1HGmu4e X-Received: by 2002:a05:6a20:5619:b0:154:a2b0:3019 with SMTP id ir25-20020a056a20561900b00154a2b03019mr7598350pzc.53.1695067579579; Mon, 18 Sep 2023 13:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695067579; cv=none; d=google.com; s=arc-20160816; b=d7H87h/afpER/0orshTBzerVJCeB4XYj5UY6+dTovq27XuUiEEAbEx+U9+fHgB3/Cb n/ZrcDeQEXYfqc19EzPICMl/Luor2W+hRV+E5GT8L227gLGUbzMlk7inHHjm+PqATsHo ReAbaAGyogBgfmYTTTf1989HaeqQ9R2pSXKkdubOyw0l98YoO3ALd25mcD8N7Lq6aya8 NJIOhILPpYMDX0umCijQPekZT/JjAL6jeGrJuJ77dJ6aQ/5DS5+Gom+iy5RdHu5xu1Y7 K2QDz5hm4ztspMW8ztj4PSPYJJ+qRncviAQYH05GV3M8y2jDm78D6zYP9rvkF+dSdVfm WceQ== 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=F3vJJIP2UYP7HB6eo2aBugvpXzlyrF8Xo1hxIR8WuNc=; fh=2LoUldgIftbCGGYNlIKiEffIWCdRcQL9EB8MUfMGcWk=; b=hx7u7OYKXq+DoVfo5Dsg9cg5pSkA7EVwltNwZyk+LbZ+RJlcTHDWOLTwkNhpCgmefx a47T2e0iLWZdLojEJmbWNMUiis6UYaCVz6Ds7FPasqoLmoW3L58mzDMapjp6lTFb53Jn rsCy18liPQ2j2f7B1JNwsxxEc4mZnz3bY/4eSanMHTfSRwEsa0iff+QstoVOOWmZJrHm oHAwgf21+09mZjVPvfIFqugd/3/ydfplZ7inia9+htgPNQy0NJDjGHW7FRkNEt3jsncP 9FRw5rOSyYAcGyGjyFxTPeObXbeGDKgmhqRBwXiAB1MH6Swy+ekFQjZ/rLibC4yJRvxx pkmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id t23-20020a656097000000b0056569ee3ae6si8156951pgu.798.2023.09.18.13.06.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 13:06:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 8FFBC81B93E9; Mon, 18 Sep 2023 12:52:08 -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 S230010AbjIRTwG (ORCPT + 99 others); Mon, 18 Sep 2023 15:52:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229757AbjIRTvm (ORCPT ); Mon, 18 Sep 2023 15:51:42 -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 2AB78132 for ; Mon, 18 Sep 2023 12:51:36 -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 1qiKH9-0003kt-5G; Mon, 18 Sep 2023 21:51:19 +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 1qiKH8-007I8j-OS; Mon, 18 Sep 2023 21:51:18 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qiKH8-002mCQ-Ef; Mon, 18 Sep 2023 21:51:18 +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 , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 07/19] net: mdio: ipq8064: Convert to platform remove callback returning void Date: Mon, 18 Sep 2023 21:50:50 +0200 Message-Id: <20230918195102.1302746-8-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=1762; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=miGmpzcVxDh0lJ0Y47z/irjCSAlu12OWqTaS3ah8Cn0=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlCKoH1VkGIYYdyqftOgEqKWtvPUrGb2Q9i1Eds h9R/LfWhc+JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZQiqBwAKCRCPgPtYfRL+ TuXOB/0Vo6HeAm9CXB3VfnLjjtTyZxnjdd3rHx/Cn54Ig6livRNGk8z11WX6xi69v2CxNR3mx+O 0Dqlk043Mj9J7wp5vEKX6eKuGmJolEEQfN9e3XyRLgsRyrRwOyfalyPATGynWpFbnsnQsPk7h2g oo0Ty51+61jlV8CytWEu0wefsJ6w51HQ/LaQ8iJZh6v48OsOkt6RJFc1K4WWH7rCT2et5ZteKRr 0eWEHy8cd6BF+8CABZLdPQJp1YKB1Tg4BbBeKIf3uz5E7Cl6fyvoGTCocePjH2/XA5Elzb1Qjdm bUDM7PM/f3v/ICEfTQC45i5jOY/VPbFfFBMohAsdhGFSCtGa 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:52:08 -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-ipq8064.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/mdio/mdio-ipq8064.c b/drivers/net/mdio/mdio-ipq8064.c index fd9716960106..f71b6e1c66e4 100644 --- a/drivers/net/mdio/mdio-ipq8064.c +++ b/drivers/net/mdio/mdio-ipq8064.c @@ -147,14 +147,11 @@ ipq8064_mdio_probe(struct platform_device *pdev) return 0; } -static int -ipq8064_mdio_remove(struct platform_device *pdev) +static void ipq8064_mdio_remove(struct platform_device *pdev) { struct mii_bus *bus = platform_get_drvdata(pdev); mdiobus_unregister(bus); - - return 0; } static const struct of_device_id ipq8064_mdio_dt_ids[] = { @@ -165,7 +162,7 @@ MODULE_DEVICE_TABLE(of, ipq8064_mdio_dt_ids); static struct platform_driver ipq8064_mdio_driver = { .probe = ipq8064_mdio_probe, - .remove = ipq8064_mdio_remove, + .remove_new = ipq8064_mdio_remove, .driver = { .name = "ipq8064-mdio", .of_match_table = ipq8064_mdio_dt_ids, -- 2.40.1