Message ID | 20230712093322.37322-6-frank.li@vivo.com |
---|---|
State | Accepted |
Commit | b68ea4c2fb89f690c6d5b34002e3ea40cbecb8a2 |
Headers | show
Return-Path: <linux-pm-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 662B1EB64D9 for <linux-pm@archiver.kernel.org>; Wed, 12 Jul 2023 09:33:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233256AbjGLJd5 (ORCPT <rfc822;linux-pm@archiver.kernel.org>); Wed, 12 Jul 2023 05:33:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233186AbjGLJdt (ORCPT <rfc822;linux-pm@vger.kernel.org>); Wed, 12 Jul 2023 05:33:49 -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 C87941A8; Wed, 12 Jul 2023 02:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JfMtvB+5Qf4K+QLrWpDTRb0JMcdarprZEewLK6dSTHwbF8M4OBOW+E244Ta1TB/HF9ovSPIbwnIr0BupHgILdDj/IJKR754DEDnrZXjAiLJc2giCKdasa/jO3Fj3yd0nfBr9K+5/bTtM66cu/EatqLGv9UxjER45vYIySjg7VYcjsxj51OeQhO5ICRYlTnGCFrJd/HBfyLP2o/8HM561IcCOaf5WTlIahuHdtvtPy397rSojiZrstG8C13uaBX00BSPrImIBE7Y+x22HXhep2E8BsVuXa//BttwDpRGocf4j3qtcjHqjGqHRYsDXUZ4e6/RvgCnxfnJdG/8sCfNEwQ== 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=DqT61dVoVAjIMQ4tirzFDt2GGKS7bnlhSrtMFE0j2EE=; b=eBSKq6qTlee+QE0mCvSY3ErxOososbsqDBuReMRVHpbqyme5LthfhFNdNoMdfQ5irXpMdDkikp//18DOqOmDo0q4+3Oy8pZJMOfQSvqjqabp86BPb5GEbG438P5hBfjfGowkLRlmu6QtgV/MHr2Hhox/s6FbEPLVRlPWxMwAw37ult4bHsu8rzrF7yYW9Yk7yaRKSE23p8KOlXzCESwMKYPs4QjHiFfiO/DtEWSsfju2F0m4ts7NTvaeRn13US3FahaxyLovPcNCOn+p0LxlPuFc9nN2Ynis0SScJtPSr5wz82OkoLqN1yuHktl/HaBeiTYOUsvg9LLHa/nE+appyQ== 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=DqT61dVoVAjIMQ4tirzFDt2GGKS7bnlhSrtMFE0j2EE=; b=gzDZm7ghehIvYvzXwGjbU7nkhumWoem4AeMu7RtrqdLXN8ihIQT8+sOvWQCBnxSpixWv7QpNWAdKGon+mc42ZsuKdh219rKgQo461Vhikcv0mdOCH/3ROk8iDt8tS0Kz5+z2Q9YPT09t4muc7q3PyT7TGuss6e1VbgqQEOc97r17MKCvOyFSjEQEQs1s1dGw2HpPzGdwtDFrsjHyS+0UBKmNgkJ8lr1DpHcGCNjcu7k6r1CI2Pcmo44dFIlU9ZsUJCx8GTek4fy06qMwKbmOdW2g1qV4sxmuipsNtRQWJ1vXC4gv9pshlHs6as+Hwh9kjpo8pm6T+Sd5XMuc2NmwoA== 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:44 +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:44 +0000 From: Yangtao Li <frank.li@vivo.com> To: "Rafael J. Wysocki" <rafael@kernel.org>, Viresh Kumar <viresh.kumar@linaro.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 06/19] cpufreq: mediatek-hw: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:09 +0800 Message-Id: <20230712093322.37322-6-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: 2d745619-8c11-483b-1cc5-08db82bb15c3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u18YQH7PdgFaMzcIQ7cGGKfWilJmeX/OfjjwWtCDpsZYADxuwUCWEsGVEmFdWjnibCmCCvWRK3A8H8dWZNv3ul2hIr+0DTNe7EhePtoUCYfebdqtqLYxg1po8c21b1w9Yo9S+wt+mSacJw3cOYtf7iMNSj1T9L5Vr7a3oX8vQJ8sNbRWj4p1LgqKxMHneyEsOk3XXqozVNMo6HjkdLqPoZ9UdQfo48n0J0xfWBrYrCTrvAzCaHAx7VLKVDJuXKgJnWfFPUOFfprrZeIwSGRT4Hk4eJqy+qy1kEwVSICQSZmxF14aQwaAQNFlHRZHizg/h5dJjIIFgRZAxLcEwqu+Q1yvNcvUAmO0cRQu0SdiE5P1vFKfLtolg+73NnXwpsqeba+BEnuL0+bxubUWOR8mMS49vaLe/GUmE2LF/+tLRu6ggVmxW6Ow5vDugXBowWne2UNLynddWNcIRFU2XI65hH7VzjvSaS/K046HD0fr4GEFIJ6SOZpQS5UxI7oXedcG9TFBwLd7EFabI/MZjSifEtgIBb6RpWXBwuyQCuMSu6UTI+zJL00/HO6TFdD0I9TL5VoXilhz5NdFok/uoIlNIS3/x5aBFIt7T2QQQpOnOUpD2s9YP6BU1kd/xWHSusae 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?i5G43RHqqdQlxBfbrTBmqi3PtrIH?= =?utf-8?q?+Fxtjg2mi7mwfJeCReksxb94U4S+o38V3Yaw5bF/qBPHtB8UtvbLUU3m3Yl/2NjT5?= =?utf-8?q?H+NTFcS/s+g2OOOcC+HrwfFj5L0DuUprDFjLBbZd1R5wVfKGkmGlWOQct/bD2OSDD?= =?utf-8?q?vZSylLvIU+t1aEIbon/tUmJH5junLR2ihCOZkCRm6rkpKohYmL2au3AG9o6GA864A?= =?utf-8?q?J7CEm8yY80WC4Us0StJeoAVDjR0fy8mk/p0PXO/eIpeqpzIU5As4SPAm6RLXe8NC6?= =?utf-8?q?GRjXiS7FHzSGpOKkKzWx0OgeQ0uATCTpm6hdRKTlYFFtDbFTWYKUFNM938Zeaa6V4?= =?utf-8?q?3e0FEygjRjSgaldA8Qlx0zajjSuFzzQLS8VszgCCckttNg2LLED8lqKBI/5el8RrD?= =?utf-8?q?j956cHhSxe1Ol+DuQedTw4vZErScVHFwKQ8/hPrDSHsM1ppS05HGlgsvoK5+9196c?= =?utf-8?q?T3FiNzY4fZNBJrnVbEMpss+KXqGyJ0oA0NV0QaE37yT7ruQeAPQnJ8iwz4UvoWLwE?= =?utf-8?q?huZ3HrsAnmPR7dQr/kfTBs8X/Sz00uuD1RzFtCg9CNWsHur4S18puNypoRWHzxuHX?= =?utf-8?q?tCC80vVdA7QJBFhIgdVmwC4q4ipYNCKAIk1tv8btpV+ojFuEabb5sBKg+abtfeaay?= =?utf-8?q?5jQFK7lVav4+qpl+5lZs44G2QwzL3iZNKO9vkGKoqnHXEDLoTP+U1cc2j4qZ9FONl?= =?utf-8?q?VTFYL/Ph5/KenxuR5cxtnOqlb77prNL4lD+XEjsAWPUBkft5dsISlHYHfaUGXV1Xi?= =?utf-8?q?xgA8/dv3Up62yh6OHSqA19iqgUdglzfTrEEC5JUsKgFKwj4GlKOuVVbusmZAotLFX?= =?utf-8?q?KTKdqbCmeIx7hWxBx6PSm8NpXUUMGj/JKt1Dr7fk8p0rOXlWTWFzt2ulIRogk+0dg?= =?utf-8?q?1fhfep7blrlvj3EP2rDJsB8fxociyrG6KqHt5N6R5GrdbDm86CLPIyJu52yi/oBed?= =?utf-8?q?e1DL7sDTI1rh9JtpPHMsSFnxcQd9j97guu7V4+NJbycTGQQcyQA9MXDnu/Oo37iWC?= =?utf-8?q?VGv487UuAvUFZn6jIgOGuZti2zmfmMi6W7Q4Frli4B0UvcyjxDV92UNObG2El2mmd?= =?utf-8?q?zIDJG54grJ4fdp8byWzdOkgv63S4DRG518lGt9aivZiJfhrPvY94Yl25eay4XZyA7?= =?utf-8?q?moFKAaL4ICATFZYedhsC4JU9yler6tqZK/gBwm4kzssV761w+tN609ZkDLKp5xYXc?= =?utf-8?q?DgLHvGMC++uYd3Fd6rs8DJmyFw05YxtTEj7YowT6wRRKjXOslZTS07yenhfBDGel+?= =?utf-8?q?MuNwE1ygSl70uq6S3Fb/S8LNM3kdw01KAvm9QB3M9SxHoUTajGRcactOr4o+au5J+?= =?utf-8?q?lFoLknx5fUsQxQtRZMg8bmcQJQIa/6hyMpmtxdm+Umgoy3Z0uJ/v+qod+i5bDoq7B?= =?utf-8?q?EashiOkmVJY5w1W5yM36PfYo1wCGTyzg7FzeHDmraRiDQjd8i38I/9VcXwqHnvlLA?= =?utf-8?q?rSXigOZHTwPIEJbT+upqFxnPfaIIQD0qXGwH57TxDUMRboZ3pQKxocT/UQxYCFqPH?= =?utf-8?q?mqtHQjMLQf8v?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d745619-8c11-483b-1cc5-08db82bb15c3 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:44.0088 (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: hPIloeMBL7jzwWCB/nvSagxLY7CuQPps6nUFHLESPoyq9RTHXU3y94Xc9sOAxGbu4HOCcSKTQpnzNCta7eEnxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5985 Precedence: bulk List-ID: <linux-pm.vger.kernel.org> X-Mailing-List: linux-pm@vger.kernel.org |
Series |
[01/19] cpufreq: sun50i: Convert to platform remove callback returning void
|
expand
|
diff --git a/drivers/cpufreq/mediatek-cpufreq-hw.c b/drivers/cpufreq/mediatek-cpufreq-hw.c index b22f5cc8a463..062250192f42 100644 --- a/drivers/cpufreq/mediatek-cpufreq-hw.c +++ b/drivers/cpufreq/mediatek-cpufreq-hw.c @@ -315,11 +315,9 @@ static int mtk_cpufreq_hw_driver_probe(struct platform_device *pdev) return ret; } -static int mtk_cpufreq_hw_driver_remove(struct platform_device *pdev) +static void mtk_cpufreq_hw_driver_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&cpufreq_mtk_hw_driver); - - return 0; } static const struct of_device_id mtk_cpufreq_hw_match[] = { @@ -330,7 +328,7 @@ MODULE_DEVICE_TABLE(of, mtk_cpufreq_hw_match); static struct platform_driver mtk_cpufreq_hw_driver = { .probe = mtk_cpufreq_hw_driver_probe, - .remove = mtk_cpufreq_hw_driver_remove, + .remove_new = mtk_cpufreq_hw_driver_remove, .driver = { .name = "mtk-cpufreq-hw", .of_match_table = mtk_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/mediatek-cpufreq-hw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)