Message ID | 20230712081258.29254-14-frank.li@vivo.com (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
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 67BFEEB64DD for <linux-pm@archiver.kernel.org>; Wed, 12 Jul 2023 08:15:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232324AbjGLIPg (ORCPT <rfc822;linux-pm@archiver.kernel.org>); Wed, 12 Jul 2023 04:15:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232351AbjGLIOy (ORCPT <rfc822;linux-pm@vger.kernel.org>); Wed, 12 Jul 2023 04:14:54 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2137.outbound.protection.outlook.com [40.107.215.137]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1BCF2105; Wed, 12 Jul 2023 01:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VyfoD/4PEjZzruSLNJwQEmpEPUaww98g3dU0r/QWSbTbCR1OcB0bqIr1JevdSQaEBUq/E2D4CHLK4fpP848zbTTi+l9SQ3NIb6sBvuaa1RJ4pd+RAltFdPOO1Wiiw1PymFdT25GVNALtq/6z80kejPikvAN7jcOukEUxGajIBUeX2bKaWFLJQeJEHq5ux6pC+ymUR8Al3eOXcsPdMWRerQHhYZraNUsqoLmelo/ob2MaXi5lUF0MfzULlQT/AfBFeOcK0c5bdA9PNW+hu764EHY8o4Vv4zfxzl7d6KW6r+o7qRwxTmpJQFDK11o8nY+QUpVA0DbwWLKrd2OTDVuibg== 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=7T90CmrdbjDP4sHSP0/vhp3TrV2NK3fye4IqWpjyNWQ=; b=niOQeUyk+AReRF7IpFh5ZPayH/qDqWMIKkglKjxIaZA6NGXtOoFBawN9XYEg2fvLfHU+VWemNQgfnZUctU56KxocWPMezwm284Sj6R+cmxYLwb8H28Xp2E7jzxN1oN0NBoPYO2UKPoGhm5+bSagBZUsOPtwfYKoexQLueH36RYWQ8ZsCxvHXWburaN6aoWPBVx43iibp23k1rEHbePIn1hIsz8ywfjuRidBHl4Xd3WWsuta7a6IP6VOGFtEUiauKcd1Bm5qGqoYoZ6+mdfYsnuvWdBmsbqNulyP005td6X8PEX90qMcm/2yUEt5VgST5HXQq0VQUr4MzLoCLAd1b/w== 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=7T90CmrdbjDP4sHSP0/vhp3TrV2NK3fye4IqWpjyNWQ=; b=fxHkDVDWAVvovGhdQlk1G6zWguhZx71NSqv5ZxKdiUpqOW3T19bcp1/FnxPIgCwEkaUKmchIisJFwSbdYSLOt2BINZTFB6OF21ifPA9iTQI7qG2UcQh8zO6qdcsyWQwsEUzIWvN37N9lR66yQk90UpczRUFa0BSvg6TbeeWVczgv8l7HRg/3c08kh9+4AJ5Y3oUueS6m+gkThC6SrkoFw5Qa9JC6LJ0XbdUGX9hBQlCieJfYoFt/EzWMDH/d9pIfvnjqYMBSHyDRS1xNOJOkrdhMrJBkqEhSjFr5yKOoDpb770+DEeer2S6eVXJIGjd6jqG5pIfyM6BRyERR7Q5yJw== 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 SEYPR06MB6524.apcprd06.prod.outlook.com (2603:1096:101:171::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 08:14:16 +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 08:14:16 +0000 From: Yangtao Li <frank.li@vivo.com> To: "Rafael J. Wysocki" <rafael@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.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-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/27] thermal/drivers/tegra-bpmp: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:45 +0800 Message-Id: <20230712081258.29254-14-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712081258.29254-1-frank.li@vivo.com> References: <20230712081258.29254-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR04CA0208.apcprd04.prod.outlook.com (2603:1096:4:187::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6524:EE_ X-MS-Office365-Filtering-Correlation-Id: c213e313-7635-47bb-2b6e-08db82affbee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mH+JKAXuOv4rLrk1OsDmFhlLYYw0fbwa6oq6CnPYE4Ku2fTiLmmDr3i02L8gQYQ/b6KzkWInkbFwi330xy8yDW9s4tzKHABChoqCDV5QAxpj7R0wFI6gePFyVBBo3hu/qb3Z6ZGOaW/JlG5Vhhbebb5ANUUhFbJ1xHibuSGfAFSsDrIkhOcTyQFmsQrWlGRL2d9C4PqIwjHPY8bLWGMjP76ZGIoTTIeInqDQHOzP6FDSncEuM6ONbAKhKxKxkkuNjAS9c4qFohjuKXhosGValA4DsjJlL3EX6BrPfNBJgyGNn+yara0JpuNMVJhcH3K6594roaAKdyPBq1uM3RXq7s48epzGtuSIM2o8iDAvZ4yJhLOfOB4atn9WYfMe1jbxU7n+TAkEXsMEW9QMyhp8ARQPyinkfb1ojdool1f9Vflag+9QYKvXu7AEl1aFkmjMsc4AkV28hlaFHQVK6D5YSa3MSUeusz0W+TZIlSIMhljU12dcc/QrANZXiGjrtw68TJ0ewS3RGpfbnEw2myKxOS3uC1rDgY2g5n7SpzziiM+rXHeAfw+3a48w1j4nTNRsMvxG1l5Si2BUa4gZBeSDneZiPUqPy8iHmU6hdiJDd5t9pFjuWfLsr+GhHwZjEzJ2 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)(376002)(346002)(366004)(136003)(39860400002)(396003)(451199021)(8676002)(8936002)(5660300002)(186003)(2616005)(83380400001)(7416002)(6506007)(26005)(86362001)(41300700001)(1076003)(6666004)(6486002)(52116002)(316002)(6512007)(66476007)(36756003)(2906002)(66946007)(66556008)(54906003)(478600001)(110136005)(4326008)(38100700002)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?PJWXEaSSGvukuZc9RBQ7SDXvTzo0?= =?utf-8?q?iFgWHwMAtxPVoGnBix1YbO+7OpZDmkIgr7YTZQig9uKuI5WaBIa9Ld5jrkYMeOtmO?= =?utf-8?q?cn9PjYVapNggF2jLqeKaD0Fussr1Y+eymXyh0xGxRbg5zJgbq6XpihuYvunKuKge+?= =?utf-8?q?5kvmHWGokgbgHaz550xFVtg+f773RfJIqsxKZ9qbYqN9GDobg7TSLG7ErRCLoqnrZ?= =?utf-8?q?cai9Eqk0W5+8/Ecf7rXiLEjI/SBzpoN1LjGqAVRcKC5NuYfFGiG+vH3C0j0UBdhTb?= =?utf-8?q?QT2YJ39VL9ksqpuE/5QtrK61fGiFRLxQyer/o06yEcRKvp+CJyZbF00qv2osq+73n?= =?utf-8?q?Y/7HCn8+nJ753PA87OzwiGwYp3VF6ojvRgk274NoV7nmyuT6p8rZyCbDvsgKLnTLa?= =?utf-8?q?qFEG8uPUl7h3AQyG/y6y5XX23jK6fy4DCp6C4Cf1At+J3+U8RVS8OOhjKy2bocb9U?= =?utf-8?q?nqRfzgtelcaVN6Y3k9LBFdQd9rsj2YXhFO1msUvjlylUAKrYY0iFmn+og7ELHmjlk?= =?utf-8?q?UEcUITb+qsawZrY0sCG2D/FTv7CcvKiw4mj9YQLNmXJDfMkIv8xvJq1FIG9GVMhsY?= =?utf-8?q?14tMFMJPQAzqw/fYUOrWFpjzSvMVRgx5muJWKHN5KIY58SMX7kt7AZPnPT5DygyKY?= =?utf-8?q?bq9Cmxyp/qqoWIUvaF+YFc/8MGZBN2mE8b5eBD7OeajR+fDn2n+2J9lYSPCC/ku2S?= =?utf-8?q?SaWNbawJJ3IXJ0GmpxiEfQwRz8GYozPQjFlEItshy67LsZ2NF/xFtUmwSJuz7sPtZ?= =?utf-8?q?lbxHkAXRyfkbj6wyNzfmk0La/uVyxq3VC4bPlOgjIVRoAVNcRfrEOu8cI0nFydG6m?= =?utf-8?q?B4ZJCt6yw0esQKI2v9t1jT22HgGwNqg23/FyM//uDzGlzKFoul5zA/kwgVqbopOTO?= =?utf-8?q?mBSMvKmy+Z4ZLJ1w4p2QGrYw2FZOk37YK/yia3/qsxkn8Wp1B3uLEpbFrVU0MDcSv?= =?utf-8?q?5URgwpDv7bF3H1WwP9hyviP/Pc67Lz+2K0WdJhN2wzvi6RUJVDUA+F784NcPmkW2C?= =?utf-8?q?HJdGL6x47VeSNVWvn6xr90SSpIVs9YHzF3yqVBxB/LDpcmQm+ujs3PmfIOz05BPda?= =?utf-8?q?cLD32aLlqcc5WNF4UENGiolWkqsGpM43xRHt3H6NFc7kP7XMRZEmkVTqntnN0YIuu?= =?utf-8?q?DOlosmU1Q2/HC0E3yAO3NL/soG3/fvsk+WJzVWAHyTIT9lGIoJhkpi+vyq708kWoW?= =?utf-8?q?XvzC7kohOt9YyxgTYv0IKdHIBB8/UpoGiZxoXX/Y7ggXdIt8XgMrbDHtaB+2k1PzI?= =?utf-8?q?V4FH6lbGWQ+GHo2aiqHZBx/avF8of/4DI42Kw4BJPaxuNduws4aJHoWxPMGSyChTC?= =?utf-8?q?O+V/YPgWbg2o1JExAZ7YR/SyBFzQFn2e9Wn+j7FXX3jm+cbCAYSMMWmxe59XloTTC?= =?utf-8?q?fkKlLiGgL9BvWoLGb0vWCcjYgrvrme/Ptc8FpdWLuksvB1ZiBPXGGzQXf4UMkzQMZ?= =?utf-8?q?KMAr3e+zVOmzRSjwVJvKkkQ/Z7GQweQixG5lm3xUBgvObUCYkEU+5i81XDym39stK?= =?utf-8?q?eyoRrLK6yjbq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c213e313-7635-47bb-2b6e-08db82affbee X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 08:14:16.2120 (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: qg732zlwJvsjyLXAqFAVUdSQfGSmHSkySaYMAuTYKmKNTeaAzLt85hQ6f1gP4q8Hs9lpzGBP5Sia8iUYcsfrhA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 Precedence: bulk List-ID: <linux-pm.vger.kernel.org> X-Mailing-List: linux-pm@vger.kernel.org |
Series |
[01/27] thermal/drivers/amlogic: Convert to platform remove callback returning void
|
expand
|
diff --git a/drivers/thermal/tegra/tegra-bpmp-thermal.c b/drivers/thermal/tegra/tegra-bpmp-thermal.c index a2879d624945..5a41c200deae 100644 --- a/drivers/thermal/tegra/tegra-bpmp-thermal.c +++ b/drivers/thermal/tegra/tegra-bpmp-thermal.c @@ -250,13 +250,11 @@ static int tegra_bpmp_thermal_probe(struct platform_device *pdev) return 0; } -static int tegra_bpmp_thermal_remove(struct platform_device *pdev) +static void tegra_bpmp_thermal_remove(struct platform_device *pdev) { struct tegra_bpmp_thermal *tegra = platform_get_drvdata(pdev); tegra_bpmp_free_mrq(tegra->bpmp, MRQ_THERMAL, tegra); - - return 0; } static const struct of_device_id tegra_bpmp_thermal_of_match[] = { @@ -267,7 +265,7 @@ MODULE_DEVICE_TABLE(of, tegra_bpmp_thermal_of_match); static struct platform_driver tegra_bpmp_thermal_driver = { .probe = tegra_bpmp_thermal_probe, - .remove = tegra_bpmp_thermal_remove, + .remove_new = tegra_bpmp_thermal_remove, .driver = { .name = "tegra-bpmp-thermal", .of_match_table = tegra_bpmp_thermal_of_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/thermal/tegra/tegra-bpmp-thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)