Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp38093899rwd; Wed, 12 Jul 2023 03:01:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlFKlYum/puTMmwUTfZ/1STh5kzO3fU85u/jGB3Ew+oHoBOaK77SnLZgOz845QkyFTqOeXW5 X-Received: by 2002:a17:90b:17cf:b0:263:2da2:fe9b with SMTP id me15-20020a17090b17cf00b002632da2fe9bmr17901885pjb.21.1689156094704; Wed, 12 Jul 2023 03:01:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689156094; cv=pass; d=google.com; s=arc-20160816; b=F6ylyPGLe/xq+/hT/rVMnQDKkLBmwEZBVme7pjoIIqds4PRRLVeAnyoIoRSXS56LWD pejJjmRO4DjW22bZfTq8heeHvoa6xhdTCdMUi+/JJVPAH4wJVcLsov7p6UUfAjXNyiI4 xJ3eYR/gZ/TgmtUpP6skTC5jiGRkdanN94FJCOYLk2qv6DeMsvgS0GF96WS5srgYOB8W Vcg/Tr8IeaZpAKftMqxqtHPDqWbqv0DV7ZUUCM99LFSSgGTLKv/tGqvafYx1NcvIAUf+ goZ4IncvXsBQ1+IrrwTx9XRd1v0/IKp5efmUBJNRF4pNWQHjJiD4sH2zkMfF7f0aH+Oj FWGA== 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=RHAWR+GUpAJDQGPWQJfK9K89QVrh/eBdAeEeYad/c7Y=; fh=792QnPNe7B6CJvN2sfEQHjHNzAPA4mlp0TVXfBm6Avs=; b=DN4cvbsKcqise2GkuNCqJXh6NYzVuHfP/LLS2TkJjwBohzt4vOsI+dnrXvvNDCFLgW CTPuBMQoX0U/noS5IO4QMpBrjlXMYHEk7vqhjKARqcXNISmxsbhAQ2RRQ3jmJD1WG3nV jhqOIAA7p6LBfY3tLPq8LR1T2xj6gRsSCcHIOYY6sTMvlzkVE5OCKGu367CpoCmX9iZK +BXCFi3QwCjg57sP8oXnKUyDnyUB9ZfQe5ZqRfr01vWlnnDsYVhy7EWV/+xh6pbGBS6F UPd68PkoRdthFiRzQJE8neOU7FvvlgtHXH9T02d6Hc1U8yPTO6nh3y9sHMcqO4sLi1E6 Qa8A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fuhtAMRd; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id om8-20020a17090b3a8800b002611518b4aesi3242271pjb.101.2023.07.12.03.01.22; Wed, 12 Jul 2023 03:01:34 -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=fuhtAMRd; 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 S233294AbjGLJfE (ORCPT + 99 others); Wed, 12 Jul 2023 05:35:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233320AbjGLJer (ORCPT ); Wed, 12 Jul 2023 05:34:47 -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 E812F1FF1; Wed, 12 Jul 2023 02:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZrZtV5E1qzrcitTZlF1uV9nbHzJ1wI1tLMhO7qAiZmwEJS2iyG2zt4wcBfGFfl/xHwRCGAb6lSaSXNpgjKA1os4HYI5G5E4V/YVB8iuUvt4rjbiFnw8fNOuWBYhqjfGpe/Gou7GsP3OFYd4fPfq4kXE5Cw01FRU5nfDWspLijbejzWxd7+xl/EG85E7v99GvYYMbLlmgGDsQglKhHaAV4AoeKbgr8B/R2gapD63wRoUmqpuRPBx5+obzb0Sq7EgxifssgBfKZE6SR9s+4B9GJzXaG9JshNbYofYqtl5I8KXqgwD+5C31lv1cFexoA5I+fwNa4YkTiBdK68adjqH1Dg== 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=RHAWR+GUpAJDQGPWQJfK9K89QVrh/eBdAeEeYad/c7Y=; b=UNOcyUNh7al7h5BKwLklCKDiq1naW3AusdKjIGqCFCOnqm6cowMW3cv+HLi2GfbW+LFX2Rh9Nlq68KZoCykVbjEwwVdxhrZUUYMuRQ6mkyn90sFAJTduMxZ7z750/Xcb2N99CfZhYwcgmotU2ajLCxJ293RTVF8+ITlPYbuRVE2O5ywHW29v4K4X9Rqekt0bBWkIr3TRM2/w18HwdLOxaAJ8y9hBHgwSOsCselwRKUWWhh6pYWhg9BbNUkHSyf7sMOUhddAhQDpiw7goG/EMjKP6X3YKynjZxeYKYLlCfBNIfdHfH7KldlqoMIsCcMNOgcjTfmjSgQW4TNKUTXOBRw== 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=RHAWR+GUpAJDQGPWQJfK9K89QVrh/eBdAeEeYad/c7Y=; b=fuhtAMRdxhKYbWda7dyC3eRgOAjCpPLjmtkCx7+aIf12YBZxr1CUyJwuLOYQpMG8aCZ5eJh7ngBFGyw6EmxmrBs7oM+9c6DOJrJCFiYgfUQFhtrHKEXTZavmRJlTkTE1gZI5kXuMNVcqCeiYequC7ibCPj5g74Y65kmuJWlzZi5diQDlLgT0RBnnsgFd9f2a1o5+FVskjB59BIBlxIw2g+Frg53DdRlZN3UbKNkA4mLiPQzig9/9rWm3G/XLb3hsEpvJOzlW/uyKWnELWNIOalNE8Pqos7l9XCaRnvebHLqT+3Th5qWJCYlwegu5hJT+0kAQ5CoytmESU2HjzU/GcA== 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:56 +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:56 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/19] cpufreq: pcc-cpufreq: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:16 +0800 Message-Id: <20230712093322.37322-13-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: 292f889f-7359-4be9-1cd5-08db82bb1d17 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K8iv0pXMx0d5b+vHXEv+cPGeqh6X9+mafmNcTOSJV4JNWUZO0JhpPnCl0c3x727R8K1+tAzW1pQztKv+tzOKstS8Jts6+DaBhL+o3QMxj9+QxsgszXAWq2RD8psNoSefXRgZqpzYh/3cWgnaqeO/9HH2QpI7u0Pd+35Yc+zCQerArsRuTdM/+NPyDLlIB5D+kF3ysn6H8/D1rd5giddC61KmR4CoriVwUDQHfd3zkJyPFTcc7IJpm76HkLIkqkCGa93WqRFZq13HlG6+gOo8ozAqSjz2RGjRLHppJVuIYNk9FfMfuUu8vlec/8uwc3Ri/YOt3eBvcxLF0hCZWCuWIUi++ji3NIZd/hbHKlSAfKm1qUkZ88K8KdkqGFbiEtkEiZaYInRjDYvnc4vYDGwKn3HI7dZlAAvqMSwvznH81M5ZHmmoCgVDzq1FZ+vNSyqg48fSgwb61F/U8WfsXMdfxHpEC4dXzakS6JucOTsYhxEcpkhNE9drD4NyfoGVryHtgbptTNwN5NiuPrxwztyD24zJ+tMFtjNL1rAEey2nxk3+HJjHAIihpPpRdryJLrOk+5W7+zV9ExUX1dfVcwXHuoe+11y2s8X5n5htNBk29U/lfdVLxSELmWD3szeHjeka 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?B?djM4WllRVTd6WmYwNkwydEhheFg2cGxUUzFJa0ZHRjF1Um5UdWdOZE9BQ2ZI?= =?utf-8?B?NDhOSTVDbWdiVUQ5V0VDbjM0N2pBMjRxQWF2bVZQekI3SW9zMTNKS3hsRHhE?= =?utf-8?B?aktiSmtEczJiM2ZYcUtrTE5SaEZvMlpvNWtNQlBFcXZpWDlXb3cyeTBzSDhh?= =?utf-8?B?dTJoNWhMcXhuWFkyVXY1c1hQbThkODZZZjhOK2hBRCt4R014YmFrclRleDZ4?= =?utf-8?B?dE1SajdDMnh6ZGhGY2huNW95bDIwVmt6clJSd0N2RzFZWFFCbmFkMHM3L296?= =?utf-8?B?NFBnVGFpbzdoSlBxUDJxSTBvU3pjRmFyOW8xZVhOWmNMcGNmRGRndzVmL1Iz?= =?utf-8?B?TytSNjU5MGV1d1BldHlIUU9UQnNkeUlxU240bXlDTmJQcGRGeEx6a2M0MDVp?= =?utf-8?B?ZHNpa2hUSWVoUm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AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 09:33:56.2940 (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: PTOnohbT5o1lO43d4NLr7IANcKW2NHPDA1r0RgJ899uTOkYT9Qlq5LCaTl2attdeXXpWRb+F4P6NBpwMm2Nqgg== 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: X-Mailing-List: linux-kernel@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/pcc-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c index 73efbcf5513b..84fe37def0f1 100644 --- a/drivers/cpufreq/pcc-cpufreq.c +++ b/drivers/cpufreq/pcc-cpufreq.c @@ -608,22 +608,20 @@ static int __init pcc_cpufreq_probe(struct platform_device *pdev) return ret; } -static int pcc_cpufreq_remove(struct platform_device *pdev) +static void pcc_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&pcc_cpufreq_driver); pcc_clear_mapping(); free_percpu(pcc_cpu_info); - - return 0; } static struct platform_driver pcc_cpufreq_platdrv = { .driver = { .name = "pcc-cpufreq", }, - .remove = pcc_cpufreq_remove, + .remove_new = pcc_cpufreq_remove, }; static int __init pcc_cpufreq_init(void) -- 2.39.0