[10/19] cpufreq: imx-cpufreq-dt: Convert to platform remove callback returning void
Message ID | 20230712093322.37322-10-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1027798vqm; Wed, 12 Jul 2023 02:41:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMSKon9SgUhp62FZfYaSLxPMsjtEVeewLfa5IdlqQWkr6uCh23NeNRfAq6qtbIctgqPIVy X-Received: by 2002:a05:6a21:9992:b0:125:4d74:cd6a with SMTP id ve18-20020a056a21999200b001254d74cd6amr2023723pzb.3.1689154873749; Wed, 12 Jul 2023 02:41:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689154873; cv=pass; d=google.com; s=arc-20160816; b=EhOBU6xTSH3TNo1j4cu9lzpZiW19zZHvOkiBHtUT5oXiDo3AQ87UdXXXF6Ux7g2mco kmqKc59kzDqx/dgO7+uwg7kEeSl8PQzjdGTSWsRpxMzaLbJi3rCBHbWUl2T8hhXPqUtA qJcw15IVMymagZYRXkSpTbXPaklom6LLRcBmndXN88D4G637982qj3dcPypVs7sxTkxu 1FWCdRhkRdLA/ZIxueE3H5E2iyXZVxnEuSirfy9LFIlkI+2/AY5l+MXhwm0rCtPqQyEg gt3hCr1n7QelUyXTvwwCEwhOJVioSrtaVnMFqWQdmKg6PKTc6Zr1x17mkwsrSPcHeQ2s l23A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C+IWyyTdI+3JNaPeR5z5dkNulc/M/Z1sGW+d58kuBYw=; fh=L6a04twCHIdsZG1P+JaPyJCOhMeAtDRESGAgyEv6fUo=; b=DsPfjxlS9Fff8RmdiXh2Krl1WQiwnb1tifGIx1yiGpt0XykoWhapIN1NUD5s0FUJpV V7zJhDBOq0XxB4krZKDKsYe9bU1kCVlrNQcrwlWpvklAN/fMnB6BFPGIkln80vl4wnKI z1RKMFfNrWZiIKttZtjig7vSEgzO3fVGAxgl9b3NEyOtHExz1nNkGuc8f2fT/cXb53dD 3Hcpsg9Ovlt6m6VufozSi/dwKcDxoV1Ckizf9kSQw3jRnrjXxEr8x3AYcxFECOlJdQKh 2iTDIC0CbDgvrRAcrBqF8ldy3Kz+eXZM2dxr8mdOVb0rR43LxXn5c6uhJa3xGQoCgml6 YDnA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=oqhemZW5; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a656687000000b0055bcb258715si2947911pgw.52.2023.07.12.02.41.00; Wed, 12 Jul 2023 02:41:13 -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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=oqhemZW5; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229446AbjGLJef (ORCPT <rfc822;gnulinuxfreebsd@gmail.com> + 99 others); Wed, 12 Jul 2023 05:34:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233272AbjGLJd7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 12 Jul 2023 05:33:59 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9AD119A0; Wed, 12 Jul 2023 02:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GcvMKRIXzEVZwyH6FN2emI5iSmvNsQ8DztwmSaKDwwkcEX9X5GLOieRPMH9CqmffaTBVYjGCxsuZBVYGKXrU+kTJRuSN5cBU+QsmiILj9UsTPDcvsRYrZ5Fn0PGDYxGQE2eaJHScc72dvi+qHXNyLjBSVqJbEPIWnriB70QvDIdlizYubeGKIGTIMMPhyDbShNBTAGodfrAzgAmFyT1/BDJfB6/R+HIPjt0Yw/F990deAEuEwr72jDVsXzDqNGGmmI2V6KQcFfaF2bsrTznxWp7Hv1Z1tM9gU7acQdFudRCcYPvlaT7fOlLQzHBVYkBqZxHrZz0n4jPGxxpB2vN4AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C+IWyyTdI+3JNaPeR5z5dkNulc/M/Z1sGW+d58kuBYw=; b=O9guvuIeHI4wtCwYLdyxx/6OKb4aio3nHjMnGx1SavJA4Vsxz/oJGDe1ZCviskwxnZQV0DjD/nUA3ioiRYUeZ2P563iUgl8ORKLwT56Rf6tfJPkQh9TTZQAt7bhylylhatnkhd9JCH+XqvlrVIS7NwdEno/FjU4fLe4fAiymxQBjXI3SN/QQTV/fqMc2LHZdv5vDShwL22razErN0VM9dMNHJV9UihygkqgdJCP38x/pREiEDjC9w6H6t9bwhHuBsbegzW/jfiFM3+m+1yUKO1YIkdIrFMsxZu6XG0U8wQ+ngHU+EWXjGgv6IqFi9fkSW0bG6Htl/oXDRZOMGQZChQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C+IWyyTdI+3JNaPeR5z5dkNulc/M/Z1sGW+d58kuBYw=; b=oqhemZW5WRABsTPJ07ApY2jS8FE0ih5yT1huvWTOElYWTKANHEPsNpEIskbBDK7zNAbmeU+sA3QXJnRYSI3aLSyncdJn80YE2msL5Dqis40ai8nNfH/9WuHKZNI730SEcWm/evt0+63WJW9DJ4dwMoyxF5ld5mVyr8QLWTc18BX1SCW4w0+uwxY2HcWyCOBL24GOCc5HrYgbtA8k8UCGdzkNgwfIw8LmssICvbrF/5aQMO13zI0LmzSgSAo+Y0teM4YjQnMk00C1vU2gno3xqWo1pFKG8HYl058xsacitHb9f/VwM0wmRh/SnzCnFk1FzyehVk4NUqOQtn4nDPZSGA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEYPR06MB5985.apcprd06.prod.outlook.com (2603:1096:101:de::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 09:33:51 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Wed, 12 Jul 2023 09:33:51 +0000 From: Yangtao Li <frank.li@vivo.com> To: "Rafael J. Wysocki" <rafael@kernel.org>, Viresh Kumar <viresh.kumar@linaro.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/19] cpufreq: imx-cpufreq-dt: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:13 +0800 Message-Id: <20230712093322.37322-10-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712093322.37322-1-frank.li@vivo.com> References: <20230712093322.37322-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR01CA0172.apcprd01.prod.exchangelabs.com (2603:1096:4:28::28) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB5985:EE_ X-MS-Office365-Filtering-Correlation-Id: 6bbb9c65-1ff5-4573-12a9-08db82bb1a40 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MpceXVcx25I1doBJ175W1Bvvqa6tUhZ1Z3FIuP5D5zcWw0SCo/qGGAAaX9lw0qunVtUjYb4BwuqNTjXpe24jGsmtuyufrxnXb/IKkSrdFhl78zryvonBOWNOkbJKrsJwLmTArylrSOHonh9POCH033WsZg5XsfI6KGTxPdKRtJifCPHtdkX4AqVeWwU7GiIp4ZyZkBNMDr9WxG/T5r5LYuM20uR0LeItmIdIqIjK4ClFx7RAvQZsC3eJNKvdw1GbQGDQZw9U1HFM86BoVSS/EmQ0jJ26ztcyv90knU/8u1g3Q7Y5hEM4aK0aabcjjC9wfMZd2pWCPPPt0Hsf3zKgkh+kiCmdDorrk9y7xR3sorR49QXiGzWX25rKWCxBQu4dYFBYOa+CsME2oNpi9wgu8UsV35eaTTBo4ubMesd1DZKE23u264n8NkgJtJWQhfdVKGWBGTodd6PzAqeMfagZ2UGPCf0HV9Y10AavB5WBr8RtTavH0qRjIN3Pld57Lb0RUQAya7fZP3iZIFpQ0z2XYaoemj7ypovqkvYWWnVgLR9ZxUEg8/zDCV9bPHvtQUmmrRftpaKb3hLp+E96yzHmCAZbskihID90+RiBA06eEnmG6srSj0klj6VinLauvID4 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(346002)(366004)(376002)(39860400002)(136003)(451199021)(186003)(2616005)(110136005)(54906003)(38350700002)(38100700002)(5660300002)(8936002)(52116002)(6666004)(6486002)(86362001)(8676002)(478600001)(316002)(41300700001)(2906002)(4326008)(66476007)(66556008)(66946007)(7416002)(6506007)(83380400001)(26005)(1076003)(6512007)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?9sSZ46VyUGCjeRUxDp5/6Ax1NdLk?= =?utf-8?q?WSqYNM8zvvrfa7oQ9JVJCjPrdJVKf4bw/5XUv9GGCBx3m1NyWKK5afW7A+Z981fty?= =?utf-8?q?oZ42l8MAytTzXPwPv9ZkQFUw+5qXOQRklDRHPLB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goQSoriUBfqd4?= =?utf-8?q?wx2M9vabA0PHc9ISJRmwFNXfTGDtGCySm3XRkMiHOchcffi6GNFm94QYWMCTQ4G+m?= =?utf-8?q?PI5LmYdGhESIFcb1fBoVQyeoECf5IK+3uA8JmC8ipYakdbHIlIyR4lb0X2noG6kxL?= =?utf-8?q?I4BV/HBImYK162NfTgzt3hKcKW+ROTSHxOume2mX0ExHpo5S11cESCpYWy6HHsVzp?= =?utf-8?q?18ZT0C66TDJldQcnt8IslPAmIbaEZ8JhqJTjOSSyFsBw04XFMx2jThizhsWqrQZhW?= =?utf-8?q?CocRIZPM2HxyXN/PrFhG7CbJR4ymSVRRguoremh3ICahNpCy4Krcbx6JxbuNCefjj?= =?utf-8?q?PWjGCPWzhWgDyK2baKJV9+SZc8e2t9Y3bAlrDF1OJcDLME5g6rlv4cJdK3OX7921l?= =?utf-8?q?sgKXUGFOLNu3jYafcBlePv/Oz4bSmtVB/ZG2zisTSCUns8wSnCezvPYdvVWZ5vSJ0?= =?utf-8?q?HTx025ecCfJFASa9WRjPGgUl7SgxZPQFMNlhJZgNP4ZJVyxGjzbBCQcpr5AYu+VXm?= =?utf-8?q?0YnLS/rVLcIx?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6bbb9c65-1ff5-4573-12a9-08db82bb1a40 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 09:33:51.5357 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XmqQVDvEVxDYXAeXN6hLs7bMbwBQB9NpDChTM9uiTELkaZS8HVq8sPesvTz4VIcQRLJz9l918fFXmNgEcoR3TA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5985 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771207260603083093 X-GMAIL-MSGID: 1771207260603083093 |
Series |
[01/19] cpufreq: sun50i: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 12, 2023, 9:33 a.m. UTC
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.
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/cpufreq/imx-cpufreq-dt.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/cpufreq/imx-cpufreq-dt.c b/drivers/cpufreq/imx-cpufreq-dt.c index 535867a7dfdd..577bb9e2f112 100644 --- a/drivers/cpufreq/imx-cpufreq-dt.c +++ b/drivers/cpufreq/imx-cpufreq-dt.c @@ -172,20 +172,18 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev) return 0; } -static int imx_cpufreq_dt_remove(struct platform_device *pdev) +static void imx_cpufreq_dt_remove(struct platform_device *pdev) { platform_device_unregister(cpufreq_dt_pdev); if (!of_machine_is_compatible("fsl,imx7ulp")) dev_pm_opp_put_supported_hw(cpufreq_opp_token); else clk_bulk_put(ARRAY_SIZE(imx7ulp_clks), imx7ulp_clks); - - return 0; } static struct platform_driver imx_cpufreq_dt_driver = { .probe = imx_cpufreq_dt_probe, - .remove = imx_cpufreq_dt_remove, + .remove_new = imx_cpufreq_dt_remove, .driver = { .name = "imx-cpufreq-dt", },