From patchwork Wed Jul 12 08:12:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118938 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp996470vqm; Wed, 12 Jul 2023 01:29:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlGSBVSPHxEViOazVaJB+K8krlTfWcHBYmh94eUBacrvb8HsxuGhzUNhk1s43lF4g27QkHFJ X-Received: by 2002:a05:6512:3157:b0:4f8:7617:6445 with SMTP id s23-20020a056512315700b004f876176445mr13948645lfi.48.1689150584582; Wed, 12 Jul 2023 01:29:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150584; cv=pass; d=google.com; s=arc-20160816; b=UDSMLiKOD/9/WIcF/pQrKxgC5wlKmjZZeJWg87D0zVZZALei+KadAoC5HF1i6buFga zb9ydnJeyBVRIjJsbYqOGsVH1YPV3AXxyVyGyj6ylwCEKQ5B+8+9uSOLJEFGmvOb1MmH 8+yLrxuOUqiqessQO4R+EIPrChu5ykorWktUqXmznemxr10Ne5Fusk+YcdfR0h4W/2b8 1PFPsiwJCiZ5fiALA0xv/v35DZPidLWoKgt4VhRdAVCl77GPAh6PDoI6ldWZ5nJs+pIr Pk0TbkshvYMkUI55leStMTE7K6rAGhydcaV4Wbf8I3DFsg1hsTg76ie6jbVXTB1rRprH LQGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NPaIbHnUrLgcrPJeVxQLB1UziQNQ2n1S+DMK88EN3Ko=; fh=IiWTCAiotD2hu6GhmOQoVrQujLqRY2CNTHWh9Km1TgY=; b=DIv9fHwRNVMhDXYXkciaSecFmlT8OB+Yr7kr8SbR+OJfwoO9WzM/af/pAABQJjkTIe cvSEA0Am5kO6M8DR0ieIvvtFMm54KJGgq/Q0qJ+HJOoPB4A+Wz2WuQPCkccn99ajSuuv jOTZKQ/rtlBpPrhJYdGTxd3klNqOiDjpyPxW320iNAfFL8fFwnqslQgYweh3VwfJaQ3k fuoQURW48Lflnyz5KtOq2NBnkNy4eZB905ySxqr0XJYsVsWVDhtJQ1+zpESLCdanqgjZ RpHjw97ekH64GoCzdAUxGn4oBZIVNMHKZtTdKJHmLrXEwA/9B3XGjhAsWL+qCFludYjp LvNQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Oa8fCESl; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f7-20020a056402068700b0051de52f8ae3si3886247edy.207.2023.07.12.01.29.21; Wed, 12 Jul 2023 01:29:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Oa8fCESl; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232273AbjGLIOV (ORCPT + 99 others); Wed, 12 Jul 2023 04:14:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231361AbjGLIOA (ORCPT ); Wed, 12 Jul 2023 04:14:00 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2103.outbound.protection.outlook.com [40.107.215.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3B7FA2; Wed, 12 Jul 2023 01:13:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZSGaFOAWM5MRQRhk68YkosXcvIlvYPr/9F71xtuvdXaa4KSCyL4bb8rIY/MjBeVb3N4BxZTgpQ2lGBI1AcjqXUWpn+Ubobb2aXZJ+1D0xZzcBy6nlMZPL+xedPVsE7ZZKfWhgcFY0K29dakOQ/KS2zplJl8DDD4mtxGMjGe/rMrmP/QqB4va0yu1Zh+hOuUhhx695T+zzyhvmBsv342+2gAAMxyKcF95TBfyym1kjp9OdeGyinjIPLy0PjGFFVdufW5YmMpqqFhZM9bAhgZsTAk9jRGcZzwl9ObUUZ57Ui2oB96ekag1obOqcKigftofjMuoZCnPbX4ko1Fc2qe6GA== 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=NPaIbHnUrLgcrPJeVxQLB1UziQNQ2n1S+DMK88EN3Ko=; b=dH4WaFrsAvLrJc+PeL46kVCw1yrYz4QSA0/agMOIk9OMb52t3UixJiRm+BydOPL7rOBU2Oh51bahciDglJ7KE8O0pDhNIjjW99uP81pIkMWIcbV+WbDIDSYTkc8E6U8K4AR3AORGrWeZLwyVsUch7ULMd0InneO67MKY83h8WDVDLedJUGntxzeziWcPvYYGjHf0hz1sti+9uHbZUY/dKTfgCY65XqJ8Yx+D7CMdvWDCHUNz6h/BwrAQy9yYWYL3yOm1wIF2ceBSvuL6kblko4rEygWVAxGSLRr/vVnAB2MXO7Rc8L/oaqSfeFktlUOU1aRz6crc9yOS91cW05XMrQ== 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=NPaIbHnUrLgcrPJeVxQLB1UziQNQ2n1S+DMK88EN3Ko=; b=Oa8fCESlm3Ss/Ew+aoTXxXmV7S8INkTe066saZrwmO43iAJx2e73tGFycnp+YOVg1orBQ1SchZdfXBmxS/gpV6ySQXVUgh/sGxoDII/I4p1wjG6SZVPY2RjO9agc1uiZa05bqySjdaad7nN7FM4fE3CjrxpyyTNqr9bzL1gnQiK/7Ifj9ckNYQzHBDJnkvN6MClwBt9t7jB6dpU0nxASJMaEUuhQCv2QTG6iWyTbSDH8/K/6JaTMgycqm7Y/BMlBeQvJ/ox5b8otmgIMO2ohGWpO6qNGb75Q+DCCEj30CAupDNVrERy0gPYVp2ACcTxAud4MTV1nDQNDBjhp4tps0Q== 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:55 +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:55 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/27] thermal/drivers/imx8mm_thermal: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:36 +0800 Message-Id: <20230712081258.29254-5-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: c0d6d2a0-d817-42cc-8f87-08db82afefaf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1uMLbiuQUAwZYpIJYlrXpVO5Wk5k5zYbCaKDEnVaPuNm3NHwx2mWv+Yu/+imQr0Q2B7yRmEBplygmYkuHEQGIukdUF7S1SehXBHrJcBpZKEeKd7vcJWkMVTNaNkIcHOFHbVV+rYZDAkKrr/LiEzKKdOBo6eBC8lykQZN19HkVRc+b9eHMj9oU4/zvbEPiLX+1TlVEH1LlrY1dAME9aH8U3wrtz5Qi2ZsXEtpsTGUAwqBOjOI5icywAvNTNKCuzDjB1gVE5gaK0w+vAHD2/Do2yWoJXkg4isoZfp3RHCs233I0Xp6aMtLavbrMxeLWLlSvfRY7wP5q8yWVGPKTEa1klWhlPy8C4eWrDqB2yH5YpzWTd/4lManDtbY3QSNrgNgWXapcDrhH4Rym6SlOStgaU4QUCwg/gO29YaI8sbGVtclxJ/TrD6AE0lxmHCYCTHn2ZBCdSnBsUMa5wY3G58glWFEy+8PhCN08OEU/ZuW6TmkdyGDOmXQOqwBAFP5sJt42iZn1QQoTuR8ebN+yKte1RsmAPbq2/1yDoSoYy+qI7+UtnCtxj5RFQZ58/OegZGUkPnPsw41JX2MdJbb6dOWlQFAUnfzj6NZ3sMaDsxCz4rrIykD1rMAr5aViRQv306L 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);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?EvqThYmCTorWE9hUJOtrvSPaswqw?= =?utf-8?q?ljQUCjph4iG2GkRXaY35k1QDkbpHknhFAUOPZTmO1d20o6adcoNAKkZEDXCAnlI9L?= =?utf-8?q?tdYU2EwOilcuhlhwqyzslVZwVqQHJlykgj6kq2LWskoRsJ290wPdo1lcoN/ZjOGhG?= =?utf-8?q?CFpIGT9nTAMc83mkeZCiCBcuFj4MAtvN1x7/wKqBAcIUmgyVk8BdJeQwzaGsLpkvd?= =?utf-8?q?bAatGWC0gavPt5n4rFmL/a8QnjvivLCRko0NTxOHdc8haDFxgZzauVJPmw+ZdbEcS?=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ng7LvSdM9hNPtUtwT2x2mtHKg3suFxy3kw/9BBNfjXZwLxZy6QVCW46adSX7e?= =?utf-8?q?9uNAIQHdvuQ4/ZPriMRyU7+iLkisTPTz8/OUZfscJ9MRmaDpFKtizB6x694v391E4?= =?utf-8?q?p7sDioIHEM1lzjMI+Krtfr6+2KYnv9Y7iR4kVh3amJvI66GmRVA7D0hiSse+LV+5X?= =?utf-8?q?MnEBfOgvVsj45G8yjCZkF1nvPCG7venqNk1MIuQY6QGoxVVoUXTXyGHN0qY6zdjXV?= =?utf-8?q?BGV4gKqWJF4odvIvWaRBG2ZA/NMxr2XKdi8iBH0dE5Bhjy1ipOQH3nAyCD0r6ZkS8?= =?utf-8?q?l6alLDaCSM6U955rZ2H694anv1PdS85iM/IhwReTfLUZFKechEgoaefqa5hCnbYH/?= =?utf-8?q?n1DO8F0M2anG?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c0d6d2a0-d817-42cc-8f87-08db82afefaf 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:55.6672 (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: SIoofbUqzxWGLZcF4dCwVX2i2uLngE5Uh3uaT3XsToVbFxROFtca+HjXrMpAie19BejXlW56nOoptVkOEjfHGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202763573948564 X-GMAIL-MSGID: 1771202763573948564 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 --- drivers/thermal/imx8mm_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c index d4b40869c7d7..b95564ad6319 100644 --- a/drivers/thermal/imx8mm_thermal.c +++ b/drivers/thermal/imx8mm_thermal.c @@ -366,7 +366,7 @@ static int imx8mm_tmu_probe(struct platform_device *pdev) return ret; } -static int imx8mm_tmu_remove(struct platform_device *pdev) +static void imx8mm_tmu_remove(struct platform_device *pdev) { struct imx8mm_tmu *tmu = platform_get_drvdata(pdev); @@ -375,8 +375,6 @@ static int imx8mm_tmu_remove(struct platform_device *pdev) clk_disable_unprepare(tmu->clk); platform_set_drvdata(pdev, NULL); - - return 0; } static struct thermal_soc_data imx8mm_tmu_data = { @@ -404,7 +402,7 @@ static struct platform_driver imx8mm_tmu = { .of_match_table = imx8mm_tmu_table, }, .probe = imx8mm_tmu_probe, - .remove = imx8mm_tmu_remove, + .remove_new = imx8mm_tmu_remove, }; module_platform_driver(imx8mm_tmu);