From patchwork Wed Jul 12 08:12:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13309723 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C37AEB64D9 for ; Wed, 12 Jul 2023 08:14:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=T5zRfw6mnowSVDvmIFpd9MrxQCBi2hRqlRDH4+a3wwk=; b=4DF0jZAuLWtoSB 9Gs8zsAmqqgV1mxYRB9MPER6qrmhcHBNi7d5u1YJrHC9FfUbYteA5t9KV1lH04gJFRSQZ10+/zBZI P4l8JSGyXUEbHqNUUtsRXy4wwIMh61aTCYX3X/hAUEh5F855/lqr6vQz2flZmR5dEQdjIKudAQKDc JZ5Knl9Teg2UESWT0D8UJDv1nyIawjFRBdZJfhEp/Ef1V3KsaQkDYs8pNFa2Q+zM75FRrxzgkYe8f Wza4eKBaiCTPxdUiVSuMkyT2FCiYXJ8ROGsRqs3zVj9J3g/iH1p4cD1tmRTurGTo5YrIjvsL6/rNG y9t81ckKDSRBOpIUNBMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJUz3-00GsNO-1T; Wed, 12 Jul 2023 08:14:01 +0000 Received: from mail-tyzapc01on20722.outbound.protection.outlook.com ([2a01:111:f403:704b::722] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJUyy-00GsLy-2l for linux-amlogic@lists.infradead.org; Wed, 12 Jul 2023 08:13:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fK0CQch+cV9vjOIaZQoMc70Msn2PkWmSVE9dtHNUrzxSQ2gjwDCgaMCkGlu1eDgVs55I36EkAfLnjvZs/0ZdBujKTzsILNhyqpKU2TPgutRK6mXAWK0xxp37mXlQOZkhrTaMhOFDLi3sDSglHe/o7yVklZePo5fXQPPfMlBwhI5P1YoWXfL3BiPyURo/miSwgO/suaCg8xtE331NuvQKSIf8ZN13jp480LB9XHzGb1wy+f2TfkcemDKXalGdNpke1VJsi8soOvXPHgPvdH8xAT7mNkvEdTeShaR40/EMLp6h8q67Yo6hPnAz1yd4BxTc3+oYME8xMS6y8y2p2e+A3A== 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=Vgvj9i8WuHJ3VFRZLwvhoKTz+hGp5LXPh+342T76Zic=; b=ZV1jwq6ZPdTUd6WtvmcCq6Jj86ETtblQU4zNgtyqCEvtpAYiOTgfb2W9r5TyxS5zNpThDhDqihf0yj+lHqm3IHq7BHnx61Mvlq3YuJJHVakZ9yfq9WSYWf/qmTbERzPfL15eBfj2LwQaHHSRfdZxNLZgEJjTsAvlZV7vnAyyHXHKljCJD5nUHzIqw6FHjAw7aQKICWrSz2oLGRPopGEDPgNfRHrjDqQ3ecpja5lPBHFhzrmDVmq5vZ70O2f4FyeCDxNFE4sBvmHbJ2uwxjPR3qVq5hvya/AZlNNSUskX4uaOxhg6i+CyoTTxiN82WI7tYL0uw7ePjRn0qguU7u3eiw== 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=Vgvj9i8WuHJ3VFRZLwvhoKTz+hGp5LXPh+342T76Zic=; b=Vdu0LxHgoY1fy0BfJIoF24gmwhp8vCQnrlDJ84FSZBEe/9AJwXK4+NGxqvlIdjrNO1ncqTRTcvBWz4sl/f2D1a5bxIq3dzKQYlbPAecpc48yVOFCOhiAZsjoEjbJL+PZUABkWqUp7BuiEkT2LAxVCGU5WFjNXgcZG3wI8502iN+JCgG0NAnNqQNurnSFc22dcscH+1luH/J29hLrDLD9/khZUDTQlI8lQ7pHX3nO0VGrOCH2/q41zgkGRHO1sCpfIk6w3hpcKOWFRXiMO11XfLAPKYEhVBTYxkmZC2E84VyI906Nyp1y198/6IyEnQ+GLXGBerWu1iOoWLSKYCjV5g== 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:45 +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:45 +0000 From: Yangtao Li To: Guillaume La Roque , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/27] thermal/drivers/amlogic: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:32 +0800 Message-Id: <20230712081258.29254-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 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: 6e4091b3-856e-4c91-7e81-08db82afe915 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YaVQ5HxBs/7drPtb4H+hFYP4ih46/4guW80n1zFNN5z36G8VEZmKdi9b8x61qLzUOlSH1ess5DtG3q833bf+sj/ar9PbRYuLn4oX87ri5yiDxZIePesu8CW2R+CR3l5p2q3c1i/4Q0W8lmOAoVI+us2zBg+5d8+thE8a+aW+mTzL1mdVfAMJs1xhLPEM+vlVEy+bQS+NC+h6pe/21z1ku4A+6KBqtNmJQmsEIPXylhJeLXZ0ffqCrZeiZolauQVK9YRNISHAjScAijtPQztSEPB9XVpmZH4BzOvqX7/JRts4xkP1QqGxL3cZCs4d5XcMGWg8gCR3gWsu5L7GXMRe8DiS0zD0V6BrT+2i4ssw9V0i+z/e0MEw0VEyNh2CH0g1LBwsGR8NHF0h/XY5WxUII/EbmlMiIiAixMKdyrt8fWLYkqeNAJsxRdGFYIjhHtiXBccHDDIjuhen3cCskAZPf7UGhPWqGzEX3CjuKCM4emN267RCHyxKZnZLuO61MrDixA42lcBaUcagjpBGlaUnTIerLThvzJOdiSy4XcMZSZ5KCb/xB9PtkkOA8a1JE4cAsSmS5o3tvTDM8FCnBAaqaQN8DOKkM9I7DkkcVFxJPSBcDHdFyXW3o2Z8b+DV+Y/t 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)(66574015);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/+MKGPyjjIKjxb7oku58yVeeOlhn?= =?utf-8?q?xdDDvZOYImd9H6Ck/aPGqlbw68RUD9HIkFM4l+rvuWJmF/fprCcjERCgQIhrE5hFv?= =?utf-8?q?WgPEj5bXlGne3oWt7dRjJF/sG57dEYO3xsILDBrAfJVSBXZNb8VM5jHKPcXCYz1Zt?= =?utf-8?q?2OBHewAAWlsIzEDutJMC3iCVisMEHyG96jYk9rX+s8mrZHrAK924ddZH0x7HdZqso?= =?utf-8?q?j2IPQcYDdo52YRW16rpHX/fQSBs70U7tL1pHA7f+7ydlgviyHFhp6pt50U/BKGlo5?= =?utf-8?q?LvqJcq+RQOpwwMCQMWoqyuauwbdGGi3Cdy38NbiU2PIEstvG1F2zrOeTdnQsVtIAu?= =?utf-8?q?0pjU7al5+XMPWEjCfbHWEjhfSrEoyq7ilrnqR1vRlNFu4Pii/UEzShVotb89lWtO/?= =?utf-8?q?7M/Y907YYQ2js+PPTsJJwDAerVhqV9IF30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UqUhJSQZVg145FgFXg6rt9iYnxhw?= =?utf-8?q?1yzYGIzG3lmcyOPA//ADXglECjqSYYiaVqUJ96/dyXo7d5sdoku87mrn/7MjpjIOd?= =?utf-8?q?U/3ejGNJ2oU+Jn4WxyJsjVqsr0awFaBHjZB9yGH0auPdzL53IzRN4pkFzXLcWPjYu?= =?utf-8?q?SDlLyeJKtLMhNOu6I9jOcqn37Uts9eewkD83Iqlgk3yLNA2a2wovxs/8wuCfXwMRz?= =?utf-8?q?DFxDqV9I/gKz?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e4091b3-856e-4c91-7e81-08db82afe915 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:44.6496 (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: BciyjHRJpLHa5vuFCzM08WPHN5NGoox5vGoe9OxnxrTnsHmXLGjD3c8dYavKMYIh1Dp5md4uaSLL2vStBNGcbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230712_011357_927039_9E27DF84 X-CRM114-Status: GOOD ( 13.38 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.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 --- drivers/thermal/amlogic_thermal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c index 756b218880a7..a95c8959e5af 100644 --- a/drivers/thermal/amlogic_thermal.c +++ b/drivers/thermal/amlogic_thermal.c @@ -293,11 +293,11 @@ static int amlogic_thermal_probe(struct platform_device *pdev) return ret; } -static int amlogic_thermal_remove(struct platform_device *pdev) +static void amlogic_thermal_remove(struct platform_device *pdev) { struct amlogic_thermal *data = platform_get_drvdata(pdev); - return amlogic_thermal_disable(data); + amlogic_thermal_disable(data); } static int __maybe_unused amlogic_thermal_suspend(struct device *dev) @@ -324,7 +324,7 @@ static struct platform_driver amlogic_thermal_driver = { .of_match_table = of_amlogic_thermal_match, }, .probe = amlogic_thermal_probe, - .remove = amlogic_thermal_remove, + .remove_new = amlogic_thermal_remove, }; module_platform_driver(amlogic_thermal_driver);