From patchwork Sun Mar 12 16:14:43 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: 68403 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp799367wrd; Sun, 12 Mar 2023 10:03:17 -0700 (PDT) X-Google-Smtp-Source: AK7set/kD9ksOaImbO6mRyolDbKVM1XVhU2Xe4rnsK09CDO4nzbkdKSi93zDFvwvWXh6RT9yf8jL X-Received: by 2002:a17:90b:1243:b0:23d:980:e2 with SMTP id gx3-20020a17090b124300b0023d098000e2mr755151pjb.6.1678640596986; Sun, 12 Mar 2023 10:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640596; cv=none; d=google.com; s=arc-20160816; b=c6UNuwlGRYqhbBG125ABruJCwo1Be50z8WWxWU9CxlQyZOjjgolAVSVvrlxOvcNurf 82F/5dwDySgw5490Cd8Xc6+8U7Mxh3W7r+n3HeXzeUAzz7BMGi6+5OHXGC7JDC9Gjcxl HBFI6RB4Fm2Mi5H849gm2xHN06XNu95CQH6SKdZ7JFbf3c8bkO16a/qWXKm3YZ0RImgz 0jDbkhLtZKQeL4SvC0TXatSu/9pfew8221XNL4GukpwmmNxEm69nm8xmDQ3EM7bCZV2N ow6kQHMpXBUr/4vXSWN4lpj6DU8KnqKZpd3Qzz7FmdfRRJLcIEnF5a+qg5Dnhoq1dbiP pgbg== 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=3nPIh1Z1KTvCMwkbPiq0HiwX565FceyQzG1+dD0oOhk=; b=ZkoGDaK4NWAvgwMenwmVfKvXISVjGtI7/UbJuIiD6QM7DIIEKn4o3UdBF55IF+WKtT PGyfRij04LpW53DJEUl6OWvHMdqvl7OmnpLT/iCaFWMI8CPvGjxPvFSv4UvS0Gowdrm2 6PG49+9RPdEuKyLDGj3sFmQ9Aw3FIb2FMJ/8ke0rvqYnfd3HM8CPVX8MDmZB52y+/zjz gmW2poSSrI6bG8a/g75jV6nkKZ52JcnWWN4skVPOwST1s0BJlxd0b6a4RosX8VzZiNh9 lBVy7ivq+2JQVgB7iuaaZfZ4NvukJty9akHqm2xPyCSYYXaiRZeILPuoXWgvBK3sIlqe HIgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4-20020a170903230400b0019e9849174fsi4821443plh.547.2023.03.12.10.03.05; Sun, 12 Mar 2023 10:03:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230455AbjCLQQy (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230157AbjCLQPr (ORCPT ); Sun, 12 Mar 2023 12:15:47 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDB4F37B5D for ; Sun, 12 Mar 2023 09:15:31 -0700 (PDT) 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 1pbOLw-0007nl-Sw; Sun, 12 Mar 2023 17:15:20 +0100 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 1pbOLv-003f1X-Co; Sun, 12 Mar 2023 17:15:19 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLu-004K85-A2; Sun, 12 Mar 2023 17:15:18 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd , Matthias Brugger Cc: AngeloGioacchino Del Regno , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 01/30] clk: mediatek: Make mtk_clk_simple_remove() return void Date: Sun, 12 Mar 2023 17:14:43 +0100 Message-Id: <20230312161512.2715500-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=65806; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=KsRbqheX8bGJCmbC01rWZIl2ibfXZY+kyfP/fFUm8go=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfoVJhBTw1f1/HjTZ0a9gjNMaJuup7459xZ/D TBLrXJQ2x+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36FQAKCRDB/BR4rcrs CSr2CACV3jMpjp8YkAwRgBTOVcgwIponDdsxhzRJcNGNgqC6HCMIM7br4MgeT09UNxMPumWirhJ hAEWldnPn8EeOwdnj9iXTwKycJwijT5n1TC3Bzg5ra2JlHM5OSn2TdTLuSs3gKzrsCAU2xGvUoa TzODX+cyutRzf1BXwz5VBvME8+rKT2nEjUq9P2kS6NPmEoFiX8qhyti5bKpbo58ryNLloIK7GTq e4Y/Ubf6PKOo1vgbWzy5+BdHC8HU8uMo8u54y6pN67OnmXnIyJPCilNsEiqV3tD+rudvXs514Et k7divILLGdQhCcheDZkKSj2UxNob6dL7zEN24CV4YX8WYKSQ 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760182242495690047?= X-GMAIL-MSGID: =?utf-8?q?1760182242495690047?= mtk_clk_simple_remove() returned zero unconditionally. Make it return no value instead and convert the respective drivers to .remove_new. This makes the semantics in the callers of mtk_clk_simple_remove() clearer and prepares for the quest to make platform driver's remove function return void. Signed-off-by: Uwe Kleine-König --- drivers/clk/mediatek/clk-mt2701-aud.c | 6 +++--- drivers/clk/mediatek/clk-mt2701-bdp.c | 2 +- drivers/clk/mediatek/clk-mt2701-eth.c | 2 +- drivers/clk/mediatek/clk-mt2701-g3d.c | 2 +- drivers/clk/mediatek/clk-mt2701-hif.c | 2 +- drivers/clk/mediatek/clk-mt2701-img.c | 2 +- drivers/clk/mediatek/clk-mt2701-vdec.c | 2 +- drivers/clk/mediatek/clk-mt2712-bdp.c | 2 +- drivers/clk/mediatek/clk-mt2712-img.c | 2 +- drivers/clk/mediatek/clk-mt2712-jpgdec.c | 2 +- drivers/clk/mediatek/clk-mt2712-mfg.c | 2 +- drivers/clk/mediatek/clk-mt2712-vdec.c | 2 +- drivers/clk/mediatek/clk-mt2712-venc.c | 2 +- drivers/clk/mediatek/clk-mt2712.c | 2 +- drivers/clk/mediatek/clk-mt6765-audio.c | 2 +- drivers/clk/mediatek/clk-mt6765-cam.c | 2 +- drivers/clk/mediatek/clk-mt6765-img.c | 2 +- drivers/clk/mediatek/clk-mt6765-mipi0a.c | 2 +- drivers/clk/mediatek/clk-mt6765-mm.c | 2 +- drivers/clk/mediatek/clk-mt6765-vcodec.c | 2 +- drivers/clk/mediatek/clk-mt6779-aud.c | 2 +- drivers/clk/mediatek/clk-mt6779-cam.c | 2 +- drivers/clk/mediatek/clk-mt6779-img.c | 2 +- drivers/clk/mediatek/clk-mt6779-ipe.c | 2 +- drivers/clk/mediatek/clk-mt6779-mfg.c | 2 +- drivers/clk/mediatek/clk-mt6779-vdec.c | 2 +- drivers/clk/mediatek/clk-mt6779-venc.c | 2 +- drivers/clk/mediatek/clk-mt6779.c | 2 +- drivers/clk/mediatek/clk-mt6795-mfg.c | 2 +- drivers/clk/mediatek/clk-mt6795-topckgen.c | 2 +- drivers/clk/mediatek/clk-mt6795-vdecsys.c | 2 +- drivers/clk/mediatek/clk-mt6795-vencsys.c | 2 +- drivers/clk/mediatek/clk-mt6797-img.c | 2 +- drivers/clk/mediatek/clk-mt6797-vdec.c | 2 +- drivers/clk/mediatek/clk-mt6797-venc.c | 2 +- drivers/clk/mediatek/clk-mt7622-aud.c | 6 +++--- drivers/clk/mediatek/clk-mt7622-eth.c | 2 +- drivers/clk/mediatek/clk-mt7622-hif.c | 2 +- drivers/clk/mediatek/clk-mt7629-hif.c | 2 +- drivers/clk/mediatek/clk-mt7981-eth.c | 2 +- drivers/clk/mediatek/clk-mt7981-infracfg.c | 2 +- drivers/clk/mediatek/clk-mt7981-topckgen.c | 2 +- drivers/clk/mediatek/clk-mt7986-topckgen.c | 2 +- drivers/clk/mediatek/clk-mt8173-img.c | 2 +- drivers/clk/mediatek/clk-mt8173-pericfg.c | 2 +- drivers/clk/mediatek/clk-mt8173-topckgen.c | 2 +- drivers/clk/mediatek/clk-mt8173-vdecsys.c | 2 +- drivers/clk/mediatek/clk-mt8173-vencsys.c | 2 +- drivers/clk/mediatek/clk-mt8183-audio.c | 6 +++--- drivers/clk/mediatek/clk-mt8183-cam.c | 2 +- drivers/clk/mediatek/clk-mt8183-img.c | 2 +- drivers/clk/mediatek/clk-mt8183-ipu0.c | 2 +- drivers/clk/mediatek/clk-mt8183-ipu1.c | 2 +- drivers/clk/mediatek/clk-mt8183-ipu_adl.c | 2 +- drivers/clk/mediatek/clk-mt8183-ipu_conn.c | 2 +- drivers/clk/mediatek/clk-mt8183-mfgcfg.c | 2 +- drivers/clk/mediatek/clk-mt8183-vdec.c | 2 +- drivers/clk/mediatek/clk-mt8183-venc.c | 2 +- drivers/clk/mediatek/clk-mt8183.c | 2 +- drivers/clk/mediatek/clk-mt8186-cam.c | 2 +- drivers/clk/mediatek/clk-mt8186-img.c | 2 +- drivers/clk/mediatek/clk-mt8186-imp_iic_wrap.c | 2 +- drivers/clk/mediatek/clk-mt8186-infra_ao.c | 2 +- drivers/clk/mediatek/clk-mt8186-ipe.c | 2 +- drivers/clk/mediatek/clk-mt8186-mdp.c | 2 +- drivers/clk/mediatek/clk-mt8186-mfg.c | 2 +- drivers/clk/mediatek/clk-mt8186-topckgen.c | 2 +- drivers/clk/mediatek/clk-mt8186-vdec.c | 2 +- drivers/clk/mediatek/clk-mt8186-venc.c | 2 +- drivers/clk/mediatek/clk-mt8186-wpe.c | 2 +- drivers/clk/mediatek/clk-mt8192-aud.c | 6 +++--- drivers/clk/mediatek/clk-mt8192-cam.c | 2 +- drivers/clk/mediatek/clk-mt8192-img.c | 2 +- drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c | 2 +- drivers/clk/mediatek/clk-mt8192-ipe.c | 2 +- drivers/clk/mediatek/clk-mt8192-mdp.c | 2 +- drivers/clk/mediatek/clk-mt8192-mfg.c | 2 +- drivers/clk/mediatek/clk-mt8192-msdc.c | 2 +- drivers/clk/mediatek/clk-mt8192-scp_adsp.c | 2 +- drivers/clk/mediatek/clk-mt8192-vdec.c | 2 +- drivers/clk/mediatek/clk-mt8192-venc.c | 2 +- drivers/clk/mediatek/clk-mt8192.c | 2 +- drivers/clk/mediatek/clk-mt8195-cam.c | 2 +- drivers/clk/mediatek/clk-mt8195-ccu.c | 2 +- drivers/clk/mediatek/clk-mt8195-img.c | 2 +- drivers/clk/mediatek/clk-mt8195-imp_iic_wrap.c | 2 +- drivers/clk/mediatek/clk-mt8195-infra_ao.c | 2 +- drivers/clk/mediatek/clk-mt8195-ipe.c | 2 +- drivers/clk/mediatek/clk-mt8195-mfg.c | 2 +- drivers/clk/mediatek/clk-mt8195-peri_ao.c | 2 +- drivers/clk/mediatek/clk-mt8195-scp_adsp.c | 2 +- drivers/clk/mediatek/clk-mt8195-vdec.c | 2 +- drivers/clk/mediatek/clk-mt8195-venc.c | 2 +- drivers/clk/mediatek/clk-mt8195-wpe.c | 2 +- drivers/clk/mediatek/clk-mt8365-apu.c | 2 +- drivers/clk/mediatek/clk-mt8365-cam.c | 2 +- drivers/clk/mediatek/clk-mt8365-mfg.c | 2 +- drivers/clk/mediatek/clk-mt8365-vdec.c | 2 +- drivers/clk/mediatek/clk-mt8365-venc.c | 2 +- drivers/clk/mediatek/clk-mtk.c | 4 +--- drivers/clk/mediatek/clk-mtk.h | 2 +- 101 files changed, 109 insertions(+), 111 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt2701-aud.c b/drivers/clk/mediatek/clk-mt2701-aud.c index 1a32d8b7db84..218c7586983a 100644 --- a/drivers/clk/mediatek/clk-mt2701-aud.c +++ b/drivers/clk/mediatek/clk-mt2701-aud.c @@ -173,15 +173,15 @@ static int clk_mt2701_aud_probe(struct platform_device *pdev) return r; } -static int clk_mt2701_aud_remove(struct platform_device *pdev) +static void clk_mt2701_aud_remove(struct platform_device *pdev) { of_platform_depopulate(&pdev->dev); - return mtk_clk_simple_remove(pdev); + mtk_clk_simple_remove(pdev); } static struct platform_driver clk_mt2701_aud_drv = { .probe = clk_mt2701_aud_probe, - .remove = clk_mt2701_aud_remove, + .remove_new = clk_mt2701_aud_remove, .driver = { .name = "clk-mt2701-aud", .of_match_table = of_match_clk_mt2701_aud, diff --git a/drivers/clk/mediatek/clk-mt2701-bdp.c b/drivers/clk/mediatek/clk-mt2701-bdp.c index 435ed4819d56..cf6a07de5dcb 100644 --- a/drivers/clk/mediatek/clk-mt2701-bdp.c +++ b/drivers/clk/mediatek/clk-mt2701-bdp.c @@ -110,7 +110,7 @@ static const struct of_device_id of_match_clk_mt2701_bdp[] = { static struct platform_driver clk_mt2701_bdp_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2701-bdp", .of_match_table = of_match_clk_mt2701_bdp, diff --git a/drivers/clk/mediatek/clk-mt2701-eth.c b/drivers/clk/mediatek/clk-mt2701-eth.c index f3cb78e7f6e9..92576bdb8a5b 100644 --- a/drivers/clk/mediatek/clk-mt2701-eth.c +++ b/drivers/clk/mediatek/clk-mt2701-eth.c @@ -58,7 +58,7 @@ static const struct of_device_id of_match_clk_mt2701_eth[] = { static struct platform_driver clk_mt2701_eth_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2701-eth", .of_match_table = of_match_clk_mt2701_eth, diff --git a/drivers/clk/mediatek/clk-mt2701-g3d.c b/drivers/clk/mediatek/clk-mt2701-g3d.c index 499a170ba5f9..e5ba06c1b6c4 100644 --- a/drivers/clk/mediatek/clk-mt2701-g3d.c +++ b/drivers/clk/mediatek/clk-mt2701-g3d.c @@ -57,7 +57,7 @@ static const struct of_device_id of_match_clk_mt2701_g3d[] = { static struct platform_driver clk_mt2701_g3d_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2701-g3d", .of_match_table = of_match_clk_mt2701_g3d, diff --git a/drivers/clk/mediatek/clk-mt2701-hif.c b/drivers/clk/mediatek/clk-mt2701-hif.c index d5465d782993..466829edd490 100644 --- a/drivers/clk/mediatek/clk-mt2701-hif.c +++ b/drivers/clk/mediatek/clk-mt2701-hif.c @@ -55,7 +55,7 @@ static const struct of_device_id of_match_clk_mt2701_hif[] = { static struct platform_driver clk_mt2701_hif_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2701-hif", .of_match_table = of_match_clk_mt2701_hif, diff --git a/drivers/clk/mediatek/clk-mt2701-img.c b/drivers/clk/mediatek/clk-mt2701-img.c index 7e53deb7f990..44df1addc9f5 100644 --- a/drivers/clk/mediatek/clk-mt2701-img.c +++ b/drivers/clk/mediatek/clk-mt2701-img.c @@ -52,7 +52,7 @@ static const struct of_device_id of_match_clk_mt2701_img[] = { static struct platform_driver clk_mt2701_img_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2701-img", .of_match_table = of_match_clk_mt2701_img, diff --git a/drivers/clk/mediatek/clk-mt2701-vdec.c b/drivers/clk/mediatek/clk-mt2701-vdec.c index d3089da0ab62..923c43ddee30 100644 --- a/drivers/clk/mediatek/clk-mt2701-vdec.c +++ b/drivers/clk/mediatek/clk-mt2701-vdec.c @@ -63,7 +63,7 @@ static const struct of_device_id of_match_clk_mt2701_vdec[] = { static struct platform_driver clk_mt2701_vdec_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2701-vdec", .of_match_table = of_match_clk_mt2701_vdec, diff --git a/drivers/clk/mediatek/clk-mt2712-bdp.c b/drivers/clk/mediatek/clk-mt2712-bdp.c index 684d03e9f6de..3c42427c765a 100644 --- a/drivers/clk/mediatek/clk-mt2712-bdp.c +++ b/drivers/clk/mediatek/clk-mt2712-bdp.c @@ -74,7 +74,7 @@ static const struct of_device_id of_match_clk_mt2712_bdp[] = { static struct platform_driver clk_mt2712_bdp_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2712-bdp", .of_match_table = of_match_clk_mt2712_bdp, diff --git a/drivers/clk/mediatek/clk-mt2712-img.c b/drivers/clk/mediatek/clk-mt2712-img.c index 335049cdc856..41c928024e75 100644 --- a/drivers/clk/mediatek/clk-mt2712-img.c +++ b/drivers/clk/mediatek/clk-mt2712-img.c @@ -52,7 +52,7 @@ static const struct of_device_id of_match_clk_mt2712_img[] = { static struct platform_driver clk_mt2712_img_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2712-img", .of_match_table = of_match_clk_mt2712_img, diff --git a/drivers/clk/mediatek/clk-mt2712-jpgdec.c b/drivers/clk/mediatek/clk-mt2712-jpgdec.c index 07ba7c5e80af..af133ab42296 100644 --- a/drivers/clk/mediatek/clk-mt2712-jpgdec.c +++ b/drivers/clk/mediatek/clk-mt2712-jpgdec.c @@ -48,7 +48,7 @@ static const struct of_device_id of_match_clk_mt2712_jpgdec[] = { static struct platform_driver clk_mt2712_jpgdec_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2712-jpgdec", .of_match_table = of_match_clk_mt2712_jpgdec, diff --git a/drivers/clk/mediatek/clk-mt2712-mfg.c b/drivers/clk/mediatek/clk-mt2712-mfg.c index 42f8cf3ecf4c..d20b7d025e47 100644 --- a/drivers/clk/mediatek/clk-mt2712-mfg.c +++ b/drivers/clk/mediatek/clk-mt2712-mfg.c @@ -47,7 +47,7 @@ static const struct of_device_id of_match_clk_mt2712_mfg[] = { static struct platform_driver clk_mt2712_mfg_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2712-mfg", .of_match_table = of_match_clk_mt2712_mfg, diff --git a/drivers/clk/mediatek/clk-mt2712-vdec.c b/drivers/clk/mediatek/clk-mt2712-vdec.c index 6296ed5c5b55..74ebe298c52e 100644 --- a/drivers/clk/mediatek/clk-mt2712-vdec.c +++ b/drivers/clk/mediatek/clk-mt2712-vdec.c @@ -66,7 +66,7 @@ static const struct of_device_id of_match_clk_mt2712_vdec[] = { static struct platform_driver clk_mt2712_vdec_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2712-vdec", .of_match_table = of_match_clk_mt2712_vdec, diff --git a/drivers/clk/mediatek/clk-mt2712-venc.c b/drivers/clk/mediatek/clk-mt2712-venc.c index b9bfc35de629..64cda87875ce 100644 --- a/drivers/clk/mediatek/clk-mt2712-venc.c +++ b/drivers/clk/mediatek/clk-mt2712-venc.c @@ -49,7 +49,7 @@ static const struct of_device_id of_match_clk_mt2712_venc[] = { static struct platform_driver clk_mt2712_venc_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2712-venc", .of_match_table = of_match_clk_mt2712_venc, diff --git a/drivers/clk/mediatek/clk-mt2712.c b/drivers/clk/mediatek/clk-mt2712.c index 94f8fc2a4f7b..07f5cf8b0040 100644 --- a/drivers/clk/mediatek/clk-mt2712.c +++ b/drivers/clk/mediatek/clk-mt2712.c @@ -1446,7 +1446,7 @@ static const struct of_device_id of_match_clk_mt2712_simple[] = { static struct platform_driver clk_mt2712_simple_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt2712-simple", .of_match_table = of_match_clk_mt2712_simple, diff --git a/drivers/clk/mediatek/clk-mt6765-audio.c b/drivers/clk/mediatek/clk-mt6765-audio.c index 0aa6c0d352ca..504812cf4647 100644 --- a/drivers/clk/mediatek/clk-mt6765-audio.c +++ b/drivers/clk/mediatek/clk-mt6765-audio.c @@ -80,7 +80,7 @@ static const struct of_device_id of_match_clk_mt6765_audio[] = { static struct platform_driver clk_mt6765_audio_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6765-audio", .of_match_table = of_match_clk_mt6765_audio, diff --git a/drivers/clk/mediatek/clk-mt6765-cam.c b/drivers/clk/mediatek/clk-mt6765-cam.c index 25f2bef38126..1e0de9422aaa 100644 --- a/drivers/clk/mediatek/clk-mt6765-cam.c +++ b/drivers/clk/mediatek/clk-mt6765-cam.c @@ -55,7 +55,7 @@ static const struct of_device_id of_match_clk_mt6765_cam[] = { static struct platform_driver clk_mt6765_cam_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6765-cam", .of_match_table = of_match_clk_mt6765_cam, diff --git a/drivers/clk/mediatek/clk-mt6765-img.c b/drivers/clk/mediatek/clk-mt6765-img.c index a62303ef4f41..284133aac909 100644 --- a/drivers/clk/mediatek/clk-mt6765-img.c +++ b/drivers/clk/mediatek/clk-mt6765-img.c @@ -51,7 +51,7 @@ static const struct of_device_id of_match_clk_mt6765_img[] = { static struct platform_driver clk_mt6765_img_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6765-img", .of_match_table = of_match_clk_mt6765_img, diff --git a/drivers/clk/mediatek/clk-mt6765-mipi0a.c b/drivers/clk/mediatek/clk-mt6765-mipi0a.c index 25c829fc3866..ad543b601023 100644 --- a/drivers/clk/mediatek/clk-mt6765-mipi0a.c +++ b/drivers/clk/mediatek/clk-mt6765-mipi0a.c @@ -48,7 +48,7 @@ static const struct of_device_id of_match_clk_mt6765_mipi0a[] = { static struct platform_driver clk_mt6765_mipi0a_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6765-mipi0a", .of_match_table = of_match_clk_mt6765_mipi0a, diff --git a/drivers/clk/mediatek/clk-mt6765-mm.c b/drivers/clk/mediatek/clk-mt6765-mm.c index bda774668a36..ef05a7283b4d 100644 --- a/drivers/clk/mediatek/clk-mt6765-mm.c +++ b/drivers/clk/mediatek/clk-mt6765-mm.c @@ -77,7 +77,7 @@ static const struct of_device_id of_match_clk_mt6765_mm[] = { static struct platform_driver clk_mt6765_mm_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6765-mm", .of_match_table = of_match_clk_mt6765_mm, diff --git a/drivers/clk/mediatek/clk-mt6765-vcodec.c b/drivers/clk/mediatek/clk-mt6765-vcodec.c index 2bc1fbde87da..87ddfdafaa7a 100644 --- a/drivers/clk/mediatek/clk-mt6765-vcodec.c +++ b/drivers/clk/mediatek/clk-mt6765-vcodec.c @@ -50,7 +50,7 @@ static const struct of_device_id of_match_clk_mt6765_vcodec[] = { static struct platform_driver clk_mt6765_vcodec_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6765-vcodec", .of_match_table = of_match_clk_mt6765_vcodec, diff --git a/drivers/clk/mediatek/clk-mt6779-aud.c b/drivers/clk/mediatek/clk-mt6779-aud.c index 6e473ae1fd90..03a258682ff7 100644 --- a/drivers/clk/mediatek/clk-mt6779-aud.c +++ b/drivers/clk/mediatek/clk-mt6779-aud.c @@ -105,7 +105,7 @@ static const struct of_device_id of_match_clk_mt6779_aud[] = { static struct platform_driver clk_mt6779_aud_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6779-aud", .of_match_table = of_match_clk_mt6779_aud, diff --git a/drivers/clk/mediatek/clk-mt6779-cam.c b/drivers/clk/mediatek/clk-mt6779-cam.c index 7be3db90fa4a..b57f577e28dd 100644 --- a/drivers/clk/mediatek/clk-mt6779-cam.c +++ b/drivers/clk/mediatek/clk-mt6779-cam.c @@ -54,7 +54,7 @@ static const struct of_device_id of_match_clk_mt6779_cam[] = { static struct platform_driver clk_mt6779_cam_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6779-cam", .of_match_table = of_match_clk_mt6779_cam, diff --git a/drivers/clk/mediatek/clk-mt6779-img.c b/drivers/clk/mediatek/clk-mt6779-img.c index 9bc51fc82dbd..468c254be1cc 100644 --- a/drivers/clk/mediatek/clk-mt6779-img.c +++ b/drivers/clk/mediatek/clk-mt6779-img.c @@ -46,7 +46,7 @@ static const struct of_device_id of_match_clk_mt6779_img[] = { static struct platform_driver clk_mt6779_img_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6779-img", .of_match_table = of_match_clk_mt6779_img, diff --git a/drivers/clk/mediatek/clk-mt6779-ipe.c b/drivers/clk/mediatek/clk-mt6779-ipe.c index 92e9d1ade422..b7d3c25f6f8e 100644 --- a/drivers/clk/mediatek/clk-mt6779-ipe.c +++ b/drivers/clk/mediatek/clk-mt6779-ipe.c @@ -48,7 +48,7 @@ static const struct of_device_id of_match_clk_mt6779_ipe[] = { static struct platform_driver clk_mt6779_ipe_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6779-ipe", .of_match_table = of_match_clk_mt6779_ipe, diff --git a/drivers/clk/mediatek/clk-mt6779-mfg.c b/drivers/clk/mediatek/clk-mt6779-mfg.c index efc793a1969a..b60868e03d63 100644 --- a/drivers/clk/mediatek/clk-mt6779-mfg.c +++ b/drivers/clk/mediatek/clk-mt6779-mfg.c @@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt6779_mfg[] = { static struct platform_driver clk_mt6779_mfg_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6779-mfg", .of_match_table = of_match_clk_mt6779_mfg, diff --git a/drivers/clk/mediatek/clk-mt6779-vdec.c b/drivers/clk/mediatek/clk-mt6779-vdec.c index 3209a6518d5b..24e8064795bd 100644 --- a/drivers/clk/mediatek/clk-mt6779-vdec.c +++ b/drivers/clk/mediatek/clk-mt6779-vdec.c @@ -55,7 +55,7 @@ static const struct of_device_id of_match_clk_mt6779_vdec[] = { static struct platform_driver clk_mt6779_vdec_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6779-vdec", .of_match_table = of_match_clk_mt6779_vdec, diff --git a/drivers/clk/mediatek/clk-mt6779-venc.c b/drivers/clk/mediatek/clk-mt6779-venc.c index c25035c0f334..f51e1299ce26 100644 --- a/drivers/clk/mediatek/clk-mt6779-venc.c +++ b/drivers/clk/mediatek/clk-mt6779-venc.c @@ -46,7 +46,7 @@ static const struct of_device_id of_match_clk_mt6779_venc[] = { static struct platform_driver clk_mt6779_venc_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6779-venc", .of_match_table = of_match_clk_mt6779_venc, diff --git a/drivers/clk/mediatek/clk-mt6779.c b/drivers/clk/mediatek/clk-mt6779.c index 827025d127d9..63b7d68de13b 100644 --- a/drivers/clk/mediatek/clk-mt6779.c +++ b/drivers/clk/mediatek/clk-mt6779.c @@ -1302,7 +1302,7 @@ static const struct of_device_id of_match_clk_mt6779_infra[] = { static struct platform_driver clk_mt6779_infra_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6779-infra", .of_match_table = of_match_clk_mt6779_infra, diff --git a/drivers/clk/mediatek/clk-mt6795-mfg.c b/drivers/clk/mediatek/clk-mt6795-mfg.c index ee7aab24eb24..239c2a286cc4 100644 --- a/drivers/clk/mediatek/clk-mt6795-mfg.c +++ b/drivers/clk/mediatek/clk-mt6795-mfg.c @@ -42,7 +42,7 @@ static struct platform_driver clk_mt6795_mfg_drv = { .of_match_table = of_match_clk_mt6795_mfg, }, .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, }; module_platform_driver(clk_mt6795_mfg_drv); diff --git a/drivers/clk/mediatek/clk-mt6795-topckgen.c b/drivers/clk/mediatek/clk-mt6795-topckgen.c index e80fa588e309..7e54233e7b19 100644 --- a/drivers/clk/mediatek/clk-mt6795-topckgen.c +++ b/drivers/clk/mediatek/clk-mt6795-topckgen.c @@ -546,7 +546,7 @@ static struct platform_driver clk_mt6795_topckgen_drv = { .of_match_table = of_match_clk_mt6795_topckgen, }, .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, }; module_platform_driver(clk_mt6795_topckgen_drv); diff --git a/drivers/clk/mediatek/clk-mt6795-vdecsys.c b/drivers/clk/mediatek/clk-mt6795-vdecsys.c index d85d04e0d016..bbc800512ac5 100644 --- a/drivers/clk/mediatek/clk-mt6795-vdecsys.c +++ b/drivers/clk/mediatek/clk-mt6795-vdecsys.c @@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt6795_vdecsys[] = { static struct platform_driver clk_mt6795_vdecsys_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6795-vdecsys", .of_match_table = of_match_clk_mt6795_vdecsys, diff --git a/drivers/clk/mediatek/clk-mt6795-vencsys.c b/drivers/clk/mediatek/clk-mt6795-vencsys.c index de40a982ca96..5eb6fd540d13 100644 --- a/drivers/clk/mediatek/clk-mt6795-vencsys.c +++ b/drivers/clk/mediatek/clk-mt6795-vencsys.c @@ -42,7 +42,7 @@ static struct platform_driver clk_mt6795_vencsys_drv = { .of_match_table = of_match_clk_mt6795_vencsys, }, .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, }; module_platform_driver(clk_mt6795_vencsys_drv); diff --git a/drivers/clk/mediatek/clk-mt6797-img.c b/drivers/clk/mediatek/clk-mt6797-img.c index 7c6a53fbb8be..eddf9ab1d443 100644 --- a/drivers/clk/mediatek/clk-mt6797-img.c +++ b/drivers/clk/mediatek/clk-mt6797-img.c @@ -48,7 +48,7 @@ static const struct of_device_id of_match_clk_mt6797_img[] = { static struct platform_driver clk_mt6797_img_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6797-img", .of_match_table = of_match_clk_mt6797_img, diff --git a/drivers/clk/mediatek/clk-mt6797-vdec.c b/drivers/clk/mediatek/clk-mt6797-vdec.c index 6120fccc859f..983471d71d0e 100644 --- a/drivers/clk/mediatek/clk-mt6797-vdec.c +++ b/drivers/clk/mediatek/clk-mt6797-vdec.c @@ -65,7 +65,7 @@ static const struct of_device_id of_match_clk_mt6797_vdec[] = { static struct platform_driver clk_mt6797_vdec_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6797-vdec", .of_match_table = of_match_clk_mt6797_vdec, diff --git a/drivers/clk/mediatek/clk-mt6797-venc.c b/drivers/clk/mediatek/clk-mt6797-venc.c index 834d3834d2bb..1120e25ef10f 100644 --- a/drivers/clk/mediatek/clk-mt6797-venc.c +++ b/drivers/clk/mediatek/clk-mt6797-venc.c @@ -50,7 +50,7 @@ static const struct of_device_id of_match_clk_mt6797_venc[] = { static struct platform_driver clk_mt6797_venc_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt6797-venc", .of_match_table = of_match_clk_mt6797_venc, diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c index b8aabfeb1cba..663680f6f1cd 100644 --- a/drivers/clk/mediatek/clk-mt7622-aud.c +++ b/drivers/clk/mediatek/clk-mt7622-aud.c @@ -159,10 +159,10 @@ static int clk_mt7622_aud_probe(struct platform_device *pdev) return r; } -static int clk_mt7622_aud_remove(struct platform_device *pdev) +static void clk_mt7622_aud_remove(struct platform_device *pdev) { of_platform_depopulate(&pdev->dev); - return mtk_clk_simple_remove(pdev); + mtk_clk_simple_remove(pdev); } static const struct of_device_id of_match_clk_mt7622_aud[] = { @@ -172,7 +172,7 @@ static const struct of_device_id of_match_clk_mt7622_aud[] = { static struct platform_driver clk_mt7622_aud_drv = { .probe = clk_mt7622_aud_probe, - .remove = clk_mt7622_aud_remove, + .remove_new = clk_mt7622_aud_remove, .driver = { .name = "clk-mt7622-aud", .of_match_table = of_match_clk_mt7622_aud, diff --git a/drivers/clk/mediatek/clk-mt7622-eth.c b/drivers/clk/mediatek/clk-mt7622-eth.c index aee583fa77d0..bb98c3d21968 100644 --- a/drivers/clk/mediatek/clk-mt7622-eth.c +++ b/drivers/clk/mediatek/clk-mt7622-eth.c @@ -92,7 +92,7 @@ static const struct of_device_id of_match_clk_mt7622_eth[] = { static struct platform_driver clk_mt7622_eth_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt7622-eth", .of_match_table = of_match_clk_mt7622_eth, diff --git a/drivers/clk/mediatek/clk-mt7622-hif.c b/drivers/clk/mediatek/clk-mt7622-hif.c index ab5cad0c2b1c..b3673838b04b 100644 --- a/drivers/clk/mediatek/clk-mt7622-hif.c +++ b/drivers/clk/mediatek/clk-mt7622-hif.c @@ -104,7 +104,7 @@ static const struct of_device_id of_match_clk_mt7622_hif[] = { static struct platform_driver clk_mt7622_hif_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt7622-hif", .of_match_table = of_match_clk_mt7622_hif, diff --git a/drivers/clk/mediatek/clk-mt7629-hif.c b/drivers/clk/mediatek/clk-mt7629-hif.c index c3eb09ea6036..879c449be122 100644 --- a/drivers/clk/mediatek/clk-mt7629-hif.c +++ b/drivers/clk/mediatek/clk-mt7629-hif.c @@ -99,7 +99,7 @@ static const struct of_device_id of_match_clk_mt7629_hif[] = { static struct platform_driver clk_mt7629_hif_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt7629-hif", .of_match_table = of_match_clk_mt7629_hif, diff --git a/drivers/clk/mediatek/clk-mt7981-eth.c b/drivers/clk/mediatek/clk-mt7981-eth.c index 773350911be2..8c95713e0e32 100644 --- a/drivers/clk/mediatek/clk-mt7981-eth.c +++ b/drivers/clk/mediatek/clk-mt7981-eth.c @@ -108,7 +108,7 @@ static const struct of_device_id of_match_clk_mt7981_eth[] = { static struct platform_driver clk_mt7981_eth_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt7981-eth", .of_match_table = of_match_clk_mt7981_eth, diff --git a/drivers/clk/mediatek/clk-mt7981-infracfg.c b/drivers/clk/mediatek/clk-mt7981-infracfg.c index 8cf5057419e8..15b84919afe0 100644 --- a/drivers/clk/mediatek/clk-mt7981-infracfg.c +++ b/drivers/clk/mediatek/clk-mt7981-infracfg.c @@ -198,7 +198,7 @@ static const struct of_device_id of_match_clk_mt7981_infracfg[] = { static struct platform_driver clk_mt7981_infracfg_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt7981-infracfg", .of_match_table = of_match_clk_mt7981_infracfg, diff --git a/drivers/clk/mediatek/clk-mt7981-topckgen.c b/drivers/clk/mediatek/clk-mt7981-topckgen.c index 74634d65f5f6..7ed7d8bff245 100644 --- a/drivers/clk/mediatek/clk-mt7981-topckgen.c +++ b/drivers/clk/mediatek/clk-mt7981-topckgen.c @@ -413,7 +413,7 @@ static const struct of_device_id of_match_clk_mt7981_topckgen[] = { static struct platform_driver clk_mt7981_topckgen_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt7981-topckgen", .of_match_table = of_match_clk_mt7981_topckgen, diff --git a/drivers/clk/mediatek/clk-mt7986-topckgen.c b/drivers/clk/mediatek/clk-mt7986-topckgen.c index dff9976fa689..ac793027c903 100644 --- a/drivers/clk/mediatek/clk-mt7986-topckgen.c +++ b/drivers/clk/mediatek/clk-mt7986-topckgen.c @@ -307,7 +307,7 @@ static const struct of_device_id of_match_clk_mt7986_topckgen[] = { static struct platform_driver clk_mt7986_topckgen_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt7986-topckgen", .of_match_table = of_match_clk_mt7986_topckgen, diff --git a/drivers/clk/mediatek/clk-mt8173-img.c b/drivers/clk/mediatek/clk-mt8173-img.c index 7b50ffb7a8a5..f5fe7b6bd066 100644 --- a/drivers/clk/mediatek/clk-mt8173-img.c +++ b/drivers/clk/mediatek/clk-mt8173-img.c @@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt8173_imgsys[] = { static struct platform_driver clk_mt8173_vdecsys_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8173-imgsys", .of_match_table = of_match_clk_mt8173_imgsys, diff --git a/drivers/clk/mediatek/clk-mt8173-pericfg.c b/drivers/clk/mediatek/clk-mt8173-pericfg.c index e87294b72c2c..a8f7b744af60 100644 --- a/drivers/clk/mediatek/clk-mt8173-pericfg.c +++ b/drivers/clk/mediatek/clk-mt8173-pericfg.c @@ -114,7 +114,7 @@ static struct platform_driver clk_mt8173_pericfg_drv = { .of_match_table = of_match_clk_mt8173_pericfg, }, .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, }; module_platform_driver(clk_mt8173_pericfg_drv); diff --git a/drivers/clk/mediatek/clk-mt8173-topckgen.c b/drivers/clk/mediatek/clk-mt8173-topckgen.c index 257961528fe2..32d5d8a822f5 100644 --- a/drivers/clk/mediatek/clk-mt8173-topckgen.c +++ b/drivers/clk/mediatek/clk-mt8173-topckgen.c @@ -645,7 +645,7 @@ static struct platform_driver clk_mt8173_topckgen_drv = { .of_match_table = of_match_clk_mt8173_topckgen, }, .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, }; module_platform_driver(clk_mt8173_topckgen_drv); diff --git a/drivers/clk/mediatek/clk-mt8173-vdecsys.c b/drivers/clk/mediatek/clk-mt8173-vdecsys.c index 5105b8e0969d..0d3f1eb1c3d1 100644 --- a/drivers/clk/mediatek/clk-mt8173-vdecsys.c +++ b/drivers/clk/mediatek/clk-mt8173-vdecsys.c @@ -45,7 +45,7 @@ static const struct of_device_id of_match_clk_mt8173_vdecsys[] = { static struct platform_driver clk_mt8173_vdecsys_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8173-vdecsys", .of_match_table = of_match_clk_mt8173_vdecsys, diff --git a/drivers/clk/mediatek/clk-mt8173-vencsys.c b/drivers/clk/mediatek/clk-mt8173-vencsys.c index ff4f1cb735de..aefd9a46e991 100644 --- a/drivers/clk/mediatek/clk-mt8173-vencsys.c +++ b/drivers/clk/mediatek/clk-mt8173-vencsys.c @@ -56,7 +56,7 @@ static struct platform_driver clk_mt8173_vencsys_drv = { .of_match_table = of_match_clk_mt8173_vencsys, }, .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, }; module_platform_driver(clk_mt8173_vencsys_drv); diff --git a/drivers/clk/mediatek/clk-mt8183-audio.c b/drivers/clk/mediatek/clk-mt8183-audio.c index 3f1630290b93..b53ec528bf8f 100644 --- a/drivers/clk/mediatek/clk-mt8183-audio.c +++ b/drivers/clk/mediatek/clk-mt8183-audio.c @@ -87,10 +87,10 @@ static int clk_mt8183_audio_probe(struct platform_device *pdev) return r; } -static int clk_mt8183_audio_remove(struct platform_device *pdev) +static void clk_mt8183_audio_remove(struct platform_device *pdev) { of_platform_depopulate(&pdev->dev); - return mtk_clk_simple_remove(pdev); + mtk_clk_simple_remove(pdev); } static const struct of_device_id of_match_clk_mt8183_audio[] = { @@ -100,7 +100,7 @@ static const struct of_device_id of_match_clk_mt8183_audio[] = { static struct platform_driver clk_mt8183_audio_drv = { .probe = clk_mt8183_audio_probe, - .remove = clk_mt8183_audio_remove, + .remove_new = clk_mt8183_audio_remove, .driver = { .name = "clk-mt8183-audio", .of_match_table = of_match_clk_mt8183_audio, diff --git a/drivers/clk/mediatek/clk-mt8183-cam.c b/drivers/clk/mediatek/clk-mt8183-cam.c index 6907b1a6a824..d3f41f7017e2 100644 --- a/drivers/clk/mediatek/clk-mt8183-cam.c +++ b/drivers/clk/mediatek/clk-mt8183-cam.c @@ -50,7 +50,7 @@ static const struct of_device_id of_match_clk_mt8183_cam[] = { static struct platform_driver clk_mt8183_cam_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8183-cam", .of_match_table = of_match_clk_mt8183_cam, diff --git a/drivers/clk/mediatek/clk-mt8183-img.c b/drivers/clk/mediatek/clk-mt8183-img.c index 8d884425d79f..8561c8c46481 100644 --- a/drivers/clk/mediatek/clk-mt8183-img.c +++ b/drivers/clk/mediatek/clk-mt8183-img.c @@ -50,7 +50,7 @@ static const struct of_device_id of_match_clk_mt8183_img[] = { static struct platform_driver clk_mt8183_img_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8183-img", .of_match_table = of_match_clk_mt8183_img, diff --git a/drivers/clk/mediatek/clk-mt8183-ipu0.c b/drivers/clk/mediatek/clk-mt8183-ipu0.c index 953a8a33d048..0076998307b7 100644 --- a/drivers/clk/mediatek/clk-mt8183-ipu0.c +++ b/drivers/clk/mediatek/clk-mt8183-ipu0.c @@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt8183_ipu_core0[] = { static struct platform_driver clk_mt8183_ipu_core0_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8183-ipu_core0", .of_match_table = of_match_clk_mt8183_ipu_core0, diff --git a/drivers/clk/mediatek/clk-mt8183-ipu1.c b/drivers/clk/mediatek/clk-mt8183-ipu1.c index 221d12265974..b92d177d9473 100644 --- a/drivers/clk/mediatek/clk-mt8183-ipu1.c +++ b/drivers/clk/mediatek/clk-mt8183-ipu1.c @@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt8183_ipu_core1[] = { static struct platform_driver clk_mt8183_ipu_core1_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8183-ipu_core1", .of_match_table = of_match_clk_mt8183_ipu_core1, diff --git a/drivers/clk/mediatek/clk-mt8183-ipu_adl.c b/drivers/clk/mediatek/clk-mt8183-ipu_adl.c index 8c4fd96df821..ac12b4febddd 100644 --- a/drivers/clk/mediatek/clk-mt8183-ipu_adl.c +++ b/drivers/clk/mediatek/clk-mt8183-ipu_adl.c @@ -41,7 +41,7 @@ static const struct of_device_id of_match_clk_mt8183_ipu_adl[] = { static struct platform_driver clk_mt8183_ipu_adl_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8183-ipu_adl", .of_match_table = of_match_clk_mt8183_ipu_adl, diff --git a/drivers/clk/mediatek/clk-mt8183-ipu_conn.c b/drivers/clk/mediatek/clk-mt8183-ipu_conn.c index 14a4c3ff82a1..528729fa62e2 100644 --- a/drivers/clk/mediatek/clk-mt8183-ipu_conn.c +++ b/drivers/clk/mediatek/clk-mt8183-ipu_conn.c @@ -110,7 +110,7 @@ static const struct of_device_id of_match_clk_mt8183_ipu_conn[] = { static struct platform_driver clk_mt8183_ipu_conn_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8183-ipu_conn", .of_match_table = of_match_clk_mt8183_ipu_conn, diff --git a/drivers/clk/mediatek/clk-mt8183-mfgcfg.c b/drivers/clk/mediatek/clk-mt8183-mfgcfg.c index 730c9ae5ea12..fc23ac2b2d17 100644 --- a/drivers/clk/mediatek/clk-mt8183-mfgcfg.c +++ b/drivers/clk/mediatek/clk-mt8183-mfgcfg.c @@ -42,7 +42,7 @@ static const struct of_device_id of_match_clk_mt8183_mfg[] = { static struct platform_driver clk_mt8183_mfg_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8183-mfg", .of_match_table = of_match_clk_mt8183_mfg, diff --git a/drivers/clk/mediatek/clk-mt8183-vdec.c b/drivers/clk/mediatek/clk-mt8183-vdec.c index c294e50b96b7..9c1c325ee513 100644 --- a/drivers/clk/mediatek/clk-mt8183-vdec.c +++ b/drivers/clk/mediatek/clk-mt8183-vdec.c @@ -54,7 +54,7 @@ static const struct of_device_id of_match_clk_mt8183_vdec[] = { static struct platform_driver clk_mt8183_vdec_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8183-vdec", .of_match_table = of_match_clk_mt8183_vdec, diff --git a/drivers/clk/mediatek/clk-mt8183-venc.c b/drivers/clk/mediatek/clk-mt8183-venc.c index 0051c5d92fc5..da883ed74ea6 100644 --- a/drivers/clk/mediatek/clk-mt8183-venc.c +++ b/drivers/clk/mediatek/clk-mt8183-venc.c @@ -46,7 +46,7 @@ static const struct of_device_id of_match_clk_mt8183_venc[] = { static struct platform_driver clk_mt8183_venc_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8183-venc", .of_match_table = of_match_clk_mt8183_venc, diff --git a/drivers/clk/mediatek/clk-mt8183.c b/drivers/clk/mediatek/clk-mt8183.c index 722d913f0b4d..41581715a951 100644 --- a/drivers/clk/mediatek/clk-mt8183.c +++ b/drivers/clk/mediatek/clk-mt8183.c @@ -1254,7 +1254,7 @@ static const struct of_device_id of_match_clk_mt8183_simple[] = { static struct platform_driver clk_mt8183_simple_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8183-simple", .of_match_table = of_match_clk_mt8183_simple, diff --git a/drivers/clk/mediatek/clk-mt8186-cam.c b/drivers/clk/mediatek/clk-mt8186-cam.c index 9ec345a2ce66..7b1b9455b2c8 100644 --- a/drivers/clk/mediatek/clk-mt8186-cam.c +++ b/drivers/clk/mediatek/clk-mt8186-cam.c @@ -81,7 +81,7 @@ static const struct of_device_id of_match_clk_mt8186_cam[] = { static struct platform_driver clk_mt8186_cam_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8186-cam", .of_match_table = of_match_clk_mt8186_cam, diff --git a/drivers/clk/mediatek/clk-mt8186-img.c b/drivers/clk/mediatek/clk-mt8186-img.c index 08a625475aee..dd9ae2891556 100644 --- a/drivers/clk/mediatek/clk-mt8186-img.c +++ b/drivers/clk/mediatek/clk-mt8186-img.c @@ -59,7 +59,7 @@ static const struct of_device_id of_match_clk_mt8186_img[] = { static struct platform_driver clk_mt8186_img_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8186-img", .of_match_table = of_match_clk_mt8186_img, diff --git a/drivers/clk/mediatek/clk-mt8186-imp_iic_wrap.c b/drivers/clk/mediatek/clk-mt8186-imp_iic_wrap.c index 47f2e480a05e..d2933d69cc1c 100644 --- a/drivers/clk/mediatek/clk-mt8186-imp_iic_wrap.c +++ b/drivers/clk/mediatek/clk-mt8186-imp_iic_wrap.c @@ -58,7 +58,7 @@ static const struct of_device_id of_match_clk_mt8186_imp_iic_wrap[] = { static struct platform_driver clk_mt8186_imp_iic_wrap_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8186-imp_iic_wrap", .of_match_table = of_match_clk_mt8186_imp_iic_wrap, diff --git a/drivers/clk/mediatek/clk-mt8186-infra_ao.c b/drivers/clk/mediatek/clk-mt8186-infra_ao.c index df2a6bd1aefa..49a7fb24ac1b 100644 --- a/drivers/clk/mediatek/clk-mt8186-infra_ao.c +++ b/drivers/clk/mediatek/clk-mt8186-infra_ao.c @@ -230,7 +230,7 @@ static const struct of_device_id of_match_clk_mt8186_infra_ao[] = { static struct platform_driver clk_mt8186_infra_ao_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8186-infra-ao", .of_match_table = of_match_clk_mt8186_infra_ao, diff --git a/drivers/clk/mediatek/clk-mt8186-ipe.c b/drivers/clk/mediatek/clk-mt8186-ipe.c index 8fca148effa6..1530614c0668 100644 --- a/drivers/clk/mediatek/clk-mt8186-ipe.c +++ b/drivers/clk/mediatek/clk-mt8186-ipe.c @@ -46,7 +46,7 @@ static const struct of_device_id of_match_clk_mt8186_ipe[] = { static struct platform_driver clk_mt8186_ipe_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8186-ipe", .of_match_table = of_match_clk_mt8186_ipe, diff --git a/drivers/clk/mediatek/clk-mt8186-mdp.c b/drivers/clk/mediatek/clk-mt8186-mdp.c index 05174088ef20..32b5a69cd310 100644 --- a/drivers/clk/mediatek/clk-mt8186-mdp.c +++ b/drivers/clk/mediatek/clk-mt8186-mdp.c @@ -71,7 +71,7 @@ static const struct of_device_id of_match_clk_mt8186_mdp[] = { static struct platform_driver clk_mt8186_mdp_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8186-mdp", .of_match_table = of_match_clk_mt8186_mdp, diff --git a/drivers/clk/mediatek/clk-mt8186-mfg.c b/drivers/clk/mediatek/clk-mt8186-mfg.c index 0142d741053a..f58919bd47ac 100644 --- a/drivers/clk/mediatek/clk-mt8186-mfg.c +++ b/drivers/clk/mediatek/clk-mt8186-mfg.c @@ -40,7 +40,7 @@ static const struct of_device_id of_match_clk_mt8186_mfg[] = { static struct platform_driver clk_mt8186_mfg_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8186-mfg", .of_match_table = of_match_clk_mt8186_mfg, diff --git a/drivers/clk/mediatek/clk-mt8186-topckgen.c b/drivers/clk/mediatek/clk-mt8186-topckgen.c index c6786c8b315f..632d54bcb1b3 100644 --- a/drivers/clk/mediatek/clk-mt8186-topckgen.c +++ b/drivers/clk/mediatek/clk-mt8186-topckgen.c @@ -724,7 +724,7 @@ static const struct of_device_id of_match_clk_mt8186_topck[] = { static struct platform_driver clk_mt8186_topck_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8186-topck", .of_match_table = of_match_clk_mt8186_topck, diff --git a/drivers/clk/mediatek/clk-mt8186-vdec.c b/drivers/clk/mediatek/clk-mt8186-vdec.c index 5ad7e1ae0bac..4379fc958408 100644 --- a/drivers/clk/mediatek/clk-mt8186-vdec.c +++ b/drivers/clk/mediatek/clk-mt8186-vdec.c @@ -79,7 +79,7 @@ static const struct of_device_id of_match_clk_mt8186_vdec[] = { static struct platform_driver clk_mt8186_vdec_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8186-vdec", .of_match_table = of_match_clk_mt8186_vdec, diff --git a/drivers/clk/mediatek/clk-mt8186-venc.c b/drivers/clk/mediatek/clk-mt8186-venc.c index f5519f794c45..ec502adfadad 100644 --- a/drivers/clk/mediatek/clk-mt8186-venc.c +++ b/drivers/clk/mediatek/clk-mt8186-venc.c @@ -42,7 +42,7 @@ static const struct of_device_id of_match_clk_mt8186_venc[] = { static struct platform_driver clk_mt8186_venc_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8186-venc", .of_match_table = of_match_clk_mt8186_venc, diff --git a/drivers/clk/mediatek/clk-mt8186-wpe.c b/drivers/clk/mediatek/clk-mt8186-wpe.c index 8db3e9178a1e..23a47fcb2782 100644 --- a/drivers/clk/mediatek/clk-mt8186-wpe.c +++ b/drivers/clk/mediatek/clk-mt8186-wpe.c @@ -42,7 +42,7 @@ static const struct of_device_id of_match_clk_mt8186_wpe[] = { static struct platform_driver clk_mt8186_wpe_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8186-wpe", .of_match_table = of_match_clk_mt8186_wpe, diff --git a/drivers/clk/mediatek/clk-mt8192-aud.c b/drivers/clk/mediatek/clk-mt8192-aud.c index 29affb68e854..8b8c4057c82f 100644 --- a/drivers/clk/mediatek/clk-mt8192-aud.c +++ b/drivers/clk/mediatek/clk-mt8192-aud.c @@ -97,10 +97,10 @@ static int clk_mt8192_aud_probe(struct platform_device *pdev) return r; } -static int clk_mt8192_aud_remove(struct platform_device *pdev) +static void clk_mt8192_aud_remove(struct platform_device *pdev) { of_platform_depopulate(&pdev->dev); - return mtk_clk_simple_remove(pdev); + mtk_clk_simple_remove(pdev); } static const struct of_device_id of_match_clk_mt8192_aud[] = { @@ -110,7 +110,7 @@ static const struct of_device_id of_match_clk_mt8192_aud[] = { static struct platform_driver clk_mt8192_aud_drv = { .probe = clk_mt8192_aud_probe, - .remove = clk_mt8192_aud_remove, + .remove_new = clk_mt8192_aud_remove, .driver = { .name = "clk-mt8192-aud", .of_match_table = of_match_clk_mt8192_aud, diff --git a/drivers/clk/mediatek/clk-mt8192-cam.c b/drivers/clk/mediatek/clk-mt8192-cam.c index 90b57d46eef7..eb5052a9b149 100644 --- a/drivers/clk/mediatek/clk-mt8192-cam.c +++ b/drivers/clk/mediatek/clk-mt8192-cam.c @@ -98,7 +98,7 @@ static const struct of_device_id of_match_clk_mt8192_cam[] = { static struct platform_driver clk_mt8192_cam_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8192-cam", .of_match_table = of_match_clk_mt8192_cam, diff --git a/drivers/clk/mediatek/clk-mt8192-img.c b/drivers/clk/mediatek/clk-mt8192-img.c index da82d65a7650..de69711ad09d 100644 --- a/drivers/clk/mediatek/clk-mt8192-img.c +++ b/drivers/clk/mediatek/clk-mt8192-img.c @@ -61,7 +61,7 @@ static const struct of_device_id of_match_clk_mt8192_img[] = { static struct platform_driver clk_mt8192_img_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8192-img", .of_match_table = of_match_clk_mt8192_img, diff --git a/drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c b/drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c index ff8e20bb44bb..f9473d6c4c14 100644 --- a/drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c +++ b/drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c @@ -110,7 +110,7 @@ static const struct of_device_id of_match_clk_mt8192_imp_iic_wrap[] = { static struct platform_driver clk_mt8192_imp_iic_wrap_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8192-imp_iic_wrap", .of_match_table = of_match_clk_mt8192_imp_iic_wrap, diff --git a/drivers/clk/mediatek/clk-mt8192-ipe.c b/drivers/clk/mediatek/clk-mt8192-ipe.c index 0225abe4170a..823bdf49735e 100644 --- a/drivers/clk/mediatek/clk-mt8192-ipe.c +++ b/drivers/clk/mediatek/clk-mt8192-ipe.c @@ -48,7 +48,7 @@ static const struct of_device_id of_match_clk_mt8192_ipe[] = { static struct platform_driver clk_mt8192_ipe_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8192-ipe", .of_match_table = of_match_clk_mt8192_ipe, diff --git a/drivers/clk/mediatek/clk-mt8192-mdp.c b/drivers/clk/mediatek/clk-mt8192-mdp.c index 4675788d7816..50ee62829bd7 100644 --- a/drivers/clk/mediatek/clk-mt8192-mdp.c +++ b/drivers/clk/mediatek/clk-mt8192-mdp.c @@ -73,7 +73,7 @@ static const struct of_device_id of_match_clk_mt8192_mdp[] = { static struct platform_driver clk_mt8192_mdp_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8192-mdp", .of_match_table = of_match_clk_mt8192_mdp, diff --git a/drivers/clk/mediatek/clk-mt8192-mfg.c b/drivers/clk/mediatek/clk-mt8192-mfg.c index ec5b44ffa458..3f4274e25103 100644 --- a/drivers/clk/mediatek/clk-mt8192-mfg.c +++ b/drivers/clk/mediatek/clk-mt8192-mfg.c @@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt8192_mfg[] = { static struct platform_driver clk_mt8192_mfg_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8192-mfg", .of_match_table = of_match_clk_mt8192_mfg, diff --git a/drivers/clk/mediatek/clk-mt8192-msdc.c b/drivers/clk/mediatek/clk-mt8192-msdc.c index a72e1b73fce8..971c7259857a 100644 --- a/drivers/clk/mediatek/clk-mt8192-msdc.c +++ b/drivers/clk/mediatek/clk-mt8192-msdc.c @@ -55,7 +55,7 @@ static const struct of_device_id of_match_clk_mt8192_msdc[] = { static struct platform_driver clk_mt8192_msdc_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8192-msdc", .of_match_table = of_match_clk_mt8192_msdc, diff --git a/drivers/clk/mediatek/clk-mt8192-scp_adsp.c b/drivers/clk/mediatek/clk-mt8192-scp_adsp.c index 18a8679108b8..60cb7f64f8b5 100644 --- a/drivers/clk/mediatek/clk-mt8192-scp_adsp.c +++ b/drivers/clk/mediatek/clk-mt8192-scp_adsp.c @@ -41,7 +41,7 @@ static const struct of_device_id of_match_clk_mt8192_scp_adsp[] = { static struct platform_driver clk_mt8192_scp_adsp_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8192-scp_adsp", .of_match_table = of_match_clk_mt8192_scp_adsp, diff --git a/drivers/clk/mediatek/clk-mt8192-vdec.c b/drivers/clk/mediatek/clk-mt8192-vdec.c index e149962dbbf9..5aaf31f24483 100644 --- a/drivers/clk/mediatek/clk-mt8192-vdec.c +++ b/drivers/clk/mediatek/clk-mt8192-vdec.c @@ -85,7 +85,7 @@ static const struct of_device_id of_match_clk_mt8192_vdec[] = { static struct platform_driver clk_mt8192_vdec_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8192-vdec", .of_match_table = of_match_clk_mt8192_vdec, diff --git a/drivers/clk/mediatek/clk-mt8192-venc.c b/drivers/clk/mediatek/clk-mt8192-venc.c index 80b8bb170996..be301abad23c 100644 --- a/drivers/clk/mediatek/clk-mt8192-venc.c +++ b/drivers/clk/mediatek/clk-mt8192-venc.c @@ -44,7 +44,7 @@ static const struct of_device_id of_match_clk_mt8192_venc[] = { static struct platform_driver clk_mt8192_venc_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8192-venc", .of_match_table = of_match_clk_mt8192_venc, diff --git a/drivers/clk/mediatek/clk-mt8192.c b/drivers/clk/mediatek/clk-mt8192.c index 61299960d28a..d370bcb69be0 100644 --- a/drivers/clk/mediatek/clk-mt8192.c +++ b/drivers/clk/mediatek/clk-mt8192.c @@ -1154,7 +1154,7 @@ static const struct of_device_id of_match_clk_mt8192_simple[] = { static struct platform_driver clk_mt8192_simple_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8192-simple", .of_match_table = of_match_clk_mt8192_simple, diff --git a/drivers/clk/mediatek/clk-mt8195-cam.c b/drivers/clk/mediatek/clk-mt8195-cam.c index e4d00fe6e757..a105e0ca6c12 100644 --- a/drivers/clk/mediatek/clk-mt8195-cam.c +++ b/drivers/clk/mediatek/clk-mt8195-cam.c @@ -134,7 +134,7 @@ static const struct of_device_id of_match_clk_mt8195_cam[] = { static struct platform_driver clk_mt8195_cam_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8195-cam", .of_match_table = of_match_clk_mt8195_cam, diff --git a/drivers/clk/mediatek/clk-mt8195-ccu.c b/drivers/clk/mediatek/clk-mt8195-ccu.c index 4e326b6301ba..b378e1d89bde 100644 --- a/drivers/clk/mediatek/clk-mt8195-ccu.c +++ b/drivers/clk/mediatek/clk-mt8195-ccu.c @@ -42,7 +42,7 @@ static const struct of_device_id of_match_clk_mt8195_ccu[] = { static struct platform_driver clk_mt8195_ccu_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8195-ccu", .of_match_table = of_match_clk_mt8195_ccu, diff --git a/drivers/clk/mediatek/clk-mt8195-img.c b/drivers/clk/mediatek/clk-mt8195-img.c index 12f5c436d075..f09719a4275b 100644 --- a/drivers/clk/mediatek/clk-mt8195-img.c +++ b/drivers/clk/mediatek/clk-mt8195-img.c @@ -88,7 +88,7 @@ static const struct of_device_id of_match_clk_mt8195_img[] = { static struct platform_driver clk_mt8195_img_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8195-img", .of_match_table = of_match_clk_mt8195_img, diff --git a/drivers/clk/mediatek/clk-mt8195-imp_iic_wrap.c b/drivers/clk/mediatek/clk-mt8195-imp_iic_wrap.c index fbc809d05072..e1f86d7d1495 100644 --- a/drivers/clk/mediatek/clk-mt8195-imp_iic_wrap.c +++ b/drivers/clk/mediatek/clk-mt8195-imp_iic_wrap.c @@ -58,7 +58,7 @@ static const struct of_device_id of_match_clk_mt8195_imp_iic_wrap[] = { static struct platform_driver clk_mt8195_imp_iic_wrap_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8195-imp_iic_wrap", .of_match_table = of_match_clk_mt8195_imp_iic_wrap, diff --git a/drivers/clk/mediatek/clk-mt8195-infra_ao.c b/drivers/clk/mediatek/clk-mt8195-infra_ao.c index fcd410461d3b..e62e8f5f446a 100644 --- a/drivers/clk/mediatek/clk-mt8195-infra_ao.c +++ b/drivers/clk/mediatek/clk-mt8195-infra_ao.c @@ -232,7 +232,7 @@ static const struct of_device_id of_match_clk_mt8195_infra_ao[] = { static struct platform_driver clk_mt8195_infra_ao_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8195-infra_ao", .of_match_table = of_match_clk_mt8195_infra_ao, diff --git a/drivers/clk/mediatek/clk-mt8195-ipe.c b/drivers/clk/mediatek/clk-mt8195-ipe.c index b0d745cf7752..13a81353438c 100644 --- a/drivers/clk/mediatek/clk-mt8195-ipe.c +++ b/drivers/clk/mediatek/clk-mt8195-ipe.c @@ -43,7 +43,7 @@ static const struct of_device_id of_match_clk_mt8195_ipe[] = { static struct platform_driver clk_mt8195_ipe_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8195-ipe", .of_match_table = of_match_clk_mt8195_ipe, diff --git a/drivers/clk/mediatek/clk-mt8195-mfg.c b/drivers/clk/mediatek/clk-mt8195-mfg.c index c94cb71bd9b9..4a696e86083a 100644 --- a/drivers/clk/mediatek/clk-mt8195-mfg.c +++ b/drivers/clk/mediatek/clk-mt8195-mfg.c @@ -41,7 +41,7 @@ static const struct of_device_id of_match_clk_mt8195_mfg[] = { static struct platform_driver clk_mt8195_mfg_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8195-mfg", .of_match_table = of_match_clk_mt8195_mfg, diff --git a/drivers/clk/mediatek/clk-mt8195-peri_ao.c b/drivers/clk/mediatek/clk-mt8195-peri_ao.c index 2f6b3bb657db..140d0fad8342 100644 --- a/drivers/clk/mediatek/clk-mt8195-peri_ao.c +++ b/drivers/clk/mediatek/clk-mt8195-peri_ao.c @@ -54,7 +54,7 @@ static const struct of_device_id of_match_clk_mt8195_peri_ao[] = { static struct platform_driver clk_mt8195_peri_ao_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8195-peri_ao", .of_match_table = of_match_clk_mt8195_peri_ao, diff --git a/drivers/clk/mediatek/clk-mt8195-scp_adsp.c b/drivers/clk/mediatek/clk-mt8195-scp_adsp.c index e16c383f631b..dfd9e159150a 100644 --- a/drivers/clk/mediatek/clk-mt8195-scp_adsp.c +++ b/drivers/clk/mediatek/clk-mt8195-scp_adsp.c @@ -39,7 +39,7 @@ static const struct of_device_id of_match_clk_mt8195_scp_adsp[] = { static struct platform_driver clk_mt8195_scp_adsp_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8195-scp_adsp", .of_match_table = of_match_clk_mt8195_scp_adsp, diff --git a/drivers/clk/mediatek/clk-mt8195-vdec.c b/drivers/clk/mediatek/clk-mt8195-vdec.c index a1446b666385..224c479f5cf9 100644 --- a/drivers/clk/mediatek/clk-mt8195-vdec.c +++ b/drivers/clk/mediatek/clk-mt8195-vdec.c @@ -96,7 +96,7 @@ static const struct of_device_id of_match_clk_mt8195_vdec[] = { static struct platform_driver clk_mt8195_vdec_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8195-vdec", .of_match_table = of_match_clk_mt8195_vdec, diff --git a/drivers/clk/mediatek/clk-mt8195-venc.c b/drivers/clk/mediatek/clk-mt8195-venc.c index 622f57804f96..d489e419ad87 100644 --- a/drivers/clk/mediatek/clk-mt8195-venc.c +++ b/drivers/clk/mediatek/clk-mt8195-venc.c @@ -61,7 +61,7 @@ static const struct of_device_id of_match_clk_mt8195_venc[] = { static struct platform_driver clk_mt8195_venc_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8195-venc", .of_match_table = of_match_clk_mt8195_venc, diff --git a/drivers/clk/mediatek/clk-mt8195-wpe.c b/drivers/clk/mediatek/clk-mt8195-wpe.c index b483fab10e18..ec4efe542566 100644 --- a/drivers/clk/mediatek/clk-mt8195-wpe.c +++ b/drivers/clk/mediatek/clk-mt8195-wpe.c @@ -135,7 +135,7 @@ static const struct of_device_id of_match_clk_mt8195_wpe[] = { static struct platform_driver clk_mt8195_wpe_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8195-wpe", .of_match_table = of_match_clk_mt8195_wpe, diff --git a/drivers/clk/mediatek/clk-mt8365-apu.c b/drivers/clk/mediatek/clk-mt8365-apu.c index 91ffe89d9721..dd785668c241 100644 --- a/drivers/clk/mediatek/clk-mt8365-apu.c +++ b/drivers/clk/mediatek/clk-mt8365-apu.c @@ -45,7 +45,7 @@ static const struct of_device_id of_match_clk_mt8365_apu[] = { static struct platform_driver clk_mt8365_apu_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8365-apu", .of_match_table = of_match_clk_mt8365_apu, diff --git a/drivers/clk/mediatek/clk-mt8365-cam.c b/drivers/clk/mediatek/clk-mt8365-cam.c index 31d5b5cd6de1..3757ef43bbf0 100644 --- a/drivers/clk/mediatek/clk-mt8365-cam.c +++ b/drivers/clk/mediatek/clk-mt8365-cam.c @@ -47,7 +47,7 @@ static const struct of_device_id of_match_clk_mt8365_cam[] = { static struct platform_driver clk_mt8365_cam_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8365-cam", .of_match_table = of_match_clk_mt8365_cam, diff --git a/drivers/clk/mediatek/clk-mt8365-mfg.c b/drivers/clk/mediatek/clk-mt8365-mfg.c index 587b49128b03..a63e289ddfa6 100644 --- a/drivers/clk/mediatek/clk-mt8365-mfg.c +++ b/drivers/clk/mediatek/clk-mt8365-mfg.c @@ -53,7 +53,7 @@ static const struct of_device_id of_match_clk_mt8365_mfg[] = { static struct platform_driver clk_mt8365_mfg_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8365-mfg", .of_match_table = of_match_clk_mt8365_mfg, diff --git a/drivers/clk/mediatek/clk-mt8365-vdec.c b/drivers/clk/mediatek/clk-mt8365-vdec.c index cdc678e8941c..780c4c6887c7 100644 --- a/drivers/clk/mediatek/clk-mt8365-vdec.c +++ b/drivers/clk/mediatek/clk-mt8365-vdec.c @@ -53,7 +53,7 @@ static const struct of_device_id of_match_clk_mt8365_vdec[] = { static struct platform_driver clk_mt8365_vdec_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8365-vdec", .of_match_table = of_match_clk_mt8365_vdec, diff --git a/drivers/clk/mediatek/clk-mt8365-venc.c b/drivers/clk/mediatek/clk-mt8365-venc.c index 0e080c22119d..5bc81f5468c1 100644 --- a/drivers/clk/mediatek/clk-mt8365-venc.c +++ b/drivers/clk/mediatek/clk-mt8365-venc.c @@ -42,7 +42,7 @@ static const struct of_device_id of_match_clk_mt8365_venc[] = { static struct platform_driver clk_mt8365_venc_drv = { .probe = mtk_clk_simple_probe, - .remove = mtk_clk_simple_remove, + .remove_new = mtk_clk_simple_remove, .driver = { .name = "clk-mt8365-venc", .of_match_table = of_match_clk_mt8365_venc, diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c index 14e8b64a32a3..388bd0843930 100644 --- a/drivers/clk/mediatek/clk-mtk.c +++ b/drivers/clk/mediatek/clk-mtk.c @@ -584,7 +584,7 @@ int mtk_clk_simple_probe(struct platform_device *pdev) } EXPORT_SYMBOL_GPL(mtk_clk_simple_probe); -int mtk_clk_simple_remove(struct platform_device *pdev) +void mtk_clk_simple_remove(struct platform_device *pdev) { const struct mtk_clk_desc *mcd = of_device_get_match_data(&pdev->dev); struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); @@ -606,8 +606,6 @@ int mtk_clk_simple_remove(struct platform_device *pdev) mtk_clk_unregister_fixed_clks(mcd->fixed_clks, mcd->num_fixed_clks, clk_data); mtk_free_clk_data(clk_data); - - return 0; } EXPORT_SYMBOL_GPL(mtk_clk_simple_remove); diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h index 41f4fa3b0c21..3c14dc1030e1 100644 --- a/drivers/clk/mediatek/clk-mtk.h +++ b/drivers/clk/mediatek/clk-mtk.h @@ -237,6 +237,6 @@ struct mtk_clk_desc { }; int mtk_clk_simple_probe(struct platform_device *pdev); -int mtk_clk_simple_remove(struct platform_device *pdev); +void mtk_clk_simple_remove(struct platform_device *pdev); #endif /* __DRV_CLK_MTK_H */ From patchwork Sun Mar 12 16:14:44 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: 68405 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp799422wrd; Sun, 12 Mar 2023 10:03:24 -0700 (PDT) X-Google-Smtp-Source: AK7set8YO0FTd+YnWOlxZVO7XDICJqfZiAVGyKyPMRKwcnWyhyaVKiCNQ2c4BZDuArcq+306jUjC X-Received: by 2002:a05:6a20:8b21:b0:c7:20d8:dc1e with SMTP id l33-20020a056a208b2100b000c720d8dc1emr26960272pzh.27.1678640604322; Sun, 12 Mar 2023 10:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640604; cv=none; d=google.com; s=arc-20160816; b=W/9JSBarHL47RtSUkJUEmLgr4JfCXhGDKiyk6zTmLtQx6oJRa8mzucJ23biA/qVNfX D84CPgjXk+CE3s8wZvXqHyL+FFwB73BrLR+KhwgpgxUGQXtDr4pAgNs4dhkG2ANC0QmT mWaaorrNkwySXCTZLg2feqU8UVWg9tNDPulVfIHfvmn+5y+yZSvHgktqVYa/uGzA71JG TzW3FXxo4HorYueaWIGAKDyxQhbEbm20Mq4I4o0VwQpppB13MJ0JkLouq94rTB8Oq3rl FcgMTZTJr+i0JeaYxA3206LUj3Xc1YGLLPOM1iIeVQxOcyTGj8Dk65fMj8OjJJ9FnxhS DJug== 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=zeL3fW23k7RNtQ2iTanmP5lU20h1taCzjerlzotOK0Y=; b=XLtwn0vKnmfKTN02E4X4FASXxoKdvjRBlSulU8+C2tanxY5r5nvbpjLyX3fA5Zhndt U0fRe7G04VRiuDsE9BzVhnsS7xNHsqP2Bu53nDL4E2czxNqZbqMUwq23LFZydgFY0Byb BY96XLNIGXakVgd3alr03JOFFkqqpf302EWCSLpJBAUx2L11uCsVMm8UJO/W71XloREQ nnzRGfYkhUC6kTv7bB656CUnyZgBNwyEKJ4a/WQG1b5Y96dkgUzT0y6utA9lickqPGFk T5+a6ocSDVlBkO7Kt34cwNFona1GBjwlvjUW9oOvMTLCYqRq+gWE6OKhoCGYXhomMs+U 8yhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q25-20020a637519000000b004fbfeed0848si4474844pgc.798.2023.03.12.10.03.10; Sun, 12 Mar 2023 10:03:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230262AbjCLQQa (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230146AbjCLQPd (ORCPT ); Sun, 12 Mar 2023 12:15:33 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE94536FE6 for ; Sun, 12 Mar 2023 09:15:31 -0700 (PDT) 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 1pbOLw-0007nk-Ja; Sun, 12 Mar 2023 17:15:20 +0100 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 1pbOLv-003f1W-CW; Sun, 12 Mar 2023 17:15:19 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLu-004K88-HS; Sun, 12 Mar 2023 17:15:18 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Peter De Schrijver , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Thierry Reding , Jonathan Hunter Cc: linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/30] clk: tegra: Don't warn three times about failure to unregister Date: Sun, 12 Mar 2023 17:14:44 +0100 Message-Id: <20230312161512.2715500-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2287; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=+9AIxbdgygHscbuQBZ/9x7Mj2mdYT5CkFcqptrNLIzs=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfoZt+vEgQUzkC6DfJiC5nFmGIwE1dZDTropc hsVPMpXKMiJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36GQAKCRDB/BR4rcrs CdPQB/9x+RX5qdpP5p75qTQmrWsuZtOUtTbvdCLf6ap0jZk0ajXM6AZAQG6gldT5Dezfdk4nBEH nGaudn6KTmmM5kKwAVzSU9bMMGVViK7U/Ik1BX7d1S+UFXjYZ7DGhrbumaB53BLoNyvq0IrInHH mQFZaJ/aCe/2AelK7D18mVR0W3MtbZPtj6tAJ0GSvIWOtlxSyhx0E0UGpDL2EpAoCBYsGWw4rvT qGcQAaCpIB6ghHcsuSizmiCZXlJARky4QiZo+q9i0p8ujwSHwS2fb1qyBUIczJ04rQQJtq6pdRZ TzmvAMFpB+rrAhMgNatHs12yLJ3EaW/R1dDHKkX7RH5sUH6u 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760182250168353310?= X-GMAIL-MSGID: =?utf-8?q?1760182250168353310?= tegra124_dfll_fcpu_remove() calls tegra_dfll_unregister() and the former emits an error message if the latter fails. In that case tegra_dfll_unregister() already printed an error message. Additionally tegra124_dfll_fcpu_remove() returns an error code which results in yet another warning emitted by platform_remove(). So drop the error message from tegra124_dfll_fcpu_remove() and let it return 0. (Retuning 0 has no side effect but suppressing the error message in platform_remove().) Also add two comments about exiting early being wrong. This is something that needs fixing separately. Signed-off-by: Uwe Kleine-König --- drivers/clk/tegra/clk-dfll.c | 5 ++++- drivers/clk/tegra/clk-tegra124-dfll-fcpu.c | 11 ++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c index 41433927b55c..58fa5a59e0c7 100644 --- a/drivers/clk/tegra/clk-dfll.c +++ b/drivers/clk/tegra/clk-dfll.c @@ -2081,7 +2081,10 @@ struct tegra_dfll_soc_data *tegra_dfll_unregister(struct platform_device *pdev) { struct tegra_dfll *td = platform_get_drvdata(pdev); - /* Try to prevent removal while the DFLL is active */ + /* + * Note that exiting early here doesn't prevent unbinding the driver. + * Exiting early here only leaks some resources. + */ if (td->mode != DFLL_DISABLED) { dev_err(&pdev->dev, "must disable DFLL before removing driver\n"); diff --git a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c index 5e339ad0a97c..15c5e14dd82f 100644 --- a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c +++ b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c @@ -616,12 +616,13 @@ static int tegra124_dfll_fcpu_remove(struct platform_device *pdev) { struct tegra_dfll_soc_data *soc; + /* + * Note that exiting early here is dangerous as after this function + * returns *soc is freed. + */ soc = tegra_dfll_unregister(pdev); - if (IS_ERR(soc)) { - dev_err(&pdev->dev, "failed to unregister DFLL: %ld\n", - PTR_ERR(soc)); - return PTR_ERR(soc); - } + if (IS_ERR(soc)) + return 0; tegra_cvb_remove_opp_table(soc->dev, soc->cvb, soc->max_freq); From patchwork Sun Mar 12 16:14:45 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: 68402 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp798994wrd; Sun, 12 Mar 2023 10:02:33 -0700 (PDT) X-Google-Smtp-Source: AK7set9hYLMDOS37IC3DUc/rGCaQjdtnd9QCty8y+wGlVdK9oD0YwKeD1i5em8k8K7H7w/2ihv3u X-Received: by 2002:a05:6a20:7f8c:b0:d0:360c:eaa9 with SMTP id d12-20020a056a207f8c00b000d0360ceaa9mr25531400pzj.62.1678640553336; Sun, 12 Mar 2023 10:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640553; cv=none; d=google.com; s=arc-20160816; b=V83i8TXUtqYXeydSYQCr1QOLnt6uW+e1BtFdMLPXd6LayD63LpM83/4RdTrbkkjHcn UgFF5OILun2CWORNZYJ6WQeUbK5FuvyQECEho5YalYRrhcGig8zYm8NQulMEDhe9Wb2V OsPiaeDCqJGZXI7b1wLxoIBUBEIw2VSOziGDmZ5Z7Z2TtoOtP2UvqixD9iuFnvpf0hHY Vl9smp8A/tfp6ZBfsKSM9Ge3yg2ml2JGP6j0sLjO+GzJz00oASVB7efRtgI9fFjVCVqG vCFlQ9R2brdoIxyjgGzztpvC5ykEvK/7+syzPd7ZS58ur7Ejyqj+TWOk6d73O/lRGwCU K3Qw== 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=jaoAeR4ZesgPullzHDsFT+Gsno+N9yQZiypT9/sW+0s=; b=Qa7y50WUdxZA9GXQGFFWcay9kdTtiUaMYrzVewJj5YJg2CXKnjcmkiekB/poCjLgMY gL6InVx7MDM1+gpqs0A3T7oeA2cnBTfXa52Vl1ILT7MsIKkZtPp0HTfICEkIN2De/3W6 OjjXb6lpyBx8rM3UkSSUJJicSfTsQR6/82Ns+GOg687kq+8AlJh0aRDe/PL475g5T/lS IMWDtSmFwevGFS1Di6LeCHHlNyrd9bL25fgAJcZBgamPV2faKrIm1aRhW1iPjvVs0faE h1jIkbBYIJhd5q8CuTgz76WlfIW2Lt+YK+88orYZt5mmRdLXp/BgudnNun5ZUxCAuTvj xZPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i14-20020a63e90e000000b00502d7cd012csi4570157pgh.378.2023.03.12.10.02.20; Sun, 12 Mar 2023 10:02:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230341AbjCLQQF (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbjCLQP2 (ORCPT ); Sun, 12 Mar 2023 12:15:28 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E38134C05 for ; Sun, 12 Mar 2023 09:15:27 -0700 (PDT) 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 1pbOLw-0007ns-M1; Sun, 12 Mar 2023 17:15:20 +0100 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 1pbOLw-003f1i-13; Sun, 12 Mar 2023 17:15:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLu-004K8B-Nd; Sun, 12 Mar 2023 17:15:18 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd , Michal Simek Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/30] clk: xilinx: Drop if block with always false condition Date: Sun, 12 Mar 2023 17:14:45 +0100 Message-Id: <20230312161512.2715500-4-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=932; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=2l2y8Hwodd04VIsYFpyJCISjEEwoZDOvzxOqN6nZXvo=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfod91tRBqw4DTMu5AWaEo9bEyJsVu3RB1JsZ RWLXfZAPzqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36HQAKCRDB/BR4rcrs CYLQB/kBUyFOTio3WkuzOw5MVnPnA08KyRaoE2EbydF8Q8XsArHNbkcU3FJ5xcKZrp6Zzp5GEWX mQfdDhOSXU0ZZTqxHdyVTxnuGbylhwOzJ/AEdxk61lIv24FRljrXwxuagRKBDYflJ4bcWMrJQ7+ tNjWDsO/yeGt5ocCPxd0ooStsRxYsp5vkEH7u8kYHivIcjoB62r7xnBb0QhgblXy8Z0jErrNM6D RayhTythzWRkOXOT3Df75a/qJOSp8Wwrds9XHFeaxeFnxx42MUoISeaMO3jD5yMxMPPLfp9L1+0 iTLKlXFHqZx1/iUjGMhh+bapytf0MENIF530tsPU0uFPZr1Q 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760182196584305591?= X-GMAIL-MSGID: =?utf-8?q?1760182196584305591?= xvcu_remove() is only called for a device after after xvcu_probe() completed successfully. In that case dev_set_drvdata() was called for that device with a non-NULL parameter, so platform_get_drvdata() won't return NULL and the if condition is never true. Drop the if, preparing a conversion to make platform driver's remove callback return void. Signed-off-by: Uwe Kleine-König --- drivers/clk/xilinx/xlnx_vcu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/clk/xilinx/xlnx_vcu.c b/drivers/clk/xilinx/xlnx_vcu.c index d66b1315114e..54b44debfd3e 100644 --- a/drivers/clk/xilinx/xlnx_vcu.c +++ b/drivers/clk/xilinx/xlnx_vcu.c @@ -707,8 +707,6 @@ static int xvcu_remove(struct platform_device *pdev) struct xvcu_device *xvcu; xvcu = platform_get_drvdata(pdev); - if (!xvcu) - return -ENODEV; xvcu_unregister_clock_provider(xvcu); From patchwork Sun Mar 12 16:14:46 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: 68398 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp797449wrd; Sun, 12 Mar 2023 09:59:21 -0700 (PDT) X-Google-Smtp-Source: AK7set//8p6/YN0fczhk0ASpskRH0ddL4gdMJyIEgAXdLMv7GUyxJZfA6QQTnC9OfDhvzvsUB1pb X-Received: by 2002:a17:902:d4c9:b0:19d:90f:6c30 with SMTP id o9-20020a170902d4c900b0019d090f6c30mr34814810plg.49.1678640360955; Sun, 12 Mar 2023 09:59:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640360; cv=none; d=google.com; s=arc-20160816; b=NoN0vCgNtcefzgSmicsTrIx3fAHljSjZ0XszOKNVwzBc5FVrU75SOfmN079BMHDpV0 d/G/Rzi9qFBlZ1IVIuplBJXcM1rp6oF8HSW5mhyFO5cQmykMqXVUUjuC/Uo4XpdVKoU0 MkPihh8OBl6ff5A6eWeolr4ACDijxcL+RN/wLLCc4JCT3vufI0X5kwdfD4VlHnE48oC1 XIwJZT9JHWPaymH1M6CsvNgblJ+BYPAwyTS/s0D3B85bf6cKXFOZgPNd3MTlhe0BD0+J NeuauPBzNvAHahgNaA8d7p3eihJtITSfgLInry+OE1Xg0idyADcYhHtsxdNTBxQJlLFK 8L4g== 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=qst7S2qIYLrFDPixJ0dF3U+w1chsgAIK+x5M0OxHO4g=; b=kDy/9qDdJjj1RO+FjB5fKGOtXjvT8u0HlVKUtxh5Qt+X/j5ur9Ds6xY8Uq8nD6K7g/ wV7rzofuOqj+XqkNsXpUXgf5ZVCgt9IsErNNYeMgeAYiHsGNQSY4wga3+u3liizUvpHK J9jZTf5RmzE1ant7V+tFvBITfoVcA1txLYNRB6/6+GrFU6Lw66DEM5yZpj6wGLoG2Mdh IXGRFCbDcUsn63KY8Iv/MXmtVGpN1HxRuNyi9fKWimRGsxMHF4A3TB1pjALKX+8wIt4R YvKs2inUjBa/5DQ0TQQt66/IlXDUpcPvb8sYC/kYEqA5YIG4X/T8IH+USPt8J4KtCdC8 iVwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4-20020a170903230400b0019e9849174fsi4821443plh.547.2023.03.12.09.59.09; Sun, 12 Mar 2023 09:59:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230261AbjCLQPy (ORCPT + 99 others); Sun, 12 Mar 2023 12:15:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230101AbjCLQP2 (ORCPT ); Sun, 12 Mar 2023 12:15:28 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30A8E34F6E for ; Sun, 12 Mar 2023 09:15:27 -0700 (PDT) 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 1pbOLw-0007nq-TQ; Sun, 12 Mar 2023 17:15:20 +0100 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 1pbOLv-003f1f-VK; Sun, 12 Mar 2023 17:15:19 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLv-004K8F-0R; Sun, 12 Mar 2023 17:15:19 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Eugeniy Paltsev , Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/30] clk: axs10x: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:46 +0100 Message-Id: <20230312161512.2715500-5-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2548; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=2+AKW+R5wH4GK/jKdVXZCGQtxTtTB3ZfwzT0vCy4l2Y=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfohCZeQbQcyatfA51UEI5TxekIaUWA95adcy p2NyIHnOz2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36IQAKCRDB/BR4rcrs CY/mB/0WQIPWqZ53K/EQqG+hwp2fYUlyTZEsHehWIeMopqBKPAPHnhiYAwcqjGohu2VzZ12XoUD 4omlGnxcU2kvZWKcPSX5oXuj3iyfxtUykePqa4Lpam8EbDNPz82AKj+sx2HnQYGeAH+NOW4bmT2 2u/SZWzo8zh1efVFFsqOBQnHlvjmhr2ATVI5/klRxPXvjdf19/UhgIobUuVpUFiM179njMmthkV t+SD0EoKqLVvVpUit3AcDC/Zp/6zIZ2KB6O6+ZZIjwasunMTa5Vu8wksds4CcUDrs/9jbNvhLfy mJGgXfG3jH0bXg0lhfuFLy+AoDmFA6inhNmNPt8w5aYl76X7 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760181994863640974?= X-GMAIL-MSGID: =?utf-8?q?1760181994863640974?= 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 (mostly) ignored 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. 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/clk/axs10x/i2s_pll_clock.c | 5 ++--- drivers/clk/axs10x/pll_clock.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/clk/axs10x/i2s_pll_clock.c b/drivers/clk/axs10x/i2s_pll_clock.c index e1fda6ad5cd5..2334e6c334cf 100644 --- a/drivers/clk/axs10x/i2s_pll_clock.c +++ b/drivers/clk/axs10x/i2s_pll_clock.c @@ -198,10 +198,9 @@ static int i2s_pll_clk_probe(struct platform_device *pdev) return of_clk_add_provider(node, of_clk_src_simple_get, clk); } -static int i2s_pll_clk_remove(struct platform_device *pdev) +static void i2s_pll_clk_remove(struct platform_device *pdev) { of_clk_del_provider(pdev->dev.of_node); - return 0; } static const struct of_device_id i2s_pll_clk_id[] = { @@ -216,7 +215,7 @@ static struct platform_driver i2s_pll_clk_driver = { .of_match_table = i2s_pll_clk_id, }, .probe = i2s_pll_clk_probe, - .remove = i2s_pll_clk_remove, + .remove_new = i2s_pll_clk_remove, }; module_platform_driver(i2s_pll_clk_driver); diff --git a/drivers/clk/axs10x/pll_clock.c b/drivers/clk/axs10x/pll_clock.c index 90fb0e6ff573..dbbfa12e530d 100644 --- a/drivers/clk/axs10x/pll_clock.c +++ b/drivers/clk/axs10x/pll_clock.c @@ -257,10 +257,9 @@ static int axs10x_pll_clk_probe(struct platform_device *pdev) &pll_clk->hw); } -static int axs10x_pll_clk_remove(struct platform_device *pdev) +static void axs10x_pll_clk_remove(struct platform_device *pdev) { of_clk_del_provider(pdev->dev.of_node); - return 0; } static void __init of_axs10x_pll_clk_setup(struct device_node *node) @@ -332,7 +331,7 @@ static struct platform_driver axs10x_pll_clk_driver = { .of_match_table = axs10x_pll_clk_id, }, .probe = axs10x_pll_clk_probe, - .remove = axs10x_pll_clk_remove, + .remove_new = axs10x_pll_clk_remove, }; builtin_platform_driver(axs10x_pll_clk_driver); From patchwork Sun Mar 12 16:14:47 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: 68392 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp795629wrd; Sun, 12 Mar 2023 09:53:19 -0700 (PDT) X-Google-Smtp-Source: AK7set+D/dkVBNLuBqVoKUMiXrRtIDDTw1VfnXtIBhJ/VgFVwkWVXDpBob0JhTrYzxCVsVBpxXQW X-Received: by 2002:a17:902:c951:b0:19e:9807:de48 with SMTP id i17-20020a170902c95100b0019e9807de48mr35434477pla.23.1678639998996; Sun, 12 Mar 2023 09:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678639998; cv=none; d=google.com; s=arc-20160816; b=l+VbQ0C0qvSyHkpnwDSvwElB5xNEDTXBJw7viMBPfNEd4wpgcnkAk3zC+O1nRaQl/C +A/oGGjNkq7Smqt7MGYSCiaw4ef78O+YKKYhgqadtbeJthr9FJOxREszjyV8QB/lMeli xPJrrr0ih7TGDXYFK06JDSWBGV7LeHOvwjK8ggW9xIy3nSatQA4G3cUkzL/pgs8drMlC v9r3dtw3ol/Wjwos3X87m6pMzymS0qtQrbKBppxO2myIHs6bToIb6tO9fnpP/8uvxelU ICjvDC4Hzwb2zNASyu0nJCTEJ2l5s+UZRMfsK+DJsM3lmttmTBc4T9GCnZzJZ+fm6qSJ 2m9Q== 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=+ha1UjluEHJXaR6uF6AA7/n94YKGxLy0KQKq0hCBT+c=; b=CzUjS923IHR+FhrV64tiFVI+BYn/P33aT+Rnm7DreSkRaopM0Wyrv5GeqBW00Cmfuo KeD/BA1ksITuD+AgkQG/zWy6tDeh9f/q3V36G91PnYaVhlmph0EhmaLvpMOnvoORKq4e sv+a0pzkk2HHaLhZutMQxgW9XdX2VTYK2QwVdXzsomBb9A98DEj+REZoMaUax9PQpZTh a5YKQBMlV4P7bSlX6eICAkJU+tYQ9pWrTA2681clXLx/aLGNBRyr3dKA5GhG3B5nKBHY tv92Xdp7+jXTsFs5eGJTKOj1Y8YPE1ghxwWc0Vg3MpgiYJLOjMUplhSqRkCA065XDu6N vnhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kq8-20020a170903284800b0019cd14bee15si4667485plb.226.2023.03.12.09.53.04; Sun, 12 Mar 2023 09:53:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230370AbjCLQQY (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjCLQPc (ORCPT ); Sun, 12 Mar 2023 12:15:32 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE25236448 for ; Sun, 12 Mar 2023 09:15:30 -0700 (PDT) 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 1pbOLx-0007nu-KB; Sun, 12 Mar 2023 17:15:21 +0100 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 1pbOLw-003f1n-3R; Sun, 12 Mar 2023 17:15:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLv-004K8I-6o; Sun, 12 Mar 2023 17:15:19 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd , Florian Fainelli Cc: Broadcom internal kernel review list , linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/30] clk: bcm: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:47 +0100 Message-Id: <20230312161512.2715500-6-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3859; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=IanNNGBHrcCJAmWf5mu1sRbucThqze61zMSvuzhO+qA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfolS68+JWJsutAg1Dv7pxwQwnL0jcsu/Rm04 J5EwBXLLl6JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36JQAKCRDB/BR4rcrs CSd1B/48w5+aiFjQRF5oReqowqPNI0mVBhXVuagj7eeGlaCXssUqUR9O72JSSo9M5NUJhnk7J0X aWFT4r8hyfXDjK8yzhCL77VqKK61akJEgQ8+qGINvBaHjaZ2kGjRhVAeQ4vKBrM7gWtMmitUt5m FlIGr5Jk4VHkGT9v9iaw8v1Nh0tR/Iz26z9LdIrBa5YNMb7Evf/95vH/+jzC6ijjzPdzMyiVjUQ BOXJdJttA381KWDF+4Tr4FW347AnNeBX2CAefe7T21KjPcagSb2iJZV9pRkDaMNsQjXp2XTtFy1 MbTvxyavrKFKwk0+xBj3JIRVzm31Yh+SDj08vadA4zdwKZSF 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760181615884107450?= X-GMAIL-MSGID: =?utf-8?q?1760181615884107450?= 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Florian Fainelli --- drivers/clk/bcm/clk-bcm2711-dvp.c | 6 ++---- drivers/clk/bcm/clk-bcm63xx-gate.c | 6 ++---- drivers/clk/bcm/clk-raspberrypi.c | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2711-dvp.c b/drivers/clk/bcm/clk-bcm2711-dvp.c index e63a42618ac2..e4fbbf3c40fe 100644 --- a/drivers/clk/bcm/clk-bcm2711-dvp.c +++ b/drivers/clk/bcm/clk-bcm2711-dvp.c @@ -92,15 +92,13 @@ static int clk_dvp_probe(struct platform_device *pdev) return ret; }; -static int clk_dvp_remove(struct platform_device *pdev) +static void clk_dvp_remove(struct platform_device *pdev) { struct clk_dvp *dvp = platform_get_drvdata(pdev); struct clk_hw_onecell_data *data = dvp->data; clk_hw_unregister_gate(data->hws[1]); clk_hw_unregister_gate(data->hws[0]); - - return 0; } static const struct of_device_id clk_dvp_dt_ids[] = { @@ -111,7 +109,7 @@ MODULE_DEVICE_TABLE(of, clk_dvp_dt_ids); static struct platform_driver clk_dvp_driver = { .probe = clk_dvp_probe, - .remove = clk_dvp_remove, + .remove_new = clk_dvp_remove, .driver = { .name = "brcm2711-dvp", .of_match_table = clk_dvp_dt_ids, diff --git a/drivers/clk/bcm/clk-bcm63xx-gate.c b/drivers/clk/bcm/clk-bcm63xx-gate.c index 89297c57881e..0769f98767da 100644 --- a/drivers/clk/bcm/clk-bcm63xx-gate.c +++ b/drivers/clk/bcm/clk-bcm63xx-gate.c @@ -541,7 +541,7 @@ static int clk_bcm63xx_probe(struct platform_device *pdev) return ret; } -static int clk_bcm63xx_remove(struct platform_device *pdev) +static void clk_bcm63xx_remove(struct platform_device *pdev) { struct clk_bcm63xx_hw *hw = platform_get_drvdata(pdev); int i; @@ -552,8 +552,6 @@ static int clk_bcm63xx_remove(struct platform_device *pdev) if (!IS_ERR(hw->data.hws[i])) clk_hw_unregister_gate(hw->data.hws[i]); } - - return 0; } static const struct of_device_id clk_bcm63xx_dt_ids[] = { @@ -570,7 +568,7 @@ static const struct of_device_id clk_bcm63xx_dt_ids[] = { static struct platform_driver clk_bcm63xx = { .probe = clk_bcm63xx_probe, - .remove = clk_bcm63xx_remove, + .remove_new = clk_bcm63xx_remove, .driver = { .name = "bcm63xx-clock", .of_match_table = clk_bcm63xx_dt_ids, diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c index ce2f93479736..eb399a4d141b 100644 --- a/drivers/clk/bcm/clk-raspberrypi.c +++ b/drivers/clk/bcm/clk-raspberrypi.c @@ -439,13 +439,11 @@ static int raspberrypi_clk_probe(struct platform_device *pdev) return 0; } -static int raspberrypi_clk_remove(struct platform_device *pdev) +static void raspberrypi_clk_remove(struct platform_device *pdev) { struct raspberrypi_clk *rpi = platform_get_drvdata(pdev); platform_device_unregister(rpi->cpufreq); - - return 0; } static const struct of_device_id raspberrypi_clk_match[] = { @@ -460,7 +458,7 @@ static struct platform_driver raspberrypi_clk_driver = { .of_match_table = raspberrypi_clk_match, }, .probe = raspberrypi_clk_probe, - .remove = raspberrypi_clk_remove, + .remove_new = raspberrypi_clk_remove, }; module_platform_driver(raspberrypi_clk_driver); From patchwork Sun Mar 12 16:14:48 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: 68376 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp782552wrd; Sun, 12 Mar 2023 09:16:45 -0700 (PDT) X-Google-Smtp-Source: AK7set8q/YEZMPhYlIJ/TJ83e2L1u8fyzE+u/OFTP2J8lkaGZWhdtC1zGq1xnPtyTn9z3v/Ycby3 X-Received: by 2002:a17:902:7582:b0:19a:a9d8:e48a with SMTP id j2-20020a170902758200b0019aa9d8e48amr28580728pll.22.1678637805502; Sun, 12 Mar 2023 09:16:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678637805; cv=none; d=google.com; s=arc-20160816; b=CiovuSpRHSgAeUWCPd94WkpqH85qrrrsUdbPy09RrXxHw/LUc45I5YmkkpIy8RSysX vfHhJFcI2ooubIbbiiCxKYkjULuLKwFu+dIYS4IGAbwckTlzOmevtmDbEMy1B9o2zGzR 8qTVnsd2qSYn5kSzN/g+n4rjZrYPQ7uMY8v9JQ9Hiw4GBrUu/KOqhYSKzM3BhW4ngYpn xqBeyMiq8CPF8bbZZ0trcOrapmX/b4Uve5qLc/n7kvXX3jP+IKBHjmcC48p0aSSGDlUV KZP08NPXfEcgTJiCPOWsdg9oIpn6Ah0bWuxxlQCAUc8Yw13nQFOXm9L6zuCrsbDZGiFZ kugw== 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=WUxL8Lihz0obhjerU05fQkKfDWJAY3Tnj9bKmZdRhTM=; b=xBzqVLXA7LbYLvNIwoh15pzWJ2p3wyWuKm3TCohymw7XoTL9bf20D/KsZ2shsArUmu a6pbxW0OVswzi4qB18fFzIDvSiZR/HDrc5ivAmELjae9wQzsbEKPI5YnllJEvJLebmgz 5b/Qayqv/QYeR/m4JF3qJhYm3fCo0KPzDjNeUc5o7pjTX7LRXvTDw5INV2gZdpCsqPc+ Wx8Zvhdhh2jc+bau8RNSlzCWW8imMW+1MDU+xZALQRXT5iz+0XNqIjv5G2aCF4TdmRuE DoiONJRSRFs2ujH//vhgBgwZvHMc/U2Tvi8BylWzA+frlD6a26Ma8hB4jlbzlgmd/Kzw Lnmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j72-20020a638b4b000000b00502ece99eb3si4535424pge.41.2023.03.12.09.16.30; Sun, 12 Mar 2023 09:16:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230084AbjCLQPe (ORCPT + 99 others); Sun, 12 Mar 2023 12:15:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230085AbjCLQP0 (ORCPT ); Sun, 12 Mar 2023 12:15:26 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AE3B34C14 for ; Sun, 12 Mar 2023 09:15:25 -0700 (PDT) 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 1pbOLw-0007nt-Nu; Sun, 12 Mar 2023 17:15:20 +0100 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 1pbOLw-003f1m-33; Sun, 12 Mar 2023 17:15:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLv-004K8L-D6; Sun, 12 Mar 2023 17:15:19 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/30] clk: axi-clkgen: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:48 +0100 Message-Id: <20230312161512.2715500-7-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1568; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=mKWm1tXjLyBA2SWXj77lTJC97AAz8dVbbZwONWNxxz0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfoprVMb78SIBnkb6CzMjA734MOUZDDgvGbwZ iDAVC4m6AKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36KQAKCRDB/BR4rcrs CfaJB/wO+xJeQ+MI+rcZY8q1XbpVZNCqDaAxpY5G5GuX8GyvvTXAAE6TetfA3Zaafkvko1OZnLq rzDp8Wc9HBs0KmRsMszYvFd47Dl6vodmfWpP8glXmUBBL9oVG84wN4AZ5tbshg8td/c0UDVJrJZ 4WBx538jrqzK16N1yfy0BYjRe5lbo9MYRabT6N2Ig72yDB3q3gRIUgfvbtPs5JDj6vxvPJtWlkF COXbgaT5jILLhUfdS7CZsvKVjWejoCPAs0LNRagV0euUI5vJr+GYpWLieMU35HE8H9e/6YbxvPN mBsIeWtymULMR7xthHfoayeB4MarC7t/j5EbYS0CvsonZaHS 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179315425598252?= X-GMAIL-MSGID: =?utf-8?q?1760179315425598252?= 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 (mostly) ignored 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. 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/clk/clk-axi-clkgen.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c index ac6ff736ac8f..671bee55ceb3 100644 --- a/drivers/clk/clk-axi-clkgen.c +++ b/drivers/clk/clk-axi-clkgen.c @@ -557,11 +557,9 @@ static int axi_clkgen_probe(struct platform_device *pdev) &axi_clkgen->clk_hw); } -static int axi_clkgen_remove(struct platform_device *pdev) +static void axi_clkgen_remove(struct platform_device *pdev) { of_clk_del_provider(pdev->dev.of_node); - - return 0; } static const struct of_device_id axi_clkgen_ids[] = { @@ -583,7 +581,7 @@ static struct platform_driver axi_clkgen_driver = { .of_match_table = axi_clkgen_ids, }, .probe = axi_clkgen_probe, - .remove = axi_clkgen_remove, + .remove_new = axi_clkgen_remove, }; module_platform_driver(axi_clkgen_driver); From patchwork Sun Mar 12 16:14: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: 68374 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp782514wrd; Sun, 12 Mar 2023 09:16:40 -0700 (PDT) X-Google-Smtp-Source: AK7set/ad5QGQp77XxhUjgg0/vqxrgUsefDI4CgFAa8i1BTMtiP3l7ELA9YNY+eAQnMXuHhBIY8k X-Received: by 2002:a62:4ed6:0:b0:622:8f86:a51 with SMTP id c205-20020a624ed6000000b006228f860a51mr3344797pfb.6.1678637800597; Sun, 12 Mar 2023 09:16:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678637800; cv=none; d=google.com; s=arc-20160816; b=MJZ/abfU/ZRxvnCrZ/2PdlB1BZhr7EQ0x+h+EsrgjfkS9ZoVEeD9LLlY9SLk4zIbec KnafFF7FosajOpiH+OSMXdNOf5CbCegzXOczuIKTNo/JmiXowBRrO1asfQXU3EmR7zMO zSZXUKF1qPIawV1iFOt6oEZPYZ85XRG7lfQAtV7DcBeuxmfrmUcfyp/c+TIx3a7DsoUA rLCRtJdjl5V0rt+8Tp/htdQb0ymiG6NsYJYkm7Npj3BlSqcsY1Nh52g1K1khJdTrPYbn PHGAYF/yBcSjSI0TUIToU5QhedxE+CcjTeLtng644WoSuB+BeNUBAjBF1j7ZkiM+i8XC JhYA== 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=yjS5BI2y0Kv5eFEZuttYchNQWDO9vhQwTFCGyeg78Tg=; b=d/yc0XfWurzAKiOKL5l9ECP01a22RYyHxwKlmGFpM21mJMs7JK9YefHdV+ZN/eueNu 0smhHUasaW7A31l4zFn6sK5FRp3/wR+mEFeY6vAQWQUet3sGYdbeCZYneHONgctQJ4U3 A9/YOcMKiw3XjasdAJ2ss1cfGWtfV+aBHDHOaYdcUfmPMju8hsU83lqoL7DjEwhn+Zn+ VqXJFwtFiBQcm8PqVRE49Ef77x0USEwNEV8RMvRLPfhrSySqtcDFKvd/2q8yf56XXFsF EWZcyqf8qZzQUVlCllWAvNeTzgvWjOlToz92+Ca1znfNSOe2N/aT24f4cJ2QKtRnnD+v m24A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b16-20020a63d310000000b00502ea97a70csi4498717pgg.837.2023.03.12.09.16.25; Sun, 12 Mar 2023 09:16:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230126AbjCLQPj (ORCPT + 99 others); Sun, 12 Mar 2023 12:15:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230089AbjCLQP1 (ORCPT ); Sun, 12 Mar 2023 12:15:27 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4A1F360A6 for ; Sun, 12 Mar 2023 09:15:25 -0700 (PDT) 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 1pbOLx-0007o3-1M; Sun, 12 Mar 2023 17:15:21 +0100 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 1pbOLw-003f1t-Cq; Sun, 12 Mar 2023 17:15:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLv-004K8Q-KQ; Sun, 12 Mar 2023 17:15:19 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/30] clk: axm5516: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:49 +0100 Message-Id: <20230312161512.2715500-8-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1476; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Z5GZGSWh1Ob3UU9gNPR0/87sU8eq9KSI3jE46vXFDkE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfosgNnsKcQ5XSf7NAX95edm3ujMAoDJwz6/R Mk2ZKLHpVyJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36LAAKCRDB/BR4rcrs CQBWB/98UBHvsgDINIPdwRsZL4ctsKFwArIpzt4SV/h+vGyGnWA7vRU1ZCXRJ7PybolnKOKeRAm ga0pTo0ZXWZIkYqieTwKAmWP3zJVfYTpfi9BuqbPD59JGfLCIFRSWJ4RNTxBXw9t+5cHJL9YfLR aYoghaJHTmF9s2TRa7jviqiY40f0WUV2FLSClIC3v/aQoLblBTDCqqESDZSZ4FfmsDTk7Wg+M4k 9pAN+bfcvKP7RhpCBZPv9ED9jPtvdDQgV7lBPYeg6wKScob/qzLWkIjp+MDOC1xm2RaojFptZ0K KWsa8qoAPRZVGPxHp9WyHe+kfGYEx+NMV/U8QjydRexgF8TG 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179310701615598?= X-GMAIL-MSGID: =?utf-8?q?1760179310701615598?= 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 (mostly) ignored 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. 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/clk/clk-axm5516.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-axm5516.c b/drivers/clk/clk-axm5516.c index 07e80fe8c310..1dff2017ad9d 100644 --- a/drivers/clk/clk-axm5516.c +++ b/drivers/clk/clk-axm5516.c @@ -572,15 +572,14 @@ static int axmclk_probe(struct platform_device *pdev) return of_clk_add_hw_provider(dev->of_node, of_clk_axmclk_get, NULL); } -static int axmclk_remove(struct platform_device *pdev) +static void axmclk_remove(struct platform_device *pdev) { of_clk_del_provider(pdev->dev.of_node); - return 0; } static struct platform_driver axmclk_driver = { .probe = axmclk_probe, - .remove = axmclk_remove, + .remove_new = axmclk_remove, .driver = { .name = "clk-axm5516", .of_match_table = axmclk_match_table, From patchwork Sun Mar 12 16:14:50 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: 68377 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp782590wrd; Sun, 12 Mar 2023 09:16:49 -0700 (PDT) X-Google-Smtp-Source: AK7set/imfOHf6/mBgq7pDgU37izcmXsExxdY7uf06YPPZ2YL2t032rzlvk/NndRZOUgICiVJO2c X-Received: by 2002:a17:90a:f485:b0:237:50b6:9843 with SMTP id bx5-20020a17090af48500b0023750b69843mr8108121pjb.0.1678637809265; Sun, 12 Mar 2023 09:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678637809; cv=none; d=google.com; s=arc-20160816; b=bM2GTOAFHNkAie8WPm+QURVaf4yAEe3/dWgfv3SVBLNRx6Ld8qACK6qe/tU1TieYZW OdzZ+W7QnagreytRFVKs5a6/8ntjh3YCq9SlL5SCALpEGsFhWR3zEfBWjq527WGu7NBy 7PuVHkhHp62ixWYCZnY04wVyhgmi4uMugMcIs//iPLjXuZ9Vs91J4iOIA/FHz/vSz8lx 5IE8rQ5baPZPi4P2B1efc3DqDO5VZgz1fRh/ZeYednsvI20qIwwC8yekj1139Lm16PC8 bILMBajp1DvXx6IcN18isWGTx6SBrkwqyY29b2jrrAnqL6Z8V9O8/At2koLcEYAjcjg+ v6aA== 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=TA8V+jmryeEc5oJ3nzJ9g4j+hdh19ZIjTqEzfzlxfyE=; b=xsyHK3jhflHpsGQ//dkIpUBX63XaGGhqh7605rTW8ms2ebxLZYG+tdFVTIBggVOZV5 4XTGa81vzJ9mbS+O+b8JoGXOa5/tsWUjCQNzzdAmbyX6GqKIulgEtuguTCYWvsAi3SSB x2z6Z0oeubwCaVbglkDqq2kElr6t6YY8PxG515gWTCxh+SFuORYlMJixxkyWxxPPFG4r HAUbjNvM2R/DxZyew2/XnVoJeYFn9CS4JOD7UIAkz9Rx8fZZvsRDnrtKMIrjNwSi5IpY 6yQSrqxZCIPzt2JE7P7d6xoFb5Me9C72YMKy25WCSOsxvOPK4jExM6GzwFaSkYK2EG3K WCjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oo10-20020a17090b1c8a00b0022962fb35b8si4559400pjb.133.2023.03.12.09.16.34; Sun, 12 Mar 2023 09:16:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230135AbjCLQPo (ORCPT + 99 others); Sun, 12 Mar 2023 12:15:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230092AbjCLQP1 (ORCPT ); Sun, 12 Mar 2023 12:15:27 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E8F636689 for ; Sun, 12 Mar 2023 09:15:26 -0700 (PDT) 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 1pbOLx-0007oS-CL; Sun, 12 Mar 2023 17:15:21 +0100 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 1pbOLw-003f22-Oq; Sun, 12 Mar 2023 17:15:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLv-004K8T-Qs; Sun, 12 Mar 2023 17:15:19 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/30] clk: fixed-factor: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:50 +0100 Message-Id: <20230312161512.2715500-9-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1823; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=M5YJcNdD/5hndGzQS3LgoQpQyz7z0G0HAcs9i/Jf418=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfovHqWbj7JZFPDet7+eKJZmO9elyLEyrjbgw 0lSwq5jTPeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36LwAKCRDB/BR4rcrs CUVjB/9hy8p80nnMmzUBJm4S9UNrcO1YO/GMo86/vZIOXLWwJ9PHfIMZjbYmALSvm+QmHEdthO/ a7N5QDv24kdHsLlDlLkxd9AvLh6nBsDchutGMwZM2EwELSSnlpoOoLyCX3eurEU3OM+BCiRSs7R RR5LSwCsTU86lEgjILzz1yk9miUoUowOdCvgSiiQUGx/jWPc/uBNgkZR/5K0jJm8WxNZTxbD1cV XkwfNa/inoEcx2l2cZUyn5FRLL2TtjjLJeQwplx9cShx1RDEH9cDT5574mFA1xPVywSb757Uv0c Y7F67O1JhKfy7VNTkrs1sXxGQv6HIj0h5fxIc5sV+UneSelm 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179319519985387?= X-GMAIL-MSGID: =?utf-8?q?1760179319519985387?= 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 (mostly) ignored 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. 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/clk/clk-fixed-factor.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index f734e34735a9..b3e66202b942 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -297,14 +297,12 @@ void __init of_fixed_factor_clk_setup(struct device_node *node) CLK_OF_DECLARE(fixed_factor_clk, "fixed-factor-clock", of_fixed_factor_clk_setup); -static int of_fixed_factor_clk_remove(struct platform_device *pdev) +static void of_fixed_factor_clk_remove(struct platform_device *pdev) { struct clk_hw *clk = platform_get_drvdata(pdev); of_clk_del_provider(pdev->dev.of_node); clk_hw_unregister_fixed_factor(clk); - - return 0; } static int of_fixed_factor_clk_probe(struct platform_device *pdev) @@ -336,7 +334,7 @@ static struct platform_driver of_fixed_factor_clk_driver = { .of_match_table = of_fixed_factor_clk_ids, }, .probe = of_fixed_factor_clk_probe, - .remove = of_fixed_factor_clk_remove, + .remove_new = of_fixed_factor_clk_remove, }; builtin_platform_driver(of_fixed_factor_clk_driver); #endif From patchwork Sun Mar 12 16:14:51 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: 68375 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp782523wrd; Sun, 12 Mar 2023 09:16:42 -0700 (PDT) X-Google-Smtp-Source: AK7set/vBWvLu1KwU9nKDz3JISz5c790zktXVw29MZw0qDfAfkPTIMNU+twid//iPsY/PEEAqkv7 X-Received: by 2002:a17:902:da87:b0:19e:4862:13ab with SMTP id j7-20020a170902da8700b0019e486213abmr34821101plx.69.1678637802074; Sun, 12 Mar 2023 09:16:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678637802; cv=none; d=google.com; s=arc-20160816; b=069idBMKyZfU9Wce5nB0XwnbX6bh4S4VWZ4E3mBbNbEfG7wUctTBYFjyhF5C5dLov0 3cCPMNC4c7gQOVFvRnVaOtZELpbN0KsEFXyJfNKwEBApq4UjncmN+zpBiaj12rcY6Ca4 NOvQ59bq0a67Hb/tFGl/0kD6rPSNwPpfuIGP/hrUoHNPDB+ohrS6wCWgpmrPmQNQNZRq 757be/xY1rmAiwP+dDaDJtmbx/kJhm+E5S9w1FJ6zvL4D/5xh+8Ih8p6XBAIocof6TlC OXmbVHOQC7B2xIDBl9vxEVKjFLEWLUu58hiGNuWmnwh73ytkFJRoAzFjHe1b3TjWurnN 53OQ== 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=Du8pScy/AgASFBEfCUryMYScrg4Qi3iIp1o9M0zNoCE=; b=w9C424qXf1oURpcw2jyOvxL3yCk8TzKVkrgD66lh7hpoupq44+Rv7osAumuzzY1zAz gVhs3FeTTz+fCYKs8O9pZipbE/+GnAhkaeK0zWRtI+pnHwCqv0ynHPIkhLY7E212nA6f uRRTrRNbph5jbVRw/1nUClwU9CQkYAWY8J4s5peyB0aFoSe4u/6FycM6ECnG/R7KIv89 5afQfvysdG7g8yhUtRH/I/ALbRVpcU00CwPOHi8TFSpQMUT3nvrT5UYu2/FxdO9pGCW9 545Y1Fb36yjH2f5RAz5DHxhxB2kSELI8TRfMWBpG5LFuAaq0sRP4tiQwJPrhvH3PtEj+ cuwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j10-20020a170902690a00b001944983f4e2si4496334plk.491.2023.03.12.09.16.25; Sun, 12 Mar 2023 09:16:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230177AbjCLQPg (ORCPT + 99 others); Sun, 12 Mar 2023 12:15:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbjCLQP1 (ORCPT ); Sun, 12 Mar 2023 12:15:27 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E0B63647E for ; Sun, 12 Mar 2023 09:15:26 -0700 (PDT) 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 1pbOLx-0007oG-9q; Sun, 12 Mar 2023 17:15:21 +0100 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 1pbOLw-003f1x-LO; Sun, 12 Mar 2023 17:15:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLw-004K8W-0w; Sun, 12 Mar 2023 17:15:20 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/30] clk: fixed-mmio: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:51 +0100 Message-Id: <20230312161512.2715500-10-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1707; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=O3BSffUzhF87lbhZq01hmKO4dRQjYInCIMfdlJqnSog=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfoz3U7OH8B0N7C8Lm3dEzQKgOrJB5nNt0941 k45EdSkZqOJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36MwAKCRDB/BR4rcrs CSh5B/92q6ddRUWfNxn8SXA3DJ5j/Um3zLfN4gOSGuKYxy2J13NUPww3p4QLMWNTWM2dP2muWee vkfO+duUem0jkgWH0poKrPyG06LSp4dWIIfLRvYI9DYAbZ/HsrfCnHny8OmDPKoPFlxFrSRuwWd 1If6FoEY7tvFudzmUekmY1Y9xdumwJzNR1m5diIVNDF7uK+9Sz7b47prh6cKR6LB4YRPfF3u9M7 0E5111dnP7z5pfkU25w31xuBlD6jnVoOveJ4NqgCChcD36spFvdxrMAthF10pGpgYnylhVHTvtC YU+ymau7Yg7s5NXLYS9SLssKd8qBAumQ4Hr5OPbYef+vbP9O 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179312213096005?= X-GMAIL-MSGID: =?utf-8?q?1760179312213096005?= 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 (mostly) ignored 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. 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/clk/clk-fixed-mmio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-fixed-mmio.c b/drivers/clk/clk-fixed-mmio.c index 5225d17d6b3f..7435055670d2 100644 --- a/drivers/clk/clk-fixed-mmio.c +++ b/drivers/clk/clk-fixed-mmio.c @@ -71,14 +71,12 @@ static int of_fixed_mmio_clk_probe(struct platform_device *pdev) return 0; } -static int of_fixed_mmio_clk_remove(struct platform_device *pdev) +static void of_fixed_mmio_clk_remove(struct platform_device *pdev) { struct clk_hw *clk = platform_get_drvdata(pdev); of_clk_del_provider(pdev->dev.of_node); clk_hw_unregister_fixed_rate(clk); - - return 0; } static const struct of_device_id of_fixed_mmio_clk_ids[] = { @@ -93,7 +91,7 @@ static struct platform_driver of_fixed_mmio_clk_driver = { .of_match_table = of_fixed_mmio_clk_ids, }, .probe = of_fixed_mmio_clk_probe, - .remove = of_fixed_mmio_clk_remove, + .remove_new = of_fixed_mmio_clk_remove, }; module_platform_driver(of_fixed_mmio_clk_driver); From patchwork Sun Mar 12 16:14:52 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: 68390 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp793488wrd; Sun, 12 Mar 2023 09:47:24 -0700 (PDT) X-Google-Smtp-Source: AK7set9HKhPZ2ZrWln+zsrWAV258xpDmFg25T7MfcsFnlTilAyjEF7yw0LnWpYX4/q3ruQP2iNvd X-Received: by 2002:a62:7b49:0:b0:5a8:a974:387f with SMTP id w70-20020a627b49000000b005a8a974387fmr22468450pfc.5.1678639644342; Sun, 12 Mar 2023 09:47:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678639644; cv=none; d=google.com; s=arc-20160816; b=k2zomZBeTV2BB456OJAORvOpDL8z0kJOea9mX5XIV3Ario7deCvL9fF7R97Qz+/dfH ARYqbD8z0sePfcAwf2gVYwqxZLUGkRJDiwIRBHymZcobjF81sQuBV/tSYJL/v6tlMT0J iYtZt/tTkmbIEBPp9JGZLaFP/s1ZAALhBRR7US2BkumauAdp01o0f1zp0CnjP/2aCBRh GKkXPiFLH/0cwtjCGqPHUnvBdu48LUgnjOyPYoQi/FvXjwk5C6nf+tCt9fa9nWlsMvB5 qtdv/dbNzXMorbuis81NN6z+9U0EtCBcGNNIEBPGPzeQVFhXv070jBRhJIMFRp8m6eKN 6FOg== 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=zoIbCZNB8UcSTeruodAIbjG17/Cskl1qjkJFxfBIaBw=; b=yJHO3qnMM/MOienIu+1K3Lar46sCcatMcLANvhhdjpQc6jkC4hDq8TEOfsDY6WA8wV 1mjwTr7dEsXEY+2AUjm02Z4jEkrIGz/AGqIB7XNiEQToXD3DPVUfqJeMFP7MahdXIL++ U18SU4JlpsQGFqIOG2FDRZ20EmnyCQwr9BQzMaVuR3IhJRJaciBq/yyic0czaqCftFwL jlNfV5A5t2SSFmpK36ASe3/EnRnTdEGcxGUi56KM3RqbIu21ovbv/7j5mCErImV68gY7 8pJKPpOPaTr2MCnWNBl1l6CnUV0pdCH0sGTl+B4379gAQ4HdVWYx3BLhJm0RovspxscN 1UZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 15-20020a630b0f000000b004fcc0120074si4539328pgl.161.2023.03.12.09.47.08; Sun, 12 Mar 2023 09:47:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230223AbjCLQPs (ORCPT + 99 others); Sun, 12 Mar 2023 12:15:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230094AbjCLQP2 (ORCPT ); Sun, 12 Mar 2023 12:15:28 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5F4F366A0 for ; Sun, 12 Mar 2023 09:15:26 -0700 (PDT) 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 1pbOLy-0007p5-1f; Sun, 12 Mar 2023 17:15:22 +0100 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 1pbOLx-003f2I-Cf; Sun, 12 Mar 2023 17:15:21 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLw-004K8d-88; Sun, 12 Mar 2023 17:15:20 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/30] clk: fixed-rate: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:52 +0100 Message-Id: <20230312161512.2715500-11-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1718; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=po8EXvs+7kHg+zX81YA98XCvTJMed7ODKE0yUfz1NMA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfo7HhZVAZ7xgnVadaKVWiVIjah3rnTnbXaAg kP/auTHxkWJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36OwAKCRDB/BR4rcrs CQBoB/970blcFnob82f3+cSBAU22kQDO9u+2fsoXotCRpnYOj8hZiZlU4Wu6W9SbSmJCwzSVbnQ p2Dp7GP3jfWchSOHVqCuLlUw16EEO2rMEHPxNWsP28CSow3Z4bGVM2rX5M4on/0VH+NQWg7rBu2 aKN3w1WCFLc6lwB9MfY63O7uOBov17HVfth8EqORFgvtHucvDczHepS6hT/ZZkrluu74Kk1GAIC Ye7ujDgMZt/eQx7R5iuzFoKrWKxzRm7OoSJ2yIbPw0pfSdrKTRgrKZpKojH+Z23GOfOYWGUR8pa 0rX+eMLhDZmVKxCbWeCtLxJ4F9HMELZJ6yNPKPIyfMuEk+fr 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760181243942135570?= X-GMAIL-MSGID: =?utf-8?q?1760181243942135570?= 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 (mostly) ignored 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. 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/clk/clk-fixed-rate.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c index 7d775954e26d..3481eb8cdeb3 100644 --- a/drivers/clk/clk-fixed-rate.c +++ b/drivers/clk/clk-fixed-rate.c @@ -196,14 +196,12 @@ void __init of_fixed_clk_setup(struct device_node *node) } CLK_OF_DECLARE(fixed_clk, "fixed-clock", of_fixed_clk_setup); -static int of_fixed_clk_remove(struct platform_device *pdev) +static void of_fixed_clk_remove(struct platform_device *pdev) { struct clk_hw *hw = platform_get_drvdata(pdev); of_clk_del_provider(pdev->dev.of_node); clk_hw_unregister_fixed_rate(hw); - - return 0; } static int of_fixed_clk_probe(struct platform_device *pdev) @@ -234,7 +232,7 @@ static struct platform_driver of_fixed_clk_driver = { .of_match_table = of_fixed_clk_ids, }, .probe = of_fixed_clk_probe, - .remove = of_fixed_clk_remove, + .remove_new = of_fixed_clk_remove, }; builtin_platform_driver(of_fixed_clk_driver); #endif From patchwork Sun Mar 12 16:14:53 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: 68379 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp782692wrd; Sun, 12 Mar 2023 09:17:07 -0700 (PDT) X-Google-Smtp-Source: AK7set+YPrRBN3jFBmn0Ty7Qk8HScYkk/qhnQE9IpoO/chH4KXfkvmO0VSGNKyngmy6a/sYXzblr X-Received: by 2002:a17:902:c20c:b0:19f:2dff:219b with SMTP id 12-20020a170902c20c00b0019f2dff219bmr3680537pll.5.1678637827267; Sun, 12 Mar 2023 09:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678637827; cv=none; d=google.com; s=arc-20160816; b=L5LVNv6/yGzmbqpZ5tpuvC3SnRtfWWwrdjoEZATUdiH1bMuFSsvXGYvhuwaU6196OZ qmmEprHHegmV9stGfhk96bOlNUJBGvP4j0yWg/t/YfkAAtt6RpbonhWRtrxyiGI05bXm oUQJueESQZo0WvuZJpccDMzqr5krbXcgiW4gof38ibP1pbk0udPKb/4+MG/1vAI+e0OT YP3sOtXK3E03cqszrA/gavw1CIdlyAG5obPcbS+l3HwZ0mhLDPR/B7XbktOpstXkTEdz ECKY8oWoy+gX4hSClfN2nv/CjRdw/NIgeOLy3gh036HIvW7Yb/rCFKBCaC7Am7snoSez 09fA== 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=zXaagUhyx8GIc9WLUrt9iMOEiFV7Y1y28k4SMmYaJDs=; b=WBri3J+ZTHIQ64qQ0oPb+QyKs8afDghAfbg8ubdM2BTNFCh74KoJ/hXCAAF/172uUY 2oYWAUZcYaE+gjMJ0iDaEks2UEKa64XpnQiJHXlvqklxnQhY1kZqtMmo8TyOpQ6P+6hd ph/vws8xIfxz8ER6s6afXdY19lwgo8gyAoogBAeyDPnBY75dwHAbM5MohNsxPOAJBeCU DuhCraJ3ghMLtOt3XIe8pQ5MGkynqE18DKmcOlda82bIB4X9Bk0JMCUkDFEKONd1+X2J JXJMQvF6bLp1Tp3YkZT8u60xJLjNJNiju38dA1meFYUxg5vmKNfnqacRePPvlCbKMSHV CH0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id la11-20020a170902fa0b00b001a023cf5177si1259478plb.176.2023.03.12.09.16.50; Sun, 12 Mar 2023 09:17:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230219AbjCLQQB (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230111AbjCLQP3 (ORCPT ); Sun, 12 Mar 2023 12:15:29 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1350036FE0 for ; Sun, 12 Mar 2023 09:15:28 -0700 (PDT) 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 1pbOLx-0007ox-Tn; Sun, 12 Mar 2023 17:15:21 +0100 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 1pbOLx-003f2D-9E; Sun, 12 Mar 2023 17:15:21 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLw-004K8g-FP; Sun, 12 Mar 2023 17:15:20 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Eugeniy Paltsev , Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/30] clk: hsdk-pll: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:53 +0100 Message-Id: <20230312161512.2715500-12-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1568; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=9IIhWYLjDyIormTcpgttLaDidPj81RFP65xbAEWauvk=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfo/+yqn918kUn8pOgYbEqE+b5exqLyF9mW6r K75nsjTeQCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36PwAKCRDB/BR4rcrs CWOJB/90DoAB++WezQIIJgaJ5BaqL/pdTJ1R4ILNlVPtCWVAmTviQRh4aivInV718Wwry0Rd9Lm FJ22ZEN9LGHv2TSjtQn+2VRRLAwwCTB75yk5+ccgvXUWKQL1aj+DQ8WDu7g2gc2+B3QJPWGaVqC r4wIhVoaN7fHexeAoucGc2xlJXji4gSs/krnj90gNtWjM+0KduYyZhHZTBohBEUgnXMrnXcxYz3 FKefheVYPdbmkC+9/QO1ZiHTILg+IDIRyN+oPEgG1HlRE2sK1jsVvepoKXQ0fMNUyNmGOonITn8 Zt6CkmpL3x5UtYvX83CWW8ozJBJhGgWJoQ8Vn5snkzpnT7nm 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179338673219143?= X-GMAIL-MSGID: =?utf-8?q?1760179338673219143?= 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 (mostly) ignored 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. 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/clk/clk-hsdk-pll.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-hsdk-pll.c b/drivers/clk/clk-hsdk-pll.c index 60007b508590..766e139972fe 100644 --- a/drivers/clk/clk-hsdk-pll.c +++ b/drivers/clk/clk-hsdk-pll.c @@ -350,10 +350,9 @@ static int hsdk_pll_clk_probe(struct platform_device *pdev) &pll_clk->hw); } -static int hsdk_pll_clk_remove(struct platform_device *pdev) +static void hsdk_pll_clk_remove(struct platform_device *pdev) { of_clk_del_provider(pdev->dev.of_node); - return 0; } static void __init of_hsdk_pll_clk_setup(struct device_node *node) @@ -432,6 +431,6 @@ static struct platform_driver hsdk_pll_clk_driver = { .of_match_table = hsdk_pll_clk_id, }, .probe = hsdk_pll_clk_probe, - .remove = hsdk_pll_clk_remove, + .remove_new = hsdk_pll_clk_remove, }; builtin_platform_driver(hsdk_pll_clk_driver); From patchwork Sun Mar 12 16:14:54 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: 68408 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp799740wrd; Sun, 12 Mar 2023 10:04:06 -0700 (PDT) X-Google-Smtp-Source: AK7set8glGFojZN2JbvlABNchnFr9AHjxoEZoPBePlU7g27oKAFvozHjSjdkhQLYJrfkzrMA4JGd X-Received: by 2002:a17:903:24d:b0:19e:76b7:c7d2 with SMTP id j13-20020a170903024d00b0019e76b7c7d2mr37401242plh.26.1678640646515; Sun, 12 Mar 2023 10:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640646; cv=none; d=google.com; s=arc-20160816; b=tqPExc9OPYMPM59s0urDrBMLLhSAPW1AKfZsno7y5LAMGDigd2kOs8Gc8OzxFopeqo feitJ65zVqS0U5zBCZwx1zKNpURR6EOyLScGaBnrSudVCvWxLdUXgTN/Oc/zoeHKPPPd mVE2JpJslW8rNVk9c+uHkcobbv/MOjrvE6V3S4ZosfAFquo7WhVEyfJQkc1BQ9+q6M55 IxqsYLsx4KbYx8aJfETAn897v/5LT1u+2tSX4K7PIb5tjM38KjRRKexBt6+SKEQiXJXX qyoTnWVIUOIQQIoW1K7xe9TzkC3oKhL7FnxN8dcUM/2Uvy1LMtK2jaO+XtyLtdvxnSMD HFLw== 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=1QhzU/c/XSahY8QgH4wM1+Po14gzuRM376u7Ela+stM=; b=sxy+HNGOxx1obpyV3U7XHmx1+8O+FF44Iij3brvlPT3IFVmjKpGx6Fvw85j0Mvy57X BpdxYaO1qFA1eS34w8hl7fZAbX6h+YOdXruUbr3hdZxAHbdO/XOZ5GeqN6PKvkQWmRdJ 6Ea55fH6WvPt7fO+dbGJsUnI7/Nv8PHNS3eloaPAs2neOv4wKF2slkFH38WOMTRFV5q9 sPFJSxY1wSe3zefN4Fz2B7d4Z6hIvHvgsTlDVS1Ogm68Fhqeqgfp+hQ66pM+TDXAjp2J 4WN+ZJIupytfp7a595jAaWkXNyGs0pX/65SUymOl1Aa0qcWnJl8/2tNhg53TFW8qd19s 2Wug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ko13-20020a17090307cd00b0019f23a15f43si3972446plb.578.2023.03.12.10.03.54; Sun, 12 Mar 2023 10:04:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbjCLQPm (ORCPT + 99 others); Sun, 12 Mar 2023 12:15:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230005AbjCLQP2 (ORCPT ); Sun, 12 Mar 2023 12:15:28 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49C743669A for ; Sun, 12 Mar 2023 09:15:26 -0700 (PDT) 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 1pbOLx-0007ov-Tz; Sun, 12 Mar 2023 17:15:21 +0100 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 1pbOLx-003f2C-8s; Sun, 12 Mar 2023 17:15:21 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLw-004K8k-LY; Sun, 12 Mar 2023 17:15:20 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/30] clk: palmas: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:54 +0100 Message-Id: <20230312161512.2715500-13-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1538; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=zEZr6iE44gTKWVY3i3VQqSeHRxgblN9cAWTQGCH3j7U=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfpCxY8G+6AOtqpcGsR8pWvAP2L4zD2Z/iA2z O1CHq8ezi+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36QgAKCRDB/BR4rcrs CfIXB/sFFu8yMgEcJcHDsWKJXt/uzgNB5264hhGM3+xfDr7ZDaQYJwxRRhvZzYn2LFH3SNL3+Oh tvbUkxroxVrfr7mUwj4r6E9rAISFqDnmxj1lfKoA6e1ODz905EcF39bWP9nfsiRZa6aIZ/3c/GI 9Al6AIDuBcGmGX8lPmACB1RVwTwjRjfuoa1VoJAFWmHL3+JFBaoHVt1oGekQ3kAyq0gS/xSwrAV xPk8mDtHmUaDpRP/PDEyOYwvTWPkMm6x64KsdiXHeW/FMeaARSSd4HKE34tZwRsmlwLDdMONyIO uEwPxcj10UimYxGWYg9rwwLB//2zYIpFsq9bgEJj49HBsPqt 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760182294509587583?= X-GMAIL-MSGID: =?utf-8?q?1760182294509587583?= 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 (mostly) ignored 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. 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/clk/clk-palmas.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-palmas.c b/drivers/clk/clk-palmas.c index b8c3d0da1918..74a241b1e1f4 100644 --- a/drivers/clk/clk-palmas.c +++ b/drivers/clk/clk-palmas.c @@ -271,10 +271,9 @@ static int palmas_clks_probe(struct platform_device *pdev) return ret; } -static int palmas_clks_remove(struct platform_device *pdev) +static void palmas_clks_remove(struct platform_device *pdev) { of_clk_del_provider(pdev->dev.of_node); - return 0; } static struct platform_driver palmas_clks_driver = { @@ -283,7 +282,7 @@ static struct platform_driver palmas_clks_driver = { .of_match_table = palmas_clks_of_match, }, .probe = palmas_clks_probe, - .remove = palmas_clks_remove, + .remove_new = palmas_clks_remove, }; module_platform_driver(palmas_clks_driver); From patchwork Sun Mar 12 16:14:55 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: 68378 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp782678wrd; Sun, 12 Mar 2023 09:17:04 -0700 (PDT) X-Google-Smtp-Source: AK7set/y4JHBhDoSjZf/oTqmeMXBSSYgWX45/65HpLLA0v7nilFMqjRbseKIP4icPEenioXwGe31 X-Received: by 2002:a17:902:c40b:b0:19e:8bfe:7d68 with SMTP id k11-20020a170902c40b00b0019e8bfe7d68mr42054051plk.11.1678637823896; Sun, 12 Mar 2023 09:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678637823; cv=none; d=google.com; s=arc-20160816; b=E9wWiAMu+EXlJbMZgdvFCbPfRh5vF2cZDZJ/FNKvhPCiHmYnmjkk9a5GEl4IN6nvln ZMlgXNNGVakgt7izNBtcAPiSTsttvcz0Sq9IzyM5hhQrxTq5IQbycIIsGOZ/QcOQHn+K 1d69jTK/XR3i3Iw6Fy+ARmCsLmSok87ZwMjguKJJiEkWPAZLudH2wUPkpN7+sVphrJD4 yzAu/aXSs3kXyUrBCSeXUG5/JComLm+RQ4O9Si9IiH11KkEbzeNmUkAGBdke4A8eGK55 ZiiPlCPctE3zr6VH7UZDu5GmOPvssiIIWXgHVUIUhTSQPooadB2ks8YTUK8RuPUxI+H+ WRfQ== 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=YaMyg25DFiMbHXpfWuYBuj35tsJF8kAnFzry0TYFxgo=; b=bbEAH69MUnfpZba2jQpUlu53nLOG0piErDBlh2ZJm7pffEV+xthX3YYBw3YbiJ26Sk lVnzdPHuvlKiV+tQxyusLVplUktWFwIu28aN1XlZCJ0uw5kov0sX+P/CK7oh3JFup4VQ SVrDzQalZrprsWYKyIAEj/ASfp5JH63TJAhJSo5hKpovcKocjQIoSaJSKp9tbjdtANs0 bDk+oRfIkg0joHiPfFb6/BE6OsWp+QfFcfjnkxE6ZfcwXG8hKiDpqR8V9LTd80uDBvaw Hclgr73cCkBRim26og9DzRM26b7YMJTuyGcv4tcqD/xyJG9MDuxuMEDAYhPIajj35eUX sjUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kq11-20020a170903284b00b0019e6e64b991si4609362plb.562.2023.03.12.09.16.48; Sun, 12 Mar 2023 09:17:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230230AbjCLQPv (ORCPT + 99 others); Sun, 12 Mar 2023 12:15:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230098AbjCLQP2 (ORCPT ); Sun, 12 Mar 2023 12:15:28 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7171367DA for ; Sun, 12 Mar 2023 09:15:26 -0700 (PDT) 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 1pbOLy-0007pC-5v; Sun, 12 Mar 2023 17:15:22 +0100 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 1pbOLx-003f2O-H9; Sun, 12 Mar 2023 17:15:21 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLw-004K8p-T4; Sun, 12 Mar 2023 17:15:20 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/30] clk: pwm: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:55 +0100 Message-Id: <20230312161512.2715500-14-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1581; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Q+rpWm1HaK4xx5/3Iyhh29mSbdCQ7CSBoKry7Jsdg+A=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfpGnV0BSNFK4Uz6sZ29SPWtGD/x44TndcG5w cCAsvh3fsSJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36RgAKCRDB/BR4rcrs CXCTB/9RpM0vW3C+ksZO4wadXUqTA5CZwwP3+1e1bM4QumdyWcbH31e8qdKW0w2SdAxHWW98v/v SxqmVOYSnUuf3SJbtqdN2xp3Le9rRn1S5ojOIdKMcZyvFYNL/Tvg5v3Q/RCY4TrRU7vIc+tquSq I1rlxSBEnx7IlqV7cNFSeK8iqAqCL6QPbSlNv1rORND0kQw1yP3HlfUJUtmBgj1C88jVLu8mq6s N5JfHxEp/t2zlrwmRWrXJh3hdLPeE39/aJAXRHs+OCnjScEoWeTZYowqeeZ4cNKPodKgAY4kijj pFE/kaQjJpsQTEAK3TnLfPcDxDsvYKugYaN88TslTUMRuRb/ 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179334878960089?= X-GMAIL-MSGID: =?utf-8?q?1760179334878960089?= 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 (mostly) ignored 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. 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/clk/clk-pwm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-pwm.c b/drivers/clk/clk-pwm.c index da2c8eddfd9f..3dd2b83d0404 100644 --- a/drivers/clk/clk-pwm.c +++ b/drivers/clk/clk-pwm.c @@ -129,11 +129,9 @@ static int clk_pwm_probe(struct platform_device *pdev) return of_clk_add_hw_provider(node, of_clk_hw_simple_get, &clk_pwm->hw); } -static int clk_pwm_remove(struct platform_device *pdev) +static void clk_pwm_remove(struct platform_device *pdev) { of_clk_del_provider(pdev->dev.of_node); - - return 0; } static const struct of_device_id clk_pwm_dt_ids[] = { @@ -144,7 +142,7 @@ MODULE_DEVICE_TABLE(of, clk_pwm_dt_ids); static struct platform_driver clk_pwm_driver = { .probe = clk_pwm_probe, - .remove = clk_pwm_remove, + .remove_new = clk_pwm_remove, .driver = { .name = "pwm-clock", .of_match_table = clk_pwm_dt_ids, From patchwork Sun Mar 12 16:14:56 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: 68400 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp798166wrd; Sun, 12 Mar 2023 10:01:01 -0700 (PDT) X-Google-Smtp-Source: AK7set+J7en2saxgcgxU9thr5Mlru1u50+Om5n3N9uPCD3o+fzAr9DUpfMemJ/dmeH7fJAKHVVcd X-Received: by 2002:a17:903:2281:b0:19a:9686:ea85 with SMTP id b1-20020a170903228100b0019a9686ea85mr34980807plh.17.1678640461203; Sun, 12 Mar 2023 10:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640461; cv=none; d=google.com; s=arc-20160816; b=Ut1mCNG5p+91l8SXCViYIdAXRJDPUuCeHoOsDpUXQpXcpDT/PbxUXt8e5ksKy6OxVm eM8Wz9qoBS0/slkE8x3/DE8tGWjBsfekKjDq8wIG7uqcMqntYfLbTf/1VTkSgKV32LTo pQNUA2KXUzQcAwPhl1S4PA3nGA6SXyVwVsnUq3Fy3gaeA7bj7/JFhzPOZ5WJ7puqgcue h4j9ySef6zC5GBxae2m67HLeliVJomz3d3NW63eDJVvQWZN5Kq0TuNKFpw1XSbOn5aT5 DSY3fTlxvCYxZFnELfw2xe8zXOU2Uzt1r5YhlKuZ8+V/kosKD1hng+sNEXyBiSA1U2E2 tp5A== 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=RxNArmw1kj7Bcy0mBWSr8WfkPtQ5NSiW7N3bJ83VeFY=; b=DcMqYMlEQaf+kL+c2zS0+vP4WQSIdksA2ThbmjU6RFN1/x5mZnR1YIUs52AlneTWxn 8lDHquTw+wgJkqeBHb8AdWPHdV+MGfakHUaJJ7QPBm7WYBGru04iRv1oxkOEUp0VBLGO xqiUIHuQ3iPtn/XJFuf8Tb1ejn9Oc/kz97qf08uKdnv8oF0FX7/6DSrl7x5xQuzE9lCE cTyziU+bIQO6osoOjyv6ZMO1Fyc1RfOH2aaohD0SbULaz8yUAxrah2ZKgPB4TrhzH+26 maG2o9XzQPumZf+9/xm9kB9V2+Ws1TbUfIK+ddYTNjzIydmv0j9zP7G1tQuynvM/wVQG eItA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4-20020a170903230400b0019e9849174fsi4821443plh.547.2023.03.12.10.00.48; Sun, 12 Mar 2023 10:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230127AbjCLQPa (ORCPT + 99 others); Sun, 12 Mar 2023 12:15:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjCLQP0 (ORCPT ); Sun, 12 Mar 2023 12:15:26 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13E7934315 for ; Sun, 12 Mar 2023 09:15:25 -0700 (PDT) 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 1pbOLz-0007pu-1m; Sun, 12 Mar 2023 17:15:23 +0100 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 1pbOLy-003f2a-Cn; Sun, 12 Mar 2023 17:15:22 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLx-004K8s-5U; Sun, 12 Mar 2023 17:15:21 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Krzysztof Kozlowski , Michael Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 14/30] clk: s2mps11: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:56 +0100 Message-Id: <20230312161512.2715500-15-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1740; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Xs0m+ONUFGBzpqo3SPbXN28Ib5a63TFdvYWV7zGlfsI=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfpJeN2QBtTOvNJ2F99zBqvIKWPabOgHyKqCE GHByGUriRyJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36SQAKCRDB/BR4rcrs CQtxCACghEFEdA2KmcHIGePbaODwj7iMAWEjhR/wD5aQJdtZ+QPkD7iWot+aOH6J2zc72h4xNiz klix6posKc6ApOT3ZNmySv5rOxBBGvEgYgXBlRFhh2tYTMJCNRX6gNcfGd8FXeE/tgeE6cwo2Fe XUt+if/1ZWQVkqGGnjmLkHeD9gddXgMXAS9hQOXJ/7Zp3aKk+OlZHkshhTYLfG06PtHlzUtvBgZ qDlfe7g9ie/Ad7ZUMMcPi5263EwpyuwfoDrHw/YQYPISTvG95md+OuDZm87SItQPHUda+2xH0Ym OVQTdsDDf88Xk31Zg028niO7pIfa+5aYI+hBKGq3Evy3axzm 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760182100040083311?= X-GMAIL-MSGID: =?utf-8?q?1760182100040083311?= 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Krzysztof Kozlowski --- drivers/clk/clk-s2mps11.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index a3e883a9f406..38c456540d1b 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -202,7 +202,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) return ret; } -static int s2mps11_clk_remove(struct platform_device *pdev) +static void s2mps11_clk_remove(struct platform_device *pdev) { struct s2mps11_clk *s2mps11_clks = platform_get_drvdata(pdev); int i; @@ -217,8 +217,6 @@ static int s2mps11_clk_remove(struct platform_device *pdev) continue; clkdev_drop(s2mps11_clks[i].lookup); } - - return 0; } static const struct platform_device_id s2mps11_clk_id[] = { @@ -265,7 +263,7 @@ static struct platform_driver s2mps11_clk_driver = { .name = "s2mps11-clk", }, .probe = s2mps11_clk_probe, - .remove = s2mps11_clk_remove, + .remove_new = s2mps11_clk_remove, .id_table = s2mps11_clk_id, }; module_platform_driver(s2mps11_clk_driver); From patchwork Sun Mar 12 16:14:57 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: 68381 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp782752wrd; Sun, 12 Mar 2023 09:17:17 -0700 (PDT) X-Google-Smtp-Source: AK7set9Q8ulv5ZOqztlXricM5TW4x9qU6v+KT5KXm/y01XzBGX/zX469ubBO3nNrqy6B3UdEf17F X-Received: by 2002:a17:903:1251:b0:19e:d60a:e9e with SMTP id u17-20020a170903125100b0019ed60a0e9emr23002878plh.42.1678637837681; Sun, 12 Mar 2023 09:17:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678637837; cv=none; d=google.com; s=arc-20160816; b=XS/JEcuRTivEGlVlv7U8dkV+qnzNZw/DOtMMEx6Ee+3twjonCqRAA1/lbatIMSK7LI ixCGXcgWvjH48y0zMsxiWY0RPtuFKZp7IhTRZFS4CpKjtwigcIj08Xitlbci4LU1XdzO sW6lqe/cjxA6Hd0Sh/Fs9o9EJKTSJghPDZrE+DSj9pPjaFiptgInSrtrKMtwEyh8kyQJ TZDjOJjofqLV/48fMAkjuUQ/IWfm6YIIAOKhgOiqA8l1gwf/BqyGgc9Z+axXQwxZo29M HLy0H3sSV1BURCJKIy0tIbFACb2DCeGVGXzqoKHxmWY2gHw8++7sUjNJjRy8R3PvJIio 2lnQ== 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=8PiSTVH0whsDB0W0/pCvcWtMqaGqnpZlb+b+VFWQh6E=; b=oVeFjPxm+OhKf8TBXk+jayBv6JHCkAQaHwUvq4JsZFywu/t8WydMNjFzyBN0sJbHk5 c3hOLsf9D+qHYXp+XEajVG6lPg8i0YaJr7mNes3vMcWvt9i4gY5edMvKOK718edgSvQt 7iOWlZh4FLzPSAIlFecOJ8nQO6l0fy8VoxALHrzRzXJ+6GUVh6K0peZWBla9IdxFa5yZ CEzpysSe7T/e71eos7EnGCAcn6SSsT0PrQwL1U+HHr0tvDJbGySGsrnLOPCn6GyV3lZd HaD3z4MhTe7/Cy4Zp9Q4iAKfRZksxBJCFs5OrP7DNA6C38iVJATZ+U4yUlhdxsSXwZ4L VDyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n11-20020a17090a2bcb00b002290cb1ca2csi4400521pje.177.2023.03.12.09.17.03; Sun, 12 Mar 2023 09:17:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230256AbjCLQQS (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbjCLQPc (ORCPT ); Sun, 12 Mar 2023 12:15:32 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44258366A0 for ; Sun, 12 Mar 2023 09:15:30 -0700 (PDT) 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 1pbOLz-0007pw-4T; Sun, 12 Mar 2023 17:15:23 +0100 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 1pbOLy-003f2c-Ed; Sun, 12 Mar 2023 17:15:22 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLx-004K8w-C4; Sun, 12 Mar 2023 17:15:21 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Sudeep Holla , Michael Turquette , Stephen Boyd Cc: Cristian Marussi , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/30] clk: scpi: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:57 +0100 Message-Id: <20230312161512.2715500-16-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1794; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=5MjW7VOTnBQN8nKLLIpeOEnNz12SyhOVFAuyxtqwJh0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfpSJ8kZ9YYoZicMME15YLeYOAXzTzoRJd/w9 RbWIYoa46uJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36UgAKCRDB/BR4rcrs CcajCACIKTV9216hk4TxgtFgcKybJIbdXSl3GMe5VLuQ7axtMl+Klu0Q7fo9MvpT91uFkZmg3U6 W5WidGSi0mjFJefT8EkBXtargZJR+FcJmGPTPAa9G9Iis5Fu0NRROc4ha52DBddGxSCdsCRuWn3 kaYrg6Aw08UOEAONWa2EmGyxDTfwsm7Z/qpJP56CQxwD/VppH3q+uGUbe1O7iOoOyuxlw52FvNN YupboOkvhmLL/yJBsmNOwH9yEdsSr7zPuaZVa9HhQ0GB6pt0caFZnxGujA6lMwgXmJZmziLOTdm r/S5yxYXPu/qW92WjVhjlXCttm+xnyxyUxJQ9ChzaueomuSW 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179349332776719?= X-GMAIL-MSGID: =?utf-8?q?1760179349332776719?= 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Sudeep Holla --- drivers/clk/clk-scpi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c index a39af7616b13..3fb4003453ee 100644 --- a/drivers/clk/clk-scpi.c +++ b/drivers/clk/clk-scpi.c @@ -246,7 +246,7 @@ static int scpi_clk_add(struct device *dev, struct device_node *np, return of_clk_add_hw_provider(np, scpi_of_clk_src_get, clk_data); } -static int scpi_clocks_remove(struct platform_device *pdev) +static void scpi_clocks_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *child, *np = dev->of_node; @@ -258,7 +258,6 @@ static int scpi_clocks_remove(struct platform_device *pdev) for_each_available_child_of_node(np, child) of_clk_del_provider(np); - return 0; } static int scpi_clocks_probe(struct platform_device *pdev) @@ -305,7 +304,7 @@ static struct platform_driver scpi_clocks_driver = { .of_match_table = scpi_clocks_ids, }, .probe = scpi_clocks_probe, - .remove = scpi_clocks_remove, + .remove_new = scpi_clocks_remove, }; module_platform_driver(scpi_clocks_driver); From patchwork Sun Mar 12 16:14:58 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: 68388 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp792968wrd; Sun, 12 Mar 2023 09:45:51 -0700 (PDT) X-Google-Smtp-Source: AK7set/e/ZqqTVYFcyaB5Qrnz2d/5JLBUpw0P0d0Kp/HnJpjGsrlUbMIInKZrSC8jW6noDfXXQiv X-Received: by 2002:a05:6a20:748b:b0:cd:83b1:4236 with SMTP id p11-20020a056a20748b00b000cd83b14236mr31862476pzd.36.1678639550939; Sun, 12 Mar 2023 09:45:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678639550; cv=none; d=google.com; s=arc-20160816; b=0nPotBPQTxVnSQQRk5t5Gu0V7psIHGe6zjJL7Zakrne1Ku0HuHCvMK2RaxvXcfB/3U BbmB6feH+Mut5hFVWNbI5XiDSZvgykYwnUM1jun4Y6lgKXcQ7au01wpfwz7goK/RDDQI vhmLxzfT+TfMMC8f0x2kvTGqRF7K3/qxAtRbRXbclzA93PrpyC0aYlJxIFVWgMflRFlq xPk0vvlqYOVDZ6zibwIsJUsopUSn7M87GCpyLeoXQ82Jvv8B6v5CZHuBeCX7yzxOWbjO /hL09uRIx3dumkhO4ConjPeR1sRPmi2Kqo6OpqynHTKRLH/kogs7MQ6cr32R5oXw2OYn Ih4w== 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=SrnMa1pZBgvTHtmSoT6HSrpze+ShshXT0DRBmqGkVio=; b=HeNRGUlSM9lBvwvuXu+wRmC2iyPpH2Min8a7B2n/FDK1vXn4Y7AR27GhDRtXf1O71j lK8GZCxSHcCvABa6YYgGWkG19PBBO4NnVCEI398v2LYbtTaelvvotBv35HqBczWmKsVD GA/956HIu8DDOLwTNRM4KF83m7CF9TX8D/aBxUOylSKra7OcRed6wr+5duI0bjtYt0Os Puz5O0+YZFauZGH0Ef/XP3hEu43TnJ4lGg/PFsDI6b+bqr1joQoJ0OQs7PX49hS1M5GQ cDhntEJi+MrnSvUX9grxCS7/zOmN9z6gCSg2YfmERmGpVlO5jDWLSFZ+kMqfpO12Rrjy kuTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i8-20020a654d08000000b004e850715f99si4660785pgt.259.2023.03.12.09.45.31; Sun, 12 Mar 2023 09:45:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230375AbjCLQQ2 (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjCLQPc (ORCPT ); Sun, 12 Mar 2023 12:15:32 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50F1634C05 for ; Sun, 12 Mar 2023 09:15:31 -0700 (PDT) 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 1pbOLz-0007qH-Ia; Sun, 12 Mar 2023 17:15:23 +0100 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 1pbOLy-003f2l-Ts; Sun, 12 Mar 2023 17:15:22 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLx-004K91-IS; Sun, 12 Mar 2023 17:15:21 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd , Maxime Coquelin , Alexandre Torgue Cc: linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/30] clk: stm32mp1: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:58 +0100 Message-Id: <20230312161512.2715500-17-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1750; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=MogxSQmmNC/utpK5URpwGXRDdvqjCsNxmjM9To6NNPI=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfpVv4WC5SN8KRSwbPkT0MGYOp14+cdP+X83h 64BGa9EPMWJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36VQAKCRDB/BR4rcrs CRbaCACa7m2DRFNqbLtWO+lY/78L7saGvxHdMIkcXdeaeAiPFbpjFY4617uowoj4C6b5GnaPfyH Twy4Tx88ijQ4B6ZaK8/Mz6RwJNPoHdsqEfr6pP/J930vPyxyhsqKNiFHf52KT07QR8J+Y0Gysiw OoGJhxXhja8ITO6VbYIwWN1Ra8RTsimGgU31zVpFkeQXcsG4C+q/FSOi6vfs9NDYMOvjSn5UtaQ XsS55usZCJXzeO1JE7Vz5t5BKlsttxmu7cLhvviTfoitn6wzAwCXV6RQG3j69rMduNeVVKNbr9y rzmX+CXLNCzRAo7Kz2H1oFSCFofpB1kpGkANZUqNwRHuLw1s 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760181145791066943?= X-GMAIL-MSGID: =?utf-8?q?1760181145791066943?= 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 (mostly) ignored 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. 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/clk/clk-stm32mp1.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-stm32mp1.c b/drivers/clk/clk-stm32mp1.c index 01e5a466897f..939779f66867 100644 --- a/drivers/clk/clk-stm32mp1.c +++ b/drivers/clk/clk-stm32mp1.c @@ -2434,15 +2434,13 @@ static int stm32mp1_rcc_clocks_probe(struct platform_device *pdev) return ret; } -static int stm32mp1_rcc_clocks_remove(struct platform_device *pdev) +static void stm32mp1_rcc_clocks_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *child, *np = dev_of_node(dev); for_each_available_child_of_node(np, child) of_clk_del_provider(child); - - return 0; } static struct platform_driver stm32mp1_rcc_clocks_driver = { @@ -2451,7 +2449,7 @@ static struct platform_driver stm32mp1_rcc_clocks_driver = { .of_match_table = stm32mp1_match_data, }, .probe = stm32mp1_rcc_clocks_probe, - .remove = stm32mp1_rcc_clocks_remove, + .remove_new = stm32mp1_rcc_clocks_remove, }; static int __init stm32mp1_clocks_init(void) From patchwork Sun Mar 12 16:14:59 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: 68380 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp782709wrd; Sun, 12 Mar 2023 09:17:11 -0700 (PDT) X-Google-Smtp-Source: AK7set8Fs0mA9avK8KiJwyLDUADVkJDAqzXDlGVKkPrOgPRFXWX3oV9idJm1qCu7xeUirgbmPCO4 X-Received: by 2002:aa7:973d:0:b0:5a8:ab21:be2e with SMTP id k29-20020aa7973d000000b005a8ab21be2emr22729974pfg.18.1678637831427; Sun, 12 Mar 2023 09:17:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678637831; cv=none; d=google.com; s=arc-20160816; b=gcCHG1vOLQc0fF/IFjf42nOYw2hg01PxftK/c/crodXKzpBkyAinjgZHXkULWgL9St um8/kmJNpRnEbLfi+tYTtuf7VbaXwnhwaIUlHVsI81DiwYmF+UiwLjJZPwW+CEbjTbHW q4QKZpholdBK0Qbg4Mp++ikRjwSr0iVJyTifrk+hur/piat1s/YRvfXDF+BRHZooeDwh BokKimCWInskdSzhQQb46oQCy0Q5MDDwvTOGEhJKKEo+i8MhKEELGQVDYvRHsccF3xSP 574hETEPqspi6fW6/klHxqS4GLEZe+FLEG4KIoMoKXpxerxh81Xrzvke/+Fl9nIcT5Bv 4VOw== 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=utMlazp8W38E3ebEBcvJ7u+3TiIbYipDWfQRIPKVqSc=; b=OmvAyKbLCRygV03jFSAaZDLdw2bZlj2L/Y+GNNg9OtfN6in8nklCQ2gQE3IS9bRrde aen+eIN7ImNocWv2hcVVgtx0ouhtxfeU7wd/blNaDgTKjagq6NKFJx3GmVLyWbq895Sb gyZWp63bcWxYE9GITHLKSVA+PffIYVTPTXx7yYD5LI7Gg98pyMPkU6lcD2MpsmOdyHYv xxrVcSUAnUWlMHEed3lO7wvtB6irS5oP02ymAdnLJgiisnch4N+/1z4QHAWxDzevcNv+ pHuXcPRDHp4BQ3WLyoLKiHz7h93b4Jr09c083XxeISFMA6qW3s3wIJ2XsFwEyov6Ob9b A59g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j125-20020a625583000000b00602eaac6646si4313122pfb.26.2023.03.12.09.16.56; Sun, 12 Mar 2023 09:17:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230086AbjCLQQK (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230123AbjCLQP3 (ORCPT ); Sun, 12 Mar 2023 12:15:29 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF55B36FE6 for ; Sun, 12 Mar 2023 09:15:28 -0700 (PDT) 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 1pbOLz-0007qO-L1; Sun, 12 Mar 2023 17:15:23 +0100 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 1pbOLz-003f2p-0t; Sun, 12 Mar 2023 17:15:23 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLx-004K95-PW; Sun, 12 Mar 2023 17:15:21 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/30] clk: hisilicon: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:14:59 +0100 Message-Id: <20230312161512.2715500-18-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4540; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ye2ciOe3ofcc3K17gZT5m+pVFUUGsOAA71z95jRxpm8=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfpZYl0t5migPG1PjAdI329B/YUO9BRpg/aQo +sxDkpiF62JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36WQAKCRDB/BR4rcrs CchQB/4q6JLHgZDa5Q1lmNGpDZvTaCp3hDH/26zUQyE+2WQC5S2bSle6rZaAY9hvXKgoHosyjbO KW0D2iuC3e6IzZv//VKTgFTH+uiX7IsKMJA254NCW5cRiqg5IJdlELZFkiq20r41SyRAk9p2Dgo Kf4Jl5dD0BKg7TSO60d9JhBxsgnvJhVCwNoOsz1I6w1abrFXw6FMT8V7ulnkaY2OkIr7lqWxVea Gs0+AkUcMh3lS8SFJpJQmoRnPg/E/lNhblOz92FIJb7f54SoKBwm9h9tpJT/pt6N+YbQuLcJ251 k2I31+a6JmBJvgLwLqJxbknc7yLaQlwbVJ/78xd+OLAUZXcx 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179342902690314?= X-GMAIL-MSGID: =?utf-8?q?1760179342902690314?= 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 (mostly) ignored 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. 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/clk/hisilicon/clk-hi3519.c | 5 ++--- drivers/clk/hisilicon/clk-hi3559a.c | 5 ++--- drivers/clk/hisilicon/crg-hi3516cv300.c | 5 ++--- drivers/clk/hisilicon/crg-hi3798cv200.c | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/clk/hisilicon/clk-hi3519.c b/drivers/clk/hisilicon/clk-hi3519.c index ad0c7f350cf0..b871872d9960 100644 --- a/drivers/clk/hisilicon/clk-hi3519.c +++ b/drivers/clk/hisilicon/clk-hi3519.c @@ -162,13 +162,12 @@ static int hi3519_clk_probe(struct platform_device *pdev) return 0; } -static int hi3519_clk_remove(struct platform_device *pdev) +static void hi3519_clk_remove(struct platform_device *pdev) { struct hi3519_crg_data *crg = platform_get_drvdata(pdev); hisi_reset_exit(crg->rstc); hi3519_clk_unregister(pdev); - return 0; } @@ -180,7 +179,7 @@ MODULE_DEVICE_TABLE(of, hi3519_clk_match_table); static struct platform_driver hi3519_clk_driver = { .probe = hi3519_clk_probe, - .remove = hi3519_clk_remove, + .remove_new = hi3519_clk_remove, .driver = { .name = "hi3519-clk", .of_match_table = hi3519_clk_match_table, diff --git a/drivers/clk/hisilicon/clk-hi3559a.c b/drivers/clk/hisilicon/clk-hi3559a.c index 9ea1a80acbe8..4f97638809b7 100644 --- a/drivers/clk/hisilicon/clk-hi3559a.c +++ b/drivers/clk/hisilicon/clk-hi3559a.c @@ -810,18 +810,17 @@ static int hi3559av100_crg_probe(struct platform_device *pdev) return 0; } -static int hi3559av100_crg_remove(struct platform_device *pdev) +static void hi3559av100_crg_remove(struct platform_device *pdev) { struct hisi_crg_dev *crg = platform_get_drvdata(pdev); hisi_reset_exit(crg->rstc); crg->funcs->unregister_clks(pdev); - return 0; } static struct platform_driver hi3559av100_crg_driver = { .probe = hi3559av100_crg_probe, - .remove = hi3559av100_crg_remove, + .remove_new = hi3559av100_crg_remove, .driver = { .name = "hi3559av100-clock", .of_match_table = hi3559av100_crg_match_table, diff --git a/drivers/clk/hisilicon/crg-hi3516cv300.c b/drivers/clk/hisilicon/crg-hi3516cv300.c index 5d4e61c7a429..fe1bd3e3f988 100644 --- a/drivers/clk/hisilicon/crg-hi3516cv300.c +++ b/drivers/clk/hisilicon/crg-hi3516cv300.c @@ -284,18 +284,17 @@ static int hi3516cv300_crg_probe(struct platform_device *pdev) return 0; } -static int hi3516cv300_crg_remove(struct platform_device *pdev) +static void hi3516cv300_crg_remove(struct platform_device *pdev) { struct hisi_crg_dev *crg = platform_get_drvdata(pdev); hisi_reset_exit(crg->rstc); crg->funcs->unregister_clks(pdev); - return 0; } static struct platform_driver hi3516cv300_crg_driver = { .probe = hi3516cv300_crg_probe, - .remove = hi3516cv300_crg_remove, + .remove_new = hi3516cv300_crg_remove, .driver = { .name = "hi3516cv300-crg", .of_match_table = hi3516cv300_crg_match_table, diff --git a/drivers/clk/hisilicon/crg-hi3798cv200.c b/drivers/clk/hisilicon/crg-hi3798cv200.c index 08a19ba776e6..a0b16be1e25d 100644 --- a/drivers/clk/hisilicon/crg-hi3798cv200.c +++ b/drivers/clk/hisilicon/crg-hi3798cv200.c @@ -367,18 +367,17 @@ static int hi3798cv200_crg_probe(struct platform_device *pdev) return 0; } -static int hi3798cv200_crg_remove(struct platform_device *pdev) +static void hi3798cv200_crg_remove(struct platform_device *pdev) { struct hisi_crg_dev *crg = platform_get_drvdata(pdev); hisi_reset_exit(crg->rstc); crg->funcs->unregister_clks(pdev); - return 0; } static struct platform_driver hi3798cv200_crg_driver = { .probe = hi3798cv200_crg_probe, - .remove = hi3798cv200_crg_remove, + .remove_new = hi3798cv200_crg_remove, .driver = { .name = "hi3798cv200-crg", .of_match_table = hi3798cv200_crg_match_table, From patchwork Sun Mar 12 16:15:00 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: 68407 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp799476wrd; Sun, 12 Mar 2023 10:03:31 -0700 (PDT) X-Google-Smtp-Source: AK7set9BTGoIiKEY2yOdu6Mj/RpeXVXNJKkwwh8Kbzg1edpB5tEPsxAZmqo+uFWYvaeODBpvWCGj X-Received: by 2002:a17:902:db04:b0:19f:3e9b:7527 with SMTP id m4-20020a170902db0400b0019f3e9b7527mr2781319plx.61.1678640611104; Sun, 12 Mar 2023 10:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640611; cv=none; d=google.com; s=arc-20160816; b=USmHsPQ4saO0MUp8uV2ETQBOdtMVS7WLqQOyWyuObD3OsT8cCW2+/dqgmgM6xmm8yg C7IX4t78ueHM2dFhnpKPeFJZxt8sEf7+dhWNHKNw/f4quDS1/nOsMceubAZqnxGStGv6 X9AObOj3lfv24Fx5w7BjAbAaw/JktGE8bEg6eXU6tiNqn7Dx0ZbOCqzcZkRufPy0DteD UIy+aQfSJU/e5dv72temOQ4myzLIKaesiRW7BlHYrGhvU2bfr+DR+npm4hH+yUqIgPfC eV8pzQTEBssNb4/ks71/gRLr3HScQ8gndkZXo1g07bEepyxRv7inb1mdgRQQWJ4fy/Ls 0AoA== 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=9mDCwbQXKXlxM23FxZi2OrgvBVp8voVWXvIugxKxk8s=; b=n2sMy0HtAJ2olzYrQ7vyS8pbseUmYGSwoBhLaSZhirPyY/Wq+47FMT36dJzTn4mbdR DotalCdoOrpu/InbKE1Ki8LzIij9c/zC8AGhp/HEVyeLCtQjDMwCWYkArfhLItU2KL3d l8x0CCfREgTGTJLROrBEOLAAkV6XuIQF6LXqEqrg2z7Vbot8HEUkjFTrQ5jzikiZys+Q sY/DiC9YB6oI6QsX/nYoUEjZzwXhf8CuP16VkPZ0mlIKUEhP/XPYRPHqkdO0mIb+nC17 lavW4niDSKeIX9CYm/scXDzYk7u/LN6owaeRAaYGvceCBOGSAkrSmlbcRSh7nMfzCpYG Az4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j5-20020a170903028500b0019f309fda80si2997457plr.515.2023.03.12.10.03.18; Sun, 12 Mar 2023 10:03:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230427AbjCLQQk (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230175AbjCLQPg (ORCPT ); Sun, 12 Mar 2023 12:15:36 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C118238663 for ; Sun, 12 Mar 2023 09:15:33 -0700 (PDT) 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 1pbOLz-0007q3-CF; Sun, 12 Mar 2023 17:15:23 +0100 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 1pbOLy-003f2i-Oh; Sun, 12 Mar 2023 17:15:22 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLy-004K98-0D; Sun, 12 Mar 2023 17:15:22 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Michael Turquette , Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 18/30] clk: keystone: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:00 +0100 Message-Id: <20230312161512.2715500-19-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1610; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=EdxpF9B3WevfLOCMcjAbOLN0OKWfDkQVotXJZRfvPU8=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfpdmGxBzJ7rYzLX8wC5RQFJSkGcMuClwg3yA dBWvUrN1waJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36XQAKCRDB/BR4rcrs Ce6zCACAc5Dsu8CfbYeza6I0tWh8Pvi239Ywn32eZEcBLa/U12ZcdegfxZaZ9x7i6L+NkxW0lhj fx7skQVtNlhSbxawvIMUE6oPRT//UZJGEFo5LcL2WypYFfFwAt3X+a1ve6vH8O3sGFY5LLarJ4u iGslA6xK0d2rcXjW8WDDjkQMiFqUZ45YpLo1o0BjVNXKPJ0cE7qW/s2mcex6dfr7M0F3Udjk/t+ uA39pWbhe9Xpy+71ntFva3IPVzXwcJvZRIm6EVf9g8hMVHpZmN1NZR1BdKbxv8CupGmdap00eGp uHIdAqmAM/tLYv7VJQVs7SUiY/oNRtOEuoCFNSITpo6Yg/hU 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760182257651060273?= X-GMAIL-MSGID: =?utf-8?q?1760182257651060273?= 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 (mostly) ignored 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. 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/clk/keystone/sci-clk.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c index d4b4e74e22da..910ecd58c4ca 100644 --- a/drivers/clk/keystone/sci-clk.c +++ b/drivers/clk/keystone/sci-clk.c @@ -689,16 +689,14 @@ static int ti_sci_clk_probe(struct platform_device *pdev) * via common clock framework. Any memory allocated for the device will * be free'd silently via the devm framework. Returns 0 always. */ -static int ti_sci_clk_remove(struct platform_device *pdev) +static void ti_sci_clk_remove(struct platform_device *pdev) { of_clk_del_provider(pdev->dev.of_node); - - return 0; } static struct platform_driver ti_sci_clk_driver = { .probe = ti_sci_clk_probe, - .remove = ti_sci_clk_remove, + .remove_new = ti_sci_clk_remove, .driver = { .name = "ti-sci-clk", .of_match_table = of_match_ptr(ti_sci_clk_of_match), From patchwork Sun Mar 12 16:15:01 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: 68383 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp782909wrd; Sun, 12 Mar 2023 09:17:47 -0700 (PDT) X-Google-Smtp-Source: AK7set+F31NUNQMVywz1Xx2IZ2557CCwn8R7E+hQ4oDD1njr/2cz9AsATd4ONdq11PuAMIQqIRvg X-Received: by 2002:a05:6a20:3fa8:b0:cb:f92f:374e with SMTP id ay40-20020a056a203fa800b000cbf92f374emr29162540pzb.22.1678637866853; Sun, 12 Mar 2023 09:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678637866; cv=none; d=google.com; s=arc-20160816; b=tMjX55mvBAGS1APpmAhbi5bNZf+NNNLMBwTjJySvrM3ASvksLmx/yuN8T/i8nr2XXZ /Hu0YlTDHVM8bLJU/es6anqQXTGyheKMmY+R/jnda2EIHLKNX4JeZAoFKdmDY36w7t/j pWJ3zOYihuRLiWcvA4fbtAjc4gjwY+4fEDnAZYnaygdyqCNC7/lKZGpmb/Y3iFVDzKuc aCnygnAJuMaiMJBoCJQ7qkw4Sl2K8zg1tgMyMcm+zs5/YVhqZqVjXXoiwXhb4pPDM/lF oteStBv/PWNd6VL1pntprTxxO9OhDDudlkfHFxyROH2n99yzYCWq4yIyR3PBsk+QtXfo HuXw== 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=ihvV19RDIWfHOTugDr0+CppTvHlRBjgnRfxzNyvz9wE=; b=S/7/gdjuoGUCBrX65vYYzTL+2WY56TRs1p3jnveaWG5GKWRtqstEcO5Uk5rdbO+5W0 zTH2mkNs9o2AMo6F7esUuWb1FWIo6eCSJKyWHSsRvq24StUBrBPe6uX+Xnos0UkYtMO2 Fki9GEptQIMPg2fzigxgkz2wIExXp2iji4sX6mmZ5/YCZ74lHLaJB+m4fxgrmWt46GTg us2yviYOydlHZAYmfMcBhugV+gJsik8ZEnHKj+Xo03sSRHuoTsmzwTq4scQH9wF+nHlt 1GlRuuMcRtDXPgyIbUs9ZYUjb/6OY1gC0z2UDGX7VfXMIsc8jJb450DpuyBeNwqfbcgR Zi8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f20-20020a63e314000000b004fcc0088e49si4414902pgh.142.2023.03.12.09.17.32; Sun, 12 Mar 2023 09:17:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230408AbjCLQQe (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230167AbjCLQPf (ORCPT ); Sun, 12 Mar 2023 12:15:35 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDD6B37F2C for ; Sun, 12 Mar 2023 09:15:31 -0700 (PDT) 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 1pbOLz-0007qV-P1; Sun, 12 Mar 2023 17:15:23 +0100 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 1pbOLz-003f2s-4x; Sun, 12 Mar 2023 17:15:23 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLy-004K9B-98; Sun, 12 Mar 2023 17:15:22 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd , Matthias Brugger Cc: AngeloGioacchino Del Regno , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 19/30] clk: mediatek: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:01 +0100 Message-Id: <20230312161512.2715500-20-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=21166; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=KF+g9q1reJzWvdfls8YQVm2+v74wmRfuk2qSt/B8rws=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfpgnE5WTo2JCisMSxXG7j3+1kmXNntVdUCGa 5XDf1fISXqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36YAAKCRDB/BR4rcrs CQwkCACMFMdOG/RNM5hmU7yU4BGAeo0YkT1YIkJOfIKLlR6HwBXC22ShIEh63ElG8h/qqfdgTCB oTpIK/GxS5MMXlUb9FaH16mzoNNVU9nmQnasx/SoatovMVM0EjN3AkkhNIv7cCRE9Rfk+e9zw4W xAoy+AUQ/K3GYssGZ8EAqPb+7HYriWhSiuNzzcKqobbLqUHxEyjju4px/PRsANH5HUN6UfGQch/ ozWZQTNuBA8EzApqFlvzxT1fLWUhzVYVFtadg1pr3/emQa2YY3Y1WXKuNNvo9GksGW0cjMkGjeR phuOBEJ+5ckvW9g+x7izXeq4+a4d+Ix0fvIQz6pB27zcgqN9 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179379948791276?= X-GMAIL-MSGID: =?utf-8?q?1760179379948791276?= 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 (mostly) ignored 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. 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/clk/mediatek/clk-mt6795-apmixedsys.c | 6 ++---- drivers/clk/mediatek/clk-mt6795-infracfg.c | 6 ++---- drivers/clk/mediatek/clk-mt6795-mm.c | 6 ++---- drivers/clk/mediatek/clk-mt6795-pericfg.c | 6 ++---- drivers/clk/mediatek/clk-mt8173-apmixedsys.c | 6 ++---- drivers/clk/mediatek/clk-mt8173-infracfg.c | 6 ++---- drivers/clk/mediatek/clk-mt8173-mm.c | 6 ++---- drivers/clk/mediatek/clk-mt8186-apmixedsys.c | 6 ++---- drivers/clk/mediatek/clk-mt8186-mcu.c | 6 ++---- drivers/clk/mediatek/clk-mt8186-mm.c | 6 ++---- drivers/clk/mediatek/clk-mt8195-apmixedsys.c | 6 ++---- drivers/clk/mediatek/clk-mt8195-apusys_pll.c | 6 ++---- drivers/clk/mediatek/clk-mt8195-topckgen.c | 6 ++---- drivers/clk/mediatek/clk-mt8195-vdo0.c | 6 ++---- drivers/clk/mediatek/clk-mt8195-vdo1.c | 6 ++---- drivers/clk/mediatek/clk-mt8195-vpp0.c | 6 ++---- drivers/clk/mediatek/clk-mt8195-vpp1.c | 6 ++---- 17 files changed, 34 insertions(+), 68 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt6795-apmixedsys.c b/drivers/clk/mediatek/clk-mt6795-apmixedsys.c index 59761c72d3bc..d71784f82d85 100644 --- a/drivers/clk/mediatek/clk-mt6795-apmixedsys.c +++ b/drivers/clk/mediatek/clk-mt6795-apmixedsys.c @@ -130,7 +130,7 @@ static int clk_mt6795_apmixed_probe(struct platform_device *pdev) return ret; } -static int clk_mt6795_apmixed_remove(struct platform_device *pdev) +static void clk_mt6795_apmixed_remove(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); @@ -139,13 +139,11 @@ static int clk_mt6795_apmixed_remove(struct platform_device *pdev) mtk_clk_unregister_ref2usb_tx(clk_data->hws[CLK_APMIXED_REF2USB_TX]); mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt6795_apmixed_drv = { .probe = clk_mt6795_apmixed_probe, - .remove = clk_mt6795_apmixed_remove, + .remove_new = clk_mt6795_apmixed_remove, .driver = { .name = "clk-mt6795-apmixed", .of_match_table = of_match_clk_mt6795_apmixed, diff --git a/drivers/clk/mediatek/clk-mt6795-infracfg.c b/drivers/clk/mediatek/clk-mt6795-infracfg.c index 23d9fc057e61..e74902d51db7 100644 --- a/drivers/clk/mediatek/clk-mt6795-infracfg.c +++ b/drivers/clk/mediatek/clk-mt6795-infracfg.c @@ -126,7 +126,7 @@ static int clk_mt6795_infracfg_probe(struct platform_device *pdev) return ret; } -static int clk_mt6795_infracfg_remove(struct platform_device *pdev) +static void clk_mt6795_infracfg_remove(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); @@ -135,8 +135,6 @@ static int clk_mt6795_infracfg_remove(struct platform_device *pdev) mtk_clk_unregister_cpumuxes(cpu_muxes, ARRAY_SIZE(cpu_muxes), clk_data); mtk_clk_unregister_gates(infra_gates, ARRAY_SIZE(infra_gates), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt6795_infracfg_drv = { @@ -145,7 +143,7 @@ static struct platform_driver clk_mt6795_infracfg_drv = { .of_match_table = of_match_clk_mt6795_infracfg, }, .probe = clk_mt6795_infracfg_probe, - .remove = clk_mt6795_infracfg_remove, + .remove_new = clk_mt6795_infracfg_remove, }; module_platform_driver(clk_mt6795_infracfg_drv); diff --git a/drivers/clk/mediatek/clk-mt6795-mm.c b/drivers/clk/mediatek/clk-mt6795-mm.c index eebb6143ada2..426f9897877d 100644 --- a/drivers/clk/mediatek/clk-mt6795-mm.c +++ b/drivers/clk/mediatek/clk-mt6795-mm.c @@ -107,7 +107,7 @@ static int clk_mt6795_mm_probe(struct platform_device *pdev) return ret; } -static int clk_mt6795_mm_remove(struct platform_device *pdev) +static void clk_mt6795_mm_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *node = dev->parent->of_node; @@ -116,8 +116,6 @@ static int clk_mt6795_mm_remove(struct platform_device *pdev) of_clk_del_provider(node); mtk_clk_unregister_gates(mm_gates, ARRAY_SIZE(mm_gates), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt6795_mm_drv = { @@ -125,7 +123,7 @@ static struct platform_driver clk_mt6795_mm_drv = { .name = "clk-mt6795-mm", }, .probe = clk_mt6795_mm_probe, - .remove = clk_mt6795_mm_remove, + .remove_new = clk_mt6795_mm_remove, }; module_platform_driver(clk_mt6795_mm_drv); diff --git a/drivers/clk/mediatek/clk-mt6795-pericfg.c b/drivers/clk/mediatek/clk-mt6795-pericfg.c index 08aaa9b09c36..9e30d8d186a2 100644 --- a/drivers/clk/mediatek/clk-mt6795-pericfg.c +++ b/drivers/clk/mediatek/clk-mt6795-pericfg.c @@ -135,7 +135,7 @@ static int clk_mt6795_pericfg_probe(struct platform_device *pdev) return ret; } -static int clk_mt6795_pericfg_remove(struct platform_device *pdev) +static void clk_mt6795_pericfg_remove(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); @@ -144,8 +144,6 @@ static int clk_mt6795_pericfg_remove(struct platform_device *pdev) mtk_clk_unregister_composites(peri_clks, ARRAY_SIZE(peri_clks), clk_data); mtk_clk_unregister_gates(peri_gates, ARRAY_SIZE(peri_gates), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt6795_pericfg_drv = { @@ -154,7 +152,7 @@ static struct platform_driver clk_mt6795_pericfg_drv = { .of_match_table = of_match_clk_mt6795_pericfg, }, .probe = clk_mt6795_pericfg_probe, - .remove = clk_mt6795_pericfg_remove, + .remove_new = clk_mt6795_pericfg_remove, }; module_platform_driver(clk_mt6795_pericfg_drv); diff --git a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c index a56c5845d07a..b7ca15949fd1 100644 --- a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c +++ b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c @@ -130,7 +130,7 @@ static int clk_mt8173_apmixed_probe(struct platform_device *pdev) return r; } -static int clk_mt8173_apmixed_remove(struct platform_device *pdev) +static void clk_mt8173_apmixed_remove(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); @@ -139,13 +139,11 @@ static int clk_mt8173_apmixed_remove(struct platform_device *pdev) mtk_clk_unregister_ref2usb_tx(clk_data->hws[CLK_APMIXED_REF2USB_TX]); mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt8173_apmixed_drv = { .probe = clk_mt8173_apmixed_probe, - .remove = clk_mt8173_apmixed_remove, + .remove_new = clk_mt8173_apmixed_remove, .driver = { .name = "clk-mt8173-apmixed", .of_match_table = of_match_clk_mt8173_apmixed, diff --git a/drivers/clk/mediatek/clk-mt8173-infracfg.c b/drivers/clk/mediatek/clk-mt8173-infracfg.c index 729b3c408c7b..c71c0e5c607d 100644 --- a/drivers/clk/mediatek/clk-mt8173-infracfg.c +++ b/drivers/clk/mediatek/clk-mt8173-infracfg.c @@ -128,7 +128,7 @@ static int clk_mt8173_infracfg_probe(struct platform_device *pdev) return r; } -static int clk_mt8173_infracfg_remove(struct platform_device *pdev) +static void clk_mt8173_infracfg_remove(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); @@ -137,8 +137,6 @@ static int clk_mt8173_infracfg_remove(struct platform_device *pdev) mtk_clk_unregister_cpumuxes(cpu_muxes, ARRAY_SIZE(cpu_muxes), clk_data); mtk_clk_unregister_gates(infra_gates, ARRAY_SIZE(infra_gates), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt8173_infracfg_drv = { @@ -147,7 +145,7 @@ static struct platform_driver clk_mt8173_infracfg_drv = { .of_match_table = of_match_clk_mt8173_infracfg, }, .probe = clk_mt8173_infracfg_probe, - .remove = clk_mt8173_infracfg_remove, + .remove_new = clk_mt8173_infracfg_remove, }; module_platform_driver(clk_mt8173_infracfg_drv); diff --git a/drivers/clk/mediatek/clk-mt8173-mm.c b/drivers/clk/mediatek/clk-mt8173-mm.c index 315430ad1581..a941b4c688a5 100644 --- a/drivers/clk/mediatek/clk-mt8173-mm.c +++ b/drivers/clk/mediatek/clk-mt8173-mm.c @@ -136,7 +136,7 @@ static int clk_mt8173_mm_probe(struct platform_device *pdev) return 0; } -static int clk_mt8173_mm_remove(struct platform_device *pdev) +static void clk_mt8173_mm_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *node = dev->parent->of_node; @@ -146,8 +146,6 @@ static int clk_mt8173_mm_remove(struct platform_device *pdev) of_clk_del_provider(node); mtk_clk_unregister_gates(data->gates_clk, data->gates_num, clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt8173_mm_drv = { @@ -155,7 +153,7 @@ static struct platform_driver clk_mt8173_mm_drv = { .name = "clk-mt8173-mm", }, .probe = clk_mt8173_mm_probe, - .remove = clk_mt8173_mm_remove, + .remove_new = clk_mt8173_mm_remove, }; builtin_platform_driver(clk_mt8173_mm_drv); diff --git a/drivers/clk/mediatek/clk-mt8186-apmixedsys.c b/drivers/clk/mediatek/clk-mt8186-apmixedsys.c index 1d673c6278a9..392ffc1acb05 100644 --- a/drivers/clk/mediatek/clk-mt8186-apmixedsys.c +++ b/drivers/clk/mediatek/clk-mt8186-apmixedsys.c @@ -169,7 +169,7 @@ static int clk_mt8186_apmixed_probe(struct platform_device *pdev) return r; } -static int clk_mt8186_apmixed_remove(struct platform_device *pdev) +static void clk_mt8186_apmixed_remove(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); @@ -178,13 +178,11 @@ static int clk_mt8186_apmixed_remove(struct platform_device *pdev) mtk_clk_unregister_pllfhs(plls, ARRAY_SIZE(plls), pllfhs, ARRAY_SIZE(pllfhs), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt8186_apmixed_drv = { .probe = clk_mt8186_apmixed_probe, - .remove = clk_mt8186_apmixed_remove, + .remove_new = clk_mt8186_apmixed_remove, .driver = { .name = "clk-mt8186-apmixed", .of_match_table = of_match_clk_mt8186_apmixed, diff --git a/drivers/clk/mediatek/clk-mt8186-mcu.c b/drivers/clk/mediatek/clk-mt8186-mcu.c index e52a2d986c99..e36519996873 100644 --- a/drivers/clk/mediatek/clk-mt8186-mcu.c +++ b/drivers/clk/mediatek/clk-mt8186-mcu.c @@ -86,7 +86,7 @@ static int clk_mt8186_mcu_probe(struct platform_device *pdev) return r; } -static int clk_mt8186_mcu_remove(struct platform_device *pdev) +static void clk_mt8186_mcu_remove(struct platform_device *pdev) { struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); struct device_node *node = pdev->dev.of_node; @@ -94,13 +94,11 @@ static int clk_mt8186_mcu_remove(struct platform_device *pdev) of_clk_del_provider(node); mtk_clk_unregister_composites(mcu_muxes, ARRAY_SIZE(mcu_muxes), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt8186_mcu_drv = { .probe = clk_mt8186_mcu_probe, - .remove = clk_mt8186_mcu_remove, + .remove_new = clk_mt8186_mcu_remove, .driver = { .name = "clk-mt8186-mcu", .of_match_table = of_match_clk_mt8186_mcu, diff --git a/drivers/clk/mediatek/clk-mt8186-mm.c b/drivers/clk/mediatek/clk-mt8186-mm.c index 0b72607777fa..bd54f13939a9 100644 --- a/drivers/clk/mediatek/clk-mt8186-mm.c +++ b/drivers/clk/mediatek/clk-mt8186-mm.c @@ -89,7 +89,7 @@ static int clk_mt8186_mm_probe(struct platform_device *pdev) return r; } -static int clk_mt8186_mm_remove(struct platform_device *pdev) +static void clk_mt8186_mm_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *node = dev->parent->of_node; @@ -98,13 +98,11 @@ static int clk_mt8186_mm_remove(struct platform_device *pdev) of_clk_del_provider(node); mtk_clk_unregister_gates(mm_clks, ARRAY_SIZE(mm_clks), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt8186_mm_drv = { .probe = clk_mt8186_mm_probe, - .remove = clk_mt8186_mm_remove, + .remove_new = clk_mt8186_mm_remove, .driver = { .name = "clk-mt8186-mm", }, diff --git a/drivers/clk/mediatek/clk-mt8195-apmixedsys.c b/drivers/clk/mediatek/clk-mt8195-apmixedsys.c index 1bc917f2667e..232781c70df2 100644 --- a/drivers/clk/mediatek/clk-mt8195-apmixedsys.c +++ b/drivers/clk/mediatek/clk-mt8195-apmixedsys.c @@ -146,7 +146,7 @@ static int clk_mt8195_apmixed_probe(struct platform_device *pdev) return r; } -static int clk_mt8195_apmixed_remove(struct platform_device *pdev) +static void clk_mt8195_apmixed_remove(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); @@ -155,13 +155,11 @@ static int clk_mt8195_apmixed_remove(struct platform_device *pdev) mtk_clk_unregister_gates(apmixed_clks, ARRAY_SIZE(apmixed_clks), clk_data); mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt8195_apmixed_drv = { .probe = clk_mt8195_apmixed_probe, - .remove = clk_mt8195_apmixed_remove, + .remove_new = clk_mt8195_apmixed_remove, .driver = { .name = "clk-mt8195-apmixed", .of_match_table = of_match_clk_mt8195_apmixed, diff --git a/drivers/clk/mediatek/clk-mt8195-apusys_pll.c b/drivers/clk/mediatek/clk-mt8195-apusys_pll.c index 0b52f6a009c4..d8ba3c5a5942 100644 --- a/drivers/clk/mediatek/clk-mt8195-apusys_pll.c +++ b/drivers/clk/mediatek/clk-mt8195-apusys_pll.c @@ -85,7 +85,7 @@ static int clk_mt8195_apusys_pll_probe(struct platform_device *pdev) return r; } -static int clk_mt8195_apusys_pll_remove(struct platform_device *pdev) +static void clk_mt8195_apusys_pll_remove(struct platform_device *pdev) { struct clk_hw_onecell_data *clk_data = platform_get_drvdata(pdev); struct device_node *node = pdev->dev.of_node; @@ -93,8 +93,6 @@ static int clk_mt8195_apusys_pll_remove(struct platform_device *pdev) of_clk_del_provider(node); mtk_clk_unregister_plls(apusys_plls, ARRAY_SIZE(apusys_plls), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static const struct of_device_id of_match_clk_mt8195_apusys_pll[] = { @@ -104,7 +102,7 @@ static const struct of_device_id of_match_clk_mt8195_apusys_pll[] = { static struct platform_driver clk_mt8195_apusys_pll_drv = { .probe = clk_mt8195_apusys_pll_probe, - .remove = clk_mt8195_apusys_pll_remove, + .remove_new = clk_mt8195_apusys_pll_remove, .driver = { .name = "clk-mt8195-apusys_pll", .of_match_table = of_match_clk_mt8195_apusys_pll, diff --git a/drivers/clk/mediatek/clk-mt8195-topckgen.c b/drivers/clk/mediatek/clk-mt8195-topckgen.c index cf520f85de73..c970cdd13c0b 100644 --- a/drivers/clk/mediatek/clk-mt8195-topckgen.c +++ b/drivers/clk/mediatek/clk-mt8195-topckgen.c @@ -1316,7 +1316,7 @@ static int clk_mt8195_topck_probe(struct platform_device *pdev) return r; } -static int clk_mt8195_topck_remove(struct platform_device *pdev) +static void clk_mt8195_topck_remove(struct platform_device *pdev) { struct clk_hw_onecell_data *top_clk_data = platform_get_drvdata(pdev); struct device_node *node = pdev->dev.of_node; @@ -1328,13 +1328,11 @@ static int clk_mt8195_topck_remove(struct platform_device *pdev) mtk_clk_unregister_factors(top_divs, ARRAY_SIZE(top_divs), top_clk_data); mtk_clk_unregister_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks), top_clk_data); mtk_free_clk_data(top_clk_data); - - return 0; } static struct platform_driver clk_mt8195_topck_drv = { .probe = clk_mt8195_topck_probe, - .remove = clk_mt8195_topck_remove, + .remove_new = clk_mt8195_topck_remove, .driver = { .name = "clk-mt8195-topck", .of_match_table = of_match_clk_mt8195_topck, diff --git a/drivers/clk/mediatek/clk-mt8195-vdo0.c b/drivers/clk/mediatek/clk-mt8195-vdo0.c index 839b730688ac..86663db54a72 100644 --- a/drivers/clk/mediatek/clk-mt8195-vdo0.c +++ b/drivers/clk/mediatek/clk-mt8195-vdo0.c @@ -124,7 +124,7 @@ static int clk_mt8195_vdo0_probe(struct platform_device *pdev) return r; } -static int clk_mt8195_vdo0_remove(struct platform_device *pdev) +static void clk_mt8195_vdo0_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *node = dev->parent->of_node; @@ -133,13 +133,11 @@ static int clk_mt8195_vdo0_remove(struct platform_device *pdev) of_clk_del_provider(node); mtk_clk_unregister_gates(vdo0_clks, ARRAY_SIZE(vdo0_clks), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt8195_vdo0_drv = { .probe = clk_mt8195_vdo0_probe, - .remove = clk_mt8195_vdo0_remove, + .remove_new = clk_mt8195_vdo0_remove, .driver = { .name = "clk-mt8195-vdo0", }, diff --git a/drivers/clk/mediatek/clk-mt8195-vdo1.c b/drivers/clk/mediatek/clk-mt8195-vdo1.c index 7df695b28925..05119b31077d 100644 --- a/drivers/clk/mediatek/clk-mt8195-vdo1.c +++ b/drivers/clk/mediatek/clk-mt8195-vdo1.c @@ -151,7 +151,7 @@ static int clk_mt8195_vdo1_probe(struct platform_device *pdev) return r; } -static int clk_mt8195_vdo1_remove(struct platform_device *pdev) +static void clk_mt8195_vdo1_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *node = dev->parent->of_node; @@ -160,13 +160,11 @@ static int clk_mt8195_vdo1_remove(struct platform_device *pdev) of_clk_del_provider(node); mtk_clk_unregister_gates(vdo1_clks, ARRAY_SIZE(vdo1_clks), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt8195_vdo1_drv = { .probe = clk_mt8195_vdo1_probe, - .remove = clk_mt8195_vdo1_remove, + .remove_new = clk_mt8195_vdo1_remove, .driver = { .name = "clk-mt8195-vdo1", }, diff --git a/drivers/clk/mediatek/clk-mt8195-vpp0.c b/drivers/clk/mediatek/clk-mt8195-vpp0.c index e19664af09b6..fdb9f0507e52 100644 --- a/drivers/clk/mediatek/clk-mt8195-vpp0.c +++ b/drivers/clk/mediatek/clk-mt8195-vpp0.c @@ -116,7 +116,7 @@ static int clk_mt8195_vpp0_probe(struct platform_device *pdev) return r; } -static int clk_mt8195_vpp0_remove(struct platform_device *pdev) +static void clk_mt8195_vpp0_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *node = dev->parent->of_node; @@ -125,13 +125,11 @@ static int clk_mt8195_vpp0_remove(struct platform_device *pdev) of_clk_del_provider(node); mtk_clk_unregister_gates(vpp0_clks, ARRAY_SIZE(vpp0_clks), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt8195_vpp0_drv = { .probe = clk_mt8195_vpp0_probe, - .remove = clk_mt8195_vpp0_remove, + .remove_new = clk_mt8195_vpp0_remove, .driver = { .name = "clk-mt8195-vpp0", }, diff --git a/drivers/clk/mediatek/clk-mt8195-vpp1.c b/drivers/clk/mediatek/clk-mt8195-vpp1.c index e6c458fc1531..075c569867d1 100644 --- a/drivers/clk/mediatek/clk-mt8195-vpp1.c +++ b/drivers/clk/mediatek/clk-mt8195-vpp1.c @@ -114,7 +114,7 @@ static int clk_mt8195_vpp1_probe(struct platform_device *pdev) return r; } -static int clk_mt8195_vpp1_remove(struct platform_device *pdev) +static void clk_mt8195_vpp1_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *node = dev->parent->of_node; @@ -123,13 +123,11 @@ static int clk_mt8195_vpp1_remove(struct platform_device *pdev) of_clk_del_provider(node); mtk_clk_unregister_gates(vpp1_clks, ARRAY_SIZE(vpp1_clks), clk_data); mtk_free_clk_data(clk_data); - - return 0; } static struct platform_driver clk_mt8195_vpp1_drv = { .probe = clk_mt8195_vpp1_probe, - .remove = clk_mt8195_vpp1_remove, + .remove_new = clk_mt8195_vpp1_remove, .driver = { .name = "clk-mt8195-vpp1", }, From patchwork Sun Mar 12 16:15:02 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: 68406 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp799467wrd; Sun, 12 Mar 2023 10:03:30 -0700 (PDT) X-Google-Smtp-Source: AK7set9+XBQ/5ZfwxR2I3gktH6MWoZZ9H2VCUHAW/IMSBosXG+70k/3WmSMq4V2cSRllZjJ1z+NT X-Received: by 2002:a17:903:1c1:b0:19e:898f:8816 with SMTP id e1-20020a17090301c100b0019e898f8816mr37242270plh.10.1678640609942; Sun, 12 Mar 2023 10:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640609; cv=none; d=google.com; s=arc-20160816; b=XyuSZaRZSMoqNqPXnI4tVWBYQmreRxOcn4q4EPop8x2GFhjr3r3nYWt0JmEgA/O1JX 6yFpd8znU8VPkDQxyH/wWZyba+FS9jBfI4VWnnLa+luCoLB1htWlmUhv2edbzybgr6wO JeGrn2en1OC7eUz449LgYqzhFALqB0qtW9Fpp3YIcbEzltY4R7pEDhzDo5oM/yZoDDmf o4s1gQMNJbEzHL4t8n7Cq/477HrN/M7kXARgkE2Fo04iOxmp5EaFDrfqfP2/pTA147zi Ya6pdGLEAcJ9kFZ7Gd+gZ9SSwwtPYGomfldx+qqRwjJCvbfKJF4Kr1AzJfwwI4QxIJ65 MbdQ== 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=MclMc0xn0z2mo+JnCOInPW2ZH73lADDSmZjNM3+kE/8=; b=czsRPuz13ZTuWVe9AlGAe6/egb9GYxons+yw8VggWZW2ITPxK+kLzI9HtSAMm/CL1O 95EieDgn5hSlSiV6vCAI9kJ/4sUS/Zhaqws+KuZ5id3f732tRu2/lUDtwJEyFwfG6P27 c75pnv6TkFVFMI7H1Dxr72yRdLQZr29fBJRWrHwczOvewCblmn+JBhxVKBU1yJJKNQ8J JHBmca5K9w9kdRHW8HoAwx1Ms6rVsGWJ7oZizHVKNuZYFWeth4ru5O2WIJUNNLBHNeD5 Vgg7+uaLLWv4Ex0KH1NBu9brLVZFmvGnYUAzYA428YGeOEGhnU+jw+oHNOjVd6zPy+Jc UJCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ko13-20020a17090307cd00b0019f23a15f43si3972446plb.578.2023.03.12.10.03.17; Sun, 12 Mar 2023 10:03:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230282AbjCLQP6 (ORCPT + 99 others); Sun, 12 Mar 2023 12:15:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbjCLQP3 (ORCPT ); Sun, 12 Mar 2023 12:15:29 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73D1236084 for ; Sun, 12 Mar 2023 09:15:28 -0700 (PDT) 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 1pbOLz-0007qY-Qw; Sun, 12 Mar 2023 17:15:23 +0100 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 1pbOLz-003f2x-7T; Sun, 12 Mar 2023 17:15:23 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLy-004K9F-G6; Sun, 12 Mar 2023 17:15:22 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 20/30] clk: mmp: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:02 +0100 Message-Id: <20230312161512.2715500-21-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1559; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=6pAH+UlQsJo/x5+z/AfP2hBEHoK8zvT2mO6fM4gHPEg=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfpnn7BYRo2cl59zcHVpqNtPyPhNPPM0EICc3 jglvKFMQeqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36ZwAKCRDB/BR4rcrs CRT5B/9qBPDaix3jhVQTCAHH9a171DMXZmMx6Dmv1SYz3TpPt5iTVGA8iv7pBoL+6AfYjHaPIk6 EgnAwmQa+JvQOe37IxI2Av5oGTh3jtxzUQNdR6bocstqa34D443hb7BpGYy2w2MZX7vH6t5i9dw PcWC1AH16o00BAjfhD0J3CzXoptP9a29Y9UJve/bGd+KG0hlvzTCh9Z9ZN/QPm9LMX7A3JU1M/L eFCkCmZI8TF5vqA7B84+KabYxX7E+1zPm8YW96Q6yMOboUEikw31MbpG2/SDqycdDMw4wj1rLEl 9bYE5iSkGvO1f6OkjJKv2bSakUJhldvIlmVlyvbbxjfKLZQ0 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760182256273450076?= X-GMAIL-MSGID: =?utf-8?q?1760182256273450076?= 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 (mostly) ignored 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. 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/clk/mmp/clk-audio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/mmp/clk-audio.c b/drivers/clk/mmp/clk-audio.c index 7aa7f4a9564f..6fb1aa9487b5 100644 --- a/drivers/clk/mmp/clk-audio.c +++ b/drivers/clk/mmp/clk-audio.c @@ -384,12 +384,10 @@ static int mmp2_audio_clk_probe(struct platform_device *pdev) return ret; } -static int mmp2_audio_clk_remove(struct platform_device *pdev) +static void mmp2_audio_clk_remove(struct platform_device *pdev) { pm_clk_destroy(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } #ifdef CONFIG_PM @@ -436,7 +434,7 @@ static struct platform_driver mmp2_audio_clk_driver = { .pm = &mmp2_audio_clk_pm_ops, }, .probe = mmp2_audio_clk_probe, - .remove = mmp2_audio_clk_remove, + .remove_new = mmp2_audio_clk_remove, }; module_platform_driver(mmp2_audio_clk_driver); From patchwork Sun Mar 12 16:15:03 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: 68389 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp792967wrd; Sun, 12 Mar 2023 09:45:51 -0700 (PDT) X-Google-Smtp-Source: AK7set/dafeN/V4Dcwf6c/QvPPDfPciOsFFyh9YzPRiLdhyhazoF54ENkcwV8I2Tj+3jPpFiwqHv X-Received: by 2002:a05:6a20:440c:b0:ce:5c14:2838 with SMTP id ce12-20020a056a20440c00b000ce5c142838mr43646506pzb.54.1678639550870; Sun, 12 Mar 2023 09:45:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678639550; cv=none; d=google.com; s=arc-20160816; b=ACH6gizfgJT8lJa2zUZ5QRSpaaIDL7u4V37VmUCNA1ed8AI50xktpEdh51EGVoOJmO y5ip/SuFKH2MAMkByzcDKYFu1qGs5syy0OZu/hamr0ZU7qyU/j5H/xt557r7yMKRVo77 +vhVn5/r9b8G7PQ3vVQwGx98YkqeIEiMExBW+ngZVIj4M7EBh7Q6XPoH2OVG5h7xdj4F ma10sCnefNviXitxtGFsPxUvS/HivObtYxGMM4IPesx8idpnoYhBL5k/lUAEvNYCeZ69 aF3vpJggNL3+ACyvweKx8RJa8Zx3RHWiqMz5nzyQJlCEtbO0AkyAl5vgu6t3fcfYOHVZ Bzow== 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=A12U4wlbS83PC9dG8Vtsly/WW7y9h9bKThCrzgPhp3Y=; b=F6UE5w6Du0Z9JpMszDY0ilM0ReUyCPkHTwWUECBQ07EBN7XPrBpdo2iYPcZ33Is98p 8QV6xjV/V3pFKQv1HpUNrulMOegOR4Q22FwkBfpjpiCWcYKQ0X5G7YI2EreNVdcYe9mz RK7hd0usqGEHQEsJiUb9j4KHd2+vACvVjT5KEGx7/bgcB0yswfa68bk76hKqlVHz+EHE QXOs1bpQnMJQ3kL3CiqJ9moUc2clHr50kH/fcS2y6v0Rc6CXZFpprDkvct5q9rKRcu3U sYNOSOYCrSfb5xde0/TZNfm0Wr05woxJp5Znu2uh1LnrcT+T0wcZXorvXobI8BeuWFJn S+0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q12-20020a63cc4c000000b005074cff89c7si140391pgi.421.2023.03.12.09.45.31; Sun, 12 Mar 2023 09:45:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230085AbjCLQQP (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbjCLQPb (ORCPT ); Sun, 12 Mar 2023 12:15:31 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E649C34F6E for ; Sun, 12 Mar 2023 09:15:29 -0700 (PDT) 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 1pbOM0-0007rH-Eb; Sun, 12 Mar 2023 17:15:24 +0100 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 1pbOLz-003f36-Pq; Sun, 12 Mar 2023 17:15:23 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLy-004K9J-MT; Sun, 12 Mar 2023 17:15:22 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 21/30] clk: mvebu: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:03 +0100 Message-Id: <20230312161512.2715500-22-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4390; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=WMTwTZXP8LdhrTppykw/Ey9Tf4bxrgjWhSEjSmPYxu0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfprZ5YALT/w10X6upwax85uZRgogh4gB5pws JwhwUrbucCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36awAKCRDB/BR4rcrs CWGRB/9X/lsRLoDOmA5j0fmrys8M6tXFOu0ftVULR4UklyTtE5PMdX/75F3LsWHgYppPgTAO+x7 vyPoy2/6ILVI0lb9u8MijUQa2Ozu+CJy9LzCdd/Gg81WRr2xrSoTL9LFS3TgTesuYz/Hi+1FwPD pkZs/88UVShdVeubuI+RM/vXzDM1DK8Ondr6ixD60x1ek+3izG/nP6oNHe4sV8O1MlI0zbp/rhF Z9EsSnw0/1aD74FSeB5TV1VtFF3+uRu7O4N3OJ2q63VEA9sXRKYlEKFzQjITIBirGiDfmH/X5IO lsklLlU+ei0APGgYylYNbWUdZjTzNU27OUlpG8ul/pc5hjrh 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760181145754383264?= X-GMAIL-MSGID: =?utf-8?q?1760181145754383264?= 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 (mostly) ignored 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. 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/clk/mvebu/armada-37xx-periph.c | 6 ++---- drivers/clk/mvebu/armada-37xx-tbg.c | 6 ++---- drivers/clk/mvebu/armada-37xx-xtal.c | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c index e3777ca65912..3ae6078f6ff7 100644 --- a/drivers/clk/mvebu/armada-37xx-periph.c +++ b/drivers/clk/mvebu/armada-37xx-periph.c @@ -781,7 +781,7 @@ static int armada_3700_periph_clock_probe(struct platform_device *pdev) return 0; } -static int armada_3700_periph_clock_remove(struct platform_device *pdev) +static void armada_3700_periph_clock_remove(struct platform_device *pdev) { struct clk_periph_driver_data *data = platform_get_drvdata(pdev); struct clk_hw_onecell_data *hw_data = data->hw_data; @@ -791,13 +791,11 @@ static int armada_3700_periph_clock_remove(struct platform_device *pdev) for (i = 0; i < hw_data->num; i++) clk_hw_unregister(hw_data->hws[i]); - - return 0; } static struct platform_driver armada_3700_periph_clock_driver = { .probe = armada_3700_periph_clock_probe, - .remove = armada_3700_periph_clock_remove, + .remove_new = armada_3700_periph_clock_remove, .driver = { .name = "marvell-armada-3700-periph-clock", .of_match_table = armada_3700_periph_clock_of_match, diff --git a/drivers/clk/mvebu/armada-37xx-tbg.c b/drivers/clk/mvebu/armada-37xx-tbg.c index fc403ad735ad..eccc1aeefbaf 100644 --- a/drivers/clk/mvebu/armada-37xx-tbg.c +++ b/drivers/clk/mvebu/armada-37xx-tbg.c @@ -126,7 +126,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev) return of_clk_add_hw_provider(np, of_clk_hw_onecell_get, hw_tbg_data); } -static int armada_3700_tbg_clock_remove(struct platform_device *pdev) +static void armada_3700_tbg_clock_remove(struct platform_device *pdev) { int i; struct clk_hw_onecell_data *hw_tbg_data = platform_get_drvdata(pdev); @@ -134,8 +134,6 @@ static int armada_3700_tbg_clock_remove(struct platform_device *pdev) of_clk_del_provider(pdev->dev.of_node); for (i = 0; i < hw_tbg_data->num; i++) clk_hw_unregister_fixed_factor(hw_tbg_data->hws[i]); - - return 0; } static const struct of_device_id armada_3700_tbg_clock_of_match[] = { @@ -145,7 +143,7 @@ static const struct of_device_id armada_3700_tbg_clock_of_match[] = { static struct platform_driver armada_3700_tbg_clock_driver = { .probe = armada_3700_tbg_clock_probe, - .remove = armada_3700_tbg_clock_remove, + .remove_new = armada_3700_tbg_clock_remove, .driver = { .name = "marvell-armada-3700-tbg-clock", .of_match_table = armada_3700_tbg_clock_of_match, diff --git a/drivers/clk/mvebu/armada-37xx-xtal.c b/drivers/clk/mvebu/armada-37xx-xtal.c index 41271351cf1f..0e2e7d00ae11 100644 --- a/drivers/clk/mvebu/armada-37xx-xtal.c +++ b/drivers/clk/mvebu/armada-37xx-xtal.c @@ -65,11 +65,9 @@ static int armada_3700_xtal_clock_probe(struct platform_device *pdev) return ret; } -static int armada_3700_xtal_clock_remove(struct platform_device *pdev) +static void armada_3700_xtal_clock_remove(struct platform_device *pdev) { of_clk_del_provider(pdev->dev.of_node); - - return 0; } static const struct of_device_id armada_3700_xtal_clock_of_match[] = { @@ -79,7 +77,7 @@ static const struct of_device_id armada_3700_xtal_clock_of_match[] = { static struct platform_driver armada_3700_xtal_clock_driver = { .probe = armada_3700_xtal_clock_probe, - .remove = armada_3700_xtal_clock_remove, + .remove_new = armada_3700_xtal_clock_remove, .driver = { .name = "marvell-armada-3700-xtal-clock", .of_match_table = armada_3700_xtal_clock_of_match, From patchwork Sun Mar 12 16:15:04 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: 68394 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp796409wrd; Sun, 12 Mar 2023 09:55:56 -0700 (PDT) X-Google-Smtp-Source: AK7set+nLDPQqOAZyABhZR3mkONJuLd62vVdw+7HdQHdO6pT9ormOEGuO5FroVz8n4Xu2guQsJlV X-Received: by 2002:a05:6a20:734d:b0:d4:3784:52c7 with SMTP id v13-20020a056a20734d00b000d4378452c7mr1444970pzc.36.1678640156597; Sun, 12 Mar 2023 09:55:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640156; cv=none; d=google.com; s=arc-20160816; b=oFoumSXdvwACZsGMa9FTSjlcYZaKpdNDjuWIzVIEuurXdaQbJ4/wmntVGvQgoCI/e9 mDmEjA0MAZuYuyBLH3RoeB3Bmf/r+ZF8/HG7oB/kxi8PSkQGiPzmNrDrlDjAACVcbpbo d+Zc1S/BDZlZBxC0Xv05xknktCd40Hkj0Q1jbrbDZvPFwf3asVzupUIeZmcwhZnSKmQG 7XPJapVliuVDkSxen7+/4hoDjkUYydKLNyD3NcXyTWfd1R+ph9sbRne+sMiHmQ7wlCM6 0Ka6040LHFv8Qte6xzVcmVoOp/2GjS7pFOvdpY4M/Qd40pBXT5rSfsKZpZHwnDU109w2 XY6Q== 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=EKmoIs5+oQw0fES7oLOk53yI+8XNPBjK21CTiMnaIns=; b=kujuqNDZOnm59++AlP8E/0S8iwVFJ4UhFUieRiqyfU0SxZ1EyfKNR8SswE0kFV/SbX Xb/p5aJbPtjm4BFCSPJgYZEcGRMZAC24xwvd0/lg+wqQ6/OYFD1/hNFZgWHJJoEfM1fY FM/kPAr2u4dvr02zCtoIYAdnojVbfN2qfbkwjms1g2yIYG7uIVncnXI+BVGDueYPAOsw OJzgacGsHFRI6JTTJRzS+4x4Po+JwKSzHBk79ZdG+TA6C8ESNwGWxdrOkL2OBwv398Jv TGxO42FbwjL4ofoXGdSdS7uFOp1fkMxwQxpWWRWSqHS6R7a09/zxmICXxmliRmYni+5b OI/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w188-20020a6362c5000000b0050308cba875si4587542pgb.490.2023.03.12.09.55.41; Sun, 12 Mar 2023 09:55:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229534AbjCLQQ5 (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbjCLQPv (ORCPT ); Sun, 12 Mar 2023 12:15:51 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 760A434C0D for ; Sun, 12 Mar 2023 09:15:37 -0700 (PDT) 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 1pbOM1-0007ri-1K; Sun, 12 Mar 2023 17:15:25 +0100 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 1pbOM0-003f3H-Bo; Sun, 12 Mar 2023 17:15:24 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLz-004K9O-1e; Sun, 12 Mar 2023 17:15:23 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Bjorn Andersson , Andy Gross , Michael Turquette , Stephen Boyd Cc: Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 22/30] clk: qcom: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:04 +0100 Message-Id: <20230312161512.2715500-23-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4258; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Gb1ghgWvrKiy4huMqkZkfU3Mnh39km7SHMXWnvwoFQs=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfpvKyV+GkyFyEGujzmzrVJX4VHYLYmILN/Vg K+byq0Tv9CJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36bwAKCRDB/BR4rcrs CdR/CACGRL9fTmx1gCk3RFSzsSUKcKJNONCQ5RYIIJ0KbzLYi5K1HXOULpyPTO5Hkqb4liDinSw LdxWBWFNXNLikW13Q7YXRNCQ2nkV0eL1p440d2OTi2rResLm5AD3X2KHLOi6M5gmOGVimgoY4ax ZEycleh4IE15iePs6iUwi68u2Qu+TO0cjqy/i/KhaMt5dQJuez5eWU9U841mlMmA7qYo4VRrJjj arEwJtHW6+1Bz4FWThNqeYJZ3BABudTXTfMfOiXXqaMGHruNRHO89mAPXJdSttXKV6JT4bjcLuA zJY8rkg+nXoHJ7pg/7nYq8SSw5eIhuYfhlmF5ckV0B9V+jJS 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760181780776173645?= X-GMAIL-MSGID: =?utf-8?q?1760181780776173645?= 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 (mostly) ignored 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. 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/clk/qcom/apcs-msm8916.c | 6 ++---- drivers/clk/qcom/apcs-sdx55.c | 6 ++---- drivers/clk/qcom/clk-rpm.c | 5 ++--- drivers/clk/qcom/gcc-msm8960.c | 6 ++---- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/clk/qcom/apcs-msm8916.c b/drivers/clk/qcom/apcs-msm8916.c index 89e0730810ac..ce57b333ec99 100644 --- a/drivers/clk/qcom/apcs-msm8916.c +++ b/drivers/clk/qcom/apcs-msm8916.c @@ -119,18 +119,16 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev) return ret; } -static int qcom_apcs_msm8916_clk_remove(struct platform_device *pdev) +static void qcom_apcs_msm8916_clk_remove(struct platform_device *pdev) { struct clk_regmap_mux_div *a53cc = platform_get_drvdata(pdev); clk_notifier_unregister(a53cc->pclk, &a53cc->clk_nb); - - return 0; } static struct platform_driver qcom_apcs_msm8916_clk_driver = { .probe = qcom_apcs_msm8916_clk_probe, - .remove = qcom_apcs_msm8916_clk_remove, + .remove_new = qcom_apcs_msm8916_clk_remove, .driver = { .name = "qcom-apcs-msm8916-clk", }, diff --git a/drivers/clk/qcom/apcs-sdx55.c b/drivers/clk/qcom/apcs-sdx55.c index e599f862ec44..d644e6e1f8b7 100644 --- a/drivers/clk/qcom/apcs-sdx55.c +++ b/drivers/clk/qcom/apcs-sdx55.c @@ -120,20 +120,18 @@ static int qcom_apcs_sdx55_clk_probe(struct platform_device *pdev) return ret; } -static int qcom_apcs_sdx55_clk_remove(struct platform_device *pdev) +static void qcom_apcs_sdx55_clk_remove(struct platform_device *pdev) { struct device *cpu_dev = get_cpu_device(0); struct clk_regmap_mux_div *a7cc = platform_get_drvdata(pdev); clk_notifier_unregister(a7cc->pclk, &a7cc->clk_nb); dev_pm_domain_detach(cpu_dev, true); - - return 0; } static struct platform_driver qcom_apcs_sdx55_clk_driver = { .probe = qcom_apcs_sdx55_clk_probe, - .remove = qcom_apcs_sdx55_clk_remove, + .remove_new = qcom_apcs_sdx55_clk_remove, .driver = { .name = "qcom-sdx55-acps-clk", }, diff --git a/drivers/clk/qcom/clk-rpm.c b/drivers/clk/qcom/clk-rpm.c index b1be5b664bf3..e723ddb99a44 100644 --- a/drivers/clk/qcom/clk-rpm.c +++ b/drivers/clk/qcom/clk-rpm.c @@ -591,10 +591,9 @@ static int rpm_clk_probe(struct platform_device *pdev) return ret; } -static int rpm_clk_remove(struct platform_device *pdev) +static void rpm_clk_remove(struct platform_device *pdev) { of_clk_del_provider(pdev->dev.of_node); - return 0; } static struct platform_driver rpm_clk_driver = { @@ -603,7 +602,7 @@ static struct platform_driver rpm_clk_driver = { .of_match_table = rpm_clk_match_table, }, .probe = rpm_clk_probe, - .remove = rpm_clk_remove, + .remove_new = rpm_clk_remove, }; static int __init rpm_clk_init(void) diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c index 9dd4e7ffa1f8..dbc7093ab9cc 100644 --- a/drivers/clk/qcom/gcc-msm8960.c +++ b/drivers/clk/qcom/gcc-msm8960.c @@ -3754,19 +3754,17 @@ static int gcc_msm8960_probe(struct platform_device *pdev) return 0; } -static int gcc_msm8960_remove(struct platform_device *pdev) +static void gcc_msm8960_remove(struct platform_device *pdev) { struct platform_device *tsens = platform_get_drvdata(pdev); if (tsens) platform_device_unregister(tsens); - - return 0; } static struct platform_driver gcc_msm8960_driver = { .probe = gcc_msm8960_probe, - .remove = gcc_msm8960_remove, + .remove_new = gcc_msm8960_remove, .driver = { .name = "gcc-msm8960", .of_match_table = gcc_msm8960_match_table, From patchwork Sun Mar 12 16:15:05 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: 68384 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp782973wrd; Sun, 12 Mar 2023 09:17:58 -0700 (PDT) X-Google-Smtp-Source: AK7set8iMvvFoM8h6segv27s2oeY4UojEDLgtGzjVsvbMGbdqG9oVeh3/ramJvNIKnyJJ62u6RED X-Received: by 2002:a17:902:b614:b0:19e:8c78:8cf6 with SMTP id b20-20020a170902b61400b0019e8c788cf6mr27485565pls.62.1678637878283; Sun, 12 Mar 2023 09:17:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678637878; cv=none; d=google.com; s=arc-20160816; b=hC0tPnvZRkI2eAcz66Gbqp3M4a+yZAQePHcr5iB+JzyvE13fsNbKC/ko/fBt5jseRp N7n7HE39GH0v/ySoxZOP9cSo0TmwqhgnX+/NUH8JO5WBoAU1Bkoe6a7TtrBsLVereNfv bYt6N6qq25Hc/U9MpANDJ/IQuk2ZyUV3HZxS8mXPCLuSzOlwUvWBfLFxg58tuFgauy8/ KdLEzqksGXHzHoKOZBRrnsRSDnAK3V21n4DzQ7iqM4GWbs3rRC6OZAdWWeRfD4xTwVbv PsBryCMUhLzKbXdvrApt3LdwRkp9YzanSPmQGK5OBCXAykPpfC5SFHW1/VIRnbths4LH 9uAQ== 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=LBpLt3SYneLVkViSkVb7rbM2vYh4+H785ckG7S4u4yw=; b=c4MaOnV33BBPVigW0DtPRUU24EPYCZkN2ZmmRmrRiTCbl4IMCtc/idcQCgkjAigqNu TAvCYYKkGDlxIk9Hd5RZ5c4Of9FGcPNjoXe7GX+qzruZbz6hmiM7L7kf2byCX6qBNHCD e7gUsf4E4CTSlhRmseRi7LQ8UdnrFxNUTx6M3RrMuhdnqfgMRQfiu412tY2Nhzx3+vz1 W3L+LihLwKLHkQh8wV6qoMgsHxLxfOwnl8hpHu00os6nZ5wxvCnP1DWeO/EAz+weOzgT e50DDmbakJ9zBkpZ7xHnKi2pJPmNTf1kVjRXr+k/Di6dIO0nVdIBwCRyxpkKw+imwGir gyDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id la11-20020a170902fa0b00b001a023cf5177si1259478plb.176.2023.03.12.09.17.43; Sun, 12 Mar 2023 09:17:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230420AbjCLQQh (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230165AbjCLQPf (ORCPT ); Sun, 12 Mar 2023 12:15:35 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C040138657 for ; Sun, 12 Mar 2023 09:15:33 -0700 (PDT) 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 1pbOM0-0007rd-Ux; Sun, 12 Mar 2023 17:15:24 +0100 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 1pbOM0-003f3E-8A; Sun, 12 Mar 2023 17:15:24 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLz-004K9T-8F; Sun, 12 Mar 2023 17:15:23 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Geert Uytterhoeven , Michael Turquette , Stephen Boyd Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 23/30] clk: renesas: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:05 +0100 Message-Id: <20230312161512.2715500-24-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1779; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=tzqGylDHbl27wcUMOwx5LcyyO3qR6CT6GQOUrE4n8uI=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfpzhc9DGdlNQXDJPhSJsCsYs2TOV5jF1d5hw yu2lPbJe4aJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36cwAKCRDB/BR4rcrs CQ9cB/9knQE1XSI+voDSdAHXVAQAjkGufgnbJqy5Tl+3jY8fUIfJXz8TfLnQIuVUcTJxmNvAwOp gAmsnUWgkCCQotILcUr9AlqNtMZ0YWcVzFNlbisomip0eYlVVWvBfritzehTm8KVSk+knsI9/oh SBdar3Tp/pdV/5lvtEMAgDW/ypB97a6EmynYkyZU9XfXfXyWi+nJxgXhXMOY/dMADyK8An1AePT sHP/xpNQfK81hJcbTkFfTOTGyCBdH7ZAovgFYFdw62KeLasb/HpAyfQ4RpzuvwIlsVXHWiZjfte IpyatPMvkyjLphcuuD/THA+q+Dp2B4HvjcMXKNTZn2jb4L1u 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179391421198900?= X-GMAIL-MSGID: =?utf-8?q?1760179391421198900?= 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Geert Uytterhoeven --- drivers/clk/renesas/rcar-usb2-clock-sel.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/renesas/rcar-usb2-clock-sel.c b/drivers/clk/renesas/rcar-usb2-clock-sel.c index 684d8937965e..17c110978e33 100644 --- a/drivers/clk/renesas/rcar-usb2-clock-sel.c +++ b/drivers/clk/renesas/rcar-usb2-clock-sel.c @@ -125,15 +125,13 @@ static int rcar_usb2_clock_sel_resume(struct device *dev) return 0; } -static int rcar_usb2_clock_sel_remove(struct platform_device *pdev) +static void rcar_usb2_clock_sel_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; of_clk_del_provider(dev->of_node); pm_runtime_put(dev); pm_runtime_disable(dev); - - return 0; } static int rcar_usb2_clock_sel_probe(struct platform_device *pdev) @@ -215,7 +213,7 @@ static struct platform_driver rcar_usb2_clock_sel_driver = { .pm = &rcar_usb2_clock_sel_pm_ops, }, .probe = rcar_usb2_clock_sel_probe, - .remove = rcar_usb2_clock_sel_remove, + .remove_new = rcar_usb2_clock_sel_remove, }; builtin_platform_driver(rcar_usb2_clock_sel_driver); From patchwork Sun Mar 12 16:15:06 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: 68395 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp796759wrd; Sun, 12 Mar 2023 09:57:07 -0700 (PDT) X-Google-Smtp-Source: AK7set/6VCRtpyP5I6ckYGfRFBUB7KZFFcIwpueiRkzgrbB9jXAkF+WcZF7K4uaJcD4pau3aHZY5 X-Received: by 2002:a17:902:b487:b0:19c:fa22:e984 with SMTP id y7-20020a170902b48700b0019cfa22e984mr28759466plr.48.1678640226720; Sun, 12 Mar 2023 09:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640226; cv=none; d=google.com; s=arc-20160816; b=fpOAd2deZ5xVxEGxJOSM7xqPq+AGtDFzAlBU4XZrgXBvTYpIR8u0oqpa4kD0HeiuRb jSx5Y5PpqHD+m27A1K2+ehyPwvfw3U5ND/rxRCdBQtoJKbOR7wuJ8F5BT7LUmWpXEMpx y4VcO3r2EoCqNYSWeeudZd58uaGP5wIqWITnMtfc326n4yvsUUdftoJda/a4C3erOjHf 9cUeL5Nl0To6vBQ7+Rm2XjxtokOR5K/f/Kzl5/JYin7vZ4RahiB+VfpyRNM8JARZ9eUy Wf3D/rmmhV8ZagaqgC+14qDprFYKaIonaSVC0pHgODKsPeDmTMUrxvBKduNr3smPWucu g23w== 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=xKDYuMRfMyCg1Nh2VpesePaNfqdKvH54TYfKMMRlde0=; b=WRDx38vUjM2EpySBF64B59NSV8Kv0S+Q/l6XGjV/s2QHCkwmEEEDvas/1/yL4jJQnv phDULMdulQwBPHrzAtIOOr00aK59XCRMDlLvEEb2sOeYX+aj9IimvYKDAEJgBHikjdDt ey+yhjoHgRs9Wlma0mPDUaiDVC+LuNInbd5ILz5wSnNUhQgH1DkDgIfKxx58dkh8WYcb AgQm/1L8dD4pQd2kxvMyPmyf7zrQFArO2uq0SVBi4VlnIMt2mzsXKySLyfNC+PIJzL1A ELetRXWOjJTAiFa10NbSjC92aAwwIHEuW3PzjS1bnEaetybQT3XBQ5HFbeQuco1V6+VO l7Mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kq11-20020a170903284b00b0019e6e64b991si4680646plb.562.2023.03.12.09.56.54; Sun, 12 Mar 2023 09:57:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230479AbjCLQRD (ORCPT + 99 others); Sun, 12 Mar 2023 12:17:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230293AbjCLQP7 (ORCPT ); Sun, 12 Mar 2023 12:15:59 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ADF14D60C for ; Sun, 12 Mar 2023 09:15:40 -0700 (PDT) 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 1pbOM1-0007sF-MD; Sun, 12 Mar 2023 17:15:25 +0100 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 1pbOM1-003f3V-1m; Sun, 12 Mar 2023 17:15:25 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLz-004K9X-FH; Sun, 12 Mar 2023 17:15:23 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Krzysztof Kozlowski , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Michael Turquette , Stephen Boyd Cc: Alim Akhtar , linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 24/30] clk: samsung: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:06 +0100 Message-Id: <20230312161512.2715500-25-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2861; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=0bilTxa4+zSBLpmHRbO43HSFtmhsJJR54/nSVpjT6CU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfp33a+QojCuZuGcyKQe/zyREOQcQiZLkaYkO 1zTaalvIpWJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36dwAKCRDB/BR4rcrs CWa3B/9uCDZNpKz0bWJK4NR6fMbLQuKSkByFGwyKd5FLjS7hubG1x0d4xFK/UxgwKaOIHbjSOMA PAjyC658mFqfbJ1htuQzO6XzlVOJETd6oeFufpHoF6Pc/BLWd6FMamZsHk7azYci6b6epvQU04r 1wdc9R84iIYNEZHpnkzK5TvU1JzYEnVH5m/LdjO4tK1jpGV8hFlapZ+uJEn6Ftzuy4XT9umon+l DSu8sTfjUpoiMIBDYwYktF2VYdZc0ofcCCZzjmVrEneNVkqp+H2rgSqYA46/vQrRQogEVLAI72G X3noRP6MSJU7os/yUVHmcmIIek0/tDSrj/hrdhhuPm3ViAzz 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760181854120613521?= X-GMAIL-MSGID: =?utf-8?q?1760181854120613521?= 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 (mostly) ignored 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. 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/clk/samsung/clk-exynos-audss.c | 6 ++---- drivers/clk/samsung/clk-exynos-clkout.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c index 9cc127a162ad..7626dff41f6f 100644 --- a/drivers/clk/samsung/clk-exynos-audss.c +++ b/drivers/clk/samsung/clk-exynos-audss.c @@ -268,7 +268,7 @@ static int exynos_audss_clk_probe(struct platform_device *pdev) return ret; } -static int exynos_audss_clk_remove(struct platform_device *pdev) +static void exynos_audss_clk_remove(struct platform_device *pdev) { of_clk_del_provider(pdev->dev.of_node); @@ -277,8 +277,6 @@ static int exynos_audss_clk_remove(struct platform_device *pdev) if (!IS_ERR(epll)) clk_disable_unprepare(epll); - - return 0; } static const struct dev_pm_ops exynos_audss_clk_pm_ops = { @@ -295,7 +293,7 @@ static struct platform_driver exynos_audss_clk_driver = { .pm = &exynos_audss_clk_pm_ops, }, .probe = exynos_audss_clk_probe, - .remove = exynos_audss_clk_remove, + .remove_new = exynos_audss_clk_remove, }; module_platform_driver(exynos_audss_clk_driver); diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c index e6d6cbf8c4e6..0cff1c94c35e 100644 --- a/drivers/clk/samsung/clk-exynos-clkout.c +++ b/drivers/clk/samsung/clk-exynos-clkout.c @@ -196,15 +196,13 @@ static int exynos_clkout_probe(struct platform_device *pdev) return ret; } -static int exynos_clkout_remove(struct platform_device *pdev) +static void exynos_clkout_remove(struct platform_device *pdev) { struct exynos_clkout *clkout = platform_get_drvdata(pdev); of_clk_del_provider(clkout->np); clk_hw_unregister(clkout->data.hws[0]); iounmap(clkout->reg); - - return 0; } static int __maybe_unused exynos_clkout_suspend(struct device *dev) @@ -235,7 +233,7 @@ static struct platform_driver exynos_clkout_driver = { .pm = &exynos_clkout_pm_ops, }, .probe = exynos_clkout_probe, - .remove = exynos_clkout_remove, + .remove_new = exynos_clkout_remove, }; module_platform_driver(exynos_clkout_driver); From patchwork Sun Mar 12 16:15:07 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: 68382 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp782874wrd; Sun, 12 Mar 2023 09:17:41 -0700 (PDT) X-Google-Smtp-Source: AK7set/Pmw8aBjD4ZeVVKWQV1m/wJCf4UZP5e+kzK1q7/ERZs/K4HWC9KM2knUkjvx2/Lg+msVJw X-Received: by 2002:a17:90a:19d3:b0:233:b849:7e8f with SMTP id 19-20020a17090a19d300b00233b8497e8fmr34654468pjj.47.1678637860761; Sun, 12 Mar 2023 09:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678637860; cv=none; d=google.com; s=arc-20160816; b=VUZY8oLkHQ/hTzWWxhkA0gzycNqnLdWuF4GJxqhiwa5kVVSe1vgGZGfd50YSGRilHn lBLVybnqdjruIAKLkeTfc2pSSseQK0zUWFju+KHsWXQomHDDbcQ52PD/QVTUcso/EdzL bl/Nq6eGLjhTm4eEPDu94n/h9pZnSbKY4PBuNKHWziMZ/QP6aM1hfEvMPnYq/Eqqdo+q qeJJen0Mzqbr/W+ey9ekRrNdux0UekeB8I38DbRRSMr+DUqhX/zoxocrBl/14MaPEaf2 UVDh+lYH1Qxhvhp8594aCKPddY2QahhP7zQ03sPIa/kdHRTfdZ03ZpXIxPuwfALOAvHM E4SA== 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=NxGAQ6JbhIUwZRa5SjqJk7QMBQgrzVxkuWg96pl6o1w=; b=0sOm95+U2fwWBZMZCPYpW+yZB1WE2cJYBUyU+vc5UlFXcsfqpA9Dt5fMkpRSxl9RcS qiy8AwON5h0+LVhBvDBgEgVMlqtemJ+H4nmekEpSZWlf1cdKyncfZQRRPlCIo9jW+5Mv hgWKUqtBGyPKbua8ao/EQK17qY293phy/QCmQt0GV/QZztEeQQUu/yQGWgfWWl76DnlJ pPulPKcQYZKWRzeURntWxv1RxUnwtwusWcUBcB7Y+g31zARaPnRamdbndw1/YXLM8XN7 uVE+rBy8KPWl89WJUTKBTMISJ84r4GApNrJkdlhaGzbwL8v80T3Rv68a9/AMg0yg12uM TKsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 27-20020a17090a031b00b00215dedefc32si4520655pje.163.2023.03.12.09.17.25; Sun, 12 Mar 2023 09:17:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230400AbjCLQQc (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230162AbjCLQPf (ORCPT ); Sun, 12 Mar 2023 12:15:35 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17E6A38013 for ; Sun, 12 Mar 2023 09:15:32 -0700 (PDT) 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 1pbOM1-0007s2-Bk; Sun, 12 Mar 2023 17:15:25 +0100 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 1pbOM0-003f3O-Mu; Sun, 12 Mar 2023 17:15:24 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLz-004K9a-MQ; Sun, 12 Mar 2023 17:15:23 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd , Maxime Coquelin , Alexandre Torgue Cc: linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 25/30] clk: stm32: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:07 +0100 Message-Id: <20230312161512.2715500-26-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1789; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=YSdgKydMUmqqeYG946UQat08kJ/q2KTOaGSGnm0gse0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfp6xwsITcqTQd1LtV6bSmWobY11RcAQyBADL isAsR//OeaJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36egAKCRDB/BR4rcrs CS0HCACeU/irJ0xObgGaUABt1LhZ3HhEP2AcWllEyHGs4VYMe2fhsL6WkHa1Xb0Zm2QIOi4pOSU cIsBOQHJzzeKxQxycQxnZ+t+iPAhaaorEtHf6W0eBtCTEW2XWK0usG5SGO1Je1QzetwHujE4Zei FfIlcwx2jmvEZpNK9kQLzYxLKzy3Xwv3SRoCHMh0+ZLjHiMIktVPFK8UE/X6YT7cnzN+IJA/P34 01tCWyMZmvUw46b6Ghm/LyOqfyoS/dPFqLK1A4vjJuQkuDOwOJ/m7kIj5zhZ3M9rRxNt0Y5nYKY vao6Xw+ru12lquwaUV1yM5TyB9xaMilvr1ASZYLqoM39TwrS 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179373316743592?= X-GMAIL-MSGID: =?utf-8?q?1760179373316743592?= 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 (mostly) ignored 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. 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/clk/stm32/clk-stm32mp13.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/stm32/clk-stm32mp13.c b/drivers/clk/stm32/clk-stm32mp13.c index 1192eee8abe4..c4a737482fe5 100644 --- a/drivers/clk/stm32/clk-stm32mp13.c +++ b/drivers/clk/stm32/clk-stm32mp13.c @@ -1593,15 +1593,13 @@ static int stm32mp1_rcc_clocks_probe(struct platform_device *pdev) return ret; } -static int stm32mp1_rcc_clocks_remove(struct platform_device *pdev) +static void stm32mp1_rcc_clocks_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *child, *np = dev_of_node(dev); for_each_available_child_of_node(np, child) of_clk_del_provider(child); - - return 0; } static struct platform_driver stm32mp13_rcc_clocks_driver = { @@ -1610,7 +1608,7 @@ static struct platform_driver stm32mp13_rcc_clocks_driver = { .of_match_table = stm32mp13_match_data, }, .probe = stm32mp1_rcc_clocks_probe, - .remove = stm32mp1_rcc_clocks_remove, + .remove_new = stm32mp1_rcc_clocks_remove, }; static int __init stm32mp13_clocks_init(void) From patchwork Sun Mar 12 16:15:08 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: 68386 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp783875wrd; Sun, 12 Mar 2023 09:20:28 -0700 (PDT) X-Google-Smtp-Source: AK7set9ycxfHwbFnBVO3VuYOYt1auT+jtygFJoEspINJitxLHPjtxVmkEb1evbhrEyFr2JE4eHp9 X-Received: by 2002:a05:6a20:7d95:b0:ce:ca9:ab30 with SMTP id v21-20020a056a207d9500b000ce0ca9ab30mr34013706pzj.36.1678638028190; Sun, 12 Mar 2023 09:20:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678638028; cv=none; d=google.com; s=arc-20160816; b=SQhrA8FvX+JyCNCcYmJt2LyMtTwQGS4STG1t0036pvpKFOYmnk6jksz+3kiAt1nhur mWM+ZjbSIvLID1StPcPt7pRd0FYpIk1dHD+1h/CvLmRSydEfKpE0oe0N8K3nblpNt0nQ mH9waD5jFM/bQDEZHUt1grglRmJfyX6zpZW+u4jpPmBHnRErBvrPZKBUkYfY4DQuJtLD t9Xb341TYuwlcsDgMoifKsTxGJmeuX770sDi29GCjYUStUG4bn9B7E2TUgkhTSla/pAh bRY90YIIy7YsqkgLFmf5QKcGb5Xdn/GhgaIqkm2Ve10uqIYHfE1ITsEBOr7DeZ+kqohS pwvA== 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=ruWKyiw9T5xkG3NYjzxUAmdoxDlc5qHZ0ApqqveKBqo=; b=nLx6kxmo1YUTn/y2iNq9E9nMfaHxXmo1Bt6uq4/FYVCoB58UhO0z5rggjebGKcs4fv 4+5qwlZns5LHmvajJG3jJcVJWfxc6JpvVUKUCNJoMQpawQvMe8pz8k9YTqoM+QdL03Ou uxys29uFKyzvOl54dRFYtTvn/bGfzvk5YfEg9U/fE9BvCkuNqQbh4flLqcGp/7wRPOcx deSfNDhVPgMhRZro59fU3vLW9r7AH8UZNEl7c+3AwTf9FA62k8ypY+eDHcXhXb3ftOV5 EoEqxAxpTjiHQrpVj2QBMqVp3JFuxBSQHmJWYY1XdkYJz4pT/Rv/stL4s8FGmokDr8bh R+lQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j125-20020a625583000000b00602eaac6646si4313122pfb.26.2023.03.12.09.20.12; Sun, 12 Mar 2023 09:20:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230297AbjCLQQt (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230207AbjCLQPr (ORCPT ); Sun, 12 Mar 2023 12:15:47 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3831F37F30 for ; Sun, 12 Mar 2023 09:15:36 -0700 (PDT) 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 1pbOM1-0007ru-D5; Sun, 12 Mar 2023 17:15:25 +0100 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 1pbOM0-003f3N-Lm; Sun, 12 Mar 2023 17:15:24 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLz-004K9d-Sr; Sun, 12 Mar 2023 17:15:23 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Peter De Schrijver , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Thierry Reding , Jonathan Hunter Cc: linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 26/30] clk: tegra: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:08 +0100 Message-Id: <20230312161512.2715500-27-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1980; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=x6okcs6Su+YD3uh5eJbZ5VyDAW7RapD+fKHvx8TVC4A=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfp9rzArRWRh7p5ABLZY7wv3BgO+zzrr/0PIT TmIX5WS8WqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36fQAKCRDB/BR4rcrs CYAwB/9sx5f5Twyck2oZkwirbVUmDa8bdOpezb6m36WniA/NzZgfYeh6B5WTaPUjQN0+PBWBI5m 2kGMctIojvHOvILTna14KpOF7LYZBM5D/p1NFZae3aV1pku5YOZbRHXvxcYIO8AqBOwDpUGWv6A yeUf2N+58kNeg2xv1/9mQchOfaqMqIV5iep/c6QpwaCv4x/KYmq+wHT/HpFsgjaFRUbdfSw6Z0x eL8bkcHlVxJlyXcWkl67Ch83BCNVTbfd35ZxKSdBPGh4WwfOtXPhwKTi6/XfDz8VrF5U+W1KJNy cKZRM4sVxoYD7Uw3wgOp6B4/p0dTzMgsZup74K7Byi6I/MKX 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179549090333276?= X-GMAIL-MSGID: =?utf-8?q?1760179549090333276?= 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 (mostly) ignored 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. 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/clk/tegra/clk-tegra124-dfll-fcpu.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c index 15c5e14dd82f..2a164e565c86 100644 --- a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c +++ b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c @@ -612,7 +612,7 @@ static int tegra124_dfll_fcpu_probe(struct platform_device *pdev) return 0; } -static int tegra124_dfll_fcpu_remove(struct platform_device *pdev) +static void tegra124_dfll_fcpu_remove(struct platform_device *pdev) { struct tegra_dfll_soc_data *soc; @@ -622,11 +622,9 @@ static int tegra124_dfll_fcpu_remove(struct platform_device *pdev) */ soc = tegra_dfll_unregister(pdev); if (IS_ERR(soc)) - return 0; + return; tegra_cvb_remove_opp_table(soc->dev, soc->cvb, soc->max_freq); - - return 0; } static const struct dev_pm_ops tegra124_dfll_pm_ops = { @@ -637,7 +635,7 @@ static const struct dev_pm_ops tegra124_dfll_pm_ops = { static struct platform_driver tegra124_dfll_fcpu_driver = { .probe = tegra124_dfll_fcpu_probe, - .remove = tegra124_dfll_fcpu_remove, + .remove_new = tegra124_dfll_fcpu_remove, .driver = { .name = "tegra124-dfll", .of_match_table = tegra124_dfll_fcpu_of_match, From patchwork Sun Mar 12 16:15:09 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: 68387 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp789107wrd; Sun, 12 Mar 2023 09:34:53 -0700 (PDT) X-Google-Smtp-Source: AK7set9W0mU7LZbZkQ1E5axqr4ckG+AUZ6hYfmOANNnt9aGkyymJEtCXfjChPuNkQfwj6DOsv8id X-Received: by 2002:a62:1a48:0:b0:623:2557:d914 with SMTP id a69-20020a621a48000000b006232557d914mr2861417pfa.24.1678638893559; Sun, 12 Mar 2023 09:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678638893; cv=none; d=google.com; s=arc-20160816; b=jlmNuBiSu6HcL9CW1n+5GY+Ues0qr/BvI2v5T7WlD9AAyjhPWhLXGcprDkB++DwPoh 5ewnZ57oVbJdF600Eqv2Ea7GO1dKsOB9+X7nJLivjkEXtRtM8aHJZYlkf6wHckUBOzAs B7V3zNFdNhFiq8Q0C9BsodEYayMpl67eagymyMA3G1oWzHWrfLVp/sDcahlIuTNKGDJ9 BA+1Ri2fuiNTTmwvhG9nMchk85zlbK9Lpol9Yh/XIGWud0CA4i2GbNdH2nRoXhQHkQA7 zgoMiPRKczg6Fk/bRrtA0AxMebAQ32YecXMtHfM7NlZb50lSiBIu0vt+e7bvi3YRSsY5 ObaA== 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=Ha4NvjnMLWl1+EUXVfeqaVe85BnljgSTDagvMhI6kVg=; b=W2sosDgvuJx+H0bUmxdS94/zyk0seDKifPXcJLE0oPRcRYsweHh953uJbgtBWeLo6v flqqZXqt2UzuLKuGu7mR2Z0tHAjDYFPRFFnYkST83hH2l0QontzQK0a4Y6GkmIY8VXGu 4n+imPbKYe1qv4xSfHRx5je4X70O2lVFsBVtsb2hgMHd0Vf88wl2jAlxIlFXnYK41wvr MX6x0FoLGxKts81bwtx4nUJX55YRnicutA/8SbvDbcKPVjrDTKPaMawSYcNforklkY0Z +jxQUiEhIyLgHj65ztSajmb1GggMuTuDAzKKWalqkUDt0A072PXU45xE1O0QNkI0EbTf 3v0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v20-20020a634654000000b004e22265da03si3557035pgk.652.2023.03.12.09.34.27; Sun, 12 Mar 2023 09:34:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230238AbjCLQRA (ORCPT + 99 others); Sun, 12 Mar 2023 12:17:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230237AbjCLQPv (ORCPT ); Sun, 12 Mar 2023 12:15:51 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 217A9367C4 for ; Sun, 12 Mar 2023 09:15:37 -0700 (PDT) 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 1pbOM1-0007sf-Uk; Sun, 12 Mar 2023 17:15:25 +0100 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 1pbOM1-003f3d-Bl; Sun, 12 Mar 2023 17:15:25 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOM0-004K9h-4q; Sun, 12 Mar 2023 17:15:24 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Tero Kristo , Michael Turquette , Stephen Boyd Cc: linux-omap@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 27/30] clk: ti: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:09 +0100 Message-Id: <20230312161512.2715500-28-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1546; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=+eDcQI6Zb4aIs7d9bJFFkkDfJcRJeMKqXpNyUgVrxUw=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfqAWH+TKlTmHEM6RxOYZ9/tjSDti0OgQsMd8 3lfr5mcv2GJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36gAAKCRDB/BR4rcrs CUW0B/4jNY4NiHQmjbgaA87O5C1kRpCQk+LmocZoMsFOsC0tZJxOkF/iopdO1LZvnd6RO/TFNtL 4sHa7kuYCq4fzdCigy8ArkO4qcv3qjWbHjtF9IaIkRnfFQ5Q1xwqfuonhrhGANm/Lc9l823UMGV VMqyTVphe/dudZ8iH2wbqbyXsxosUjCbDg54p1tVjIRr9NwPsx8gc5ecRq4oP61hOcXBVXY2Z3g waRxdIPA0Pgllstt5/4O3iQl/Yd8o3L5a0lGs4x2Ov/sA8RjdSmqqOXwrxTfTE0MEjVhIACueWD AOC1aazeB2ueFvzfFAzgZPKfA4u1IKoDpyUS6Y2BNREilAg6 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760180455964972075?= X-GMAIL-MSGID: =?utf-8?q?1760180455964972075?= 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 (mostly) ignored 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. 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/clk/ti/adpll.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/ti/adpll.c b/drivers/clk/ti/adpll.c index f5e7e2049241..6ecbba4342c5 100644 --- a/drivers/clk/ti/adpll.c +++ b/drivers/clk/ti/adpll.c @@ -931,13 +931,11 @@ static int ti_adpll_probe(struct platform_device *pdev) return err; } -static int ti_adpll_remove(struct platform_device *pdev) +static void ti_adpll_remove(struct platform_device *pdev) { struct ti_adpll_data *d = dev_get_drvdata(&pdev->dev); ti_adpll_free_resources(d); - - return 0; } static struct platform_driver ti_adpll_driver = { @@ -946,7 +944,7 @@ static struct platform_driver ti_adpll_driver = { .of_match_table = ti_adpll_match, }, .probe = ti_adpll_probe, - .remove = ti_adpll_remove, + .remove_new = ti_adpll_remove, }; static int __init ti_adpll_init(void) From patchwork Sun Mar 12 16:15:10 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: 68385 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp783531wrd; Sun, 12 Mar 2023 09:19:30 -0700 (PDT) X-Google-Smtp-Source: AK7set/21r8Bu/+5lei7GpUayF+U0OaKzcffAaGVs/7p00cIWF1Gc6oOdIX3S0t8L08gV7Vw72aE X-Received: by 2002:a17:903:124c:b0:19e:b2ed:6fee with SMTP id u12-20020a170903124c00b0019eb2ed6feemr28531299plh.58.1678637970303; Sun, 12 Mar 2023 09:19:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678637970; cv=none; d=google.com; s=arc-20160816; b=dmFm9tqFW1P8RXz9dxwIo1KZ0CjDEUkmCh8mhLSA567g3+YmfavXTbJAZJDbbt7HXs BDRKTLjQnsgPXulCIYJILzfFGqAx//7bETD9hmu9o2nk58lTfUF05EcU7iUZ2g//wepy IBdwQ1DmDdeUwBSx+YdJo54GAdsZekSIkBlk63iY+YiubLjF170vjEdexFlX9ncTn9wt Xk2gPXDFJP7okkbFZl38AJGPhw28ViENdes/WiHGVMZ7pdAmgOrhssqmbYR4y5/8Sy1S pJQzIwEpZAsYbLxbkF+rpyQlO5GOeI+c6NIp7PewjHySa8cqYBeq5ZUCfKWb5ZKJch9p sL1g== 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=nOWnNoZpGlZ7e8XOBPKlue5NFGdJeUgQNhD6eesyrGg=; b=pZSHK+6jBKNspLz0AG1ZAm1YBt6wjJJuSgeL/2t2RQK69JpDLzundjWUf9yVYVbmH6 ZugkKaooPBjFb/UQfG2njMtxcYZ6jzj+I0D4pF3nhj4HQ4ppnQqVweN8e5UF4HcgQ1E8 qwI58O5TVKI6jIhwX05QHXv7rCawVDieUtQ5Sk0QA77R0C7WtIiqR0OBIywwNRVcDnoh qXOgsQa6A+04FAI8+6Kjs+uyhm6tRNQBwmcUR8PCal8dC/Ic7c/cMm73YxnpTJp8hlcy fsAfVIuiS3tlPJJA+ssLZy5BnvepLvnnAm9d9BqM0pW33LHszbCDxNJw7oCIVrdJYqv0 mR3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r7-20020a17090aad0700b002340b11f1e8si4347352pjq.44.2023.03.12.09.19.15; Sun, 12 Mar 2023 09:19:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230449AbjCLQQr (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229846AbjCLQPq (ORCPT ); Sun, 12 Mar 2023 12:15:46 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9CC23803E for ; Sun, 12 Mar 2023 09:15:36 -0700 (PDT) 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 1pbOM1-0007sa-Tp; Sun, 12 Mar 2023 17:15:25 +0100 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 1pbOM1-003f3a-9C; Sun, 12 Mar 2023 17:15:25 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOM0-004K9k-BN; Sun, 12 Mar 2023 17:15:24 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd , Kunihiko Hayashi , Masami Hiramatsu Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 28/30] clk: uniphier: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:10 +0100 Message-Id: <20230312161512.2715500-29-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1683; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=k2hk+THTHlfsffOg5cgLVPYHlE54dpLVDOQ8OZNammU=; b=owGbwMvMwMV48I9IxdpTbzgZT6slMaTw/mp5stz1XLPr+ZOT7l8LZ7d3b7venXIpVvtw928Hv +yYEyIzOxmNWRgYuRhkxRRZ6oq0xCZIrPlvV7KEG2YQKxPIFAYuTgGYSGMO+z+rn0wFKXFxgrbu m6Il2MOSvs5pesCydlndp7DO8ge9Nl+4ZYyieO+y/7kwb56s36GtUgvLbDetLQjW+d1corfF6XO xuNuW1wYLM4r3KyYkOzj2tqq/yPqe98vVRv5B+y2xF2b3NmrKWAoqpU19lr2f8bmwq9vz01yThE MZ3Zx/bk60Ot+5v/7K0u+/fQ7na0WIRjTeEm5P2/zvd9kDpzBB4VlVRasFQuOEfhpLZ395HH/dc PuKfw4mhiKqu2L3dLt77u9f8GTxmSlJU0IbKqqTs7suepn8q37fuv/pblXd7i8CdmXrThyxqzUL 2p36hFOqdWK126IiyeoYB8mlYky6vKufTuJV1rovGWMDAA== 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760179488141919105?= X-GMAIL-MSGID: =?utf-8?q?1760179488141919105?= 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 (mostly) ignored 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. 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/clk/uniphier/clk-uniphier-core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/uniphier/clk-uniphier-core.c b/drivers/clk/uniphier/clk-uniphier-core.c index 46c66fac48e6..92f4ddc593db 100644 --- a/drivers/clk/uniphier/clk-uniphier-core.c +++ b/drivers/clk/uniphier/clk-uniphier-core.c @@ -91,11 +91,9 @@ static int uniphier_clk_probe(struct platform_device *pdev) hw_data); } -static int uniphier_clk_remove(struct platform_device *pdev) +static void uniphier_clk_remove(struct platform_device *pdev) { of_clk_del_provider(pdev->dev.of_node); - - return 0; } static const struct of_device_id uniphier_clk_match[] = { @@ -220,7 +218,7 @@ static const struct of_device_id uniphier_clk_match[] = { static struct platform_driver uniphier_clk_driver = { .probe = uniphier_clk_probe, - .remove = uniphier_clk_remove, + .remove_new = uniphier_clk_remove, .driver = { .name = "uniphier-clk", .of_match_table = uniphier_clk_match, From patchwork Sun Mar 12 16:15:11 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: 68397 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp797256wrd; Sun, 12 Mar 2023 09:58:45 -0700 (PDT) X-Google-Smtp-Source: AK7set8+ba3KtA8QYnaz31RT8E7SSFqSe4DEMeLjGktMCepAGU6MQTsgGwszirwrXhd4p5H1YYRb X-Received: by 2002:a17:903:441:b0:19d:2542:96b7 with SMTP id iw1-20020a170903044100b0019d254296b7mr28427972plb.39.1678640325094; Sun, 12 Mar 2023 09:58:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640325; cv=none; d=google.com; s=arc-20160816; b=xfxYnEeiRhwpycPlwZy9MboeHw9bnJruZbtZDhnzl+XKvAm7hLwBWRBaJZsbYGljdv 70vQIgO62fPkrBHEaPeWEi/bVGxT3Tx24mr3akwY+fVDG9dxb4l8BY0viH31Rcbo4pbm aM0WFNjUKkT6ydcmx7jgsbDXDv7wEWLEScbDUvtQgxpjC1OhZFJbEjlqhrBKBV506Zt/ jV3cRClVS2oUiOwjOv/K0DLMrlr8JwprtdwQhRBIATBTzKi1EDopYUTY89aCDH71fmp0 Fn0PQMc8gGZZcwIIzDeZut6Qag4ROg76HaIjwTMYE74YC+EEeVVkzTds96LYZU+i0knf dGTg== 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=9ACTGXFqC9N4tNJ/8qFwUSdRGH80mHPzSFGKqPKuprI=; b=p50LvSkdkXzUnqGdlBQYag/jdkY+mPBtWNtBnmI8jqm1wUGAXkooU/DCEekhKcxJBC oEzgfvdBEdKqt4pUSl9XzMOEuTVe8PFykn9mOwcCUj+EpXjQi0kCHATbPmv7eG+5cZVP 8glel1bam6Rv1ftZY8ELs6Gm2Uzhcy0jtFqMJYRBHWWfHIDi0P96nKdRgkaiBuzzfjr5 /tAP8tIg5KcQwA21usfsYno0q6oMtpOwLyyJBih95JrP5zkoIAuX81yZyWuPFvGOGkut bD8lDcv6bq7gWk87/k1VGOYy8fe79tyH25EnUs3lMx1oI9k0HI7SgJhPx2CAQysciwEO lWgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ki14-20020a170903068e00b001968cbc67e2si4581128plb.583.2023.03.12.09.58.33; Sun, 12 Mar 2023 09:58:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230359AbjCLQQW (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230080AbjCLQPc (ORCPT ); Sun, 12 Mar 2023 12:15:32 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 336063754F for ; Sun, 12 Mar 2023 09:15:31 -0700 (PDT) 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 1pbOM2-0007sp-4V; Sun, 12 Mar 2023 17:15:26 +0100 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 1pbOM1-003f3i-GL; Sun, 12 Mar 2023 17:15:25 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOM0-004K9p-Ho; Sun, 12 Mar 2023 17:15:24 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 29/30] clk: x86: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:11 +0100 Message-Id: <20230312161512.2715500-30-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2818; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=q67zyHKhevN1eKgcWpbwGQPFWUk3s3NN9pb+s0sov04=; b=owGbwMvMwMV48I9IxdpTbzgZT6slMaTw/uqwVSzYw13++7G/kdKUY+fuFzxWfdDJq8x+RSrcv zSw6AFvJ6MxCwMjF4OsmCJLXZGW2ASJNf/tSpZwwwxiZQKZwsDFKQATYb7M/ovp2ENt75Xxk3d/ sHvfmSt87N7bs6aihnoKX6cpht3WF1/p06r4TuLvwsTJ2vNvvrmkzZsvx+l+/4jJd+1g88T6R89 771Xc5075VnAj/hPfj1Mc6uoXvnOHtiosLE9o/Dd5pYndxVl1jofbFQIs083eeLxy7I2Z+t2kNs jyzVUh9T4ZVh1Z+YiNX6vPJgfvfbd+Ok/RtIxr6o8S2tY+5J4qmvmSTSSbc2rHv4AEpxOmAgwrb Bdc1mhtkrW3+R7/TNODUfnOUv4Qdkf1i2zrrQyMuG03NrXb2qtl7thSt2ZpqLPFDxnmiccPPDf8 /rxb2ECi6amlbfcSgQhHkdPP/2cfzjlx0PlvqvVUvr4QAA== 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760181957311656369?= X-GMAIL-MSGID: =?utf-8?q?1760181957311656369?= 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 (mostly) ignored 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. 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/clk/x86/clk-fch.c | 7 +++---- drivers/clk/x86/clk-pmc-atom.c | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/clk/x86/clk-fch.c b/drivers/clk/x86/clk-fch.c index fdc060e75839..aed7d22fae63 100644 --- a/drivers/clk/x86/clk-fch.c +++ b/drivers/clk/x86/clk-fch.c @@ -92,14 +92,14 @@ static int fch_clk_probe(struct platform_device *pdev) return 0; } -static int fch_clk_remove(struct platform_device *pdev) +static void fch_clk_remove(struct platform_device *pdev) { int i, clks; struct pci_dev *rdev; rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0)); if (!rdev) - return -ENODEV; + return; clks = pci_match_id(fch_pci_ids, rdev) ? CLK_MAX_FIXED : ST_MAX_CLKS; @@ -107,7 +107,6 @@ static int fch_clk_remove(struct platform_device *pdev) clk_hw_unregister(hws[i]); pci_dev_put(rdev); - return 0; } static struct platform_driver fch_clk_driver = { @@ -116,6 +115,6 @@ static struct platform_driver fch_clk_driver = { .suppress_bind_attrs = true, }, .probe = fch_clk_probe, - .remove = fch_clk_remove, + .remove_new = fch_clk_remove, }; builtin_platform_driver(fch_clk_driver); diff --git a/drivers/clk/x86/clk-pmc-atom.c b/drivers/clk/x86/clk-pmc-atom.c index e746e3f8d05a..2974dd0ec6f4 100644 --- a/drivers/clk/x86/clk-pmc-atom.c +++ b/drivers/clk/x86/clk-pmc-atom.c @@ -367,7 +367,7 @@ static int plt_clk_probe(struct platform_device *pdev) return err; } -static int plt_clk_remove(struct platform_device *pdev) +static void plt_clk_remove(struct platform_device *pdev) { struct clk_plt_data *data; @@ -377,7 +377,6 @@ static int plt_clk_remove(struct platform_device *pdev) clkdev_drop(data->mclk_lookup); plt_clk_unregister_loop(data, PMC_CLK_NUM); plt_clk_unregister_parents(data); - return 0; } static struct platform_driver plt_clk_driver = { @@ -385,6 +384,6 @@ static struct platform_driver plt_clk_driver = { .name = "clk-pmc-atom", }, .probe = plt_clk_probe, - .remove = plt_clk_remove, + .remove_new = plt_clk_remove, }; builtin_platform_driver(plt_clk_driver); From patchwork Sun Mar 12 16:15:12 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: 68399 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp797914wrd; Sun, 12 Mar 2023 10:00:32 -0700 (PDT) X-Google-Smtp-Source: AK7set96vWuRm1zTFAd9ya7Bzo1wT47UEWKWHBiiAmNctIC8p1n8p6hREucTr7htpv/kNy9fHDSH X-Received: by 2002:a17:90a:c089:b0:23c:fdb9:b528 with SMTP id o9-20020a17090ac08900b0023cfdb9b528mr1379021pjs.27.1678640432562; Sun, 12 Mar 2023 10:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640432; cv=none; d=google.com; s=arc-20160816; b=lgY7HCtmU8PZ6FSF6xYqpKhpNtuWWfxsxcxlNI7orRQXsB/gYt/tGmhsN5I4mMId4k KZXXrku+F+zT0jg7Z9d1JX98WNzfUkqZc4LKPlwOFb05wKxwRjI6apQal1lF47NPKGyS 7MJZImpE+lqxiHhBxZM+AmaG07840RDgeZGle4HC8onoE0T7cgrrXGtFDcapMeB1XzEI bDz1AIkAKO52pEc0/Ho5WAY/XYoImgA4fnJF5AKjAXMzV/EHlH2W4H0/B2VEPicZrvMT BtPwqTFqbDJIAstAKLTPa9GTAgYxgHgp0cmXYbf+ytuUuYI0JINzBZiRRvTndXSf9QGJ KNfw== 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=i9fiZ9v84r8fbuLW7di7da4ZPqCHWXDxwIjJ0Ueth2I=; b=sJHgBb00rInxWxqbD8wQJvRmjnvIyal/Og8gwV1xKCyVkiv8BJtDE3p2joUCxn/66M xbPGIa252Or3Ttn+gABuhPI4IrowuYdG3bze1LdRxVyiEPyKD0GIGWTll3V7lMSaGVP7 VJFVBNFvJ8C75b0wXsEkx/TttzRhGUMSQhOHBiC2+xDZVOgK9s+V1FhWsO8Lo6kBXYOj VQjJJTz9LgCFQoK0fgJZQUxrTHMWmrnIV/Yq763StcVqyYA46D+YJk2ET+kXPU+J+PGg TtM3ScqohE5DTCEUOVeoNTXY+DxxeaaCr6dn3dHs8VZcCDa4I7+G4AF6RGwUFra0lFIe 3vZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q44-20020a17090a17af00b00230cb79e2b3si4351585pja.104.2023.03.12.10.00.19; Sun, 12 Mar 2023 10:00:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229819AbjCLQQn (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230176AbjCLQPg (ORCPT ); Sun, 12 Mar 2023 12:15:36 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 179A537F25 for ; Sun, 12 Mar 2023 09:15:34 -0700 (PDT) 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 1pbOM2-0007sv-AH; Sun, 12 Mar 2023 17:15:26 +0100 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 1pbOM1-003f3l-Lj; Sun, 12 Mar 2023 17:15:25 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOM0-004K9s-OY; Sun, 12 Mar 2023 17:15:24 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd , Michal Simek Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 30/30] clk: xilinx: Convert to platform remove callback returning void Date: Sun, 12 Mar 2023 17:15:12 +0100 Message-Id: <20230312161512.2715500-31-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2836; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=/rDzIBzAtm47A0FxuDgmfod8dN7hBzvdh87gyR+Fj/4=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfqMeEK/Vobkf/pVhqxwG+ebhdSRP3oQMNj38 1vbndIn9E6JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36jAAKCRDB/BR4rcrs CXpUCACNQrNswFWo36ck3lJDYrbCZWoN+NTLA8bb7Lnp5R518DWanFyN7Ob2xVR+cm7JbRBnUt6 +SHI2YkPMJhU4kyoqmKi6++mJNF4H+si9Za3s4K4b2Rc2QFf3dIPuXnJB7kBXdJ8f59WNcREX6Z bEnw7wr5DPw6HlsXs2nbPV7KfDYOQ8m9mygkhVfzBN4XFg1FDtP0WQUtJ8MkiY8I0bF5DpcR/Yl JJVrDMs3A5o2hV06M++8YQQgv7f0DY6F0yU8HMBDkT8+edEXBokTBP8btq11qqmd3cNLifEGvjz 7Z+UysCJaWNU0ym20N6wgFHIY+/7sNcT9HfT2+lEc05uAU8l 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760182069984166400?= X-GMAIL-MSGID: =?utf-8?q?1760182069984166400?= 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 (mostly) ignored 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. 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/clk/xilinx/clk-xlnx-clock-wizard.c | 6 ++---- drivers/clk/xilinx/xlnx_vcu.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c index eb1dfe7ecc1b..fa829c01a444 100644 --- a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c +++ b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c @@ -593,7 +593,7 @@ static int clk_wzrd_probe(struct platform_device *pdev) return ret; } -static int clk_wzrd_remove(struct platform_device *pdev) +static void clk_wzrd_remove(struct platform_device *pdev) { int i; struct clk_wzrd *clk_wzrd = platform_get_drvdata(pdev); @@ -611,8 +611,6 @@ static int clk_wzrd_remove(struct platform_device *pdev) } clk_disable_unprepare(clk_wzrd->axi_clk); - - return 0; } static const struct of_device_id clk_wzrd_ids[] = { @@ -630,7 +628,7 @@ static struct platform_driver clk_wzrd_driver = { .pm = &clk_wzrd_dev_pm_ops, }, .probe = clk_wzrd_probe, - .remove = clk_wzrd_remove, + .remove_new = clk_wzrd_remove, }; module_platform_driver(clk_wzrd_driver); diff --git a/drivers/clk/xilinx/xlnx_vcu.c b/drivers/clk/xilinx/xlnx_vcu.c index 54b44debfd3e..0786f15ebbe8 100644 --- a/drivers/clk/xilinx/xlnx_vcu.c +++ b/drivers/clk/xilinx/xlnx_vcu.c @@ -702,7 +702,7 @@ static int xvcu_probe(struct platform_device *pdev) * Return: Returns 0 on success * Negative error code otherwise */ -static int xvcu_remove(struct platform_device *pdev) +static void xvcu_remove(struct platform_device *pdev) { struct xvcu_device *xvcu; @@ -714,8 +714,6 @@ static int xvcu_remove(struct platform_device *pdev) regmap_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, 0); clk_disable_unprepare(xvcu->aclk); - - return 0; } static const struct of_device_id xvcu_of_id_table[] = { @@ -731,7 +729,7 @@ static struct platform_driver xvcu_driver = { .of_match_table = xvcu_of_id_table, }, .probe = xvcu_probe, - .remove = xvcu_remove, + .remove_new = xvcu_remove, }; module_platform_driver(xvcu_driver);