Message ID | 20230712093322.37322-3-frank.li@vivo.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <linux-arm-msm-owner@vger.kernel.org> 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 50C72C001DD for <linux-arm-msm@archiver.kernel.org>; Wed, 12 Jul 2023 09:33:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233159AbjGLJdr (ORCPT <rfc822;linux-arm-msm@archiver.kernel.org>); Wed, 12 Jul 2023 05:33:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232992AbjGLJdp (ORCPT <rfc822;linux-arm-msm@vger.kernel.org>); Wed, 12 Jul 2023 05:33:45 -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 591DC1A8; Wed, 12 Jul 2023 02:33:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iRvt3qddAdR5r7RGf2s7qjha/zbBTJLL1UGtD8cIcpPzfS+daKULagOBQBTrQwi5It4abM05KwCiMs3Lgvt4bfpjZYGYxc/8DQBaaJKvr4isjW7YUS6PSYanp+jwIo16b2M7Z9/zz8UpwqjF3LRstzXHeADFaedbvo8FdTkXGxoqL3sgMQWQLpG5jBYaJUBd7QRIK/+A2eYhJqL7Pdhp7OrjorulHuFlGinOssKcWKzqLygNe2Lr8HDRlxrY/gEwMy6OV8KhhINTrNA5qHYbEvyeUycpOW6XLhWYJwl6HvAiQ7b/c0ibmQdSbAIybJVERymspvtDl+moZoojZBglHA== 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=CYtqx7WfYEGqYG5KEaHeDbzCIJfRJ6FFOI4C7Yrs37A=; b=dmQkgsjHta3e/Q+njezIA60w3jPBUc1ImH6FyFw3BmZn+N8hCxap1ad0WsH2RBTC9JVdFl7etU/mzFOCGRdLEtLJ5/7MWEIPtZnrzq3SAGOlTD2yS0m9LjA7VlNrmNmsBJpM2dIKZLON5oAj2cVy9JG8XKJSx8ZzDOEUx4paR0w8u+GOZ3LzGUiW5N4Xl/pmRcuJ4uBMc7Kk1SbTKbcqGg2gF+fSqw0DlDUPWYu2qO6cs05i2GrGh5EzIE8zKhZXGEs04F78TdkXU29xhnOwcblT7pie45+faycxa3s7dUfVECrH5W0Xx3VB+XQWPCSMfYfTcn/G8HyN1LE0mBH2tw== 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=CYtqx7WfYEGqYG5KEaHeDbzCIJfRJ6FFOI4C7Yrs37A=; b=Gdimz1Mlkqc0IfR2eg6o+8qU5Xlg2AO8LyVhHxTwoDkjr9Hx9S5zO4p4DM+fnbZ6urjPJO2jUQaKrLCb7cXT/2iJ2hwN6ac47Rj76RgpqVIpxuyOOsW4sNpR5NN2LToAB/nHZ43AKKkYQm0ZnmVm+PRGthL7LowEZQhLlqCibvODetTrtkzmstiwbSW1yR5Smyh0BQwI+FtTudWqG+HfkF62+9P8q/oKb8NNWFLzf9/sgnjlTpyQV4gOYbRn9cvsCyt2jPscU8mlhOhnlTzXsTbO+dKYAFAVhLm25fkcQ6j/ZO2e4IJEa5rjtI0eebZDAImjOV2D85UARcdx8s4CIQ== 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:38 +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:38 +0000 From: Yangtao Li <frank.li@vivo.com> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, "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-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/19] cpufreq: qcom-cpufreq-hw: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:06 +0800 Message-Id: <20230712093322.37322-3-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: 7d3b8a70-de08-4e21-d3d5-08db82bb1242 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KLllzGyAwtfPcG9/vNkMgFJNwrSdRuEcmy5HzdRW6O3/RaL9i75jPQ1rz3S8M0aTCSx3LV4AvTDcDA0ZKwrINt9TvOGdKT6mgBioLn2Nd6fM+xXcRlYs3BPa87XmSAY9/+lIhchOyeHp33yjfQrnUFSfok0GyO+e3+33ZdXQr9r8fPuMlWiiBYwbihImu0Hfo6mSBWnFzeXLoRcjPAzApok52rihTCOIvSfMaSi07wyV8f1khb38Q1ipUOwql2O7gdAYvdNUPWQxIriqRPWny46M36fng7mpP7YOG67D6P+fknOuOKJW56fA+gtsK3nEN4JDZ5ZsAvQrpp13/bkUPOleFPu5APuyOlxayfkOaurRTgjZuhjFQGpOe9l7hrxbueRJg87LLhjqHFVlOmiOgV/z96VhcP6nE9Sy6VouNCZpQ5XwvvyLZxZCmKaFPJtEwNoQmAMKw2nLUmsa3LMqW8Ex/4ViIgJflsVfid3ZFTEMlH3JRMoK7Z/o8JKUa/we+7OoqREFgsv+3pdLsBg9lNXpAKZ4YwihKP6utY7HaKEeP8QP1w68c+Qe5tMh0/Kn1D/sCzANQC6s+OnjAZiu4jxzIt+aHxUlZcG6BtxosMy+pHYgJHEQa5pBy6QnBFLT 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?kqn1I4pMpttMkEKlkkClViqDjLk7?= =?utf-8?q?lqvxokyN6oJLbhYQMorvXv/LAt2y7PS3kyk35576ze+SfsEkYWAPLrI3DYSyn5/RX?= =?utf-8?q?0PRVrSANVuOT71O7CBc51qMxNF4fj22nl5/qUohxTGDHN9/LiIfELCBKZTmpogvOM?= =?utf-8?q?LhGmBpwYmshA1wjB6Ope+RyCaTAuqh3mWiFrO7jaPoVLAKWYZZe0Z86MIspxMxkDI?= =?utf-8?q?5D0B++Lowlr/mxFo6rdjt6i9UQQhq7A4MBbil2L0pdkJwEVTkg3a8emKZOIgrDoJo?= =?utf-8?q?89HcUL7erKGKC47xDyGEEwywdYRNJ6lCJKJhdhsizfVJOt6xXpIeb42mDJAWwrumk?= =?utf-8?q?tF2lPg14VlR0mowqe6Xlw9IDGt31gYNtvmH2W+xhYguiKmSwiPw5lJeL+0+j/pvMp?= =?utf-8?q?Rm4kK7TEwkNb6Za2me6pQZHAaedaB+3b3ffP3j4JmlH+OMcZRxyP19OEIplh1E8qn?= =?utf-8?q?DAi5r7UnihVSOq2gNiYbs3TorkMr4iSijnnAjJvGsjfSoC6uUxaH2H2HCuSetJXBM?= =?utf-8?q?fEluqNPhL2G/bFf0kNz73l8jTQpBhcmvrNZWmHebioFqlOF/NFixJzTCvnZ6T9s19?= =?utf-8?q?+H/IDFzx8gS652LlAUlbRYz3tPHBKh9CKnFrPehdzGa0XNbOYvJU+H1gViYaOBi60?= =?utf-8?q?gpfqpeiU32iOXfjTRoXvZlhHyFG34kWs+2hP/im5PiQ4udP8l5JwuIPhFI3y6oCdx?= =?utf-8?q?fQH5xsgGdr05JHoY2j9uxofUG5xcn5GSXCesVaI9jny28YZQaCHYqh4WwoFN7NUDj?= =?utf-8?q?7rNIQlByAyabkxyjp3e0MFDdvelw+Aa260aZp0t7/XXHTRULHSozj0ephHOpzyBEM?= =?utf-8?q?evmu+wRPuBUTQWLQKFUVFXJxIj+FVeR4dmWiabSQIexSWcnaAiXsUSyw89yUt+I1X?= =?utf-8?q?0YSOvsfa1ERa+/QFQ5cCuRNF1a34lsUwddAW5x3qbRR+hHoLB7jdZfgUG3ADBDASM?= =?utf-8?q?AgBcmV9ZwK4ReAqybavQCY4pk86pyAWhWt354Vfqqo5mlum269f7tYOI/smpXPmXd?= =?utf-8?q?TvZ8DpZ9aoJ7n4IBdLyR3NDq0lHsyhJsCAQbipfWZLJCZHEyb/Bj7wnwc7ZUcBijT?= =?utf-8?q?78+3Z7YCtweH7xQJr/1PrIAjACAkYkO2VZ3JV2EMBP7LxXc1TV0LidEz3QNa9FeZJ?= =?utf-8?q?tITuJszAYg87pHDzA04EAh+uS3VemoeFBs4y4uWFlGNU2P3a3mdX8K60YpnzVuL7N?= =?utf-8?q?LMSPOF0RhhfMJ5XO5Pp4+AmgB5eAuz6t/u5/o8PjIuocTeAuPMnWIKeKQpLRbMqHn?= =?utf-8?q?mGg3NG9p9nBQ0UbR7QW1N75a1RCUyz0pQRDVhzeOV2z7rzx+hcxVT9Uk/8qGTRcWb?= =?utf-8?q?jgbjeE3BY+kFP5ewJM3aM+Yv23swORnzhBSjWZSMb9yRN87rJ57QpZUeMsBpCUDnH?= =?utf-8?q?Ds5IDsaZdWIRZpof13eGQC/dltuF+RPQaiOfT42WminQb7pKXWp/oF72zzGf4SlKY?= =?utf-8?q?MZIKo6lqx2MdbQ5qoLo8ltqpATfXNWQCDMjQF8TgOy8P85vhQN+DGDeH1sjBaNDLx?= =?utf-8?q?EqdB4LFuQ3tq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d3b8a70-de08-4e21-d3d5-08db82bb1242 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:38.1334 (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: Q1f+/os1UoNN1Vab/NsiBlheITly3ftcGYfDobxeejzKMrJ0Km68yTXFQQdUhFX5JGeMLia3aywf+prtrJqYpw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5985 Precedence: bulk List-ID: <linux-arm-msm.vger.kernel.org> X-Mailing-List: linux-arm-msm@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index f2830371d25f..f24cf2eddf1e 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -730,16 +730,14 @@ static int qcom_cpufreq_hw_driver_probe(struct platform_device *pdev) return ret; } -static int qcom_cpufreq_hw_driver_remove(struct platform_device *pdev) +static void qcom_cpufreq_hw_driver_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&cpufreq_qcom_hw_driver); - - return 0; } static struct platform_driver qcom_cpufreq_hw_driver = { .probe = qcom_cpufreq_hw_driver_probe, - .remove = qcom_cpufreq_hw_driver_remove, + .remove_new = qcom_cpufreq_hw_driver_remove, .driver = { .name = "qcom-cpufreq-hw", .of_match_table = qcom_cpufreq_hw_match,
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/qcom-cpufreq-hw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)