Message ID | 20230712081258.29254-10-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 62D86EB64D9 for <linux-pm@archiver.kernel.org>; Wed, 12 Jul 2023 08:14:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232281AbjGLIO5 (ORCPT <rfc822;linux-pm@archiver.kernel.org>); Wed, 12 Jul 2023 04:14:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232291AbjGLIO1 (ORCPT <rfc822;linux-pm@vger.kernel.org>); Wed, 12 Jul 2023 04:14:27 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2116.outbound.protection.outlook.com [40.107.215.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00CB5E4F; Wed, 12 Jul 2023 01:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lcr/rDLqf7rmEK+s/Tc+njcgDdxo5fay7IQdNLle1dkcgCi7qwRDg6L5CfdiBw3TZjbfsWy7//NmryqXRwfKPuPdvhv1sDj572nGSV25ThUJyC7MyBkGY1Ztnm8SgD+bnFMcc1BUUznN8wWQx/2mYe7nTMeO4i0j8w/ucGWnMBfv+D973TZ2/jGU694NDnfpU8YiEEY8MSk0wUWGkzV4YnwAZfONxWU/MbRTNG3JvI56ycKvQBs3c3gnfNbw9jjM3CIwtqPPCC8cv+JqArPD8Qs1WbdJUo/kTYCS7T4zpnS7EQyPrg00K7VKz8KPNUwWiGVFYadFnENGNb+s7b+wZg== 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=2trwrTRv81u40CbsVYU+78HZvkwkCI6xWFO9bsRms6A=; b=dqBKer728umChfdYYzd3WFndcX8l9L4S5tDfewlkzEtWekVsqvo8+IRYJ9LswlnNFGlqE7OkyD6Q2zzmo9E1Br7w2Mrw8Iynxif+bw5Q9Ywkhh8+pPhccbr02t9I5cYdGVXXZILsTwL8ezJz7+jgUI1pWW2Zhp7MIYEZpA+s/1N8CUVRDDN7biJKmu3bNzNKVtKon9yPv9n2EZGlCrsC2T4ApTWQW9R7Y2RaXn4QkrLDHTgS/SFDbaNIIfoKnazX8KF7CvelB/ui5fmM+b4wzJRHkQ1d/bKxtIqgSLlasARpQH/T0P+umZa+HnVL+yJS9NrkR09zosdD6fMP4l0L1Q== 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=2trwrTRv81u40CbsVYU+78HZvkwkCI6xWFO9bsRms6A=; b=KukuO4Xmg1T7xRAShFokkMj0ulmfA/pfpEZ2UVLWlZ98G6cEeygmjVXE/CzCKxTh1UG1aB8MSTtBhZiomFk0qAB2mr4Q80x4Z06IA3DYtvqvg65AFOZHviqP7RSd6zdOrCoaytAETvzola2U+ll2MFohBt97CyX+Rqz2aTFDByz+UvJnqwVr3wyT5DddgJadpFP7OVfXGipckKKOqn0kORyC7+x9CLWsZnkdOC8PEftigtvdLWXdFuaFyL4UtXyhAO8O6rz+KFBw+8YZaEvSR0tvo6YLA8LKpKZOKVx7R5dIaMA4kyoWfqqvvBqj8hMK4wb1sjoYdtUajd9koFo9KQ== 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 SG2PR06MB5382.apcprd06.prod.outlook.com (2603:1096:4:1d5::14) 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 08:14:08 +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:08 +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>, Heiko Stuebner <heiko@sntech.de> 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-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/27] thermal/drivers/rockchip: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:41 +0800 Message-Id: <20230712081258.29254-10-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_|SG2PR06MB5382:EE_ X-MS-Office365-Filtering-Correlation-Id: bbdec929-d002-4e3f-23f7-08db82aff75e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KmYmhvHbe1SXevXcR43uQCv7b0KOFuWHZAvARsYkm1IjuzsSH3+uFxUr90d9JzgDiWpf379xp03Dbi11X/S6GhLRKe3AUy5UXSPCipi7OTNApMnoYMvHzL0nVVNMDIiUc+48TSe4nTg431/d+/lJQqji60z7ye+vXBvXSW6yHla8YgrOlfhWGkCc9KhBYsWHKatjLUtG/4YYm5xoNauhzVABBXkqmr0vAiKKTT73yiHKJikgmp1bDSbsAxDLJ2sRu87R/oNcJN2h63iHLCT3BCYy8WMWM0ScMDTRiYJcsa+YS+cjRbqpliSJsWC1rzNEmTrgjJwKKqHdhYRaMDzSRPSHQM9ntKoyO+OrlfKuIwfV+t/5upUjZ3OzDudmZNHZeqG90agzoYh0NCTSaCQ47TO/X46DvTTKdKTBiQrrnDYVGR3yIN5EUqxLx7vwGfoWTFy92AddvjXFaN6cyq5ZNE2R4Huczcjv3seviSTh4PmFxI6+XM4W/lTRSXnKUwxjesITo7ZybkHIwPGqmkG7q16gXUZEii7Xm+dOt8VZTl2dR7GfA8FvJFkzq8V6RnMewvIjiBBmBt6zQknKr6gR/Dq4yvGIisTO7b6gL28P9zB0JV3pe5mBzalFs+y0pWe7 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)(366004)(136003)(376002)(346002)(39860400002)(451199021)(6666004)(52116002)(6486002)(478600001)(54906003)(110136005)(6506007)(1076003)(26005)(186003)(6512007)(2906002)(66946007)(41300700001)(66476007)(316002)(8936002)(66556008)(7416002)(4326008)(5660300002)(38100700002)(38350700002)(8676002)(86362001)(36756003)(2616005)(83380400001)(66574015);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?CXdD5EtrX/gh8uLyNqaauwa46wuH?= =?utf-8?q?AbLYNwdzlA6X+N6rB+IzDoMlD31XiRqnv2zJ7ZqeDWPh/eDzNMdwCSyjOISX0nrJ0?= =?utf-8?q?VNNIB3yT4sWCnCwS3XY9ZdSvjO6roDlRDXN39MfvypHWf3CwJrbto28g0SegJRQmK?= =?utf-8?q?YJd1vwRTQqbYMeWzLKfNckrax1yda6wYTwhlD4Q1vqTWAl2XygtWrj6JYNGucb0Y1?= =?utf-8?q?cuD8kX6z/tmmY0avQK3P3/6vdBF326JCYgS+rPUB8Mj152IJcgu4voRNsncDcVdJl?= =?utf-8?q?2ZTer0OAFFoFUgGQM5GpOxkjW+hI/Z35bveE5zheqh+3LDozShswuEMqOf7CDEu4D?= =?utf-8?q?G7gWi7LihboHdydWr08QyXzp9AWp5Jq0ykwedFyLeWp1I1J/FzGP9OCMIdCXG2UY3?= =?utf-8?q?+LXKn9ikEj9g1dC51f255/bYuITqi58NcQtc4vip1pz/7OlKC2iEpUCNkWlkTKhJM?= =?utf-8?q?122895dbOfuoNAtGDkQdUJR4vG3H0SZtKX9p8Ug43jtidcrYkHA/mZjTS+w6VI1Oe?= =?utf-8?q?9QETFpb6cTgrCOxFgGP+DhSj862ucZhjFR5oED0FNyORcegJJKcmiAdFUAt+TSFi+?= =?utf-8?q?kHHbhLc0p9Jj//qobsJ2+ZIeRoO1uTZmQFugcn0N+i5niVAJu+yy+eZOTkRy3e/wE?= =?utf-8?q?mvdnFNlGUEC5wqgOz5gNjOLlkYejiXARKiR8XyfyjLoQxON1FBwVYbTQlvILK/edT?= =?utf-8?q?ge1AxB1Zw3jkUq2xhFEqN13bdk1wU/0CJOS/Wrlh226fWvxc6Uc4vnPg/tkj8hIgk?= =?utf-8?q?eqQy8WZPLUVjHNjjZZa4rVIrH72aQSP4IJMO9rVLdjjwPIF25xSESxfBkohe0GHXR?= =?utf-8?q?Tkls2hJstbD+wNEZ/0sJ7OJ1n/IoD45BT7sj+dFqFLkXhL7dP9reS7fAl5rbOBMxJ?= =?utf-8?q?nMLsfBiLpabLviZCXNwQr8KIqOkVtQ35kJptQMBwSQyNRQrDda/+07KSIYPinbcU7?= =?utf-8?q?nmuCA3DgBwbIdhXpQAx0EtGn3HE4lls8lfslLyYeYoE3EuwO7BUrOREEA2916yrpm?= =?utf-8?q?k5BNr7suTMepbV72b6XbDiGawrX1QoYN5R8aYopBffLx1sVeMsR5oLYlTLmtpL3IJ?= =?utf-8?q?9cw6zuNxNO6BkCzjSOurr0FtRuXBDdau7CJilzhW8a6m37ckWdhHYKAbkdZN/mJSV?= =?utf-8?q?B8RJP09+M3ZdWg1KRJsX2YNyw0bziEbLWQE7LHlGMTyZvdJkhShSxOigjAmWL8dxh?= =?utf-8?q?B3FxkgYELs7MFEFYbUQJ6jwmUtCBmhBIP0EDo24d8Q+GWokBHZUWjrKKI2Dd5cML5?= =?utf-8?q?cspuIReJBE6/zsdxKTAUS+HuYjNx76BNY95QHNzgTnb7FtcQnPLJ38xxsTHSpfoJG?= =?utf-8?q?r6eqMR1tRqMvPC7kZeBNCi0CRnf1Q6cLcjWUr9AzvzTccBzgnlYBinGc0C8MeAfRU?= =?utf-8?q?5ZLtNIT+GEBy2M6VQTxilVHjUaWNQH6XJ871LLpTFHXvPainVFO1R2xfTXgVo1UI4?= =?utf-8?q?UoMsQMTouX0EZmY9l22dGAlbGG2FiXtiG9LuIPWxdWqHI99rly1QK2shvYP5hDIjj?= =?utf-8?q?ECzDwmRWkQaA?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbdec929-d002-4e3f-23f7-08db82aff75e 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:08.5523 (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: KI6sgDu/AUHlZNaEERcUO7k/3ZXdrTo0bJALVdLQSiKs0T7wyPZmi5MmrLA4dzHKyRx6JhHFBHt28JVSUGosIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 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/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index 77231a9d28ff..086ed42dd16c 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -1601,7 +1601,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev) return 0; } -static int rockchip_thermal_remove(struct platform_device *pdev) +static void rockchip_thermal_remove(struct platform_device *pdev) { struct rockchip_thermal_data *thermal = platform_get_drvdata(pdev); int i; @@ -1614,8 +1614,6 @@ static int rockchip_thermal_remove(struct platform_device *pdev) } thermal->chip->control(thermal->regs, false); - - return 0; } static int __maybe_unused rockchip_thermal_suspend(struct device *dev) @@ -1691,7 +1689,7 @@ static struct platform_driver rockchip_thermal_driver = { .of_match_table = of_rockchip_thermal_match, }, .probe = rockchip_thermal_probe, - .remove = rockchip_thermal_remove, + .remove_new = rockchip_thermal_remove, }; module_platform_driver(rockchip_thermal_driver);
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/rockchip_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)