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);