From patchwork Wed Jul 12 08:12:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13309717 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: 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 9ADA2C0015E for ; Wed, 12 Jul 2023 08:14:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231920AbjGLIOD (ORCPT ); Wed, 12 Jul 2023 04:14:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231588AbjGLIN4 (ORCPT ); Wed, 12 Jul 2023 04:13:56 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2107.outbound.protection.outlook.com [40.107.117.107]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A7CE195; Wed, 12 Jul 2023 01:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zbx+RKPfOcVBknTlxqNsE7/vQ2KIuwsPNxAoiGy0uYfAkUQydN+EFz4Fpkt3YcAu0ojxs/QRvyhpLJCv2TUJGWFQ85P+ntKFhrK+3ZrC+IJQ5+rAnkLpiY+b17ecx4SxdUU4YQKkWH/UBSmyPM5D0uonMhFCgGjqh3nl4M5alNMtViCrRVre+ABnbFREl/EtT7T7kv8VaHSBHTNIJSyIn0mb966Kk7F6pF5A/Q0kKF4pL2MYpjhqGb7umfDjsQI51n/o4s8K5ZmRWt4C/JKWazVpup239pHo6gGGfHfcsKvYxkismUcLTNv1qfeAyTFtlUxN6E0pjUnIWQiDHlpivw== 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=vyvljtpagtsfnuAKvlq6VdiLKjkkJMSxKhFNYW+BGnI=; b=kOEUxDiW/1pIIM3Ymd+loW5UDcb8/n0/m2l/odYxPt2qAnsjULdr/J9/DdSilReAyOY/66RUT87T7T/jANONlrrNqPdWUlKTPUOjT80obtmnVfvS9qfYIn0t8oSZmNDJnQljQ4YVlX0IBf6AOrI1ynFZu2FEDoM30Ic2bRlmnMD3ps+UpzXqzzqKfOOK0Uuxean/uUKuaMe32av3DOAYK0VfW7iarlD5no7/hGsP4aaylDITfFZCLfkXjiMxe37C/NI89mWNcCXjHJRWqsO2IHon8Q/YpbvGnF8b2LX29tmBW9n61gsbkt9vjSz5NOWnHxVBQfQEtiYrXgLKTVNRpg== 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=vyvljtpagtsfnuAKvlq6VdiLKjkkJMSxKhFNYW+BGnI=; b=OB7Y4qa5Sr1zcDPOwH8317SUQWQzDaH7ITzlXJISf2AiZNOAxHXPxI97qj53WxkLUgJ/ykkR/vt+khHRgG7qE47au7rQtWpzvgIXJQ5cSLpECN/ddK13L4ZADcoe7IpaFNy33puZFgCre5WMYQpkMDmq0JyquMdKUUVvfowCS2yfp7uVTX1rVWPlBM6HUmKicqMYjlGtcM6jjkzJF/I7uFgehr2eQfwaVvL5qb0syWJvsEcyLc+ov/Vmbw91SAEERijoHNxUZtCMmlRcEMtrVlUIR8RBe0w6xUXGQgI2zpds0hJxj3WGD31SzffscDejqdMFJKOMoKVA0+fTVsGPDg== 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:13:52 +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:13:52 +0000 From: Yangtao Li To: =?utf-8?q?Niklas_S=C3=B6derlund?= , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-renesas-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/27] drivers/thermal/rcar_gen3_thermal: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:35 +0800 Message-Id: <20230712081258.29254-4-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> 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: a372113a-ca4a-40d0-d086-08db82afedd2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MJ51T+ZoCoXSZN8t/Q3cEF1xlqMyUoFtOWLYfNOePi+nP4r2pSuTDdmx2CZT2pNRZkBG61p5xQCpFQ+MpM97p1IzA6HHp8b6nqIl1p9H8T9eW5l3c7399uXfYo16TQGmPgod9dELFFYlCvBtQwXPu8cV/hTi6+5bH8GXkqur6nStbEDWYqT/FNQ/crrnHkpSXH1DlkYnNeOKwsPEe7f0JEqfRWd7o2XEqNR52QovBKeHAOp4gJ8cSm2UiL1LUEnNw/wB+6kgg8ZjybDBi1bHYPOuDW0Dh6r2d6jZTGFhCgaNIyZGU3AFRWxih89LjkjOzOibctMY884J/bP+DtQZwAoSEj8AVVqeweqa8YRTQTtS9n7B1nSAYE+nSwEeisPbE2Bo9ivDQf9pOjxdd9ESIzHgzZq8kp0+wWNu29s/Wb+Id5G7ZIYgSZnMtJcrEq810DviR44RCdgT6FTEFPzQPo9uWz0WrRoki0tT2F9PnPCyrAVKfYiW6nizNOrg/OAruAGHpJESKMuSJVSn88a437euoXXd6IeHxP3WBnSCkqK9j+TcPIHMHI16qozGAUEISq60u7/3MX1OKo+YJhTie4G4nMdIK5gn1U8MdnpYidgvq3UMttNQ0t96tUit2Yqp 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)(4326008)(5660300002)(38100700002)(38350700002)(8676002)(86362001)(36756003)(2616005)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?oDfpH2nIgh4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w4c9sTft3I?= =?utf-8?q?egrGA3nju5kef323uQJ2lxOf4OJsJDASbkqo8RAe7yZjhrtEAP8GClS7tdiypfdkS?= =?utf-8?q?soXvhsfiGYUYwIuiTeeSCh3a2B+7Qs33JWoNcFGlWxE6vogDnNxBro+1PDkjgE3mI?= =?utf-8?q?rK77KJLETikokLx9GUd0BmSJL4b8VfG5OwI+oUYVsIrKYKpNZkwXDf8B9fiv0APsT?= =?utf-8?q?FVn5bP1Y2uYmWOSYISAUabKUEx7OYIPXBc1dr0mwDs9ZLFZf4WtMO+Dec/N8bAzZ1?= =?utf-8?q?8R62toIpCaqWjLJziBv/IkRg8i6O/7s+K7oox2T/QVT2iNerQ5itC3ZyB/TJ1DOzq?= =?utf-8?q?/4J1T0zeSVJ9QhWNNGlm4t5j0rFFjwYbXXUUePqCTP1VHe4Enk/QOSl6m+/VlOELU?= =?utf-8?q?NCL3+pLKcDqremTYrHW3Frahxdbf+JGTt8NVFd0QMr5PUjMmwqMZ0pvzfeshIsACt?= =?utf-8?q?72DkQTLCGC4LOFHesgky8uKxwnTfZTvgax2X2wtl6LGzwUeRVEQ2P4M2CaTHzaYXx?= =?utf-8?q?0GiuxmxyRKnAikLBgP0m5slnakd1U+NnsOWAzbJf9qLXz9C7XxmU/l8D36xpndiRs?= =?utf-8?q?8UHtCXG3eNl3BKe9kggndhwc0w6Ir/sl6AcTiO/EnII+aQ31gK9VIS7KdoaMc70Py?= =?utf-8?q?yEtjFbZgXOGZ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a372113a-ca4a-40d0-d086-08db82afedd2 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:13:52.5430 (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: ozMT979mJAxXw4mN/lcAxFUPK1BTmyuG8PrTjv44MOtjRez22EuifPW+GMX4paKgf+N0btBdDLnQS7hyaaHyLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org 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 Reviewed-by: Uwe Kleine-König Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund --- drivers/thermal/rcar_gen3_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c index 9029d01e029b..1405163caa34 100644 --- a/drivers/thermal/rcar_gen3_thermal.c +++ b/drivers/thermal/rcar_gen3_thermal.c @@ -432,14 +432,12 @@ static const struct of_device_id rcar_gen3_thermal_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids); -static int rcar_gen3_thermal_remove(struct platform_device *pdev) +static void rcar_gen3_thermal_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; pm_runtime_put(dev); pm_runtime_disable(dev); - - return 0; } static void rcar_gen3_hwmon_action(void *data) @@ -594,7 +592,7 @@ static struct platform_driver rcar_gen3_thermal_driver = { .of_match_table = rcar_gen3_thermal_dt_ids, }, .probe = rcar_gen3_thermal_probe, - .remove = rcar_gen3_thermal_remove, + .remove_new = rcar_gen3_thermal_remove, }; module_platform_driver(rcar_gen3_thermal_driver); From patchwork Wed Jul 12 08:12:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13309748 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: 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 65281EB64D9 for ; Wed, 12 Jul 2023 08:18:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232224AbjGLISq (ORCPT ); Wed, 12 Jul 2023 04:18:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232422AbjGLIRz (ORCPT ); Wed, 12 Jul 2023 04:17:55 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2090.outbound.protection.outlook.com [40.107.215.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46842212D; Wed, 12 Jul 2023 01:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iyhx9hgZCVgEeOfNtFDRqoECWF0VGaPFwx0+suf6g9n/j6Fkgf4nGOOpvOWf1B9pkXCEawsDEVh6yrdw3Bgmfw1Ljqk11Rl0yoUDb6slaKnN6d43sM0czTK24U8AP36Xa2JnxoWNi9tM3bCBCeELXiF05xh/78vwu1jUsI++FVWn4ghf7LS5Gm513Omfl9R9jg1eosU5D8kYBtnsM1wsBrO709mLnUSckivOfID92rqFvPHso041JgVDBSIyCGfrqZifhJ3mR/anedIruZLl/s9AGokiQqW2JEMNm5xxxqyZVv2q1TnoyHTVjbRoA9UoW4yGxkopVRVopR2vue5C+w== 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=BmlYxUlZMLn3gJYLM84Y8qIS0SHt06c0F82wrEX1jIo=; b=Ww9kBS/6dp7n0yRxFkYj+KcE4Q7z7G6mEgXweg6neT+1hkF/xbgnbHx4uBeCIeSwkwpnoTbMuhvCZwsVl588cQr+8zWnilz9+8v7/aU836wmfw0alKZN5UKKv2FU5YF3SvsmL8FHoPWTwxcyTEafaKJ7M8o3+RyNY1JZOIqtSCG/eJ6BB4ilfzm74mifMOVrfXZnvbwVzQ1/fQCBtasRyRSr/BkV48l+pacbgiaEPIMNWIMAzyvez83hiL8kTqjmR+Ceyozj349N2pON4fgcMgNvmRaavyPXHqgHEHxbRsj4UbMYldPZqpYV9/FJscnU9zEhEcnGaaiJZdyYu9bCnw== 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=BmlYxUlZMLn3gJYLM84Y8qIS0SHt06c0F82wrEX1jIo=; b=d4dzxt+ASED5iSMqaBLFBG72lD8vHeemBAzz91JEMBbWIt9W68UGiJ9O6K2Np+HOsgQAuplWfSZkjL6AsHf5+vn1u/E1pFpLZ4ILDRA3EJ5g089IBS6x3u3YaAIzof0bxGyJG99BaqYuWD0CHq0j0P1VjqPzWr4GCM7IgPIccLCg/BoB7LJxjm/yP7GY41yRDhHYCMyqnZf4GwOHYbep8YpqpwE21LxD97lNyY7nFj+Uu+dUzW2ojxMXQM1PU4JgdEcYS7ioH7MjaMMevYj7w1SOFaWRGuIu854G4pPbwxp56E28gPlZWpYNdV7cJYxmsTehEaFkj7QGNa4tf6qbbQ== 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:29 +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:29 +0000 From: Yangtao Li To: =?utf-8?q?Niklas_S=C3=B6derlund?= , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-renesas-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 21/27] thermal/drivers/rcar_thermal: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:52 +0800 Message-Id: <20230712081258.29254-21-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> 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: 9d0b128f-b9df-4228-7e7b-08db82b003df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NHDupBP443ajH+MN7hcS0xHZ8IKO0yRmOQLE+/gbBYlJ7VIewc4gZ4Fo4XSz+jnSFLc0wGb0w1eIYkLMuFWoQ4Igj3YJonBYnmya5wZ666QWA4ZxkSk5qCvMTrL2Hwg6pAuzEIoBk9njn2HpCS6jqjkVt06b5O3AT2zzJfsYwXJk+sFRBgyIzoOZ+8ZifsBInb2MinSkgAla8h0j+R82u1nQzm6iHAmKE7vOomC8ZpqI6sQXAZdcxrrcBBnhblDeRv8zhkUwuCxXtP0kuiVrjuQkjYIO/2CuqXXSa1g5G7AfZCf/ZbjuNdn1njrmPuINHs+8UQP/WaK6IRp1Pw0keMyRsubd1BnYD/F539lCOcsV8/ezzlhLmL8NkoFnF6Cx1SxehoX2oCHSw8QbpS/eyk0ZGym9F9g3pOyVQ5q1L61r5NG+NZk0d8xvJ7zV/kQeMXLe5x9r1fuGKrFCVL9gzLSghGa/MKsMHyzL7Abvk0eJqlN/Wzk0qCBiWcYRyEVdKdJnDB6Vdw0+hsUPIuFj8G8jTeWPDQsf9bPC9haX9aGv5EM5NTtQC4MSk56XfPvXRW3qmtHCBA9JgBiZQXzcPo5lZ7i9A7Y1YL3IKcALnHwdujP2rbocyZVP9YQ3u/MM 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)(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?owm8pqKS1Vgfts3QteiDAaDT5+GD?= =?utf-8?q?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swV/6?= =?utf-8?q?mLd34pdB9f3omk2G+uz9ZzgRuIOBgPUT36WWLhbLwv3LP6AwrPj3RKNmRct+sQ6Oy?= =?utf-8?q?yDU7h6Z7FxqZJS73tMb47qr1XeULs8nTLimcXY85LyrCIoVkyJ2taEn1iwClaHZ0D?= =?utf-8?q?PQWNAlZrUsnFCKqh//UPMjuuYnBwi2qs1iMfn3MBH7IlBxAj2oW/nrfloVBBFtN0A?= =?utf-8?q?YTpwLbZ95jeYihV7Lge0dX/DrTt7+biAlG7jnH25bYvtvoB/mZUNk54wWFVq370Lo?= =?utf-8?q?F+/VJx+oT1M/ObL72YJHWQGA112Z12JtdzmmcbNYnlHYY2Y9bxgyc0BgxU4vHRrEa?= =?utf-8?q?TDqwZC+dlmSQ0QrUBY2yu1sxw1dy0J6qhypfPbB1kbQeWVVOYCmZRXPBfUvhG5K63?= =?utf-8?q?zo64DySiLk5N9o8AyViJSCWn8vkhBcWIOhl2aXslsz8w0uCDZ++eGagxNdNgeHwj9?= =?utf-8?q?wwB1CPkNgzjGKrDJMjR4N2QkwAjSQvJUz+as0jVX/yyJ7oO6zKgRwEqyBdeC7SXIP?= =?utf-8?q?wEKTFE+lwpyrVbYw/vmCmMKnubczOoSnPV0fMsVQ5GbxbT/7NvsKiBW2qEIFeCbww?= =?utf-8?q?HZoDLQzk8KPfLNh15w0ptfBFIUgKwCrmEdgTAsnYyGCRtises6j74tHyo9noa1bTR?= =?utf-8?q?FYfA6/aZGj0r?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d0b128f-b9df-4228-7e7b-08db82b003df 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:29.5389 (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: Lq26VdSOYwJAvEAVYEkKk6nAvmL0S4NXogRzAZsVnBYcDB826147ACMpPaYelsLNIljjySmNRAhyFJVQ5ex6Rg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org 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 Reviewed-by: Geert Uytterhoeven Reviewed-by: Uwe Kleine-König Reviewed-by: Niklas Söderlund --- drivers/thermal/rcar_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index b8571f7090aa..b4c58c5f6f6d 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -371,7 +371,7 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data) /* * platform functions */ -static int rcar_thermal_remove(struct platform_device *pdev) +static void rcar_thermal_remove(struct platform_device *pdev) { struct rcar_thermal_common *common = platform_get_drvdata(pdev); struct device *dev = &pdev->dev; @@ -388,8 +388,6 @@ static int rcar_thermal_remove(struct platform_device *pdev) pm_runtime_put(dev); pm_runtime_disable(dev); - - return 0; } static int rcar_thermal_probe(struct platform_device *pdev) @@ -581,7 +579,7 @@ static struct platform_driver rcar_thermal_driver = { .of_match_table = rcar_thermal_dt_ids, }, .probe = rcar_thermal_probe, - .remove = rcar_thermal_remove, + .remove_new = rcar_thermal_remove, }; module_platform_driver(rcar_thermal_driver);