Message ID | 20230712093322.37322-18-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 c18csp1031833vqm; Wed, 12 Jul 2023 02:51:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlEb76C1LLXZ03X6/AAAIsPtZfI776Lq6bTE+eEv327ZTcELqqiy0+/jMGbQ/4DIqETARv8B X-Received: by 2002:a17:902:b187:b0:1b8:a39e:ff4b with SMTP id s7-20020a170902b18700b001b8a39eff4bmr1777875plr.32.1689155487361; Wed, 12 Jul 2023 02:51:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155487; cv=pass; d=google.com; s=arc-20160816; b=VUKcXI+omv/mGR/JVeaqDmQc6M0Rb7QkRU6jpMGXwENG0sZaVwqOyOPc7IsBKnvHnu 8j1jZ7xeRxGW/jeeXsEbGPCNa7ZDMLYYrMYV9TD5Bk0NExvENJ9BVE0nKlAZxHsquX4r /ww9SfYXZ/VwFV9iSwCVtTWPKJQ01nyoXdqTPUVgA12XrARP+5irYubJK38SmbuZA5IG CInIIfG8zx8yEmE0Yv/mwL2bchPqm5FuRKrC6zx4a7Q9J2f1f0mCsfw1EbPCC9JObfN+ krXSUbvrBfVT1xRakCLzj+F2dYc8CPNafOo4wl1uZCgPgCBspw43HcOlH/GnsUSRoK+6 G0gA== 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=KzVbD8vpWGYcyP7wC5u0fG3SruaXhfw/VzRr4XIqwA4=; fh=792QnPNe7B6CJvN2sfEQHjHNzAPA4mlp0TVXfBm6Avs=; b=fyD8XUGCxli6mroEdVkr77VPLFQ7jS8VTtyWA6KuyyjA+2iBOIPpKxFBQjFMQtK+DB xjkOJ+ZoZcpQ7xECPob8e+z6Af30NjbK89MtkzBNI5WMyNlYErJRHPn0NsXXlgEwlldl a7xNeG/I94xPdzhrNG5Cd6n4be3Wb3VOfKoscL2JwAx7ZD2qOQCPrWOVQE+iutafSRQZ p0b5V3+G+UHDDMRqndNhem22Scris3XElLQNM9hE+DVuv4Ft7eMPw0QSSyndGkr/D9m3 8/mB2/BHvpZTtHF3jfh7CT2C4Hxrswfe8Etvd5UTmx3cCnLAjkacJrXqh4gvv617AUdQ ooZg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=QkMeTfab; 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 j190-20020a638bc7000000b005439273f2a4si2878818pge.139.2023.07.12.02.51.13; Wed, 12 Jul 2023 02:51:27 -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=QkMeTfab; 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 S230241AbjGLJfU (ORCPT <rfc822;gnulinuxfreebsd@gmail.com> + 99 others); Wed, 12 Jul 2023 05:35:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232892AbjGLJew (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 12 Jul 2023 05:34:52 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2105.outbound.protection.outlook.com [40.107.215.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E777C1739; Wed, 12 Jul 2023 02:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CeDFJhfu1rwGChvtBj5KlLTtH0cvO15KzwOvc6u+Chgfo0lqmxTgPaoEoDeKfU21nd4i6bf2rP+HW2PvS92PaEN17Ol+uNjbw7r5TXFoTrfGDAmuy18WvmzHFaBXTQ0/OXa5RuJlUK87Tf2LmnmUPNFU/p8eUGA+T5b1epweuu5AnUUiYRz2RCIi3jbg852TzC3sRtOvX+uniXZlWD98NM16qdJ2AsYnpy9Ifo5+/Q8GMM3p/4gURiM44DbBDPzDRh/yRWbbgysfYL6DKrlxJ10rmGrZaFkMsiXTdHfRrOmegTUaGDM3xNjn7vi/sO9JxDG7JOpSmJeJGQyERdYORQ== 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=KzVbD8vpWGYcyP7wC5u0fG3SruaXhfw/VzRr4XIqwA4=; b=bEG6gTPM8ggnVECK33LiDG+ZWy/C2JG+NakTN3ZCD4C3mOW7T3H3L5yGHl9ZpB3kcPNb7+HLh5MFdOqwZ37ecHGLLlqzFH23tjDOUt6gFmKiIpTwQ584bGn3f8HGPW7TSc2AdImPHsYfDnMUyb2+hyiY4l+Sdy4gxt6FHbv2ApW23GYd8H/WsDoLeh1V9H9x2nohQLhwUMJeLZhaN2jTKLCelOsk9ps6SprJ1XpupwZr25PsOzM3qcAEsYB4K9mgUOWk47tmJ/FXOnL43FEjW6eGYKMFtvjrnvF1iq4YOh1kd5yq74lqaIO7fhqfsBFOTOJgxnJqxw3xi8sS9/yfxg== 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=KzVbD8vpWGYcyP7wC5u0fG3SruaXhfw/VzRr4XIqwA4=; b=QkMeTfabHCg0orf7VvbeQwU/KtChKvbgyq/mhWxYnTyDXic/9ndaHYUGe0mn8Y8uNztltJw0OUsmtSooGe7CpmQsAMS8Svzrq3r8xhmpnjx+KLNQgr1XrB98mwonXdbWBLm8FRwgEsxfhSAeBTU98iY2ofSIXcFDI9VHnFbydGuuhMlJgkyvjNryxoGaDZgLp7X2KJV72ndRG+LMbDUdPyeoQ+cB4D5ioIjgKZzest7KPzMUmAttDKIDvRWqO+j8IsRzLwKfOz5xNhLt+FcVZ4+if6Krcc/HNsaU+FCuMzkb3UTp9gK6ch0QWkkROlwmxbEvZwvmtm5VTa1rWaAqUg== 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 SI2PR06MB4091.apcprd06.prod.outlook.com (2603:1096:4:f4::12) 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:34:04 +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:34:04 +0000 From: Yangtao Li <frank.li@vivo.com> To: "Rafael J. Wysocki" <rafael@kernel.org>, Viresh Kumar <viresh.kumar@linaro.org> 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-kernel@vger.kernel.org Subject: [PATCH 18/19] cpufreq: qoriq: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:21 +0800 Message-Id: <20230712093322.37322-18-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_|SI2PR06MB4091:EE_ X-MS-Office365-Filtering-Correlation-Id: 42dc6710-9b72-484c-bc91-08db82bb21e2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yXrkZ8wcSkWAPriimk6/T2ZXK2A6DyZnpwa0BMlrE7ncbGGeWeGLynbhgPzyUxfbvWzAtx1cn9eavSGO+sVi8pYtdZRNUndm2d7ROX3SwblHpM7ElzZRK2PigqmzfzeHkhr0QmP0j+3bBQ/ObRSLDuXvJOqCLZLeOX8EzwQGiapYywB8cSKojFnfj+4bfoNZ+eBzuNjhaycv4qqPGx5GeCBaAxvq2XilYW2iX419Zk9Fbv+9YeV3cR9x7swcnIwdkMs1oO+p74MwgMcqupjbwHlTJqVLedn/S5cXrQ7g1vz1OKDoHBLBY8asXc4vLR7WjS3TVuohJV6weQHyfz/a2o+CK2TaKs4BpIUd22S1r5bcZKNv3PDjpwQq0eu4lQoEJv7oTeA9GMolxI0w/SN4aejyB5kDkzdLDsCbQxAUd/uhS484ykt3HJh/nLEqES81Hmn0NlFftyJZPCsLmT1hTW/ItaLLcQDnVzpghAkGJaSn3WQvi5CRLYpxId3NjyNXPCm0ER5l5KQMhvwmqQj48FqS6N8CBrmaf/Iw/C0ljaHsGSyQMnqXgWC6g46SymAnLsioFeb/PSeWVhIu4Lm92ZFedn6Wp82FCZj5E2R5Ju0kwI8NhMKuCdNK/yktB5UM 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)(39860400002)(346002)(366004)(136003)(376002)(396003)(451199021)(2906002)(6512007)(38100700002)(38350700002)(83380400001)(2616005)(186003)(26005)(1076003)(86362001)(6506007)(5660300002)(8676002)(36756003)(8936002)(110136005)(54906003)(6486002)(6666004)(52116002)(478600001)(66556008)(66946007)(41300700001)(66476007)(316002)(4326008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?DjbUPxmiByXq9LhO6xPYI3+X+f56?= =?utf-8?q?uwFMMP3DwWjK83kWrFkZl67yqz6NlzuHPxlgAu3MHN2hO4cNZdYxzvDLcx+lpn4vw?= =?utf-8?q?REobkAin/ZbNrn6F/R2LQwN5iUBJvP/pxOyWH+kmcdOZ/Op4sheot/RaCsbxcwhYC?= =?utf-8?q?+v74XzexkK9L4BGSLk2iZ+2gBrkUUZWoVKDX4Pht50ydXrlAkc8LCkjQ7H1mmX805?= =?utf-8?q?uaqv6pwOwcbh9FrFE3bzXTuEuWqBdsHtsCNXn17cX3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QKAGOzFOUYA2EYGXf+MpaZ?= =?utf-8?q?58g53aGjInRTtL9aTOQ6t0ItnF80tkIP7PxQk39vO9Obrl1wmSKo9o6/939rH+tOe?= =?utf-8?q?xg1ZAA87msq7eL6IpXpqIogXNVkdEN2PZnulRPqcZqO/x962Rm3hrmTgzpF0ecMCH?= =?utf-8?q?qB2zHKqgAkqVdVRzMGesvnk23ik8t3+h0YngG7WEbYwNHDRsbtRojSRdSOKTkK9fZ?= =?utf-8?q?4WjQSsaUxrRWLHbxp4+BCH9QQHqJlVABYIP/tX36buqaFuAV7aCVBm55z+HBA2tNa?= =?utf-8?q?2YvWyHTeah/4AdOZuJ4MS7CRJyHpJ7tkyUFKCL444muerw+OAi3WA5E+Lm4D4GJ5k?= =?utf-8?q?xiMik6ygCn0MIo0o4FwUfxJ+dPCcQqGOl4XYgHqLcfuEH9OaX96ryCWoQ2ORoRYbl?= =?utf-8?q?Yjxt6O9+LE4v?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42dc6710-9b72-484c-bc91-08db82bb21e2 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:34:04.3592 (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: DqRqYoHmT+YwW/3C9s6slLChYDfMPtGvYcYPQ4do7jJNvsjIUZcMqCeEaOp/Lm+etROUr3HJ/01PKO3XhRdKwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4091 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: 1771207904266707477 X-GMAIL-MSGID: 1771207904266707477 |
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/qoriq-cpufreq.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c index 573b417e1483..0aecaecbb0e6 100644 --- a/drivers/cpufreq/qoriq-cpufreq.c +++ b/drivers/cpufreq/qoriq-cpufreq.c @@ -288,11 +288,9 @@ static int qoriq_cpufreq_probe(struct platform_device *pdev) return 0; } -static int qoriq_cpufreq_remove(struct platform_device *pdev) +static void qoriq_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&qoriq_cpufreq_driver); - - return 0; } static struct platform_driver qoriq_cpufreq_platform_driver = { @@ -300,7 +298,7 @@ static struct platform_driver qoriq_cpufreq_platform_driver = { .name = "qoriq-cpufreq", }, .probe = qoriq_cpufreq_probe, - .remove = qoriq_cpufreq_remove, + .remove_new = qoriq_cpufreq_remove, }; module_platform_driver(qoriq_cpufreq_platform_driver);