From patchwork Wed Jul 12 09:33:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13309935 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD369EB64D9 for ; Wed, 12 Jul 2023 09:34:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233297AbjGLJes (ORCPT ); Wed, 12 Jul 2023 05:34:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233265AbjGLJeN (ORCPT ); Wed, 12 Jul 2023 05:34:13 -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 891311734; Wed, 12 Jul 2023 02:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m3Eef4wlubdq7M3IIBu9g6uWC3uEwOQOl2UmkzvrCBH570DIiOQW5ePBT6s33BKbeKmCMKVlE7MaQ/TQNbpmaLAsUMna5wAlEorqnMfahdskYElYrlZu/wHk4rmh1kjvLIq4vZOU8NpUib9nzl44PHpok+QgA+tk/TY6s7bhhrnK2jlxaT0mxQx0ugLyWJMTjP/UA2a+jgVkDLrGIiGEsN1qsklj/KfULRlzA2ir7ugCNJAlgDLxyOyl9bLjIOvob+xViHMnSllUDZ4q4e4ceWG19SuaPJRhjEl20NCpGjqPBM1SHPk2YW5/QeC91nRg3NrPfiE7P8QdnlqQqENgdQ== 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=Iay+IBxV/Yg8sWs5F5S9FoVE3oZ5N68RmY8kEJqwsKc=; b=J39KxLpwzmdf1F0iC3bPZHX8unmtS2ZGmVba+08CK+dFFlsOZswsYmueoG2zhXpdUUrZhROeKNqYxx4m62nD1hc2Y0lB+5DDCxW8/Ibws24LfcS8qwrtnU8SmxbVYYuibVZy9ieSdj0vfKUBB74W+7o7AKRDD2FS/QHiJdQ/4ybuebOXhZQNwgMStC4T10aObYNWTS9s1fQNeP5nWEiOENvA0fH8hwb3nxNwPq8xTj/Cii2qZ2Cty4PA/RgbZ8Ydppbi1iwTrObH5WqlTyi2gnWVG6CrPBlb7CdJoaMHgGmz8nAwYbBb7g+DUR50NyTtctWvSHe6VhZTPdMw8atebw== 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=Iay+IBxV/Yg8sWs5F5S9FoVE3oZ5N68RmY8kEJqwsKc=; b=fiGkAM1986+i9vmN7T6QenvY4SqYegFHYs+FW+WApxwnUM+41mB7ul2Z67YzxyB5v0lq0+iNc7UYcEHQhwyKdWysfpElzi6MQ6FqWxBUyaKzzM1Qy6+VtIR3/D+gwZRSMZcbsiHR5KImYGHHz5zynXzEf8RhbZUkGxPGc1Sey8S2H9ZyIPPc8E/Al1ZKFa+W4lQ82QZyfnSfHrh1X6eWIPe0kD7IRk0tQbE6Zmek1xdlwgdUtkOmLotFhynEyZBqV3DuYVOQ1BVH/7t494UQhzVg3LJLoE8bGtKBtPbFhHVTDCxCvvF9wQfbNtalwzOkRZXdN0FVzvBbwGhwCe0/eQ== 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:53 +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:53 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/19] cpufreq: davinci: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:14 +0800 Message-Id: <20230712093322.37322-11-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> 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: aab5a0ca-a0c7-460f-c2ad-08db82bb1b1d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zrXVH50nQuOD0TvGkc2Rvxd3Ko5HqZ8Z/Ub6u2Wg4bSudswEwS91pJLzHpatHFLnvTQKMIuw6k2pXa+C6Id0mJCkfY+twML9mkwNXcZf9kHpAJ57SQTD+CDCj9yRrkWUY4tVXTi+nX35KwUJX5S15ZpWo+5wlx+23EwwvUetfHxmKOkR1VaK6R9SPkim0dZPtjz6Bb58X3PZnmu7dITJh5yJxPX7qflM34pm9rK1t7ZkvKv6tw5iQ+m5VfmJoPpTpCCQX9kN3LEzXD3MGqPatllwKoPe+Ua/1gqCbjh13nQmgd/YOioBypzJbfuxnBfr36d5/us+fBt7UNVn4ER39IeF1dZDHF4lq33hRLC2pwEbX7i2FeCPa79E4C4U0u3ayZqAw1Nle1ldWUujKd4GH0/Iza3GEBW5l/NVGB5oAok1iMAId963cnJY+TMWDhPLjYze6qUQCDpqykNcU4IpdJf5nEEeV08dhWhICuOJkIWAr8ce6MJdw/UVyxuAbmEyC0bpMziWcZKJ+SsB4/AG4ZNiY5q3XwsDvSL/BNSlpKtXibrZuuMC6gKvjOIteptkFiDAk61XorpbYz1mJjbM4x/qdBKxXfL9X/9xvPr7B2IhjJsjwrlSKZEQCVDDX3JE 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)(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?OUd0/UrmO3hicCTnQzfoNywcYo+7?= =?utf-8?q?BEVWDLd0I6wC6kzq7lUKhR2uTUDVH3FcyFopUIDFrezqtIpe0rTR0G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z4?= =?utf-8?q?ByqEgFHDGVaAorjAR1LdlMQwpMaW71O3vdQ29baZnVje6YsQpr0jI7stJc/detM37?= =?utf-8?q?WWSuB3sSX9a1aF+Fj5zRtQeoAITIeY9J8HlVXXF4Zo/HzSuGs1ZBsNb5mx0pUCPGr?= =?utf-8?q?SsAdIVOcnWgxjRGBsVfTX7n8TqwHcVqrsyl/itq4vTxjPzHjPIL9W1SFBsr++Sj1P?= =?utf-8?q?L++47gyq6hjUzUE746yvmTdAFeA35G/L/Guk+csPNLSyfBWG8u6canZeLdvqmL82W?= =?utf-8?q?kTrzNlrhFxTrMKd2IzdqFkj4+qIEmKqWgwZXs7IPS7qAMa42nJhBsg5KdYnj3K9MA?= =?utf-8?q?CfNxmMoSc2eKTbhc3fPNyffDK7fxYgaWxyZA+Ouod1wp71NLjQCu1h3XA0vogT6wO?= =?utf-8?q?Uu7O983s2k/BibotAV8R7FIinI5qmIIiPOP4R2JkgXOvsDOeXA980CpLgOWslQ82U?= =?utf-8?q?/hvoJrMinAaMVH+QGkwGKsdq2Hl/VBHEIvlrjHAD7s1vTWpFSv+4dp/5J4W0lFc1U?= =?utf-8?q?BLln5eQSVlboVgN+d5pg/GOxETTnbg8eUw6SOJEN4U0OCm5mjvYJdwflzW+wG2q4E?= =?utf-8?q?AZyVdAqW6c69?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: aab5a0ca-a0c7-460f-c2ad-08db82bb1b1d 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:52.9834 (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: 8zXxBsiCoN3uSm779QjHDrvQDCt/Yla1n+iiA48stXiCiHVgAwJ5H6XWg2XMWpn2LMlf4XKkj11a2+n1UsV4jw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5985 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 Signed-off-by: Yangtao Li --- drivers/cpufreq/davinci-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/davinci-cpufreq.c b/drivers/cpufreq/davinci-cpufreq.c index ebb3a8102681..7d2754411d8c 100644 --- a/drivers/cpufreq/davinci-cpufreq.c +++ b/drivers/cpufreq/davinci-cpufreq.c @@ -131,7 +131,7 @@ static int __init davinci_cpufreq_probe(struct platform_device *pdev) return cpufreq_register_driver(&davinci_driver); } -static int __exit davinci_cpufreq_remove(struct platform_device *pdev) +static void __exit davinci_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&davinci_driver); @@ -139,15 +139,13 @@ static int __exit davinci_cpufreq_remove(struct platform_device *pdev) if (cpufreq.asyncclk) clk_put(cpufreq.asyncclk); - - return 0; } static struct platform_driver davinci_cpufreq_driver = { .driver = { .name = "cpufreq-davinci", }, - .remove = __exit_p(davinci_cpufreq_remove), + .remove_new = __exit_p(davinci_cpufreq_remove), }; int __init davinci_cpufreq_init(void)