From patchwork Wed Jul 12 09:33:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 119042 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1034934vqm; Wed, 12 Jul 2023 02:59:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlFvGC4tCIfLyWpvE61ggK963+oP+KLe11WH/10+P1GJ0b4hFzUMho8gEXFL8enkfXRQXtno X-Received: by 2002:a05:6a00:230b:b0:662:f0d0:a77d with SMTP id h11-20020a056a00230b00b00662f0d0a77dmr16983554pfh.30.1689155999173; Wed, 12 Jul 2023 02:59:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155999; cv=pass; d=google.com; s=arc-20160816; b=f0EwMUa7BZHIQvhUzOpBr/WsaaQATIjJdA+bPBvrcJCG/aBS+ikFTHUd07ktwOfMqt 6WURHzbSxQz+NZKlIxX84R9DAOrBfPf2st+f1aP8as4T4KRJ3xCD0UUXOAcUGRbljjqI bSEJ6f3q49THC+qX63Pfn8L6CTGlOIvuX9zfL2H9FYtfgC1+Y4wCEme0DJ3OrDFymYZO 6wKe5bS4DaB95CK1kB1moVSl3OOpQ2EvUDMBfIhGXqcu/+U1LSF7Pt52e6GUYx4vFTO7 ZYioTDjjdRZceoyesUeWuNwPGHY7oJRhoc4/T26W6K3+9yKTyG50q9nYwoKjMyuV4+hR 9QTQ== 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=Xxd4pDuQMQTbe3wajRQCtOORyTdekhjvyWLURZTgnKU=; fh=aLrmfDRXO5VR2GT05st/28kNJvSGxJ0c9BofnW6RXsQ=; b=pSeHvtDec5Y6s7lq9sdJaZCUOYR3FuyaTqhR41VoGXZEyiQfPFmFi1YNHh6fEY+4yv ghyjxAFglLFCAPA3a4eFp/jctXvqn6ND/ioS3+q8FUFFN3FA67OUWJekP9C5+RgARcZ6 FIJfSKa7kLenCrINLncYc6+DW8F8NlIUDGZvJSCp7AtkwG7G+dYDumGlLpEFNB4mMedJ 9eC/Ffw9kwlTYaI+U6C2CtCdXpq+yPZvLDauNh5rv0t8J5goec5XsMOOqMs4ckRCO5Og B/V2W/r2YIlsH4Tu1pQfRog5+pdx384M9gb+vO6ptoTbNVn0RuuZ1pIl19CjdCXNLJVa ExqQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=JelU4UIa; 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 b64-20020a633443000000b0055ab9bb07fbsi2955750pga.395.2023.07.12.02.59.46; Wed, 12 Jul 2023 02:59:59 -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=JelU4UIa; 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 S232221AbjGLJgE (ORCPT + 99 others); Wed, 12 Jul 2023 05:36:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbjGLJfg (ORCPT ); Wed, 12 Jul 2023 05:35:36 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2108.outbound.protection.outlook.com [40.107.117.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0D8E1BD0; Wed, 12 Jul 2023 02:34:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BIZ3eTciWWlQ3bkqW/ah/mjxztvXh1163axUCcviXNO4uulo5OYRvuTyLc0jgag7aC3WHAE47S9x6F6K5yQZtmZcZKS/cbfTSC+RpwdAp7a/rYT7BfRoPMplYv5Pr6kqTXaan3wYaAPILju3y6yZ9SgDRLMQqheZQBIrJ1ILIXsRr3+TaT5Ry2FwqQwtpC3mtPKtJ2EtIU27CVpfxalQ9Izwe5rp4bdGw2pgb5ZLis0COW/2DmhWmotoJ3bkwJwo1bQoCHZGki7B0GDKgaFGrSwhMK3/uz/039TFybI/0CVl8A89f7otUL+39doWp+/gNtVxkmlqtfhlFJ0BhRmAzw== 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=Xxd4pDuQMQTbe3wajRQCtOORyTdekhjvyWLURZTgnKU=; b=ULc3kncwFTQ/cvNkYc9BnEII6+AtsEu/gXIDZGz9cTwgIa1//Obk0wwg/LyWuMvATKRfMnM9zRYfYFrKn5t8+7PS46nv/M1nd5Gc3qJdxy/Xqp+2NLpWglBj1CTlPi6uN+rZpw251QCJqv0MSamMwk+piDF/P186poGibXbpevSYhU1a+RQ2EGzz+9IIJyBokjcL2gfAHDdOpjX1clrRAiv7cFCneA+jXSZADpwlOvKF2jCfS+YBvqSWkxZx3b20F5nQRHYo+0u/1A/WsAE2bhqQnYRoAPENBza3VTlmpyY+oh09jH+XWXs3hWXyyjJIXUG1fYE+T3TCOtaEwc60Tg== 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=Xxd4pDuQMQTbe3wajRQCtOORyTdekhjvyWLURZTgnKU=; b=JelU4UIaK2FM2KHpCnoCybAOyPuXY4rwUMjzY/p3Ju0EW2H+RSnNTdUljJ1+lwKn6I2aMbsDAoho/Cr/lmGKmTRE84/Xug8oJcUYzdltMETXPwvnDrgVExPcE3H1xswmj9YnqrrvRXWtoM319AZtyRoVDp1PNcRQNODyagRSk+Kwm6WJMImphBP+a3nygptB8Smnq3fQEgNGvS1jeSrh5Cdb1iavB+SXDe4pmrwrF/PuyEWreYYEBIJmlKmZmr1uoUW8BcfOG9gSsPijxG+0KlM25pfLfC/r3fCR3YK26ZP0JgRnmpXkOuIQGWH4rkJ9TOGY3NIF2x2WXTKvs4159g== 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:34:01 +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:01 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/19] cpufreq: tegra186: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:19 +0800 Message-Id: <20230712093322.37322-16-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: 01e25c38-2bbb-4e3d-5c93-08db82bb2027 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1KQf9C/pnrOcaSMLCTTi54ctYqJn/7yVdUzCbkrLBqrza1yFnZ67pPXey48Jqjf85tNuOcJE20VLkyfe/VM1JobcjLzWmV/zL1bAkNZ59yaNKFxK9b1VQBxegjXG4a4+Px5zzo15Hpxrc6uumaUlj/M7wG86QtrxkX8fXgLVMCKXkuWZCNJJXI3yr1RbmN7T0j95gT6SeVzzuyG60mCdoHg7EG7AitKW7G3Abbh5XQ83rqux7AzF3hCrn+inS7NWeZFjVwAR8zVtgw70SZ2NtQEePqdVbbg/Irl9WGtO8lLkYpGaqtsrptNozGcZbK4ShGmQ+Bw7wK2siRicTlcW49YyxVac8JAAoEqJebCDHKBWtXCZ1U52a6U2CpwHubuWYXOZed/O72InpLWXenMxrO/Sb1I8Nm6Wo4Kmbzx+cacj7ns1g5EqvkI0C8agHIkfHY9FZBIOgQ+xxi8w5WF85nvMcTRYHpUUJ2kP0jSK7W4EHbv7rCv94pMogYva/MDhyxSlcBmxQe8ABwIhRO6eCm9My/d6AvzSvvpLhjINBN0/yPHcq8YNQXDsQFSFDto8qFQVzNeWH/61iyGntoLYyNCr/rKM3xDJjialrRRmg0FkFdNGpm8O2vilxtP26DYV 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?OizegItsKRqG+szAwCUgP3l4X8XN?= =?utf-8?q?CAL2nfodPFCt34JA5BqmuRFtrphvrhgOtwFzAC8aZAsnwksSxcA4vC/g/8v6QmG7w?= =?utf-8?q?QfaBYWSpZYqHNXRcV1heT1GNKKeAdlNPHQjtCSsFqhriW8cQGVhBa2yAKgHeBGNKY?= =?utf-8?q?PH7WFOy7wu6EBucjT6xZCZVtT9b3YWSR2ZZN/ncuzdO8ImXKXddSJ2Tzb+DiI0J5A?= =?utf-8?q?qYOnNt0PEsOsjIEK5OhhEvtGBNLRZhaE9/6zlqg75+3bugUuOOkfedAzT/w2y0gKc?= =?utf-8?q?K2/hFw6/uo60rDPRUjxll3e5RVOIV5sov125d5q5XvOYXy7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z62eoZEW48BpUD87pz/2?= =?utf-8?q?l3+S7+lo0+V7Q4dNe6dkfaqf18ayrJwPlUz6RQcnk3+hYTo5PR3oeqnEIT2C3Ar5z?= =?utf-8?q?OfI127CZeqo8e9V36vGSFkeFYQZW/0c1+zrYJpxeSrlGSHnGQc6JYsiO5WVtYRaT8?= =?utf-8?q?GThQr0MQBnqppZsX7NfvuIs5KbCQcIXgeEX0Hrt9fIEw6x3ZTz3fRyvcTEAGEcAUT?= =?utf-8?q?pvwKajV3vIGw7QJSSDtPB/Czb3dJ5+HOhjeDiU8bemVkvji3Khqfe5pkhUXghpGz1?= =?utf-8?q?UJ7qPIXvqqe9SBB9n2ndrHNSMyS4nxgKZO9SRb5KCl0uaPZhOh7rmySptyps+5+OH?= =?utf-8?q?W5DM5snb7V0/?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01e25c38-2bbb-4e3d-5c93-08db82bb2027 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:01.4646 (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: VKVUeC6+7XJkbTCA5KIsiU0tds/yuWWXxNhn190hM+7TPKW6kSKpy//ONQE9tdoS9Mc7wVyI0UDAGS19MoilWA== 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771208440657763800 X-GMAIL-MSGID: 1771208440657763800 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/tegra186-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c index f98f53bf1011..7b8fcfa55038 100644 --- a/drivers/cpufreq/tegra186-cpufreq.c +++ b/drivers/cpufreq/tegra186-cpufreq.c @@ -259,11 +259,9 @@ static int tegra186_cpufreq_probe(struct platform_device *pdev) return err; } -static int tegra186_cpufreq_remove(struct platform_device *pdev) +static void tegra186_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&tegra186_cpufreq_driver); - - return 0; } static const struct of_device_id tegra186_cpufreq_of_match[] = { @@ -278,7 +276,7 @@ static struct platform_driver tegra186_cpufreq_platform_driver = { .of_match_table = tegra186_cpufreq_of_match, }, .probe = tegra186_cpufreq_probe, - .remove = tegra186_cpufreq_remove, + .remove_new = tegra186_cpufreq_remove, }; module_platform_driver(tegra186_cpufreq_platform_driver);