From patchwork Wed Jul 12 09:33:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13309944 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 CD3E1EB64D9 for ; Wed, 12 Jul 2023 09:36:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233165AbjGLJg1 (ORCPT ); Wed, 12 Jul 2023 05:36:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231309AbjGLJgB (ORCPT ); Wed, 12 Jul 2023 05:36:01 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20717.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::717]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B70FC210C; Wed, 12 Jul 2023 02:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tbvur/pRKi8kXhRS7eys95owGe3P/wtsE6/mG0OTzcmxKnjk9pHcdKg+tDcUjOmx+vV9m8iBr97HYJGPlrLph7cPIUSTRLN2oCgVuwHwzmN5+xhwO1bMKIRrOxSuInyEr+atq9fRQAWL/lGP/y9GBlp4Y4U4e8iKDbxtNKsPwRlTJDHdIU3zXse428dgwEgVdX/fczLrjK3JkvBqn62NZxfs7Pmsfq/R5UfwXIIo5N1ZwLHBV017ZWli//UQFIkgOImAYiw6GZ9ndePZ3sV8MARQbkqeJ8sCabWjwPhK2aIPgUq59nZDr7Neut4UXyjSPQfQZO/uvSn/rPwu6ZrrQw== 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=ODrWtgSyv6IxrZtWeftArJlnezTb+OKVjb2Bn6QAOsk=; b=gTfZYjS92d0XR+SYmX1qblgJsPRINkRvsxf9eu0ZnKRzG8O+wd5hPpwuFNDzqPGm0OAwJxzKQ73WlkR2ON/Uyc/9mxIta1icUyK0z2m7LndtQv7RhXtoG3nDfpY/Ugt4Jqxgzi2ONyx5q1+6JCYfdsz4ebmPGsePn1s0ArHIpMNnFGu/ryklxB2P0HOHWRgn1aUVkkklmI6w6cWPKniSJh6r/S8H4JzGejLuGNBoYmVF5maiKK/ABr8xSUU9uS0BGEc8jsuaAASjOibb7DinVmeGgqGpbbH0M6ycH2U99muRBYhCGbDXJwNd8dc3QlkQQTVm82EDUCwpLUcS3sMwOw== 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=ODrWtgSyv6IxrZtWeftArJlnezTb+OKVjb2Bn6QAOsk=; b=h2hzz1KFRbqLCUKZD8WyFEFlfVI1ii672aqUcvZ/l5clnw2CoAtvdGYuJCAqDDxCWtmR6rFJavtRzPRaIjNyl9AisBBemU/XVLHFzowe9YdriREbeNrfDxPdkBJ+geVEsBsVpuI501r1WvPxgExkqjIm3twtijulE1Qlruc25JSjj3iBSc8NFhuTQF+tvmQsFrLHYbqRED94g41JxOZoWV+fAVcW+/bX7vdiHpvui0KcB8CmdJ+1Cb93OMw7jQl/4jdEFf1LA5+L2Y3ngJnvoxpoeqZOzffvRRgvQZhANUsfjxC+KlzUZHAwA4UuOBhQgQa4Ws0u1k58ZpvN/oxwgA== 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:06 +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:06 +0000 From: Yangtao Li To: Kevin Hilman , "Rafael J. Wysocki" , Viresh Kumar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 19/19] cpufreq: omap: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:22 +0800 Message-Id: <20230712093322.37322-19-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_|SI2PR06MB4091:EE_ X-MS-Office365-Filtering-Correlation-Id: bd2f3c1b-a6af-49af-69a1-08db82bb22df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IjA7tQfQp5TDT0TflhR9cqw2D4Fcm2HIsS6GE7zef6O+5NZ/xWxO5XaJxDkJX336efbuh3nEOu19eaWLW17HeWdDNyfqfoWMgS2tYQziOk3kFnEU0vSzv4ahHjzKJS1XB3oN6dAmATJMmzSPeuzoj4O+MT6l6BwJA3n7OsYy0FVt9eSKuFg+GWzjY9vv+I5tJFrpm/fJopwskD3c7I+lhPxD+yo3TiC5bugfCTwjIVeVL8ZiTCFHO+KANZjmyQNQ/63BkAfSUpHVUi/uRbSJV/C3AhUKKQuqRhmlfLcR5bQBdPKSoJmqIDp3Z+f3QvdEmMUfPSFdmThjSYw+HamPTya8rm+xDNAcv6p6csItiS1sZWNlGbR8hCl0hCVwVyXWr9tllbNO3R7vX4s1r5yHvFOpYAu5SXcjbdFcvd97lrYxWwoC3LiDcXQwQ+uMuA1QmVDdtumWZHXvM/4VNjN7wHETAEVXk1xsISWvqsKFjM/+5fID1LZWfYPvkEuN+U/oKUIx3kBnDI+TxmjvKRDCc/mr174J+reFE0PILWLIFfXQeRk4GhE9WKrkbkbjch8d3QQjG+AGukHGei4teqa4WCV7htIWQ+p9Nai/H5vqOXrvLbyGheWih6Ny2qO5KDAE 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?n3YDd/L2/8qx3ul69GTZZ8vchpGV?= =?utf-8?q?dS1aEI+7uD19GOktUQmSu430LN2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VT4hERwjdWPY9L3rFjsXj14RZZLz?= =?utf-8?q?quU5Y5/YObX22W9kVH3gGb0CoUzuARCjiyT3ED0lMquN4R7kG4VRJXdFLZvV2tEDA?= =?utf-8?q?B1uuWPz3h8FKtlfMLIRy4U+xVCkP2xMO8Ulr8n665wa/GlDhzJF/w36/q5oXCGSvW?= =?utf-8?q?2sT0v0+kb1xB654uU/98XCGV28c2mM4eVwGPE1tVg4qwYbqTcnTJcBpU7Zz7HKQw+?= =?utf-8?q?bsYR0HU2wDw1PT6sWlqCbtkXjB4OpDN+oF33HRuLUqO+nI+zd7EnyULMY45bHGvLL?= =?utf-8?q?C/FhMiXVXoRnKMyexSBzjJ+FS4ki55NWtJkXnZRRodxUCGp+tOoSEXr+Xnnp33Chb?= =?utf-8?q?RRQpu5EMX2utApqc7u4+vjC9LcQSTPGRW/sGELROIahijZez5vZLvXj4ROR9LLIXA?= =?utf-8?q?+3jaDc/md4grcMV923WpHHeYxcEv5kTp6oT5ZKTyYYZRUzo66yL2m/UYvd8izWuel?= =?utf-8?q?fLqgcoYivXN3mHD+c0t+e85oPpF6170+8O58RQoVmZfVAMY+ES/s9ysCNynwi+Rlq?= =?utf-8?q?daol65XUelANlfICtqSytAjlNkduoBqI3gQkv6gP41CTSF0SnrvQsVcjqk6xsNiH0?= =?utf-8?q?hPvmMocSoHLq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd2f3c1b-a6af-49af-69a1-08db82bb22df 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:06.0037 (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: 7wGuP+YZC+lmsbwhHuh2M3JO1XuH8bpPzV5yubApZmfoeCdfinQhCrhQgxIiObH7s78FWfGD3rT1zDnBX1DGWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4091 Precedence: bulk List-ID: X-Mailing-List: linux-omap@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/omap-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index 81649a1969b6..895690856665 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c @@ -182,11 +182,9 @@ static int omap_cpufreq_probe(struct platform_device *pdev) return cpufreq_register_driver(&omap_driver); } -static int omap_cpufreq_remove(struct platform_device *pdev) +static void omap_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&omap_driver); - - return 0; } static struct platform_driver omap_cpufreq_platdrv = { @@ -194,7 +192,7 @@ static struct platform_driver omap_cpufreq_platdrv = { .name = "omap-cpufreq", }, .probe = omap_cpufreq_probe, - .remove = omap_cpufreq_remove, + .remove_new = omap_cpufreq_remove, }; module_platform_driver(omap_cpufreq_platdrv);