From patchwork Wed Jul 12 08:12:33 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: 702147 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 2FC5EEB64DD for ; Wed, 12 Jul 2023 08:14:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232160AbjGLIN5 (ORCPT ); Wed, 12 Jul 2023 04:13:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232173AbjGLINx (ORCPT ); Wed, 12 Jul 2023 04:13:53 -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 B40A51981; Wed, 12 Jul 2023 01:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UMq9JekGXvDoSmVOx56UkbGy8wx/W+le4mSAHkt+6VB4eNmLi/HITFaDGTzAk6G88U6aKz77BKAohZECbdJG0v6tQgvjEFvnk9cyavvxTdk/e3R/DN/69Cv3TFO9DMw4JE+1NCKTcL8KcJoP6XZH6hIxcM80Pm88asOInIHkmAHnGsbGp+2Yw0OUsv1zq6wFP3g0oEJAF5PJOBEG5v2wVmolAv7EY1Gj3xHUPZxOlFp2lq/tZt+skOtocjpGh1Octbhp9RNneT5n742A5iFVXhU7bkVrO2zyogw2cOFiISoGg+gr0HvjAAecG8vwc6afjvEfs/uQy4G7tWTmbfp70g== 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=hpZMshgUnhl1a1NRIEAw9FoWwWlGONyeujolIieNF5s=; b=fKxN9NncDeyHewf2r4+VcvnlMqjNA12/wNPqZnnuhy24G8JBpql6SP/O0GCwsZ0I1cwXMiB0/fsWEKj5s03RVSJL7tbVqojmdgeUbBAIMh/Dr78LNMlzQvJ7HXjRLQ9J5nxZR5GhZ5h285mzCSVyNMToJukFI2BvvnjDzktFiZNU1VN6rZoRt6iUfyQ3AFXt50aI4FP71/bQO1YfoG9K7jahWbtkbZtKWQrjKsIWDt+2Cazl3/F4b+siVtQ68TisbxIiYihMHmyff7b7f7+F/LTl6TXoNTc3oyjdW1JJ+WzLA6irHsgIQi/S5/3GJZpkQaA2qwNAUGrSCuqbxhJ0Ng== 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=hpZMshgUnhl1a1NRIEAw9FoWwWlGONyeujolIieNF5s=; b=YouXT0nfwyIPN63x5wCih/7tP/H+0Rt1DDqER1dX/Th8eZAtxwJbm6N528VhnmTEFC/6EipCRWBT08/6LIdnljzK+Q30LfSFzwX8PI7ugnPD6PhVNYwOuhs1DE7BK7uNU3wMZC4NFMNOo4uFafR6MJcNFmx3HouEuwmYxMNUjvA2lVPrO7vX8N4+t1OjEa+ouCOJPFIeQUe7YieAhK6KWcze8mvpCf5XZ8JW/Y2XgJO5Y6sR+i1CDgwQ98lMdoPoAO3vQt5as5nif/GS3Oml1D6067PFNLASvRaginj5DCb5YxWGPsqJKlnGr5iiSdbQa2ld0YgKE3kJ8CysL9tjJg== 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:47 +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:47 +0000 From: Yangtao Li To: Miquel Raynal , "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-kernel@vger.kernel.org Subject: [PATCH 02/27] thermal/drivers/armada: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:33 +0800 Message-Id: <20230712081258.29254-2-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: 061e9397-d4c6-4c5a-7eff-08db82afeaaf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TU+mu0z4wCrDRKxcHWfmczo0DABagI5/nANMCyAGUVlTBVuWIXSdYFpakU957C1Utx8RGVbBaIXp/im2yo5xr/ukKY4YavW/n0qXOcxxQpRKIEvWBaR/5Nl8AWbYJHDUgjv5zCXfvaSVxPEpCIutTyDpZ3WfoahLu/Yg2cIbreOiid65NkpxZadoxdBZKmnyfJM/AIDmUOos1+iGSV4GHoq569umcezpVbcooBvic49BtmHXvU9eQiB+w27nIoVGcJVyQWjkuhksWLp7bCv/OZTYYw8zQUdN/DDOtS/VhcwKbLq9rdYB7AJMgIZO3dp8QUTLdtetIexSySMJslVxYftwz/yWmQLFYROaEZea+9wSttrHS688LYJUZdObhLgRNzlIRqrxHhSVKjf00WvyTPFAvosy9tCXqso5L5qAExeqObP3nuAwpS5D2WG0eIK9pVu8Ps89LDILggtKcXStwO/VMb6Cuid4T+pocfZGepYjy02mG8AziJmykLGNjSaZ0R7Ke3P4NeHNcR9B6eIpbepb/jGR1tUZ3A/Naz0nbmd8z6GIry2ZBTOXEWIm8lQLBl9JXeI4MmR+gtFQh/ph0eJUEf/lC2voIMjt4Jl8X9aLPU/cJeGdmUrolCcneUny 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?r+wHfRZcEGKlB2Cvg2d4goInCjbB?= =?utf-8?q?voolnNSuAiQB4JGX7u0OLVJULBIvbdYrIQFI5FwA1UHNwnSA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4zUDok5?= =?utf-8?q?KdfrfY/HDEtQtowQ8D0kLPwBzkmMbQnFhxU1A8BmYO/JAmiPOCigG8kbmCTr+qGcc?= =?utf-8?q?zD8Kr549zcQAjmgTtnBYNmVLDuo8+2Rfa54CHL1t2lShCfixZQBZaRt5RR1DAW6s0?= =?utf-8?q?3rKnmW5kmWTXAWnG4AFnQ6rOOYXRVJCs+/uPOhIogvLlk9xFrAPBBKJkkD7u491YG?= =?utf-8?q?Phz44v9KZtehsj0B8a5xLCI3ypKBdvp6ZGfOooxPmfoGMxN8tJnXsN3cm35QAGGyq?= =?utf-8?q?2ZrgBPm1lXOG/4Hs1Ku3BIzfkJge1uOoqRtzwZvng4BDWR3NS7IfvwphIpui6Vf+X?= =?utf-8?q?O7AerqOyzc99zowBg8ekcbUFiIGgVTKimM3e1Poa6n9P0Qqf5sIbatU0NpCOY9L0I?= =?utf-8?q?7scxM9jwBbunDutyCnClqVo8Li1ai/jX8boDOIrJqLCrHGZoJjt6d0AYBkQsY7SO7?= =?utf-8?q?yBK22tCWxx/kP4pSI7FPXjG3DQaJzCiPYjZJMPqpHndpiZsFh+C4y7MmuYzdC8gPM?= =?utf-8?q?Mf/7YkR+n0AQXDRCRG+iwUA36RtL3GNh4GQYGcTFE81aRwKnXhwB0QLrvC1gIrX2H?= =?utf-8?q?4yY3o9GqRBv/?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 061e9397-d4c6-4c5a-7eff-08db82afeaaf 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:47.2866 (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: xiTTdfSaBFHk+pg7qQZUKYsNbYI7DXEF3vw8hzDD1/6Gvrqtj2I+nzzh58nP0/l929CQ3Yo4X0YnDIAAf6SzUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- drivers/thermal/armada_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c index 9f6dc4fc9112..94783e374d37 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c @@ -964,19 +964,17 @@ static int armada_thermal_probe(struct platform_device *pdev) return 0; } -static int armada_thermal_exit(struct platform_device *pdev) +static void armada_thermal_exit(struct platform_device *pdev) { struct armada_drvdata *drvdata = platform_get_drvdata(pdev); if (drvdata->type == LEGACY) thermal_zone_device_unregister(drvdata->data.tz); - - return 0; } static struct platform_driver armada_thermal_driver = { .probe = armada_thermal_probe, - .remove = armada_thermal_exit, + .remove_new = armada_thermal_exit, .driver = { .name = "armada_thermal", .of_match_table = armada_thermal_id_table, 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: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 702146 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 6413BEB64DD for ; Wed, 12 Jul 2023 08:14:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231334AbjGLIOD (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?oDfpH2nIgh4c6zHsRuHcUplEcirs?= =?utf-8?q?VZxsnKOUgc2uS7vcdyKnzA8zSf5zBZj+YGC9ghaCLOdZChYD122uTgnjopkP9FSf5?= =?utf-8?q?PsKif3uM3zHzrCj/Z3MMDetzcNtO08EHcEqdrhy2YlQ9UsMrmLZvxuL8XH+gHbmGc?= =?utf-8?q?wme9jMEB7gl+gw3FtwmE35k8amxMjYi6eFtfHxE3exPOIzxQtqW6E2ABNRIK2RBqI?= =?utf-8?q?5pXhbDNKjOr0olvgqw3xMu1scesX4gstAjm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ZLFZf4WtMO+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-pm@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 --- 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:37 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: 702145 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 61582EB64DA for ; Wed, 12 Jul 2023 08:14:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232173AbjGLIOP (ORCPT ); Wed, 12 Jul 2023 04:14:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232171AbjGLIOG (ORCPT ); Wed, 12 Jul 2023 04:14:06 -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 69E5C10F7; Wed, 12 Jul 2023 01:14:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YEXeiBF8g+5q3VWCoEyrudMVeFWD6qrkLs4E/enFJtp/j240NeA2u4qkBmXze+4cd2N9hNLh4GIQ6JVjHns/MhU32K3OZUaezI2cf2tYc8lkgUemDLmtyNMPu68+CUqtOiDcv0yuEJkjTGtKWwNuoY05DoZvh6lgQsHnPqAL6KSlEF5DbsC7TXCKLg892yBNXfa4YURCWRwIYLP+k245VfFEFDImxbvqxu3hIXMDBaDHoYPVcPo56Cq+XAxKyizTsHL53Hx+qGZAOiArtQMF1QeBGOr6jFsl90Eu6HPPz7zCDHvxVsN9la9RS8zobF6PZV/co41iZtG5e7eEhj6mbA== 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=xOBtxgJupmI+362Ug4gZvaILE8rmdn+aJOFY+2JC5mI=; b=E0b+wsK1IoUTC+MjiNoO0JnSmyZ9ATe0mCo+hlLGIVNQwUOwN55JNW8d2inrNJ9MpBML3aV9yu6qLUs4aXdKFUIX9HYwv0rD4rRc4JGu71K1CclU84iYdQ5u2jDIJjJ0TWS7pgWy2yRArFL4YqzruISMpA1/8vk+JzqYy2s2glYE8JGnp5vZpnEsAaQPZYjur4XCS/E+TPOY/N2U/Lwxty0SpK8NsjfN970VXB+9iWO7HM8DhpmcTcI+O9KU0QLqVMmxfc/BcNcPOpyQWvHFZzfCI+TBbHM82nKlZxJEtQ9KOvqi/pWd4nPaySTKiLlDt70jtR4wF+GMvKzaSEMIaA== 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=xOBtxgJupmI+362Ug4gZvaILE8rmdn+aJOFY+2JC5mI=; b=FhLlm4c8og83IFHt7JS4xcbJI2AZIex8sSjXhEO12kzIcn8D4WpTC9cEr/H/LPYfB6Z/jKBGRTId6XJZoGJsoeFmituArUZ7nVpc8fsrR19jv5VXNwfnfE4Qd1K6ZW5E34wPcfJUydKLZgwFYYKq62WllwZVvwvYfh01nu9NOTMKrig0WpR4iwf0/4LXDWLjJ/Fi+aQI9ln7FZRSlwRv10YZM70czpAKdXR+C7RQRKNwfveoA6kXamEGVkGm/e3fnGo3/nIRLH0LW65bq9flPlPHPQFquJwqoN60/B7hDbcl5CL8xffH0cI+A6/l+kuh/W4l/mzwR3ZY28oyK+vVqA== 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:01 +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:01 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Matthias Brugger , AngeloGioacchino Del Regno Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 06/27] thermal/drivers/mediatek/lvts_thermal: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:37 +0800 Message-Id: <20230712081258.29254-6-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: 5cd2d12c-89f6-43cc-69d6-08db82aff2dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dhQmjyNqXxtidFLb+8UMAra06iIoiC6NgkEVHQ9Fh+AJEih5SeCRpJuEmm7VtcJzYrXGKShFwi/uKd3T2XemhW8eMMp4azCq/vf9TxzOV6UKg0PrR71PGdanbHnFr4BuslscVfaLRgc6kn2mexa8n/dIgB9Fgfr1p+ISzd8kMyi6xuWGsPh2vBLhYnYG/ZYf7Vpjz7QZjQcNKYtd3mbccmzRxNnLIfbyM0rc3hz/7TwM1cpXyEdbLVAA0Jwbk8qpJO4P9C6jmUSZXTdyD4u1sPJEX9pHHtlx57Tpw/Wc2jRc9PO65+yjr2Ut/KVN4R6Fr/1N+gmRvIRhvuJ+p2My0CinzP9Apqbi8m3RS1KU07dYzAkj2Es8W5daQpbwA/XkH6sD3id2t/eb09GtOpjhcefAF/E2pzvUtk/DshVwCquTP3d9NmJW7WrbudgGBI5WcsMSs6v8ddnHKwHb4zZSFdykkoq9ea7N1sgYlwcwA6XQlmdb/1tNHjYeP9ZATjZsS6jVDXsBjW2KPxLlVMUDcshFou0b2DwLcfgLYV4p4G3zv+IEH9+PDDkazSMPdkp0UzEKSOKwj5dy+K2BAk3h6h0dMCF+jqE3RLEhjTi6vkhXCLlzTxl2gXXUVcNCSSYR 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?J2PuvL8C80FWmB7zusK1CaqJCQ4T?= =?utf-8?q?T05z5uZBzqInhUVyrLWbpDzuHktjZCobVJRXWt/wrtbIDS59Awm4VvTtBiqVwaqD5?= =?utf-8?q?HnOX2WAtHCRRPmq5qWyyezckwi8bmuVdHr9FAv5WM0noCSqMTvV7b7thYG7dHzM5k?= =?utf-8?q?lNlPKl1tHhjQOJuyaP8OZNX5eWmRFf8kVED5Ni+/1HOdj2UbWRPF2qwdQcTD16TVB?= =?utf-8?q?FCY+wW+yxZPyz6xNq53iho0URNmUHT2O5Gq3eSahREdSAS18sAAQRLgwkMQ3LTRFu?= =?utf-8?q?ogh+pTtiOGkarHPPLhWBqMKIt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Nld8wp7spg+uwgkJZbM6EAkStvy?= =?utf-8?q?LWDapoJuJd8+WniwDniq0sdLIRosWEoUkQ+uZGONrU8LNtGQs22M+VN2v1q7+Vxo2?= =?utf-8?q?EJRnASzwCp3hRFB4I8eQ8fBdP5dgNWF1YESLGW9t8x8sLHVTVAP7E3MKd49MAAHta?= =?utf-8?q?qCwD70nQWLK+CfqJiwussx4YsGx9iekfVVbbZHGUpKZdrjddgddfxS9bdYWvoKsEP?= =?utf-8?q?TQyFTTW9vQoMlLkQRIhWXZ9Fb5hY7+E0fiCUvlmUe24IxO/U9SzRp8dXvf3oqBna8?= =?utf-8?q?DWpXamzEkx76ClJ+r/8DC3ycWe7Z819ixjRgCUnFabj/EQtl242U1HnlT5nHbfFjt?= =?utf-8?q?5j2W3T4VUVoz?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5cd2d12c-89f6-43cc-69d6-08db82aff2dc 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:00.9960 (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: pbfUjtH1dTQte/hiR3U8S2HF/JF+P+Hj+W1Znub5OnkT0aZDJisTV1fuMF7qAU0SgKuC9qbBjwU9ZGwOgKQVhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- drivers/thermal/mediatek/lvts_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index b693fac2d677..5dfa69c7669e 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -1158,7 +1158,7 @@ static int lvts_probe(struct platform_device *pdev) return 0; } -static int lvts_remove(struct platform_device *pdev) +static void lvts_remove(struct platform_device *pdev) { struct lvts_domain *lvts_td; int i; @@ -1169,8 +1169,6 @@ static int lvts_remove(struct platform_device *pdev) lvts_ctrl_set_enable(&lvts_td->lvts_ctrl[i], false); lvts_debugfs_exit(lvts_td); - - return 0; } static const struct lvts_ctrl_data mt8195_lvts_mcu_data_ctrl[] = { @@ -1271,7 +1269,7 @@ MODULE_DEVICE_TABLE(of, lvts_of_match); static struct platform_driver lvts_driver = { .probe = lvts_probe, - .remove = lvts_remove, + .remove_new = lvts_remove, .driver = { .name = "mtk-lvts-thermal", .of_match_table = lvts_of_match, From patchwork Wed Jul 12 08:12:39 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: 702144 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 57E82EB64DD for ; Wed, 12 Jul 2023 08:14:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232310AbjGLIOd (ORCPT ); Wed, 12 Jul 2023 04:14:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232229AbjGLION (ORCPT ); Wed, 12 Jul 2023 04:14:13 -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 670C71993; Wed, 12 Jul 2023 01:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BVkaOOgScelebmBKJ24zU5QB1aUTT4K6Uz2Ssk+DDFy8f+GTQjaEf+1s/Ed7mZ2hVxyVa6uBbM3xOS2WNoBQC+aU+mdWFlOtLYB5dPxmdbBhboYEgQ1JRXNcjN7XGuNaM+wQ8Lphb89lhZGaQiFXiFrWCw5qrtsgh1+ubSKW+Ssaxj6EnPcU+A2TRj3ud1qMG363IvzeI/eF0/6zHnopzQ9viz+I7/NScXnXPbAQ0Az1DkhMiwWvfNKw+ZuMR+nJpWZHY9g+mHmjcsxFkkNC8sKt4JkBZ3uPkC7VDu2ZCbwa+c1dARgWndqInjQ/OV7Rsb9ui+o4iVLFQT8aQSE2+A== 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=4KfnkcOCRCsGJGl26MPgx9BL6OZU2oHmhp4i4s8PNKM=; b=TXbXnnq9G+AOOGJcjvXllktYIk1ThPHgGrm2Vb7uIDlq+h2m3YGr9F3hSOG8lmB3/zmsdSy516tgPjDutvHs+W9H+DV2SmdvIauTQLdjkOrMA2tzvnt20FQXcs1Ie8qqgFsLr02MklsYKSr4DYZEJDZT+w/zEiz5f5wNnRghGzehoTS6WrZfE7Q4BNTdcGG5Q0IN37VRfE/ZKiXK/M4dxzvi8CdYKkhSx+Yfpb8xPILFAgAQNCk8XUyp7tTe5uS4MjqwXAgloZUMcuXuXDg7rvB6v5T9DogRLxYpf96H0gZTrOdqXzHYI3tlC5wKMdpNndxAfjVyrT5nnM61FTfdiw== 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=4KfnkcOCRCsGJGl26MPgx9BL6OZU2oHmhp4i4s8PNKM=; b=Yie0RE81MhyJqYgY2Ln5yc9GQXTFLFQxD1Rdw/Fw5J5AahdM81DIuClx99Fs54tnvb9E4o8lJRVQYb+AfKUZhlH44OYEA4E7aRies7npOpj7ipe5SSMl0XG7wW1o/wt2WiAqZepehlVomasGd2IujrCeZJLmILYCdFLfcPs3rVt8D8+4Sfsb1M1/BCcms278i+y5yzq7Fqc6M5FtD8Q2nt0vqtJ66naQDEku1LK2lp1sKCitBzgjdgK7/O+AYpxq4do6/KZk9wGLOPNBzAvK2Qm5vIkAXXbyUQXNoLIyUrhBiWa6W6LAoAbQYETXJK2bg18sonNFhaseTG0Ya676jA== 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:05 +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:05 +0000 From: Yangtao Li To: "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-kernel@vger.kernel.org Subject: [PATCH 08/27] thermal/drivers/hisi: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:39 +0800 Message-Id: <20230712081258.29254-8-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: f9a32f76-4801-4091-82fc-08db82aff537 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xh55cCW8QLGVKZytFoZEHULq4H0LM5zk+nOo0cQDE6ODGujwi+UC8aJA3n2TkXqhZU10FtVPrVA+9ouWx9wamDT/LqxdHNMEyJoFqNfdYz0abWXn7vQ1BR3cVymqErOGiXS7PW2MdC9X3bu9V68Hr9KdhVwCURotKIG4dehPtQdnD5HRgSafnxx46CAu75EU7y04dAxwTNM/AfLkUJ54zccEt6BTqLMU4/zzZvzpyPV/qOeGab4bDplCjVdQZUG0rWS5CI2//z6fYNoPnRc0qjTBVcWsp+X9T8SXWgfG0/ZuY2Fdmgg8TacctBiWjvZnf+m/rfx9AfsFN4FqdGiktOYw6yo8QJu8TjHUM2Jq3QpqMwsTv33jSf45xqTaV099W2cXYDKhpBGNXxrMs4D7gtkm/hONnrOK4PPr19N8Hy8lOkJXAMr5vf5hHCaD62YyHeAxxJeqACwZDcRn9ToR/+TKk5GYi5saOHUEfS/qUdTREef3VkHyqYeg5Aql/M9BG/BTGE6Ur/yDRI1wo2zFtQueDhBapB5wynhDpNVuZ26zo4Q7QgOIv1MWADvFdgDW74SUmApIHFiUyMkw0tqe+JoN3g0W7S65ieSNp3euRrNWrM0M2DwDDcKLcfMb9tnz 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?JlcgfBTL+qpgP7OGtMuxbOHbYx3l?= =?utf-8?q?gk85Ram/v162DwF34ARNdUrzVfjrYpUXoSA3QftEyccRlpXsRW1ybBaVGRVrAWwND?= =?utf-8?q?FpTHE9y4G+qv3zK+udTCrz7WnXNTtUCMah59cjGtUlgCdvs4xUQqJZ1i63ryTl/hD?= =?utf-8?q?87HkrEZbzoXNP+AIdNVKFeOlTRr1beb88cCtdTXIRFgfAiLipkjzcM/llZXCmkOqG?= =?utf-8?q?aiZ6sQqiBQABoQjRRiweouPXV56NXeYw9VQfUf60hkamyXkN4iXGQJiQDJ1jSF4zT?= =?utf-8?q?5Ah/WAi8XLnHfjH4NTAEe6ZnGxcfi3uJwSVpH97AnnD/60ON95+r75JaPSMN803jG?= =?utf-8?q?SgrJodNKkqKfAyPLcyU68IrjuJs842RbUUFnMZJjIMsDoOKS/5/kgzsVCCHnGvheL?= =?utf-8?q?ATz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uB7ssSLFdco+RBSicq3eL0D64zifhVotxeSLW8uAh+0EDuLk2Ld1nAXCCcI?= =?utf-8?q?sG7DghI/fih91dd6uYIDDhvQNGgxbv+zj0ddGCaRZ6oEztlgSOelVqXKzGMlOrbcE?= =?utf-8?q?S8/p3sboMIEIQKXWmn7kHYx8xRI0bnvnYVIEXSandgEwaja+g+z25AC8XtsMwgi8U?= =?utf-8?q?hTSnQrkja1NvzjpxqT3/IIT+D8BKlVwW2PTEZf7RY4o3m19GNI392IIjTquDbhbOD?= =?utf-8?q?ajkEUwkEx5qh?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9a32f76-4801-4091-82fc-08db82aff537 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:04.9287 (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: Nw6wyzXBpR1CHmPkHVAPQYRjsSpBDDfNtLh0Zg67Kq0UzlTdtw70xZ5vhSHQJSA1ccr5zkJpPLzZUUAj/kT/qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- drivers/thermal/hisi_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index 3f09ef8be41a..855ccd6b8b13 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -597,7 +597,7 @@ static int hisi_thermal_probe(struct platform_device *pdev) return 0; } -static int hisi_thermal_remove(struct platform_device *pdev) +static void hisi_thermal_remove(struct platform_device *pdev) { struct hisi_thermal_data *data = platform_get_drvdata(pdev); int i; @@ -608,8 +608,6 @@ static int hisi_thermal_remove(struct platform_device *pdev) hisi_thermal_toggle_sensor(sensor, false); data->ops->disable_sensor(sensor); } - - return 0; } static int hisi_thermal_suspend(struct device *dev) @@ -644,7 +642,7 @@ static struct platform_driver hisi_thermal_driver = { .of_match_table = of_hisi_thermal_match, }, .probe = hisi_thermal_probe, - .remove = hisi_thermal_remove, + .remove_new = hisi_thermal_remove, }; module_platform_driver(hisi_thermal_driver); From patchwork Wed Jul 12 08:12:41 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: 702143 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 62D86EB64D9 for ; Wed, 12 Jul 2023 08:14:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232281AbjGLIO5 (ORCPT ); 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 ); 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 To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Heiko Stuebner Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , 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> 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?122895dbOfuoNAtGDkQdUJR4vG3H0SZtKX9p8Ug43jtidcrYk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BinGc0C8MeAfRU?= =?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: X-Mailing-List: linux-pm@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 --- drivers/thermal/rockchip_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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); From patchwork Wed Jul 12 08:12:43 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: 702141 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 B020EEB64D9 for ; Wed, 12 Jul 2023 08:16:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231592AbjGLIQV (ORCPT ); Wed, 12 Jul 2023 04:16:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230038AbjGLIPs (ORCPT ); Wed, 12 Jul 2023 04:15:48 -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 94AFA26AA; Wed, 12 Jul 2023 01:14:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LN0MV9cJPOPWDFuSV3pEazt/wU7WqYNM4qGzjxNuI4hS1JfGaqO7p36lrDSVKpnkvr5En6RRvxqexYHNnEcKlz5up3nuKVdjJHAy8R8em+Rof+ZkCUZiaFNrLEoX26W0du6nLenpWhlV7ESFkwli2ZCET3RbMB8R3++5UPo0CM7ooECiXV1pDtv5xUpLAREoKRs1R58xKqhZM6pQV5pHipC5Su3sep9uBhsSeSZayY531tS0SrNvR4clSbH6pfVm8FrQoHsfjMD7y9g9uGfwQURZXahXWstO7i26XM993ZeEgkFyfuD3gYvNuHdLglPpTHTtO3P0QtZ0XXqWG5QMzQ== 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=BuytSjqM/X4Fmb98T2znUym9CSN4FbNy4RZeehwR64Q=; b=bKwu43lbB+Zigj/jwNj68roqYFk+tZU6N/mBmVgU4D/svcE+DjzQIGE5RXfd2/lBsiQPvaDC6AUJIX+Kl189EQcweptjWuKsVJHPB7vWOmHUDdeMhCzLHyRC8PkCX/4SbBXt5dwU7HtBy5stNv6rBQHoqsNs4Pi7ejnKezP0NyA4wIr66Mq+byQAwJwr4ekC2QZhixMk/1QoN0psNkXPiVZSsP6ZgnHfIz+EK4vbUlDUMeJ/2QLx84jV10x6w+elsnmTcfXv+qFrqRyr47zfrEAK1+tBNIMU7EgaUg8j2nIuA4lW+oUDgunLV3TnlgOI+oVbaVGPV915J7XMf75R4A== 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=BuytSjqM/X4Fmb98T2znUym9CSN4FbNy4RZeehwR64Q=; b=pZjtjQ9hojKTgQi0fDTPmyqN/dixn2j4U3fYFHxB+hhaPlSvlS6YPfdf0UYo8qVlxNUo1Tule+Ctq1Gcx4sXsU0p4NUPU7PpmXW4R59COCGNRk8zUVAitkRYULyv3yUkQjcTqOF5fUmS5I6NqDOaGXlZRqrCYaqMFkAVwKBKBuM3VYBiI93i2IBAxb327+ShkzHCAILOAU4ujb9CwwerVZ/gYCBUfHDoMN+TnobZemkoR08gygEn4URsn3DpA8ILWxARRhargvibsZamJ5SnxCu+Tn44kXEgrOkENc5b06PcercN2SdP6uI/zCoKv8X+DjHTv/C9P67MNosRLs6m1g== 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:12 +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:12 +0000 From: Yangtao Li To: "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-kernel@vger.kernel.org Subject: [PATCH 12/27] thermal/drivers/dove: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:43 +0800 Message-Id: <20230712081258.29254-12-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: ba0f4680-6218-4125-2aa7-08db82aff987 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cKqSeJlSta4qzSXrkeu3uj4EShY9rFoDdS1kKmEcdmtEP6ZNG6+J2PiDtBQXtAVEKRK9kBih9SRjkYZGy1hl50H1KhJBFPR9NZJFevaKy0FdJKVtQzTmOuSz33kSEWc+gtjKLPpi72o4upJWu+9ddx4aIa0nhMJadkEbm+P1Uqu7Xvlk4U+H/SqLieT5DaIM2SZJCydrEmoRw3Hh9nIwVJA2zcGj2LHB0N2uPTWFQacg2b1Hqy+RWwGvV06Hf1CZyOAzD+THHVIWtYL2J7JFHOZw0XUpPwPqU8HFmkiqeiNsZq4DysZo7yeuOYmbmoEGK5DO7uSQjG6zVCNZkbZcIxkJx0M6cwHOhi6mC7CqVTGUzmjO+KvU4iYzT/QL/SYax9sO3yrqyTAn3W0IaUuqBAngwq9N0Y5sWAaUipWeU1Yc4j0RoUMR7ASKu1swSLoLN+NllGLBFocF5je7i2BvfF9NkwmMOYjPfs/nLzaH8gm1QdHeIT3iZs4OfYqsy4TXkhJXV4QJg9IvYYpt1ajp1KLunN0pdIrZFm/qaJNyuyqHxjLY3IwOdAcPbHE/xzmDfEkVqV/Ul90iIzSZKNIL02AyxObeJkNNMsHSrI/cNTmUhZlcLzYPXRYOmRpNrnn7 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?VhPdOp78EHQJXIwAD6g/TL4ikqML?= =?utf-8?q?Qkv1GGcp4JCC6Jk7V7Z0+0EOPduSFpNtjd4Im9/e0iokSGCbFrv6pI2KnAq76jdDH?= =?utf-8?q?wVfcnFgxy8DmwlLTLFzZoJEzAuLapW6VK9tm98VNO+rLxgJtq42jI+2ZWThRoB2H/?= =?utf-8?q?fKvatNshTkHGqM1Oo+sP5sWAAo7Wv8x3RLz1h3OG6MXV6kneP7NTEFE+/dnGqK2Jw?= =?utf-8?q?L5OQDSMsl0pHvcNTsLBC6vcGvbbAVdbg3MpY+gAcQCITMwMLKqQj4DCslYSR6zqAh?= =?utf-8?q?R+QPPZIasH1CyEeQyrjfdJ7vUBGgzowKdhRtcXTT8wYn/YZVx60sEtLyIvK9ps0b2?= =?utf-8?q?iRQdIaJNT2AQ6aeJ7CRuDroerx/xISNWdGA3+Pm94ZuNlgLCJARpLgeIZLtStrOsl?= =?utf-8?q?4ZHHIFalodmd9OQ4hBQIiGhljn6Rg/UD5kbISh5YNLREmBKlVf9UdVFm5IlhjousD?= =?utf-8?q?ZEtTd8H3gOHiODLQYbLXpePSepIY3ymdYGg77g00SXosrweu4gcpsIfZl381Z71ws?= =?utf-8?q?alpcEZpkNNx/qW88aGh6i7M3q/i3sEPSFqapKMxmqL+u01kg5PY+ebaVgC+3ZyUd1?= =?utf-8?q?734lXRowr6oJqajU4zFP+frIDUVJazIPfBuZwfryuml0HbTBqgzw65etEWvr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cgapaSGbbt2YPLv+Ns+rF?= =?utf-8?q?XdnLjWNcAITQ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba0f4680-6218-4125-2aa7-08db82aff987 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:12.2183 (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: Ys7GGyxgV8PoM7/GxCVW1qnsePiUn8UKe5egGoP33tOVAkDZ9ZTUzGd8rqv6LJA5FKD2ycbrBUfwbCclFfAS9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- drivers/thermal/dove_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/dove_thermal.c b/drivers/thermal/dove_thermal.c index 9954040d1d2c..526c96fd4cc5 100644 --- a/drivers/thermal/dove_thermal.c +++ b/drivers/thermal/dove_thermal.c @@ -158,21 +158,19 @@ static int dove_thermal_probe(struct platform_device *pdev) return 0; } -static int dove_thermal_exit(struct platform_device *pdev) +static void dove_thermal_exit(struct platform_device *pdev) { struct thermal_zone_device *dove_thermal = platform_get_drvdata(pdev); thermal_zone_device_unregister(dove_thermal); - - return 0; } MODULE_DEVICE_TABLE(of, dove_thermal_id_table); static struct platform_driver dove_thermal_driver = { .probe = dove_thermal_probe, - .remove = dove_thermal_exit, + .remove_new = dove_thermal_exit, .driver = { .name = "dove_thermal", .of_match_table = dove_thermal_id_table, From patchwork Wed Jul 12 08:12:44 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: 702136 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 0BCA2EB64DD for ; Wed, 12 Jul 2023 08:19:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232350AbjGLIS6 (ORCPT ); Wed, 12 Jul 2023 04:18:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232487AbjGLISA (ORCPT ); Wed, 12 Jul 2023 04:18:00 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2124.outbound.protection.outlook.com [40.107.117.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1B882686; Wed, 12 Jul 2023 01:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DccWMCXJmfc84IJ6au4zZbfbXuCGSrc5jNKE4AXNPicf7S1yTdmn/YFLEgpaYUEcXrH9woCJhtDWFdR2JKeFwaKlz6fB/L6sQSurJKJYb7vuLjNi8Xg6spGA1AaG8q0952WtSrd6sApK8D1yfdqQEyd60dkMYytjNPkKgp2hXw25lyHhBJT0xqYIggQdJmu2/jr763I8bGdc7V6VTLo18LuyKTgbRp5lXgzOD5k9uz7CbJ11ehcFAf+Yd2vfIj/UdJ6p3j7p8l8/Xfrk1Iyr+fiZZdrW19Sfm9qrm7hmvu/516mBlegKFNas3FdQyTe57qZPRPx5EC8gI1XRqudNMQ== 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=lYFoLrIYPPMmZGcgCqfwl0/W4Ed+UKsrtwUWwkise+M=; b=julGXPhaCI/pcRVj1un+vf/3EWqFpOGExNo+YKZPcRJplsgAjVpA70XITAUbxNj9oBSlmkyxRtFVuuVLqASncBwXEvdUqAF1i2GrE5Kc2cvJ0TJSGez1BKSoSOH/DkF6g6Jcg96AJ3ahd7JoTGkbRproNei/vcIV8oMZVY5Uir0eGL0jlTkAD915RfcvnTo+t8GaN2WFnBiLKTfuJAUwACnVgFNpqhDRgCyJGUBZtA85CxF0mgbVe55WWmk5OdikR+y6rlHtgtyVDz4T7lmlAPCUvbitp1Pd1mq7rCfFqoVCpcdlisR7Een7PrxBT3ZZQCl7PdTgf24y5eh5ohkSQw== 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=lYFoLrIYPPMmZGcgCqfwl0/W4Ed+UKsrtwUWwkise+M=; b=XAjcqdHUK70IHI/k7gdInFwQCZWqB3ptQBKjfT3y2LkBh+zsBPK17Kfe2gmaBiHiUCFJOAtkpBfA8obFRC4q9CVQM4ZcE2P0nPDl8diddYuufbkJ+S570Ezhbc22+o0I1HyO9t3odZi1CzuEmg09T+4lyh9B035hJ+5+IMWyNJqukieJYUy8Py4KjUDJCYit9ze0XnnhMVjEbopgTpRxRNurOMzJ9OA7bowjnDCrkC0bL/9Vm78qDCdC1K66S+p55sgBX17CXw2l8SnR4GbVkdzyOCEY1CmSqYiYQw2emmcI/ybDyCmWNSkVDw1RmbKR7YZ4Q10/ba6J2jNGJayasA== 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:14 +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:14 +0000 From: Yangtao Li To: "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-kernel@vger.kernel.org Subject: [PATCH 13/27] thermal/drivers/k3_j72xx_bandgap: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:44 +0800 Message-Id: <20230712081258.29254-13-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: 3fcf2f94-e2bf-4974-3407-08db82affac4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aCD9pwk0nArSQfhrAgVDt37mcjrDdHz4SZ/uHw+17A1PkmMwP30+L8RTH5AnDt94vbBAdsb4tV5wZFhnO2SOkvwwHITEEM+xPsep+1CVUP/VFcTyLGvhHKtlGamUI9bPCiISw8rVbvrHotEqTfQM2vsje3ntZvdx5aT9p/XMwh/ZgXkY8TGAuUXJAK+tKVwlZ/ay2RC/ap5DQ2TOErt0Spk8q4qmp5hLzcAIwSo3aZfgrDIbojf5OyRFJ56EN4b+2QTZvofen0n5mxzUF0VYeIeUuZxPj7ElGDq6INCw00AT1YqbScKm+QOUjacSyCM3gRCXdQbT7n9dy3IPL3td0dYxMIpDV/48iK3BJ6nwcfIYFxQpW4hJXl8XqytsggLMa8zBYgaPn96J3C816uJ4dqV/PEoaq1n+S/XSlBa+x383bEOmM+Pur6rwdfcVkxqWlepZabfYD4e8uhIERY0hapLiYyQcK5HDepdb3Q9oos5ZXFgiaikSTuQQVje9Vpq4soidf55s8526FpHg4+goasnZpADQkq1rlmLBDV7D8Yl4PJsQExuDDS08XSUl3G+v9GSonkM2QA2vkxKRa34QmQIK4APUFglT7I0YFQf+U+lqPf3ChjZdrXAMXDeQdZJZ 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-AntiS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WsOe?= =?utf-8?q?epjlnS6hGgH2lvhHkF/Dv7Avc4oiVHkon7D2uwvcOKFvFPuIcY+Y5N9kE/Qdv2iy2?= =?utf-8?q?IHFoH0KO7WHyFwyFxjtvnEEDKKMZlcOo+wFVoV28h52wKcHaLPoMJSmTSPoxqelfS?= =?utf-8?q?i5lE4wLHyq+26H/7UCbv2eRc7xzH51zlnk/KM01AU0YKSKr12UE3OKR8bz73/3JS/?= =?utf-8?q?nZNvN+n49PM/sFp98Ey2jTzs5UlX4edMLbm6OXEHYLWXJ4/FgoG3qkiia3GxfFwTq?= =?utf-8?q?xS83q5MjAKHeeu44A3MYh7h2+klqXOkDxzbVnk9NMedSWAVZ1GkOtiwWTzdbORHFz?= =?utf-8?q?77nIZAKgRz7mCukxFocfsYcWIs4RfjlkqqLKPdBE0jqRMmfipT2Xhn7ZLGTaUf6AR?= =?utf-8?q?GWzPUhrRe4z+wkoYVQqd7VTc2lqhyNYsI8FMk6wkBVcKvAzbUsFWLe6z3JUCsXIPc?= =?utf-8?q?TGs2LUGoyEcRw26HCUksHshc6Zv5SWuCNgknavpNuPBfaDD27Qz68UR/sVRgdpB5x?= =?utf-8?q?kU6l7BG0hQ1N1OtvYC2PelmjXsRTtdCVOfC1RqJpp0SBQzoUfrQJp6nbT9dXfrpKB?= =?utf-8?q?rSSBn4BO7QC9my/4Js79ckm0tBoLc/uLFNc7amQxA4xaL0Whxr89VILHKcB2XD2Xa?= =?utf-8?q?77xfDHGuQBh8LJpBi8iMbUKtc7QqKeJyyqjSNKKmxSEQBX0bwF2XV1qRrmr1PsXSL?= =?utf-8?q?SpKCMrnEazCp?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fcf2f94-e2bf-4974-3407-08db82affac4 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:14.2232 (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: CxJweYBw8dTXYvkZRrNZqnxSg37il/9/xa+fU412smeSSd5t4oG88YTOj5qTOL1ntZ8PjJncNd/gHkxdWlMLfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- drivers/thermal/k3_j72xx_bandgap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c index 5be1f09eeb2c..62e24d08f408 100644 --- a/drivers/thermal/k3_j72xx_bandgap.c +++ b/drivers/thermal/k3_j72xx_bandgap.c @@ -523,12 +523,10 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev) return ret; } -static int k3_j72xx_bandgap_remove(struct platform_device *pdev) +static void k3_j72xx_bandgap_remove(struct platform_device *pdev) { pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } static const struct k3_j72xx_bandgap_data k3_j72xx_bandgap_j721e_data = { @@ -554,7 +552,7 @@ MODULE_DEVICE_TABLE(of, of_k3_j72xx_bandgap_match); static struct platform_driver k3_j72xx_bandgap_sensor_driver = { .probe = k3_j72xx_bandgap_probe, - .remove = k3_j72xx_bandgap_remove, + .remove_new = k3_j72xx_bandgap_remove, .driver = { .name = "k3-j72xx-soc-thermal", .of_match_table = of_k3_j72xx_bandgap_match, From patchwork Wed Jul 12 08:12:45 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: 702142 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 67BFEEB64DD for ; Wed, 12 Jul 2023 08:15:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232324AbjGLIPg (ORCPT ); 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 ); 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 To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , 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> 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?PJWXEaSSGvuku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KFoul5zA/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: X-Mailing-List: linux-pm@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 --- drivers/thermal/tegra/tegra-bpmp-thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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, From patchwork Wed Jul 12 08:12:49 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: 702139 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 370D0EB64D9 for ; Wed, 12 Jul 2023 08:17:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232330AbjGLIR3 (ORCPT ); Wed, 12 Jul 2023 04:17:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231179AbjGLIQk (ORCPT ); Wed, 12 Jul 2023 04:16:40 -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 49C801FC3; Wed, 12 Jul 2023 01:15:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GYhzeHDpQbEq190LouZNXvuHMvlW1J2Yur4UwpQP1+fr8x2By4ya1kwIlkmhyqrWNF2Ia/sMHawgzQ8ryJCREk+R47ZSmHON2nLdC44wq4b19h9PqEn5WFp0pN+NcfBXOZPoPjA85QsbXUroQ0mvNhUfOMDYCYwo+0nVoUM7jel0rj01K2cAP8j70GFIF2bM4lRJlXyDSy6rbKycYvZgW877MBdgNZ3sOeEZe1w8AN0MnBh5w18MQwDhqFv4ldGh5t3MFjOHlxeTY5sntrIZ3ZY1gGQmD4d21cK7s3dZ6Pe/6VQRvrBFahiQu3Fo1PAEL1mrmAHI59zYWI1967FefA== 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=xFgJBXXEtiM5Mp8+y5LGgXWr+IbVRZHIo9JtSR+Nias=; b=eNxCydeL8thsHi14Oe83QC9nQN+7vK42om7Z38aRmNmvWFw/gOAb1+t5no40U8MDdmMxM8rntvQhCmRQHbwCDjTt5qzjbcSSpN05Cpte0kwNmhW/0k0rkI4YxwRrbU/enNSmpUNl338AKM7aaQy3uIB8humiucPoXPNzwbj3etlGQVAFHjRxzfKdIppb66zxui51LXFlB9DIg+62rTaXXpHo3NwEIA2i99FzCrIt7bkOu3fYsXs2Y/hQwWRfA3aaLGVIaCLUdm0PDyu/2b44JvsD/UsmfukfbWyei/DXmLl4fNp1rAKe1sv+DkWDXa6mX/2GCwta4is9naLEo+Q4IQ== 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=xFgJBXXEtiM5Mp8+y5LGgXWr+IbVRZHIo9JtSR+Nias=; b=LnSLxCOjj8hK5dw2J2sG5jTZ9PQGQefCMdgtgViAFn1GQZ5UM8tZZiaVw6lS43+nigeAOEpgf6kbawR9QfyTu/s6Mw2AUxEObvz7KjLgFu1tMm5mh2PiQyAv9BW2Ibdx+LYVmI21PG7rIh4OCCvaEfiT9jZV8i//EGMnzxnEewSglN61WDp8NTMyWoc03hJdt66bSN5+ThFXQ4FUoIZzKP8ZzM5wZSEiqREQnRiCkvxAtWA2u8CcgHDeJxl6/IzzU46NT0hJ0ZsvL559EXR+vpXLT+HtubxM7hbgR0enwAgSsfu38pSGyKJzdUe4JaRsw+cxR3gRdRoD7VnBW7UzoQ== 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:23 +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:23 +0000 From: Yangtao Li To: "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-kernel@vger.kernel.org Subject: [PATCH 18/27] thermal/drivers/rzg2l: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:49 +0800 Message-Id: <20230712081258.29254-18-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: 92ad5278-6fd8-447b-35e0-08db82b0005f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JSO9DzMTqEI4GNwbdWHyUxwf4JZGV7nW731QrczKEKteejxr5yJa3ap3k8DOi7kqAytBbCm6RaHLxPJ3gFsoKUEQN+ThlHpvSY3FW7e+214k1d9AQsSS1bxA9l94aeHX/fOpOGdtAbJBGa3h22TOS/wC1dLpIlN815TIxytU9hg3nMBAWcC9WMFIEwitkHyhOVyoqu7j/dqp5duKhv1e33GP4MzCLVgtoN7bkSitS7YpVA3H5v9DSz7KSXProq6wT8LmIB+L4vGFlfNvAiVm1z+gIv/sTb6NKeYvG786uYcdyt6Rf6kEN/Av/OI62TiQn1Anam0xhpI7laQXUi4XDhl3j5uddsc4LC2UB+8x+yiNdBbgrAW81gZ8yd4yYacwFxqarFL0pd2XleRsFBgu3Pq2gcmVIUW/x1s70dLk2XFdI9H3Vv/xAeHMtMm0ExjpqN4rVkDKnRxSg6TAREgsvpY6LLwbDVkSFraOeFZiy8A9u4IRViAH9JGMesM6Xc2yG/ezyiPxQsC4sfAi2aEYmPbeDKeO37K4eoECg5XcNfZBdA5TIqL7rF8vlhEMh03r3tO69UdiP978oLxTgx/2ZKXVdFfyLh1e6Yi71uORsTK/9wFk86YrG+eyT2UqdP1c 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?EAY3R+qddLqf5VMmFGl+R41mkt5e?= =?utf-8?q?oNHp4TohEkFNLz3nWjITtU9AtALeOonMKPFYuJ3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/Lue5EVdq4i/ZJlfAJ1HHMrMdOHh44yq4uLzXq?= =?utf-8?q?FiYklxIMj4IGvnquQv4YcI+ALPlNkYDVe9Dj3cza+Xp4AzgGyXt9DLOs4u9/d0EdO?= =?utf-8?q?3E0wUrGN11GepMLZqoLMlN3eHTEYJTZ7WwrmwvPyxUUDsVhkEYuRG+oFVQpuPqDt6?= =?utf-8?q?pJ3ZhQGHr+s5M4X/ya7XfDoOevvqCq7EzoA563OEy0wvtXU/0Pp73qi5FC7/A98vy?= =?utf-8?q?r990vOrfdEGEJfKSZnv0lAte7wDHH1OHdfUd+D9NZRMY8HB9J6/27wojYJsxJtGmI?= =?utf-8?q?M1DJzN1qVsyB8VOLzG2+wppEeYUOtg/gNg+uHwECobd2waJp3OjGVNb9CEqVLH7Ad?= =?utf-8?q?6HJC/Zu6mdjTRGqOVULEc3LGr4dnPAqWp/zM0TfRF7sJZ7oL6HGa3qX2UGEjdqPUs?= =?utf-8?q?sPYn6UvnW/CksX22q1k8vaSB8tPRq7pPVLnVSr2BRxModEbghisicerNnEm8SK6Au?= =?utf-8?q?CwzqtUC5PZuTOkI77L+ldppfJFSI5PiIGVfJCjOEw+ZpfGuXBPIPfWH8+ZlgkjmXp?= =?utf-8?q?4YjKpncPMtmu3EGrkH1p3X0UG+B1+5X6oLzkn5+3WAg4UMMG86Td04h5mtZdi+2ZJ?= =?utf-8?q?pk/mLhk6Rkk2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92ad5278-6fd8-447b-35e0-08db82b0005f 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:23.6654 (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: 5jFGA806Yco2Kmd8217AMOmg+rIKcNGdI8TjwWUp1srW8tHJdpdK/r8y67+6JC755dKJsiRtaoCjt3vjnsR9eQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- drivers/thermal/rzg2l_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/rzg2l_thermal.c b/drivers/thermal/rzg2l_thermal.c index b56981f85306..a723eaff78e5 100644 --- a/drivers/thermal/rzg2l_thermal.c +++ b/drivers/thermal/rzg2l_thermal.c @@ -150,14 +150,12 @@ static void rzg2l_thermal_reset_assert_pm_disable_put(struct platform_device *pd reset_control_assert(priv->rstc); } -static int rzg2l_thermal_remove(struct platform_device *pdev) +static void rzg2l_thermal_remove(struct platform_device *pdev) { struct rzg2l_thermal_priv *priv = dev_get_drvdata(&pdev->dev); thermal_remove_hwmon_sysfs(priv->zone); rzg2l_thermal_reset_assert_pm_disable_put(pdev); - - return 0; } static int rzg2l_thermal_probe(struct platform_device *pdev) @@ -242,7 +240,7 @@ static struct platform_driver rzg2l_thermal_driver = { .of_match_table = rzg2l_thermal_dt_ids, }, .probe = rzg2l_thermal_probe, - .remove = rzg2l_thermal_remove, + .remove_new = rzg2l_thermal_remove, }; module_platform_driver(rzg2l_thermal_driver); From patchwork Wed Jul 12 08:12:50 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: 702138 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 C3264EB64D9 for ; Wed, 12 Jul 2023 08:17:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231796AbjGLIRo (ORCPT ); Wed, 12 Jul 2023 04:17:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231361AbjGLIRJ (ORCPT ); Wed, 12 Jul 2023 04:17:09 -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 428701FD3; Wed, 12 Jul 2023 01:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h/shaG558dvme994EaCEeG0kf9LRYgccjtgWR/e+17FtKiH1sH5/w9WuGgcqF0X+LBT3KmNOVDR96DzyXWyvdvmHkBCe5RA93yLqXTiyrtnkSOV/7FB/+yTnTRrbog0MaHPYDhWhov4scrgQLH/DIqJAK09ZFVeIwA5XcA8SrKDlOUK/4ySPnxZbKIAIeN6gJJAbK69DfoBP09j+vnSsfVzS3zM2OqtgSdslfai8BZukv/m84BfGwrkM80OQz7ah/UzCJYjUXY6VcujH9/qPtDAnirE5hwMMXVwbNVYUtBU360MMLd4Ep9z4BiD4+mAlGeQkmnktjKVo9FZGAYl+bg== 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=t4anR4hB8BWzDaOgZAWI1NpEZLsSC9kJ1QyDsNU8d7s=; b=IjhD7Bg/Qiy/lk016qrph/Vcy0MinUx/iZo2d/QtpCpaox4jLuxMdg8/AdwCqeFLIVI+mRnOda4QBzBf+/R58ca3hEOMg/KXbeRPn6iQeDUqSaOZXXWORWsgKaiywLcQBG29WACo+c+XzmAaXlYu1djMzYEPzOhDT2YcQAu6/JDfO3SrgSr2JKB2vd79dERvVnG24jr1Kwi2BE0cekAQj3oQqjwzoKzIZSXYy4yVSFl2HQGylMnYLS7ElypRdbmFTTR+fwTilmyOAE6NY2RZYxFhC5V6a+B797GWZkx1snw5KfeYEUPtIUBfysfZe2S88h3gQUaCaOLAPyBOFdt9SQ== 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=t4anR4hB8BWzDaOgZAWI1NpEZLsSC9kJ1QyDsNU8d7s=; b=A0YTbUy/dLPH4j0F9UcYAt4LSNWfbfyPF12zRiKSAnYRiGPT+Rg+griFiI/QQHFIRXB3IA1poOy4pgH5p266B6lGin1oKLpR2hMxT/KzSwaS1KrgUvPP5z3maK/U3RYIwowvqLRNVrn/F3OGVh/iNdK0cd2EGjRK8DeDEQJaNCGGTDIUtipP66MdEzrPM2gNNXgiA7rRUORGRluJdBYR4gKMC2qvCu8nFN4o0e9+nnh2IDqX2Yhxj+CGu/ZSoA24tsc7TMAL0zZJKeJZRRMy1vkhE4UJ48xsR65h6xr10LdT2yBtkY/P8tT+dnSNutErl6aAh+6jMdNGgp1kYoQX0g== 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:25 +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:25 +0000 From: Yangtao Li To: "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-kernel@vger.kernel.org Subject: [PATCH 19/27] drivers/thermal/k3: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:50 +0800 Message-Id: <20230712081258.29254-19-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: 4774065d-af07-4d41-451e-08db82b0015e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tfJKjhxM6rXUZbuejCr5mo0BBYgGI98SGWZnWZL9z/F59Z79HfigjF0tyPwhljwGLpQ2IioPYm275pBiIPEqyLXP/YKWlEAD/Ut6miZpnmAdvGYQV0j/Jhgd652tN/SijZXZCe6SkAlgkueJdUcsQXTdmELiEpcov8o9RsvGb6VUCB7HUqYOPK+Wn45UHtS5F2wj5KftLDXdSQ+7MPnfTbslBllGsqUP94yDaTbccKWTCB1QZmj0PMB7IjxGmaN8AImdkZYsJDt8UucU4Q4pSio7DXPpwmls7wmZIapn6YRZu97bCHJm95MXJ3u8h9SSnRVMXNsmp6yfiGpV3uO363LkI30TAT4LAiwJDDaFxuwVmdoz0HpwVnwT85dA4ZguFw1aJ12X7QDOFrOQBoDsKQOZucWkkdPeaPhSVW/21uPfJP5Sqqwy+ed8Mv8cvAcrYOCSmTK27n0P0RL77ASP4EdrsjdPhjFS3+ZDkvcZTqmWAetsQYRxuJsStZB1CScTd9+H8wJQ3nrIDyFP7O5EbfSC93m1MxPCpLMLh25W9EYW4fUB8HClZ4sJyBkVGPHgO8yrl4Zkfn2m9RSh6cMFnYrNNVMlUZ/mUsba1t1HaxmDu6qQzFirFlk7Ypd6Drpv 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?p1Ose5tkOwl1PRDbS286W+AmvdJt?= =?utf-8?q?j3lAEbW6DcxFzwJUBJ5HdXYl7ksrXJp3dhGSnSY4Zm+uSoHSQ3eOeK/tDZu1OUPku?= =?utf-8?q?Wc1U4f5RH5PcaET+B4dv90urL1nkv0VfxatFBpRIZTY0KRVqDRAkJKYMJfPgh7jb4?= =?utf-8?q?x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HNlDVYcQgxeoNejmMpGObbnzSE2VmXUYvwDUFFb39pAJm6/0?= =?utf-8?q?LLVHZ17Mtt/hUZB2VtOTNf/OrF/Q5yLZ1AeE8F3ntDzXtn5D200UkBVycuEpW1uED?= =?utf-8?q?/eqBLN2sbNvHzrQjlSgPdit5+Bdb9N7u/u7bHdeISPm9K0PTJ8aLn3Nxlm71ZVn4F?= =?utf-8?q?ZGJuyWqCENvKEkCt2Xm7YPDc4UFqutwGxRZHMM1S5ixx8igKaxuugaJv6hT65Gvay?= =?utf-8?q?UTt/gLFrhX5AikpG8I7l/lDwY4zhwxgdWLtNlKUXwvSWogTyNtLwMwdYe/NAp+BXF?= =?utf-8?q?aYzYO6AkRSa23FgC/XShrvDWzg0zv/GK7feAV0yvOIiHyrAtcEJlUhgnFp3nZmkA/?= =?utf-8?q?vtTzj20vIArK77gLPiA7bB9vfASHmrEnv5zzOxZ6LgCIb+VGNY6tzJQj5p3RnD7c2?= =?utf-8?q?r3kiSeszShjgE0NkvLj39DbfOGe6gGlgeYHx76ZfzyueQAEIFCrafyMcLiSJvEQTj?= =?utf-8?q?pvjLBwKW17M9?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4774065d-af07-4d41-451e-08db82b0015e 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:25.3351 (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: Ix7dVL1ZC9v7fm0wHtK4dQk7yZxN+0QVxzOtATuNQ3GtOI17efKADa5VzMn/fveGQcDTQ2xUnmJj04aa4KxYyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- drivers/thermal/k3_bandgap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/k3_bandgap.c b/drivers/thermal/k3_bandgap.c index 1c3e590157ec..ae03c5bdb5f1 100644 --- a/drivers/thermal/k3_bandgap.c +++ b/drivers/thermal/k3_bandgap.c @@ -236,12 +236,10 @@ static int k3_bandgap_probe(struct platform_device *pdev) return ret; } -static int k3_bandgap_remove(struct platform_device *pdev) +static void k3_bandgap_remove(struct platform_device *pdev) { pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } static const struct of_device_id of_k3_bandgap_match[] = { @@ -254,7 +252,7 @@ MODULE_DEVICE_TABLE(of, of_k3_bandgap_match); static struct platform_driver k3_bandgap_sensor_driver = { .probe = k3_bandgap_probe, - .remove = k3_bandgap_remove, + .remove_new = k3_bandgap_remove, .driver = { .name = "k3-soc-thermal", .of_match_table = of_k3_bandgap_match, From patchwork Wed Jul 12 08:12:53 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: 702135 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 28413EB64DD for ; Wed, 12 Jul 2023 08:19:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231688AbjGLITW (ORCPT ); Wed, 12 Jul 2023 04:19:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbjGLISb (ORCPT ); Wed, 12 Jul 2023 04:18:31 -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 D2C522D7E; Wed, 12 Jul 2023 01:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ScbyEyyZkmp53JTPqryXo2DgaI2X0Cqwv5No2+q1MZ2lDWSk2Kagu2ktFt/AcCskW3ipbHh37zthEiC3aP9aXkrwu44DdE4ZwwU5QfTxCtWITllY62R5fAGFBIxw+2RZJiU92Xgs6BOfLZkYVjsJZLZycTWaj7syBib72mwex6t7r0e3wUdOKg2ZlEQH4nkud+FP7P7XpK4Lxwc7TniTxRLdokRsO9Q/OdV6zYCC1cx6BZO7/7B0rOQNehIsdjTm2jSsX1w0KZDmtjos9sl3l2mVI1SC/6WJ7teJbUxjxZfNASDqSpznqUmjZMqAj8XKtCZyI3IcXrj4d7RueXvd0Q== 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=fhP46AB2RhUS6oqayVfe/eF0wD+5UJFy3MIxYFrPY9U=; b=FRdSIu1EjWAJZVERld1UXVVhPfBCyDG89Cq6Xds2I3n/zf7miK/tSfrfha2Qb+9Qz5UdYdR/gKoxfkDmzpBzacDFihTm7SXR1Pm/hQ/qmBm3Gx1CqQ4Di9T/yKCk9aW2Ib2aAmf9olVQJUBF5BxWP/USiaxOHoxm15XV3y5j0PcCMWFzr11y+guG/ZNCHwqtByQANI+irJdCL+U3Mo0WqBO4HPL2FXUaNZN4GmYFABABbcV7cLrAxtPBUCQ2/nhJ5DpuQNYy0iKuF/sdUJG84yye8u/R2l/1CUt27VmvCPzSFnVLzByuagPpiF2FlBLzP900xfgYTQk+rt3Xl43KgA== 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=fhP46AB2RhUS6oqayVfe/eF0wD+5UJFy3MIxYFrPY9U=; b=LRGitOodRjNR3NiZ+0usCFk7tB5x4aLA31VYtRdW/yTh5ICrdjBQJw4SpjyT8e0Hr2TBxYN4OGqMq9dBpiySlK8DpInCZUMuYEr4fPGOh+DLk0+fYhAnVdsTbGT8p5DM0m0Vbl+v9urmQd7z33Dg9/GuzIsbv+Hz7O0Mu2de2CCEjJdeHo9XVpNw7SFxGiTWxDRqs2FQnRA7svA4o6JMMiQU1cVlz8PD3FdZ+fMH08s98Pmy0CP/7WXXsN9+cFDAek2G59n8zku8bIr5teV6xgeAaNI6dMtnAE7q/kpCqkUHuJGozz0w1qpmWHeVuSvaKgqg2CzlRaBLc+5lmKqY+w== 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:31 +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:31 +0000 From: Yangtao Li To: Eduardo Valentin , Keerthy , "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-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 22/27] thermal/ti-soc-thermal: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:53 +0800 Message-Id: <20230712081258.29254-22-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: 937f8d88-d09c-401a-fc12-08db82b00531 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GMxUaieA4cUpoatiAQ+KBaUqiS3RKnwvbpkAHuLPqin/lI0g3hNDulvFWQMOENZXpgSy80dD9hI7Xsfa9HLsIQ8WG4uLOUC4Lb3jC0l0X2p3clBZ/ls3ZXvslIB2a0Z/Fs2c2qBcr9cXOBgFW+0TPIMySRYNUFbdxR5LFNjSe7/BuiX/BxksErU3amak1bfWj1VQ8rDr1McFTGDZiPVmURNVdLbb8EpZS9jDCBE3Lh8zjCjEsCFVKD/ajSuT4r7EDFeWnmT+R/GKjXpoPJyTLQXMxMYmNcV3l5mBKwGb4H5k6P7Hd4xWa0vHEplSJIe/6HY+hhwBwg+OAFmppiDSXyNq44E5t9cvegC9Nr0lsnmT6HYj2v/xlsbXI+J3q3FTi7tiQO+uIcXFpWi567AP/2wZRLiyfPeAHpKkKGtB5vH1regwTb/ZRuKEMDd7/WCVSYycaRXtNzFJs1UAt+w/nplQZp3uAl05bg7uRc/L4HRPgbdZgQon2L0/JTgd139/Sc9tLCeRPYqSrWfdj7mYJnPa0i38fDwvTtVrQqDzE0DdjZHXLbgrjVzIcD1laxf+R6dEx6z3rakA9HefCpgZ7fTgzYOO+yPjA0WODdVKIcsCoZcEeUVcKchFDXkOI+sp 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?eL8RNie9iicM+ZNI6WCiIAgBkpnW?= =?utf-8?q?S2Mn1yFtCVr/L9rmH1p/rViij4WegXmHaGr/rOIpIVD3qO4D63eE30pK7X9zT8wFi?= =?utf-8?q?WgIyX4RG19nAAlT9A3MmJiiI/ydTBFiFrHqe8QZsrzza4Zt7HRUEmzag8dhEfDD0a?= =?utf-8?q?Q7tNBTGmc1+LSld7HNeo/Z8bNrsus1qhB1je9mTU5iGECP0t1RMhKJQBRmIpVpN7K?= =?utf-8?q?iVpgr1A8LxIqz20zJ00YoDWe0Lzt7Y0dLy8Zrn6vF9fwlDDVdVsSf0N6ToYZbNlg5?= =?utf-8?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?utf-8?q?kS+vGXZ74UDIeBlnkilz3LuzjktdFYmBxaXsSlNo0cmro7zrRwnM/na7JwS40m/Qw?= =?utf-8?q?qge5JIort5iy1/L5k6VdQuUOIF9roZ6V60+9VFmzF1BdcGkC7CiEhr+Xq4evYb/03?= =?utf-8?q?mSgd8G0UGFsYubKZqQo/DM6HNuFrNMxJy3ClF89R5YoIkzyzwRE3D1OhqRty5X7ag?= =?utf-8?q?qMN3q/0lAE+5q0nhQw6vG1oTR0WvkNQF2jwqrKrsB1XoCITVxWAXc7uVO0p6xhs+n?= =?utf-8?q?Z+EHd88HOf9NgKs93jvs5dZ0llVZNDeoYm5jawhX11KHn+MP9ulOLek1HKctWjvHc?= =?utf-8?q?pJS+bKLq9egz0gpyvSZ9822yqJilOY/eNGTr1BnQ6yDATtPZ/ML3plkOETWkbQMuU?= =?utf-8?q?LNV1jSoRSFSb?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 937f8d88-d09c-401a-fc12-08db82b00531 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:31.7375 (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: CMeNwE2kCysWQOZhE3LCqRKZa5xD56D35ySjMaHtITFe+mylfRtY5/lOmURyh7ByD2lRTp7fC1E5BStszwggrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c index a1c9a1530183..6c23f2095631 100644 --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c @@ -1068,8 +1068,7 @@ int ti_bandgap_probe(struct platform_device *pdev) return ret; } -static -int ti_bandgap_remove(struct platform_device *pdev) +static void ti_bandgap_remove(struct platform_device *pdev) { struct ti_bandgap *bgp = platform_get_drvdata(pdev); int i; @@ -1098,8 +1097,6 @@ int ti_bandgap_remove(struct platform_device *pdev) if (TI_BANDGAP_HAS(bgp, TSHUT)) free_irq(gpiod_to_irq(bgp->tshut_gpiod), NULL); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1283,7 +1280,7 @@ MODULE_DEVICE_TABLE(of, of_ti_bandgap_match); static struct platform_driver ti_bandgap_sensor_driver = { .probe = ti_bandgap_probe, - .remove = ti_bandgap_remove, + .remove_new = ti_bandgap_remove, .driver = { .name = "ti-soc-thermal", .pm = DEV_PM_OPS, From patchwork Wed Jul 12 08:12:55 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: 702140 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 C9FCAEB64DA for ; Wed, 12 Jul 2023 08:16:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231888AbjGLIQm (ORCPT ); Wed, 12 Jul 2023 04:16:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232026AbjGLIQD (ORCPT ); Wed, 12 Jul 2023 04:16:03 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2136.outbound.protection.outlook.com [40.107.215.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 653152700; Wed, 12 Jul 2023 01:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PF/wi240e2Onsxv0itbELahJcGOScybXkkrZCBD6gsjSKGZnMDVi+2mQUnxNqbzuXQKpi+mdBpepO0Zji0LCtQaQpLDZ2vu/jDHJ+4Ec6sdUp+Sb4odcgcj6jsorvtZTsdjEcdJpKMWBnZ0pyl5icDxeW4fpXTnrPiQ1VYck3yaHIJVuOAN0ss2poKicXK2x9WnmN9G4ui7Ylg4mIgKC83oKklAJR4jsJOYNY+0UyP+zJuC9Wf+3ejmaH6PYynYspxkVb4vEbE8SILm7ofzxZ16Tl0A12IXqsdY+yVA5oy87njAa6LIMqLnZWp511SV1rOOkxcJxfhWeC7Xnbd99DQ== 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=YDpghUfsAcmM6fKD/5o033Ckp7CnOvDpysz9Vp/fg5U=; b=SqlHhS+jkBvq01UjuS3Rt1h9MGo7qNXnyfcfgeZxmr2xvPWxep6J0MMthJAP9WrgG6JDs7dCYYT0YYD/la7ieIirzpw73ywl28HFJlqK9cmq0ued0uUkrnBuVaod7jKpUGHyiTlYHhN8e2z/EiY04G+igwSN7qL4bUdPClm0S437sYqF/rtmhe2heRGwLoeisnSiB+whBkUAiNsjMer5dxkJGXNPa71BQjLJURsJjk3XWE1knR6nCBks0Xlo2NcWA7UjtrTQK4Toacoz9l3Pl1wNrqqTVJDQVNDHeuVCRGx1o8tgDaQGKBRx7LlvXIQImSWisha3gE2ibDLXIAUtfg== 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=YDpghUfsAcmM6fKD/5o033Ckp7CnOvDpysz9Vp/fg5U=; b=C+VyypNQb4MFTeiLgTQjeQ4pGhGfGdIv9t/tKOwDWgQFNgFMREHi3NrkKY8saq2YA5ns5K7R96HMwDkvE0H6dLYJkQGbvR0GqqHRDIu7mkzFzUZKMY8AYFueLa03AKrGd9dOHQoMF4xppnMaI36fXTDKRhlWZnP4Qsz1XSkbRuJYM44eJnu4iHDtaOYu8/bz4AaqNEDZGBZzBdNP8xn0xU2+BboeT2Mt2OLF2np3zEhGam7c2wPeWhuBOrHAxe80c7Kyb6pCYoNSE7tbXwsgbDIwQLOr5FZ8hFRi+NCeNR+wO/RqK1jibhomPOP2WimcM89DhsVxVJRwXjcOFWq/IA== 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 TYZPR06MB5027.apcprd06.prod.outlook.com (2603:1096:400:1c9::9) 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:36 +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:36 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 24/27] thermal/drivers/tegra-soctherm: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:55 +0800 Message-Id: <20230712081258.29254-24-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_|TYZPR06MB5027:EE_ X-MS-Office365-Filtering-Correlation-Id: fde2135e-d8bf-40da-be66-08db82b007bc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aWxmbxyiivnRW5LZAweY/+3euVqR2R5hHLyje5tjQKOLb0uLkab6r9FrqIzeN6MgSV5ta1PrJM5Wev1F+itr6saD1+Uh1VoCIKo+St4fH30aLeXaUcVj2l1m392/MKLRimoFBpnWmuuqw03si1eBDmCbA4fkAasKzd/CGIGLIY4vAbEMvnaqsfqz9AAubewzfGzsHWcerAPPTtn3I7desn1UawrS5rEWA5ufaqegT6GmA4zbsAi/nohfyW1JR+SufHNAhuo+p9LlX7rG2lAWhk3IWtE5pizbswRDSfz+Yq4rZGtKmRCt9/WsyGnYNLPVt2qzcSpn+8QRquBnFMoaFgznsa2STyqMQYSAmOA6ikNYYwzoCZcXc3xj0PucBs1ryBK4Wau7he29ldSJQYr1m9EBnGy6IIqDF5srs4C3kiV8/fCsDQnVj6NbxjAIoVFHxFN064OoDKN2QRQZNc7GwWkdN3bePkMlkHzHhw1A7kUP9tcWZzN41uuZoaliLzIGVc/5UneD/AJM1m/Rl8vk3UMETUUM5QeTvSYAnrLD0K7Wm3bZW1uC5FXauG+0eNjjl6by/1V1le8g/+UPt+aE+DLRo/rVsj8dVP8xXoXlH4OSZ4WH9SWlgTW0wknFSRJb 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)(39850400004)(366004)(376002)(136003)(346002)(451199021)(66556008)(66946007)(66476007)(4326008)(478600001)(36756003)(110136005)(54906003)(86362001)(26005)(186003)(1076003)(6506007)(6666004)(6512007)(6486002)(52116002)(83380400001)(66574015)(38350700002)(38100700002)(2616005)(41300700001)(7416002)(8676002)(8936002)(5660300002)(316002)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?XjH9UWj3JqM97NVNYV6nE2GfWdtE?= =?utf-8?q?8Z4yMimLvFpygw0XEYMCFashdZWjn0UYSYGgK4v3g0lZfxfMKSK6mHyGPkMAVBuzF?= =?utf-8?q?GjFgWWZ5Ax+WqcOF5cIWDKbakEzUdFQwoW9dwDRllBvdFCxSHN0HUrqBIl0BpCv2l?= =?utf-8?q?mpeYGr2w2zxJCKdtuFI5A4clotDI/Q/heBmr3b2Gv0gk6fQ9/BC+uFoaOQ/vyPcVZ?= =?utf-8?q?zDoTKDbrJ7YN4MHy80QaHXLhQiB86f87lLVTz7oR3hRDRwcyjtqf/6ao5ye5z9Qkb?= =?utf-8?q?k9XgzZkFICzANypE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XLbLQ2gi+1RZcb+RA54NKoDUyvj1Pv2NFubx4JNBjqu+C5n8US?= =?utf-8?q?nyclSmIAg7QEJTNhwYd830PkA6cjWx6zHuui38ApToic4WVtotNZStjcDi2xxx8/W?= =?utf-8?q?OKAFRPzyOkU3Jo/q99x3cpyiExaSKXhil5X8YfUNrEpe5s00E+7tI/B9MxAQHX+Ew?= =?utf-8?q?hzoEKzBuE3r2D8xSMoLgxT4TGGD93xBCk7Ai/FM28e+UtlEk7fpqlNbmVe7Ql7sgl?= =?utf-8?q?3U5WK/1VW4WfSCKKADzXXHJCdx0JepvpKsSmwyVWbXzvtNkfUt5taJcYp+U9hta0T?= =?utf-8?q?Br8XjQydA8RibXusRK8/DppRck7mg/USxPqtZu8gAAaSxYe/Feqpc+GTkQbNwrA5D?= =?utf-8?q?hU6AdipGME+r?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fde2135e-d8bf-40da-be66-08db82b007bc 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:36.0036 (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: SgIeAksltozG7gIqXwDpwqibJX1PlrQTx9uVveFf735+StSkp3jBCF4vCzHRMrfXattkI1cL7f4X/hFbxuThig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5027 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- drivers/thermal/tegra/soctherm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index ea66cba09e56..e7fe8683bfc5 100644 --- a/drivers/thermal/tegra/soctherm.c +++ b/drivers/thermal/tegra/soctherm.c @@ -2219,15 +2219,13 @@ static int tegra_soctherm_probe(struct platform_device *pdev) return err; } -static int tegra_soctherm_remove(struct platform_device *pdev) +static void tegra_soctherm_remove(struct platform_device *pdev) { struct tegra_soctherm *tegra = platform_get_drvdata(pdev); debugfs_remove_recursive(tegra->debugfs_dir); soctherm_clk_enable(pdev, false); - - return 0; } static int __maybe_unused soctherm_suspend(struct device *dev) @@ -2274,7 +2272,7 @@ static SIMPLE_DEV_PM_OPS(tegra_soctherm_pm, soctherm_suspend, soctherm_resume); static struct platform_driver tegra_soctherm_driver = { .probe = tegra_soctherm_probe, - .remove = tegra_soctherm_remove, + .remove_new = tegra_soctherm_remove, .driver = { .name = "tegra_soctherm", .pm = &tegra_soctherm_pm, From patchwork Wed Jul 12 08:12:58 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: 702137 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 58A01EB64D9 for ; Wed, 12 Jul 2023 08:18:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231876AbjGLISg (ORCPT ); Wed, 12 Jul 2023 04:18:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232179AbjGLIRt (ORCPT ); Wed, 12 Jul 2023 04:17:49 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2136.outbound.protection.outlook.com [40.107.215.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF95F199E; Wed, 12 Jul 2023 01:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mx4hHhtlc6bhCQ3wWg4n5DefZS/ftOFU2OOtwpuYP0/p4QuRM5vRLED7wbvJK18spCcLlFIPPyLm6RLK9PWA2pMOhgURtbyvUBA6hv5P89gbdYepmHoCk1Y4qkChhjAD427uyAzZir8y09DOJtxxesDXPTZGDeaNwXXxUrKq+4ne2Trp98wdgtCxz1J1JjLUBzuqedM5zUh1HDScj+EiKnygY0sc3GbZwDQf2ncL2tWrV0dcG0Kbz9U2N/JWprmKgCuotEZ7p5jRPEAvGHBwpKoiV/dy9Ksk8APgCXxecvtt833pt7Jxw6jnDuiEa7dRoqpp0Jr2+TuMptwGmpIgiQ== 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=VBLuBcb0aq39A6ve1LIP7jQ8bQkSgTkbFQP14gLD+wI=; b=F3KzNhxcOtBot1LuvQ4l/xNx3hG11pc+GQYh6u1R5U/afIl1bqAn22EFJYlNox7g4guSDmazxd+VXeI3eSIQ0DaJtydg4wdrA2/o0GF5c4+XuHnMXQwhC7ufenK4lzG6s6XRKzzGNqTgBloRjnoJ/JywHiR+nfN0KfgHBoYJBwFgH1FBjlzQZh2JlvYRQTLlymg0d9/Mlwhe2JAffScIWuA+b2XkgOpccsKDpyVzwlEMCtB9FZN8/qGd8FQ+/5L5WYclkQ4FP1qYAbi/sjXZk208SA1SJSIQeXbxnR0NX6LNp+DRmLgnOS+tdok38psZbQZYdr8lanDdijohUWR0Bw== 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=VBLuBcb0aq39A6ve1LIP7jQ8bQkSgTkbFQP14gLD+wI=; b=grsi3s4ag5toBee1dlLxCSdXtTk9Y0E/JFbTwlxBdg+9sfTi1vXqn+ZrVc4wQkHR0eOoi/qsFFbXvG2jB1hvbY2rubM58rineMAihBexCuvKPVWASbLqlXW+4LrNmFl5VUv72ZjkYdpL1E1NZnDan1RMXxoT/bkDAmNUxW/uRrOTN1ZVd4nUwt4Hp4kcQZjGf5BvKAll/SuXtI9O3Po+9lvDXA1RmUXid6xcrb4yvqvyAFu3/JBTqcAfFI3CGol8DMJGHhO8lsJxA8s5YGx3wXr3tmCyPqYu8gZRZPjXKU7gS8dwlRAvG9XuCzEnoefsbMcMKxmyQ8uJJKczIpq6Nw== 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 TYZPR06MB5027.apcprd06.prod.outlook.com (2603:1096:400:1c9::9) 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:42 +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:42 +0000 From: Yangtao Li To: "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-kernel@vger.kernel.org Subject: [PATCH 27/27] thermal: intel: int340x: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:58 +0800 Message-Id: <20230712081258.29254-27-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_|TYZPR06MB5027:EE_ X-MS-Office365-Filtering-Correlation-Id: f0c1ca3e-1730-4d64-ade1-08db82b00baa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CSflBvgUqDicdwOHHHTxmfMaHzRvUZoj9hEnlzae/pOqp3AaVu5scP537QJkOz7L8VmCPxXmjWdJW6dWKbsZycLVeViOuj+TP6s3LTmEpWJ3Ak3G/4f1mJFc/2cP3aRkLzRfcBMUBBIL0nnNyQAxQ+UBQ0PHaRW/qThIdXM0u3zTqmok/2CGX5E4Pot5Rp8x/iWwFW2PJZ43RuTHA5UVdrskQyCx6FGfUGzXi/TAXlXcEs2Wt/TsPlQReCQoQt9txcB5JHRpJamETtdQ4kuNKwkm3demiAKEcM42rP/3wPrh3sKQx5FDHc3axZsztLQQhsuqhRPjFw70yK8CgihaZSLANpGhubG/nc1XTg3I9RJr5bygkwNoKnx8N+BzdL4vtTHBs29dsqbRASdONylRl/keTDdHvi+wdrS6YIASnKvvyAOVFrCeMDiwHS27Ppa25fi02e4zF2odtgcj5Boi2vBlh5H8JlkCsNQyY6KnL5yZqCIQ1lLPWaCH577chv5rtMNtan8pKLmKc+M70GjTl11EzguDCXYxVN5/X5sb4Ktfq2FnDW9ZX3/AFVgEOFl80leEoLZTSNpuTKzEclNYru2a6KQXqO+TPjZ2ouNmDvGKq/d5YB6cgOTuW1f4gTDp 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)(39850400004)(366004)(376002)(136003)(346002)(451199021)(66556008)(66946007)(66476007)(4326008)(478600001)(36756003)(110136005)(54906003)(86362001)(26005)(186003)(1076003)(6506007)(6666004)(6512007)(6486002)(52116002)(83380400001)(66574015)(38350700002)(38100700002)(2616005)(41300700001)(8676002)(8936002)(5660300002)(316002)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?IaH/Tj6Jkn3c6Zop2wOXGbqRT0jH?= =?utf-8?q?ADcNtJNFzTIcE5Fu/TytrzkbVOoix+EyHwt4fO4SFqf6Yfn6OK3HqLYrPUZOQ2uKl?= =?utf-8?q?q3A5LRsHHBKLsHmhveqnpwvOR9kVK1P+jNgAXHpH6CinEtFdQvlUzfOXhDR/iLPCd?= =?utf-8?q?ZYKWIDJ8TLWBlGNZMRf+i+KENEuWvWkGvN/EwnENsZIZTZ2DnCTp23pBTHur6TNqa?= =?utf-8?q?LWCPJ48oid1T75WqsekOAaku+Jlr7FIEgkW3C9JG3WjcSFTKitoH+1H7SHaVvoZxZ?= =?utf-8?q?/BxTk0Gfri8t+5b7g8JuXxHbKAobmGmQm8ZXKdKTy9hNitgcH6phaQ1Yqmd+gPtK9?= =?utf-8?q?C0PuF5PgLYwLlilPgf55ftNIbs7t9JWuCfAnEI349XpuKyA95wtOt8KLpXjwiTRoC?= =?utf-8?q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nI/gOQB1fwBsK+Vl1G5DxcjnRZJjFMHTPIlLt7BkiwY1f6IMUEwLKJfbvO6iD?= =?utf-8?q?DU0ahqZ6L3JHSd5uEligDPHEehpbGw/eifD2de9tM5Y5MBbr6Ms23A/iAEXzJISyD?= =?utf-8?q?/sMAk9lmW/antZYcEJSqLnVVmMCPqMeOYdJAuvQAlwv4+k1vIT6Q7BCzfdTOQ4VzD?= =?utf-8?q?0wVeTuuNdUWkY90CbzFKflJJnP7cwMyx0xCREBfF9Mc1qsH0xtHXGbilZAfqTMvzU?= =?utf-8?q?8FHMh2uWdDMi?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0c1ca3e-1730-4d64-ade1-08db82b00baa 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:42.6117 (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: Pgqr7/UFhpkalBly3jeZ5JsRBqPvTv9H+Ur3Uc7k6If+q+4RQl9zW4t2fhwe5VlpeR32Oc7ouPfkd3RjnQgTXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5027 Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 Acked-by: Rafael J. Wysocki --- drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 5 ++--- drivers/thermal/intel/int340x_thermal/int3401_thermal.c | 6 ++---- drivers/thermal/intel/int340x_thermal/int3402_thermal.c | 6 ++---- drivers/thermal/intel/int340x_thermal/int3403_thermal.c | 6 ++---- drivers/thermal/intel/int340x_thermal/int3406_thermal.c | 5 ++--- 5 files changed, 10 insertions(+), 18 deletions(-) diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c index 5e1164226ada..8fbc97641740 100644 --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c @@ -674,7 +674,7 @@ static int int3400_thermal_probe(struct platform_device *pdev) return result; } -static int int3400_thermal_remove(struct platform_device *pdev) +static void int3400_thermal_remove(struct platform_device *pdev) { struct int3400_thermal_priv *priv = platform_get_drvdata(pdev); @@ -698,7 +698,6 @@ static int int3400_thermal_remove(struct platform_device *pdev) kfree(priv->trts); kfree(priv->arts); kfree(priv); - return 0; } static const struct acpi_device_id int3400_thermal_match[] = { @@ -714,7 +713,7 @@ MODULE_DEVICE_TABLE(acpi, int3400_thermal_match); static struct platform_driver int3400_thermal_driver = { .probe = int3400_thermal_probe, - .remove = int3400_thermal_remove, + .remove_new = int3400_thermal_remove, .driver = { .name = "int3400 thermal", .acpi_match_table = ACPI_PTR(int3400_thermal_match), diff --git a/drivers/thermal/intel/int340x_thermal/int3401_thermal.c b/drivers/thermal/intel/int340x_thermal/int3401_thermal.c index 217786fba185..714f4cb59cfd 100644 --- a/drivers/thermal/intel/int340x_thermal/int3401_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3401_thermal.c @@ -36,11 +36,9 @@ static int int3401_add(struct platform_device *pdev) return ret; } -static int int3401_remove(struct platform_device *pdev) +static void int3401_remove(struct platform_device *pdev) { proc_thermal_remove(platform_get_drvdata(pdev)); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -62,7 +60,7 @@ static SIMPLE_DEV_PM_OPS(int3401_proc_thermal_pm, int3401_thermal_suspend, static struct platform_driver int3401_driver = { .probe = int3401_add, - .remove = int3401_remove, + .remove_new = int3401_remove, .driver = { .name = "int3401 thermal", .acpi_match_table = int3401_device_ids, diff --git a/drivers/thermal/intel/int340x_thermal/int3402_thermal.c b/drivers/thermal/intel/int340x_thermal/int3402_thermal.c index 43fa351e2b9e..ab8bfb5a3946 100644 --- a/drivers/thermal/intel/int340x_thermal/int3402_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3402_thermal.c @@ -71,15 +71,13 @@ static int int3402_thermal_probe(struct platform_device *pdev) return 0; } -static int int3402_thermal_remove(struct platform_device *pdev) +static void int3402_thermal_remove(struct platform_device *pdev) { struct int3402_thermal_data *d = platform_get_drvdata(pdev); acpi_remove_notify_handler(d->handle, ACPI_DEVICE_NOTIFY, int3402_notify); int340x_thermal_zone_remove(d->int340x_zone); - - return 0; } static const struct acpi_device_id int3402_thermal_match[] = { @@ -91,7 +89,7 @@ MODULE_DEVICE_TABLE(acpi, int3402_thermal_match); static struct platform_driver int3402_thermal_driver = { .probe = int3402_thermal_probe, - .remove = int3402_thermal_remove, + .remove_new = int3402_thermal_remove, .driver = { .name = "int3402 thermal", .acpi_match_table = int3402_thermal_match, diff --git a/drivers/thermal/intel/int340x_thermal/int3403_thermal.c b/drivers/thermal/intel/int340x_thermal/int3403_thermal.c index e418d270bc76..9b33fd3a66da 100644 --- a/drivers/thermal/intel/int340x_thermal/int3403_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3403_thermal.c @@ -262,7 +262,7 @@ static int int3403_add(struct platform_device *pdev) return result; } -static int int3403_remove(struct platform_device *pdev) +static void int3403_remove(struct platform_device *pdev) { struct int3403_priv *priv = platform_get_drvdata(pdev); @@ -277,8 +277,6 @@ static int int3403_remove(struct platform_device *pdev) default: break; } - - return 0; } static const struct acpi_device_id int3403_device_ids[] = { @@ -293,7 +291,7 @@ MODULE_DEVICE_TABLE(acpi, int3403_device_ids); static struct platform_driver int3403_driver = { .probe = int3403_add, - .remove = int3403_remove, + .remove_new = int3403_remove, .driver = { .name = "int3403 thermal", .acpi_match_table = int3403_device_ids, diff --git a/drivers/thermal/intel/int340x_thermal/int3406_thermal.c b/drivers/thermal/intel/int340x_thermal/int3406_thermal.c index f5e42fc2acc0..1c266493c1aa 100644 --- a/drivers/thermal/intel/int340x_thermal/int3406_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3406_thermal.c @@ -178,13 +178,12 @@ static int int3406_thermal_probe(struct platform_device *pdev) return -ENODEV; } -static int int3406_thermal_remove(struct platform_device *pdev) +static void int3406_thermal_remove(struct platform_device *pdev) { struct int3406_thermal_data *d = platform_get_drvdata(pdev); thermal_cooling_device_unregister(d->cooling_dev); kfree(d->br); - return 0; } static const struct acpi_device_id int3406_thermal_match[] = { @@ -196,7 +195,7 @@ MODULE_DEVICE_TABLE(acpi, int3406_thermal_match); static struct platform_driver int3406_thermal_driver = { .probe = int3406_thermal_probe, - .remove = int3406_thermal_remove, + .remove_new = int3406_thermal_remove, .driver = { .name = "int3406 thermal", .acpi_match_table = int3406_thermal_match,