From patchwork Wed Jul 12 08:12:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118917 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp992615vqm; Wed, 12 Jul 2023 01:20:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlHoeD758T7uSlsiak3VXac+ifJhOyAniWBvRWaZd1dIq8edwEOdz7aPaUfxRlAwThFbe1kB X-Received: by 2002:a17:902:eacc:b0:1b9:c207:1802 with SMTP id p12-20020a170902eacc00b001b9c2071802mr10969511pld.0.1689150039600; Wed, 12 Jul 2023 01:20:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150039; cv=pass; d=google.com; s=arc-20160816; b=OJa6JLYP4WjphcE+6EEBqb2wJu6AiTnd06/DvhgaXIoweswKVdydiUGC/fe28k9g+u sVZnRBpH5DjLrjY6/k+J+anZCHBP9OTAT0HyIE6dzxk+RE1u/wdfBR3kdN6cbmd4F8Fb tkhp5gOx60sXFzqpA8YLnbXn6iLAjVP11FBQko/J1zBIv6YKWrMbZbbj4LBqjHnCSNPo tH1VkjqAJvMUPfxx3ZTi5hkQYdmuuhWhyx0jjkczr3FJrmeN3dibom+2R7rnVeCWnWb/ swYowY6roFBGFgmwOYhsTWhoGIU/gGLmAUrUPLNkLTkdMd7RU23I6Uc88l8ymywAahy1 kXPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=Vgvj9i8WuHJ3VFRZLwvhoKTz+hGp5LXPh+342T76Zic=; fh=1+UcP5FPtyorDabhFxl9fs6v/ow/zCvbObV1xO8lhos=; b=fWqB9liDLV5jhn83y/okAGBs9s1LoRvh2JcHXnDk8wUuH4u/jCqFj/03cWlxto9IRs BdV+lkoCz3iUHeACkz3jgBvdEHWfDxL4CKFIu4Xr2LL48Gfv9aOCHfGH4+EjpcT976Hg NdwZxQQvFhCwkNtq0ishC4wspH4RRfCq27ti0u+iEUVPb9Xo5x2vBQyaSguuaGJMT8Zs dAEacpQ0OmhsFq42jDY7S3rzKyQ/m4T+XDuMRmt3b9wh56XUsBKaLPJ4xDFqvPiC8ZFO LnoUF1HPUvGxnxucy8k9QwGYYmS5nLk4epJO3zIxywSya0WUxscmCxjnDeUVt4BIWupC sd5Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Vdu0LxHg; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kr7-20020a170903080700b001b5afcfa180si2885499plb.213.2023.07.12.01.20.26; Wed, 12 Jul 2023 01:20:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Vdu0LxHg; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230241AbjGLIN7 (ORCPT + 99 others); Wed, 12 Jul 2023 04:13:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232169AbjGLINw (ORCPT ); Wed, 12 Jul 2023 04:13:52 -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 8F78BCA; Wed, 12 Jul 2023 01:13:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fK0CQch+cV9vjOIaZQoMc70Msn2PkWmSVE9dtHNUrzxSQ2gjwDCgaMCkGlu1eDgVs55I36EkAfLnjvZs/0ZdBujKTzsILNhyqpKU2TPgutRK6mXAWK0xxp37mXlQOZkhrTaMhOFDLi3sDSglHe/o7yVklZePo5fXQPPfMlBwhI5P1YoWXfL3BiPyURo/miSwgO/suaCg8xtE331NuvQKSIf8ZN13jp480LB9XHzGb1wy+f2TfkcemDKXalGdNpke1VJsi8soOvXPHgPvdH8xAT7mNkvEdTeShaR40/EMLp6h8q67Yo6hPnAz1yd4BxTc3+oYME8xMS6y8y2p2e+A3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Vgvj9i8WuHJ3VFRZLwvhoKTz+hGp5LXPh+342T76Zic=; b=ZV1jwq6ZPdTUd6WtvmcCq6Jj86ETtblQU4zNgtyqCEvtpAYiOTgfb2W9r5TyxS5zNpThDhDqihf0yj+lHqm3IHq7BHnx61Mvlq3YuJJHVakZ9yfq9WSYWf/qmTbERzPfL15eBfj2LwQaHHSRfdZxNLZgEJjTsAvlZV7vnAyyHXHKljCJD5nUHzIqw6FHjAw7aQKICWrSz2oLGRPopGEDPgNfRHrjDqQ3ecpja5lPBHFhzrmDVmq5vZ70O2f4FyeCDxNFE4sBvmHbJ2uwxjPR3qVq5hvya/AZlNNSUskX4uaOxhg6i+CyoTTxiN82WI7tYL0uw7ePjRn0qguU7u3eiw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Vgvj9i8WuHJ3VFRZLwvhoKTz+hGp5LXPh+342T76Zic=; b=Vdu0LxHgoY1fy0BfJIoF24gmwhp8vCQnrlDJ84FSZBEe/9AJwXK4+NGxqvlIdjrNO1ncqTRTcvBWz4sl/f2D1a5bxIq3dzKQYlbPAecpc48yVOFCOhiAZsjoEjbJL+PZUABkWqUp7BuiEkT2LAxVCGU5WFjNXgcZG3wI8502iN+JCgG0NAnNqQNurnSFc22dcscH+1luH/J29hLrDLD9/khZUDTQlI8lQ7pHX3nO0VGrOCH2/q41zgkGRHO1sCpfIk6w3hpcKOWFRXiMO11XfLAPKYEhVBTYxkmZC2E84VyI906Nyp1y198/6IyEnQ+GLXGBerWu1iOoWLSKYCjV5g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SG2PR06MB5382.apcprd06.prod.outlook.com (2603:1096:4:1d5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 08:13:45 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Wed, 12 Jul 2023 08:13:45 +0000 From: Yangtao Li To: Guillaume La Roque , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/27] thermal/drivers/amlogic: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:32 +0800 Message-Id: <20230712081258.29254-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SG2PR04CA0208.apcprd04.prod.outlook.com (2603:1096:4:187::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SG2PR06MB5382:EE_ X-MS-Office365-Filtering-Correlation-Id: 6e4091b3-856e-4c91-7e81-08db82afe915 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YaVQ5HxBs/7drPtb4H+hFYP4ih46/4guW80n1zFNN5z36G8VEZmKdi9b8x61qLzUOlSH1ess5DtG3q833bf+sj/ar9PbRYuLn4oX87ri5yiDxZIePesu8CW2R+CR3l5p2q3c1i/4Q0W8lmOAoVI+us2zBg+5d8+thE8a+aW+mTzL1mdVfAMJs1xhLPEM+vlVEy+bQS+NC+h6pe/21z1ku4A+6KBqtNmJQmsEIPXylhJeLXZ0ffqCrZeiZolauQVK9YRNISHAjScAijtPQztSEPB9XVpmZH4BzOvqX7/JRts4xkP1QqGxL3cZCs4d5XcMGWg8gCR3gWsu5L7GXMRe8DiS0zD0V6BrT+2i4ssw9V0i+z/e0MEw0VEyNh2CH0g1LBwsGR8NHF0h/XY5WxUII/EbmlMiIiAixMKdyrt8fWLYkqeNAJsxRdGFYIjhHtiXBccHDDIjuhen3cCskAZPf7UGhPWqGzEX3CjuKCM4emN267RCHyxKZnZLuO61MrDixA42lcBaUcagjpBGlaUnTIerLThvzJOdiSy4XcMZSZ5KCb/xB9PtkkOA8a1JE4cAsSmS5o3tvTDM8FCnBAaqaQN8DOKkM9I7DkkcVFxJPSBcDHdFyXW3o2Z8b+DV+Y/t X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(366004)(136003)(376002)(346002)(39860400002)(451199021)(6666004)(52116002)(6486002)(478600001)(54906003)(110136005)(6506007)(1076003)(26005)(186003)(6512007)(2906002)(66946007)(41300700001)(66476007)(316002)(8936002)(66556008)(4326008)(5660300002)(38100700002)(38350700002)(8676002)(86362001)(36756003)(2616005)(83380400001)(66574015);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/+MKGPyjjIKjxb7oku58yVeeOlhn?= =?utf-8?q?xdDDvZOYImd9H6Ck/aPGqlbw68RUD9HIkFM4l+rvuWJmF/fprCcjERCgQIhrE5hFv?= =?utf-8?q?WgPEj5bXlGne3oWt7dRjJF/sG57dEYO3xsILDBrAfJVSBXZNb8VM5jHKPcXCYz1Zt?= =?utf-8?q?2OBHewAAWlsIzEDutJMC3iCVisMEHyG96jYk9rX+s8mrZHrAK924ddZH0x7HdZqso?= =?utf-8?q?j2IPQcYDdo52YRW16rpHX/fQSBs70U7tL1pHA7f+7ydlgviyHFhp6pt50U/BKGlo5?= =?utf-8?q?LvqJcq+RQOpwwMCQMWoqyuauwbdGGi3Cdy38NbiU2PIEstvG1F2zrOeTdnQsVtIAu?= =?utf-8?q?0pjU7al5+XMPWEjCfbHWEjhfSrEoyq7ilrnqR1vRlNFu4Pii/UEzShVotb89lWtO/?= =?utf-8?q?7M/Y907YYQ2js+PPTsJJwDAerVhqV9IF30ySDC/Qs6QA3UWw6Y9FWnC7O6hxBOB0P?= =?utf-8?q?wLcFRbkGHHQgSdu1xZ3f2MkbuThURO0l3GpRGR//Cm/dG7CQNRXXjLUMtv8q7U2T+?= =?utf-8?q?oDCPCqHksSdCW9WKhruYHpXMOtliqRMx614/T7hujnzQky1zylROvWP4nezH475kU?= =?utf-8?q?xpfAYlA/WJ8wq1/8lBaqTljgAaRr9VsVn/ZIh+HhYE9R6Bzcbey6OncWUzu4A5QgV?= =?utf-8?q?Ng1OmE+pqRYLqTODCdHfe3zeiPoeJGrpX89t2bKuE1JeNSjEtHC1zpJ7iKuYKDajc?= =?utf-8?q?QF5SWGwDV1cWpyqlDIpfuFSjN7HuzmALS3+tbQuEd2PkaRl/8k1gkP4zqqxr6dwkI?= =?utf-8?q?7WYxIdLd1qocd4DYQ8Vj6vEr0fsa2FAD94XB9UYbsi/kn5b1xnT3KYReDFB2vpKis?= =?utf-8?q?1oIWX1958RjvdxXJnY0pme4uJi/sUl+AEQTXphtBL+Qeds46N1SXJt4sDdfng1zGH?= =?utf-8?q?e7ZsMEY73TakUScUMAQfPPpd4R7GnFONhksEcUaGr48HBpl8vPwp2shx6YP2D/Uzl?= =?utf-8?q?sD/bDHIRCMrXvvNwjOOXa9s6aIntRGsgMQYnjiCfzLJOWnrUCf96zYBWGXhqKRaLc?= =?utf-8?q?0t+teJsgZJ+vRs1uwBCy2iLjBDXvln4qB3ozqcHrN5PJTTlQinm1/zXI1FUD93DDD?= =?utf-8?q?Wg4vfqxVfXEUenETur8ACTd3+Swu+EX2RwtuKqfQBJ8OWuDJK0zxTGWyeZpbmOypF?= =?utf-8?q?uCNTasdSrO+ZOYeEpqb+Jx1ONlBtx3wcU2wnkoqa109lT/bxgyk8qDSvfXwoRirXY?= =?utf-8?q?Fml8AkViIU1aQC/uzIHGlMwMnNO730TZmeOQpK4KLLSdYzmqNXy5Enhgd2J814YBC?= =?utf-8?q?JluvXdxbx9jPl2HcomGV5K5OO3pu+VCrwQgcjUqUhJSQZVg145FgFXg6rt9iYnxhw?= =?utf-8?q?1yzYGIzG3lmcyOPA//ADXglECjqSYYiaVqUJ96/dyXo7d5sdoku87mrn/7MjpjIOd?= =?utf-8?q?U/3ejGNJ2oU+Jn4WxyJsjVqsr0awFaBHjZB9yGH0auPdzL53IzRN4pkFzXLcWPjYu?= =?utf-8?q?SDlLyeJKtLMhNOu6I9jOcqn37Uts9eewkD83Iqlgk3yLNA2a2wovxs/8wuCfXwMRz?= =?utf-8?q?DFxDqV9I/gKz?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e4091b3-856e-4c91-7e81-08db82afe915 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 08:13:44.6496 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BciyjHRJpLHa5vuFCzM08WPHN5NGoox5vGoe9OxnxrTnsHmXLGjD3c8dYavKMYIh1Dp5md4uaSLL2vStBNGcbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202192381933892 X-GMAIL-MSGID: 1771202192381933892 The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Cc: Uwe Kleine-König Signed-off-by: Yangtao Li --- drivers/thermal/amlogic_thermal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c index 756b218880a7..a95c8959e5af 100644 --- a/drivers/thermal/amlogic_thermal.c +++ b/drivers/thermal/amlogic_thermal.c @@ -293,11 +293,11 @@ static int amlogic_thermal_probe(struct platform_device *pdev) return ret; } -static int amlogic_thermal_remove(struct platform_device *pdev) +static void amlogic_thermal_remove(struct platform_device *pdev) { struct amlogic_thermal *data = platform_get_drvdata(pdev); - return amlogic_thermal_disable(data); + amlogic_thermal_disable(data); } static int __maybe_unused amlogic_thermal_suspend(struct device *dev) @@ -324,7 +324,7 @@ static struct platform_driver amlogic_thermal_driver = { .of_match_table = of_amlogic_thermal_match, }, .probe = amlogic_thermal_probe, - .remove = amlogic_thermal_remove, + .remove_new = amlogic_thermal_remove, }; module_platform_driver(amlogic_thermal_driver); 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: 118932 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp996029vqm; Wed, 12 Jul 2023 01:28:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlF9cepUMKQzlJK6FCgPMkm5QaVxbLrJYr37RYD0dPB0PaKpYATR4gOaUgC7H/IoMzHdSwKM X-Received: by 2002:a17:906:9a:b0:994:19ed:e92b with SMTP id 26-20020a170906009a00b0099419ede92bmr3921978ejc.20.1689150523255; Wed, 12 Jul 2023 01:28:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150523; cv=pass; d=google.com; s=arc-20160816; b=OYZJDq+26GfaLbt+691DjKYajEa/HkGNSjbhMjRnEwTBCxwkmt4jSTRHnnUT1yLgJG 0OdiALGcrd19Ho7PebtgIB1JzkQZiKq9tvr5u/yv0qJdD3cP4owSouHATUpX6+S83/v3 iDWYbGTzcbUTxgj5r4oI2SuURsu0MzNG2MlueZsKhi9s3jN6Z+/rhO6CsUTFld21V3B0 YVLseUoz8YWaL/SDnUIa8RPLwtQUSNn8RM8HwthjUlNliDx2xG6s8ChmKKBNTwN1l9Sw MVzzV1jv3W/ApOrPiEx7mnzjBHvQ/o70g5qv8gt1pRVLVGoWuphVzZPjxF5zDxCw6mHo 6sjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hpZMshgUnhl1a1NRIEAw9FoWwWlGONyeujolIieNF5s=; fh=Dy5jh62BNeCq7//OKKCLIafiz0QP97pbjqh18MS8wtw=; b=BAgrfa2rDRNusRu1epBv9nnF35hvo5lS+5nKFIIAVO95WJqU+PIszfTDvsy4cFPHp5 5cBZyUTqbJlbbu8IRdQJC7iEgmvDmA6//QYoWdoOCn0d5OhG/w9GGsRj4IkbgylEegMc nU6BtvOR2DBwYSaF1hVyQuTaalbMgUiKx7J/92/zkvWraMoPtOEF/En52X7FYJyw3E5z +FBfBZRdViuDB7yBtVbbCocF8moHYoCSPkyo5TnP64w/d+i49K1xW4b9uPl5Yp3l5D6I RFUoNIqHzSXJmB3BiUabvs5DhJCA5wHAVjW9iBvaTSkKKbQluEpReUW2o4vxQkgBkhJ9 +E1A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YouXT0nf; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i18-20020a170906251200b009930d4e3185si3706549ejb.883.2023.07.12.01.28.20; Wed, 12 Jul 2023 01:28:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YouXT0nf; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229879AbjGLIOE (ORCPT + 99 others); Wed, 12 Jul 2023 04:14:04 -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?voolnNSuAiQB4JGX7u0OLVJULBIvbdYrIQFI5FwA1UHNwnSA0rqtJKpkdvGAdPL4n?= =?utf-8?q?n2DF5nSsoBKFdmY0wsgEVNJnW+om7J9tf/6rMMNCvgqhHYYa8R5AY6LD3oNkQaiix?= =?utf-8?q?qMZ5UnIITxkQMyv4NBjNzbgWr9ErOIyV1RclurbP59j4c7QSngeqvD1b9QM1X28IJ?= =?utf-8?q?lVCooMdYCVj4A2ijvQu/Zd6p2zKEbu6x59Z/BeAj0AMGIIpgrEMWK7vdMit6jRL9C?= =?utf-8?q?9El6R6sRa5vS/q6q+SRniL6lEYPej5feHKpEk2HzoMxLZpKywo7TF3WxGGnWviXPg?= =?utf-8?q?j70pCm5onykLCklm3lIKMWJ7J9odCOv7c6TXglwTRn4mtu4dCODox0f8oLuCkeYKC?= =?utf-8?q?nZULV3/PZzOhmObZ0ylLWeB633wJw/i2/WYdhVxQ0SISjarmuzFrwV4R9jFCT9rKS?= =?utf-8?q?Pftu7h+hYXOBBTHjfpun4EYiHwmAa3dzU43Yd1N+8hbNZVV2mw0TtvDKVdR2gPSnc?= =?utf-8?q?bb7JP3EG0mqgPwP5hbly0i8Njv9U1g593eZatBB6srVfca31BCJpuohA1+QIg3SXi?= =?utf-8?q?W+bQsw/1740ToKvt8A5K3jO7445m5/4rXeXYX1hjp6R0lQXxTX9uzdKh9BIa3uj+J?= =?utf-8?q?lfClzJ1CaWtYEeit4Nj1fobaEbJIcWPp1jSAO1Ni9g+c7aw68OTT1w0hkG4WtNZ02?= =?utf-8?q?mOw0JofdXFYJtB7SW6szFghJsxz83Bnp2P+jxiKr+KRHbyI+rt7d7d6BgGdJtpapB?= =?utf-8?q?X5/E8KjkQkGboKMmtM35UEg1EGmhfGtXqM0mUozkTPxMWBDbmd1pQ6xo6w+tLfjEZ?= =?utf-8?q?NzrCpmcysetDsaDTdSu785/kWs2dg8g5+gLfB6BYyaqiwLyjMstlO1bAc9Nfsn7BI?= =?utf-8?q?N+gPLnJy3ne+MD8DaGOK++ZejlA81TN6q9Jsp34b+SrHG8rN1W1hneut3Y4zUDok5?= =?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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202699073013615 X-GMAIL-MSGID: 1771202699073013615 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: Miquel Raynal Reviewed-by: Uwe Kleine-König --- 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:34 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: 118915 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp991025vqm; Wed, 12 Jul 2023 01:17:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlGivXi1FafvCRq9IRaC2bwu7hROEVg3Hg2WnVjdnhXHtg6NdiovggAck+QJp3W+83wDznVp X-Received: by 2002:a05:6870:ac13:b0:1b7:3026:117c with SMTP id kw19-20020a056870ac1300b001b73026117cmr10001601oab.47.1689149829167; Wed, 12 Jul 2023 01:17:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689149829; cv=pass; d=google.com; s=arc-20160816; b=ArYuVHsx29WsBamzWqH2sM2/VsJRhZSkaPjpe4WvxviugXqBT7nkvyChVjNiTALh+1 qzw5FmfJsJNyDVn3vDy+46YW+Ei8qYFtxkfiE4LpG3D48DVyPjlkzyNZP3bKEZcJpxCs a1+6UzkSx74yu1r811kZDBjGfq9cCMPOfyGs/o6oCWpJw9KKcjJY9VZbD79k2HCn3VQ7 XVcYD2NYO2fKCqlnxY5h3oPdJTsMUUBQWl9rxKNq0N/7ilUtbRY61mPjapeBQCF3aKGU XWGvrD9x9Yh/Zh9fTYusZJ2KtNrWGgewaHhYmLGl2NbPuYT8Td4YWpSgbZwYCa691sXV rCAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NzLCRfXSM5Q+XLM+3F453WQFQF3sJhFjkD9vWMheGAA=; fh=I38nncbezvo5XrMYKnpEN6aB1iD6hkinJ067P7DFwFA=; b=HuXcZqb3ZnE4IKnrruT4q7zNul+7aB7K7Ei7RhyFjoUlfu0/lsAlwyXiPh6cOZv2WG iBusOggVojNsGzwuB54jrvpKmS9+6kByaVSKA5GnfOS/tsFvkkAMkh6VvTElAwalvk+b o+dsrC3u2K/jcZkNvs0ZML8lx21AGzFkvHgUJhN7/2tyuNKCK2OMFof1b82fQE9itNJh I64JMtxQXKIYuH/xxRQINwF55NxeIHqqR6hbboAR9kbfTwaTkvVeCUoFGziHWndg/SiA io6VL5qAXaq/ZuhgHLtrhCv/3RI7zhSlKSV6SXh6j8LHysz6ECGMv3FnF2qHy2740POu fSSA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=RY7fHY4V; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cx3-20020a17090afd8300b00263f3d759cdsi2894357pjb.78.2023.07.12.01.16.55; Wed, 12 Jul 2023 01:17:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=RY7fHY4V; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232201AbjGLIOI (ORCPT + 99 others); Wed, 12 Jul 2023 04:14:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjGLINz (ORCPT ); Wed, 12 Jul 2023 04:13:55 -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 13634170E; Wed, 12 Jul 2023 01:13:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HPw1TKEzUEIxWrrJCPNPNj0erWwVZr5D+06B/2qqAHlNi2CMVlpxoRu0myGOIY5ZXP/VAqDLRSLOUvHvcwz8BIGGtsHXN96A6HFwEIUcQlVcddpMAQh1npyPifQNCXqk/qAFvDbIMxtFdE/qoIw56ietIQYn00g96voWpMzNdbPRO5iaywwRMSTJf6rRCmxxDacVSek7UolrGuW6aVyJXnGSE0l02srz3rZb/5umEnxiFyKetam3rKDKLx84W/fcJErupeddLTEf+PBbJjFhp+olYVxrHeBCcqajFo4EWtSHS8IRLqg71V/1Uw0BmR1ovchOWwDnhhCFBcvPykpojw== 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=NzLCRfXSM5Q+XLM+3F453WQFQF3sJhFjkD9vWMheGAA=; b=UdfG/38vjN1QKCm9zSwndLKrYZVtgXQr1L2vQNhftbgSztmr5k+uakmvt6sh4EcDYsWzX0b6ZePiLCE+CDIqJuf/rKXiRYLCpx2P9vMzNziyUgxdRfSrqHpmFgsUrUJXgQR0yhQX9gsOXOhMtsKZLl9JOIrzLNvi4kpvlsPrwVW/dVlD17FxFzvzx+nCZlU6Ysx2l65bhjgRlWuIqQjdIVCLcSWWS24Z0YfwqFK519ULyxU8D9fKtejPfMmkuC2bKo9TSmfcpfqXDW+2YTPo0XwxADecnpqgnouHVzwUKcdBTzOsPQPLz/Ejf9Ol3VvNAEtKv7EocTC8BaafJD9f7w== 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=NzLCRfXSM5Q+XLM+3F453WQFQF3sJhFjkD9vWMheGAA=; b=RY7fHY4VixdQtiizYxO9h80utu9wtORyM/zjWzrZZbG+1xeC1s2eNofDxn0vnBLvT6f/OK6SlrKrtg72rTgGd5UtouW4GXWlRhfiO57icJukQQojDCjosELxPFWbGuFvSwcyQBiNsByUKfBaF3c4QgVQwPvykyThOE4VdMtNNCYf8DKhzTUJt2YC9wBfolEYr/6fo/16hfyhq8opKS7XUXTC5ngyne07TC0Gj1oRIfcZyBYcgXr+CJM/9NKBu+EAKyC7o4F/6gfA0sVXgsVxV/2WK64pe9SRI4/CY6SdTGIgkO2zX8iG9QEl8iSmwAjrDMeUF0f2Er9FPb3rKEjthA== 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:50 +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:50 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/27] thermal/drivers/broadcom: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:34 +0800 Message-Id: <20230712081258.29254-3-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: a121bdc0-dcca-4ac6-1a67-08db82afec66 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WsNH7W5DglptFbWoOqcRoHq32d6V0t/81ZYYiJfGqoaIyZLafE+w0HDX+Ug0VnBlrJUynLTX5Tf9AmCEnp/ONsE/qSC1P2TaNUXTQg1ZncwMUfLAqLY9bWGdOWdAd/RLloanIJPaPUo58IpUuc4jn67Q2aB4PXydkEhN6uWgyklTLiXYj03AUPLjoFhCA19lJrgQGcBB6Umd89p29PHPMWzh6M6bIodLVcsgCn45KbvYWmH1N51gWcPfjtqUQD7Q5ezlgLD5+yavezc6LzqFHVmlUwxV0P7CGKbho2EDLVHzjzrJE5i+l04W1mSnAbu642vFqvzyK992B73Nd9S5GiJkC+FQ/RIjYOM70qaMEk+HHziL4bEY9CPw/+UwsFv1uHPYxpIxiex1NEEpIdSHatSZplyog3al0IjftoaWlhieOEyjPAiH0E0UVQernDf39pnX4vA5tONSsxWQnST+hEIndOuzJy0TjcFt+Dw7ecZveHPYFKwcIoISCAjPKW7UJNqbAMSd76k3tasw50bkyI1/5pIuDnZ0E+3r1nzIn53s/GyXQVe6qGbHkr1BjQARqTG2gBMaBWywMgHM8tt6yZLHNWFFa6EgEtOb2khJDHwcgtNukWujWguPN1IeKkkd 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?KNFCiMuuiF65lKW5ngD/Gz7EoDME?= =?utf-8?q?GHcmHfDkqvZ8eK9bS2Tsmn4xYhSQbo7yIQvTEOn21b2WoID7V4tczfWtVNe9Q5mnu?= =?utf-8?q?w617t1xMcWpH4DTs1/a5UYwODME4C1PmEW3BUvMYyfkoJw52bGEovjoMlIImA/gwB?= =?utf-8?q?li8IohvkvxA/7L2EZ937IxcUiuHLDSt30W7g3ClLUiuugLGK6DFuOjZNfhCevTPJ/?= =?utf-8?q?5iIen/6rxmqLSOeyW5rgsKv0OcKZ2K/tZTmF8WTikCggoesl4rrw6o+NGNAfUlAFW?= =?utf-8?q?UINpJuPFkdt0eeNkED6WV1t1Yo0lzqVtcdscD8C3XXhYMz2GCwQSStvJ6KOxW3pkU?= =?utf-8?q?deM3PWx0fCdjlcJsGxSLoV8BzpHqrkXsM9u4bieEwffDEiKPTg0iGBpJvvj2RCb3g?= =?utf-8?q?r14VqoPDmGQNHHnZhRMIIm9fL7lbbKZ4F2iWqzQcDlyPGrWTkDe8C3RCvh6/NS1xf?= =?utf-8?q?5vII04yvSHhxtX6pOvWUjmRx+4knwBEiit/C8CiZeD3iuA+KWIyDyNLCeNMHk3cmW?= =?utf-8?q?C3oEjGzsILEySdEX4FwvX69UnbhPrSH1n7SToTx6kvONnnPEjiuQRCPjKV2tBzfMW?= =?utf-8?q?7FSyFQ6AhHaJsY/CMeLYfU9dQWhiQ2yMouEB3HEQsaahMkQdj6WJK1QA8Ebahwwz6?= =?utf-8?q?o09OlkMjEN/X2H/YtIjvj70bNIik2MGvQrppJOAagsL0dzzm5cmgnzX7f0KW6WLhC?= =?utf-8?q?Obw70sOJ2g8xJ7RhOpM4RJR1HQytrQzxu43VaflZdGPRuD+Xgvn48nFf5PihAE8ql?= =?utf-8?q?NJ3gZFwSl7JHcCPcWDbVWIYHQSrVeH/Wb4p3zq9aPKByz3DbkMS3+6laZSJprGYyy?= =?utf-8?q?5Q7+h57R/P6BQTHrZtkFN/6kIWFBiZ3KpJ3MdOG8wd5qFiMvahL5YO7L35FB47qSL?= =?utf-8?q?Gq0oovjQfscSFYUt2ZrfH8tyQNtGlXa+8nC92apbuzzkW8WzYP4DdjvbhPcdaLa7k?= =?utf-8?q?szVon0hX0dCnrYN0sBGWYIBKOvhjc9XwY/cyIFHRuZMj/FNlp3qMVX4m1ifdDbTF9?= =?utf-8?q?7aSww33orqicUP0s1u8V2qv+Goz+bFoDvjlq2vM1Nal9msr+7gO3k08+oZSvlMtC9?= =?utf-8?q?2LrBKw3cxbxtFacgPrHc6pF7/713HUiq2NeTbzaluA9wTBCNjfPIqfVCA/s9YKAC9?= =?utf-8?q?8c0RxYjTspi3MLUn6GrZg3F+/Gn5KIpE98PgR4DvbkIzHY0cO9HOzv95Jqsdp2OKS?= =?utf-8?q?X5KcwEPAGCHK3J/zTFBByX4hmIt2ZjE5KZCIwK6FHQhTacmUIBDJL3miiVg1aAZdF?= =?utf-8?q?HbsVOgFZIkmrO9IfPTXvhOmVr1+2nX2QpPz+VDFtvt06/iZg6GRhryGooCW1i7ikc?= =?utf-8?q?qbFmY4+LHks3Zdlda732P72xY5ti+c0pRJ4xD2KcEQqqEC/CCUCe/l7+8NaoL4qaE?= =?utf-8?q?mcwA88ryqnXg2xsRi/C2Qkx4zBn0mOO5NREQkph2j17tMN8tROqgUGcIHvsPhfkfD?= =?utf-8?q?hhFzV6EGbAP+VATvjrSGr8qhnckeuHxzxJfW67GTPOnonpPaFrRx0iUjjw5dRXXg5?= =?utf-8?q?UqB0vb+jPG0G?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a121bdc0-dcca-4ac6-1a67-08db82afec66 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:50.1551 (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: tKPmWUP2LbXx9eYenZLxmUcUwVNH6k3zipKTd0yTqjpwkxvMpe6UaBcGQhz2qbjBsvjzLgFGKclrYH8eW6bXKA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771201971704783414 X-GMAIL-MSGID: 1771201971704783414 The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Cc: Uwe Kleine-König Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Reviewed-by: Florian Fainelli --- drivers/thermal/broadcom/bcm2835_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c index 3acc9288b310..5c1cebe07580 100644 --- a/drivers/thermal/broadcom/bcm2835_thermal.c +++ b/drivers/thermal/broadcom/bcm2835_thermal.c @@ -282,19 +282,17 @@ static int bcm2835_thermal_probe(struct platform_device *pdev) return err; } -static int bcm2835_thermal_remove(struct platform_device *pdev) +static void bcm2835_thermal_remove(struct platform_device *pdev) { struct bcm2835_thermal_data *data = platform_get_drvdata(pdev); debugfs_remove_recursive(data->debugfsdir); clk_disable_unprepare(data->clk); - - return 0; } static struct platform_driver bcm2835_thermal_driver = { .probe = bcm2835_thermal_probe, - .remove = bcm2835_thermal_remove, + .remove_new = bcm2835_thermal_remove, .driver = { .name = "bcm2835_thermal", .of_match_table = bcm2835_thermal_of_match_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: 118928 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp994779vqm; Wed, 12 Jul 2023 01:25:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlEnSV3I4i5ATzJr51MynvUPg0n+b6Zn9ZELEtFIdBMvSYxus3Ov420JG4V/ZkVlUcVN4DVc X-Received: by 2002:a17:906:8413:b0:988:4a48:6ff3 with SMTP id n19-20020a170906841300b009884a486ff3mr14350586ejx.30.1689150333048; Wed, 12 Jul 2023 01:25:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150333; cv=pass; d=google.com; s=arc-20160816; b=OWVIQSZW2tOOgXhaNDWIb4e0gUbmQANMavi6JTmiULJ+HzlcW0+7yKPMPAXIQUR7a9 fN2hkwcbVAkiZfdo8xeCea1bxenbuvvyzA/palTBCxYKDs12IWcy3k7WItpRQIGzTChB 0QEo40J3UGkuoRA3onLXeU8oyuZwpEG/NlAlT86j5rwMLSGaAPYLiWAVcw0yogzUDuQm U0w+AnRaBuS4msKhN4EE0EWM4vobzS4tVLco1TLLf+qN/QV95rlojjI/AeFhz0TI7YGe nV7l5gyrJ5UMO/Wdh7XL2HQcrGHMtSKvvgfGJHOIo/DQK+uM7N56j48fJeUisOhtSyNe Sbzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vyvljtpagtsfnuAKvlq6VdiLKjkkJMSxKhFNYW+BGnI=; fh=Cmjlp7r1sVwzkDkoKftLyginZOx26MWtlgTL6TCUiUI=; b=g/F/i9b6g+5NF0Ak8v7iHpr97NKn/X3JhHCcGqKze2rft4+9wCcZmHQK14CnGQ/DN2 eTSJma9RzhYKfYk42b5MTpLutT881kyQycTiFsOKzhnixH44I1B1Ze2VopdIuZg61fa8 h56uNX8MdA5Bxf5tQsMO2AWF6wRPtI+pWBs6+ma+LoH5qgJ/1pu2L0KDBvFuePOdfmvq qbjkjgtj30Scw2gsJ72ArLGcMJ+MxMzXSF7AXYyWNrnEF3g9B/B2nAv3eo98XbIiec7I /au3j6/VAE3Ro/S//RumnbB0Uc3FAaOnoo2dsFQ/VTpJgdJbkF+G0O/hH7M/qWgqhiOD Qcug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=OB7Y4qa5; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020a1709067c4900b0098d373fa9d9si3885373ejp.149.2023.07.12.01.25.09; Wed, 12 Jul 2023 01:25:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=OB7Y4qa5; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232180AbjGLIOQ (ORCPT + 99 others); Wed, 12 Jul 2023 04:14:16 -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?5pXhbDNKjOr0olvgqw3xMu1scesX4gstAjmuD1qzsA/2h7lay+/Z5gD9K4uRCLfBd?= =?utf-8?q?HPwdmqsKdEoZXY1vdhHLy1K55Sl+tnyD2ShN/wExGSoZ67smyyIsZdk8cppTzR6+J?= =?utf-8?q?lb2TrNUS+h8P1bbXOzT9upCXK27xR0qlIj44rT423SmRnrG01boQ+8aHXO356/Fyj?= =?utf-8?q?jLxFImB7nwXSnJHVNjHsjm+bFNWQlCNIybRSvvWsTuCc+HxUUkfW4v3+ZETraeoh8?= =?utf-8?q?daXp9BqvWyu9Vf20Cf9fv0Lgb7gDwPZLm35XPk3kFFcJXB6rh+zWB1bMt3qzInD2W?= =?utf-8?q?doAUk/A2f10cM2lWa56jX6vyL6Wd0rhL4K2stP7zuFUgvPWD1D9NmuTtxA+9KW3wI?= =?utf-8?q?ke4FwrD+3vR3QOcl5k/D4XAcGrabBg3bjyJPidEwfB+ZuU+44CnlJ9H8qaDGJrMp/?= =?utf-8?q?DPJ+zA0rej505op2P1xemS/NBVaRaFoSxrztAbpplz4Tp1PxGT+UqaRQ/g9NlSYwU?= =?utf-8?q?MZ5qqHF4kWyawKlh35kDaqRDb0FggE4UjzEmS/xXd99GOKsudKqVE9huxMRQdfgBR?= =?utf-8?q?3ajbKd2m1uK6+Od2L7Rb0eoAazZjTS4pB2rARtjVf3p7zKr2ibsJzzuxf3WTPplj0?= =?utf-8?q?QYH9baaTx1KpcWoTa6MdnfnpLPR8gGMrJZiWul6gQvfeEh+hGs1DAncw4c9sTft3I?= =?utf-8?q?egrGA3nju5kef323uQJ2lxOf4OJsJDASbkqo8RAe7yZjhrtEAP8GClS7tdiypfdkS?= =?utf-8?q?soXvhsfiGYUYwIuiTeeSCh3a2B+7Qs33JWoNcFGlWxE6vogDnNxBro+1PDkjgE3mI?= =?utf-8?q?rK77KJLETikokLx9GUd0BmSJL4b8VfG5OwI+oUYVsIrKYKpNZkwXDf8B9fiv0APsT?= =?utf-8?q?FVn5bP1Y2uYmWOSYISAUabKUEx7OYIPXBc1dr0mwDs9ZLFZf4WtMO+Dec/N8bAzZ1?= =?utf-8?q?8R62toIpCaqWjLJziBv/IkRg8i6O/7s+K7oox2T/QVT2iNerQ5itC3ZyB/TJ1DOzq?= =?utf-8?q?/4J1T0zeSVJ9QhWNNGlm4t5j0rFFjwYbXXUUePqCTP1VHe4Enk/QOSl6m+/VlOELU?= =?utf-8?q?NCL3+pLKcDqremTYrHW3Frahxdbf+JGTt8NVFd0QMr5PUjMmwqMZ0pvzfeshIsACt?= =?utf-8?q?72DkQTLCGC4LOFHesgky8uKxwnTfZTvgax2X2wtl6LGzwUeRVEQ2P4M2CaTHzaYXx?= =?utf-8?q?0GiuxmxyRKnAikLBgP0m5slnakd1U+NnsOWAzbJf9qLXz9C7XxmU/l8D36xpndiRs?= =?utf-8?q?8UHtCXG3eNl3BKe9kggndhwc0w6Ir/sl6AcTiO/EnII+aQ31gK9VIS7KdoaMc70Py?= =?utf-8?q?yEtjFbZgXOGZ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a372113a-ca4a-40d0-d086-08db82afedd2 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 08:13:52.5430 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ozMT979mJAxXw4mN/lcAxFUPK1BTmyuG8PrTjv44MOtjRez22EuifPW+GMX4paKgf+N0btBdDLnQS7hyaaHyLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202500032976431 X-GMAIL-MSGID: 1771202500032976431 The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Cc: Uwe Kleine-König Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund --- drivers/thermal/rcar_gen3_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c index 9029d01e029b..1405163caa34 100644 --- a/drivers/thermal/rcar_gen3_thermal.c +++ b/drivers/thermal/rcar_gen3_thermal.c @@ -432,14 +432,12 @@ static const struct of_device_id rcar_gen3_thermal_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids); -static int rcar_gen3_thermal_remove(struct platform_device *pdev) +static void rcar_gen3_thermal_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; pm_runtime_put(dev); pm_runtime_disable(dev); - - return 0; } static void rcar_gen3_hwmon_action(void *data) @@ -594,7 +592,7 @@ static struct platform_driver rcar_gen3_thermal_driver = { .of_match_table = rcar_gen3_thermal_dt_ids, }, .probe = rcar_gen3_thermal_probe, - .remove = rcar_gen3_thermal_remove, + .remove_new = rcar_gen3_thermal_remove, }; module_platform_driver(rcar_gen3_thermal_driver); From patchwork Wed Jul 12 08:12:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118938 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp996470vqm; Wed, 12 Jul 2023 01:29:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlGSBVSPHxEViOazVaJB+K8krlTfWcHBYmh94eUBacrvb8HsxuGhzUNhk1s43lF4g27QkHFJ X-Received: by 2002:a05:6512:3157:b0:4f8:7617:6445 with SMTP id s23-20020a056512315700b004f876176445mr13948645lfi.48.1689150584582; Wed, 12 Jul 2023 01:29:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150584; cv=pass; d=google.com; s=arc-20160816; b=UDSMLiKOD/9/WIcF/pQrKxgC5wlKmjZZeJWg87D0zVZZALei+KadAoC5HF1i6buFga zb9ydnJeyBVRIjJsbYqOGsVH1YPV3AXxyVyGyj6ylwCEKQ5B+8+9uSOLJEFGmvOb1MmH 8+yLrxuOUqiqessQO4R+EIPrChu5ykorWktUqXmznemxr10Ne5Fusk+YcdfR0h4W/2b8 1PFPsiwJCiZ5fiALA0xv/v35DZPidLWoKgt4VhRdAVCl77GPAh6PDoI6ldWZ5nJs+pIr Pk0TbkshvYMkUI55leStMTE7K6rAGhydcaV4Wbf8I3DFsg1hsTg76ie6jbVXTB1rRprH LQGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NPaIbHnUrLgcrPJeVxQLB1UziQNQ2n1S+DMK88EN3Ko=; fh=IiWTCAiotD2hu6GhmOQoVrQujLqRY2CNTHWh9Km1TgY=; b=DIv9fHwRNVMhDXYXkciaSecFmlT8OB+Yr7kr8SbR+OJfwoO9WzM/af/pAABQJjkTIe cvSEA0Am5kO6M8DR0ieIvvtFMm54KJGgq/Q0qJ+HJOoPB4A+Wz2WuQPCkccn99ajSuuv jOTZKQ/rtlBpPrhJYdGTxd3klNqOiDjpyPxW320iNAfFL8fFwnqslQgYweh3VwfJaQ3k fuoQURW48Lflnyz5KtOq2NBnkNy4eZB905ySxqr0XJYsVsWVDhtJQ1+zpESLCdanqgjZ RpHjw97ekH64GoCzdAUxGn4oBZIVNMHKZtTdKJHmLrXEwA/9B3XGjhAsWL+qCFludYjp LvNQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Oa8fCESl; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f7-20020a056402068700b0051de52f8ae3si3886247edy.207.2023.07.12.01.29.21; Wed, 12 Jul 2023 01:29:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Oa8fCESl; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232273AbjGLIOV (ORCPT + 99 others); Wed, 12 Jul 2023 04:14:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231361AbjGLIOA (ORCPT ); Wed, 12 Jul 2023 04:14:00 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2103.outbound.protection.outlook.com [40.107.215.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3B7FA2; Wed, 12 Jul 2023 01:13:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZSGaFOAWM5MRQRhk68YkosXcvIlvYPr/9F71xtuvdXaa4KSCyL4bb8rIY/MjBeVb3N4BxZTgpQ2lGBI1AcjqXUWpn+Ubobb2aXZJ+1D0xZzcBy6nlMZPL+xedPVsE7ZZKfWhgcFY0K29dakOQ/KS2zplJl8DDD4mtxGMjGe/rMrmP/QqB4va0yu1Zh+hOuUhhx695T+zzyhvmBsv342+2gAAMxyKcF95TBfyym1kjp9OdeGyinjIPLy0PjGFFVdufW5YmMpqqFhZM9bAhgZsTAk9jRGcZzwl9ObUUZ57Ui2oB96ekag1obOqcKigftofjMuoZCnPbX4ko1Fc2qe6GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NPaIbHnUrLgcrPJeVxQLB1UziQNQ2n1S+DMK88EN3Ko=; b=dH4WaFrsAvLrJc+PeL46kVCw1yrYz4QSA0/agMOIk9OMb52t3UixJiRm+BydOPL7rOBU2Oh51bahciDglJ7KE8O0pDhNIjjW99uP81pIkMWIcbV+WbDIDSYTkc8E6U8K4AR3AORGrWeZLwyVsUch7ULMd0InneO67MKY83h8WDVDLedJUGntxzeziWcPvYYGjHf0hz1sti+9uHbZUY/dKTfgCY65XqJ8Yx+D7CMdvWDCHUNz6h/BwrAQy9yYWYL3yOm1wIF2ceBSvuL6kblko4rEygWVAxGSLRr/vVnAB2MXO7Rc8L/oaqSfeFktlUOU1aRz6crc9yOS91cW05XMrQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NPaIbHnUrLgcrPJeVxQLB1UziQNQ2n1S+DMK88EN3Ko=; b=Oa8fCESlm3Ss/Ew+aoTXxXmV7S8INkTe066saZrwmO43iAJx2e73tGFycnp+YOVg1orBQ1SchZdfXBmxS/gpV6ySQXVUgh/sGxoDII/I4p1wjG6SZVPY2RjO9agc1uiZa05bqySjdaad7nN7FM4fE3CjrxpyyTNqr9bzL1gnQiK/7Ifj9ckNYQzHBDJnkvN6MClwBt9t7jB6dpU0nxASJMaEUuhQCv2QTG6iWyTbSDH8/K/6JaTMgycqm7Y/BMlBeQvJ/ox5b8otmgIMO2ohGWpO6qNGb75Q+DCCEj30CAupDNVrERy0gPYVp2ACcTxAud4MTV1nDQNDBjhp4tps0Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SG2PR06MB5382.apcprd06.prod.outlook.com (2603:1096:4:1d5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 08:13:55 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Wed, 12 Jul 2023 08:13:55 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/27] thermal/drivers/imx8mm_thermal: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:36 +0800 Message-Id: <20230712081258.29254-5-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712081258.29254-1-frank.li@vivo.com> References: <20230712081258.29254-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR04CA0208.apcprd04.prod.outlook.com (2603:1096:4:187::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SG2PR06MB5382:EE_ X-MS-Office365-Filtering-Correlation-Id: c0d6d2a0-d817-42cc-8f87-08db82afefaf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1uMLbiuQUAwZYpIJYlrXpVO5Wk5k5zYbCaKDEnVaPuNm3NHwx2mWv+Yu/+imQr0Q2B7yRmEBplygmYkuHEQGIukdUF7S1SehXBHrJcBpZKEeKd7vcJWkMVTNaNkIcHOFHbVV+rYZDAkKrr/LiEzKKdOBo6eBC8lykQZN19HkVRc+b9eHMj9oU4/zvbEPiLX+1TlVEH1LlrY1dAME9aH8U3wrtz5Qi2ZsXEtpsTGUAwqBOjOI5icywAvNTNKCuzDjB1gVE5gaK0w+vAHD2/Do2yWoJXkg4isoZfp3RHCs233I0Xp6aMtLavbrMxeLWLlSvfRY7wP5q8yWVGPKTEa1klWhlPy8C4eWrDqB2yH5YpzWTd/4lManDtbY3QSNrgNgWXapcDrhH4Rym6SlOStgaU4QUCwg/gO29YaI8sbGVtclxJ/TrD6AE0lxmHCYCTHn2ZBCdSnBsUMa5wY3G58glWFEy+8PhCN08OEU/ZuW6TmkdyGDOmXQOqwBAFP5sJt42iZn1QQoTuR8ebN+yKte1RsmAPbq2/1yDoSoYy+qI7+UtnCtxj5RFQZ58/OegZGUkPnPsw41JX2MdJbb6dOWlQFAUnfzj6NZ3sMaDsxCz4rrIykD1rMAr5aViRQv306L X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(366004)(136003)(376002)(346002)(39860400002)(451199021)(6666004)(52116002)(6486002)(478600001)(54906003)(110136005)(6506007)(1076003)(26005)(186003)(6512007)(2906002)(66946007)(41300700001)(66476007)(316002)(8936002)(66556008)(7416002)(4326008)(5660300002)(38100700002)(38350700002)(8676002)(86362001)(36756003)(2616005)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?EvqThYmCTorWE9hUJOtrvSPaswqw?= =?utf-8?q?ljQUCjph4iG2GkRXaY35k1QDkbpHknhFAUOPZTmO1d20o6adcoNAKkZEDXCAnlI9L?= =?utf-8?q?tdYU2EwOilcuhlhwqyzslVZwVqQHJlykgj6kq2LWskoRsJ290wPdo1lcoN/ZjOGhG?= =?utf-8?q?CFpIGT9nTAMc83mkeZCiCBcuFj4MAtvN1x7/wKqBAcIUmgyVk8BdJeQwzaGsLpkvd?= =?utf-8?q?bAatGWC0gavPt5n4rFmL/a8QnjvivLCRko0NTxOHdc8haDFxgZzauVJPmw+ZdbEcS?= =?utf-8?q?3FQqUkCh14vNz0MANiH7oMCS/yV8rhzSj9P7zm33Xnitx4o3VEJvt6nBq5zBgdRAZ?= =?utf-8?q?c/qQPZCGwAajvaMpNPWSlKUjDTizawWNIG23RGM3JlT35s9xDV/57j/dp20ZYpta0?= =?utf-8?q?UUkM6JohS1tmPoacwaGzgT4eL0ZYQX+dxL8fPQSJX4Mh0IpYzgBxIc+1w97Fb+l+o?= =?utf-8?q?B1sStlDgTXzSIWYhgR7/cMWuMzOiAYpkvbpirW4X8W+G27460C6Veaxaveht3pPYA?= =?utf-8?q?EhvJdA2SrqfjAT//Z/Nw0FvCga4nnNdYjoa+UUYvP4rDfBqgKVMA1qibOdh6aHGGx?= =?utf-8?q?x4qlTKetXYvDRX3os/V6MdAU5YfZdP5bPA/o7JmIhqpFA5I5ogBzjdTfxRIQafTrZ?= =?utf-8?q?/uBm3bfX1oMHgtbovqtnuG/ZgqEtfIjLjAssk+WaAayCc7KAD3nrlwNFH0BrCXmpI?= =?utf-8?q?zj4RPlKlJ1Zhw4TPZKRxPpIwXpg8KLsp8XIToH0honM5bRc4HP27MhEA61DRgunyc?= =?utf-8?q?ieJnQImfxBq6RpYbRId2zMkEyK2vjRp16SoU7s/QwsjY6Kue3QsiEorfZMmKhOBUV?= =?utf-8?q?xn5eodeMtQciau8cGrZYcNwyOzDDarPUuSZV6MnWRegQOpn5ExJm3HbLmdwvSg29O?= =?utf-8?q?BomPVxWYx+Ig+tdOQlFdSTMJ8dGsyULulWr+DeXcLhxvgaaTAZMJcEfb6w73uHFqU?= =?utf-8?q?84TmNqjIk4kQbvuzxuuyzKXydDIWC45fsK9LiAsCVYfTrzXz8IoeE5N60xXqklFN2?= =?utf-8?q?nDdjVOvANvbt07R6POieoJNXl04R8RV9vAS/0t+FithGxrlL9VAPOYbNn4A8+3HBx?= =?utf-8?q?cF3T1/TXKLFvAaLfPQo+05eGBOsV2run4tQLk1k9EzBe0goqRBo+lGP4bCC7snYCi?= =?utf-8?q?UOO4ng7LvSdM9hNPtUtwT2x2mtHKg3suFxy3kw/9BBNfjXZwLxZy6QVCW46adSX7e?= =?utf-8?q?9uNAIQHdvuQ4/ZPriMRyU7+iLkisTPTz8/OUZfscJ9MRmaDpFKtizB6x694v391E4?= =?utf-8?q?p7sDioIHEM1lzjMI+Krtfr6+2KYnv9Y7iR4kVh3amJvI66GmRVA7D0hiSse+LV+5X?= =?utf-8?q?MnEBfOgvVsj45G8yjCZkF1nvPCG7venqNk1MIuQY6QGoxVVoUXTXyGHN0qY6zdjXV?= =?utf-8?q?BGV4gKqWJF4odvIvWaRBG2ZA/NMxr2XKdi8iBH0dE5Bhjy1ipOQH3nAyCD0r6ZkS8?= =?utf-8?q?l6alLDaCSM6U955rZ2H694anv1PdS85iM/IhwReTfLUZFKechEgoaefqa5hCnbYH/?= =?utf-8?q?n1DO8F0M2anG?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c0d6d2a0-d817-42cc-8f87-08db82afefaf X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 08:13:55.6672 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SIoofbUqzxWGLZcF4dCwVX2i2uLngE5Uh3uaT3XsToVbFxROFtca+HjXrMpAie19BejXlW56nOoptVkOEjfHGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202763573948564 X-GMAIL-MSGID: 1771202763573948564 The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Cc: Uwe Kleine-König Signed-off-by: Yangtao Li --- drivers/thermal/imx8mm_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c index d4b40869c7d7..b95564ad6319 100644 --- a/drivers/thermal/imx8mm_thermal.c +++ b/drivers/thermal/imx8mm_thermal.c @@ -366,7 +366,7 @@ static int imx8mm_tmu_probe(struct platform_device *pdev) return ret; } -static int imx8mm_tmu_remove(struct platform_device *pdev) +static void imx8mm_tmu_remove(struct platform_device *pdev) { struct imx8mm_tmu *tmu = platform_get_drvdata(pdev); @@ -375,8 +375,6 @@ static int imx8mm_tmu_remove(struct platform_device *pdev) clk_disable_unprepare(tmu->clk); platform_set_drvdata(pdev, NULL); - - return 0; } static struct thermal_soc_data imx8mm_tmu_data = { @@ -404,7 +402,7 @@ static struct platform_driver imx8mm_tmu = { .of_match_table = imx8mm_tmu_table, }, .probe = imx8mm_tmu_probe, - .remove = imx8mm_tmu_remove, + .remove_new = imx8mm_tmu_remove, }; module_platform_driver(imx8mm_tmu); 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: 118937 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp996220vqm; Wed, 12 Jul 2023 01:29:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlE04AWoXzjuCnsviY4jviHYbL+Xl+nllpwhpF/NKqWlhoWpW8bTCiyajX/FDhnJiAWTcrcq X-Received: by 2002:a17:906:1046:b0:993:d8a2:380 with SMTP id j6-20020a170906104600b00993d8a20380mr14164729ejj.21.1689150552823; Wed, 12 Jul 2023 01:29:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150552; cv=pass; d=google.com; s=arc-20160816; b=Tk/uEBnMu4N5g0w7sSnhSCJVCPTNPSflhERWRm2zCKyH390PcUXUEHKn/0hxIfEguN PSxLRWQPWzDY7FQGPeMOElPVMGBfyZE6TAldNnj3kUW430U5v7UNmZxy1Fjdp17ASCsv BVE4rHHD6AjLj7a0e0yjV8LO/FMsU1Sb5811P5Kk+iTClMytk2aWwakkakE1IOL4cCjL klRCckS6XBxG+g6DgciOLiWewoynD42QoR4FJ2uITPfnE9tNAeQuRVSOhivI/zgLirKk trQkVJ+fPgz4V3EKVrVhac+GTLIRA7muUYp1HLjToo6R0xf/dr9xkueX2YdtRMlqE9gS KPxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xOBtxgJupmI+362Ug4gZvaILE8rmdn+aJOFY+2JC5mI=; fh=+NMcMEAe+m6+wnhVw13iIfV45vgzC6SDOyZS0+YFPh4=; b=jpmo4DXou7M/qrW9Yi09VyooENAxZWFD7Me3aJURncfLcxUzYLhION+P0+V1br52ZG Nqo9oEu7KGU+nvoShhtHsAlnw8iKAXY9QZFkkLmrRqkfTIinQyympPaMrcjzUcF/piS4 oYnicVXKKEPuh/reMvk4os4zL6nbGsIb92PgC/FdMRT8j2DUo6H+Ws06dmeZTxFNJlrK GnZPIQRE7gNwMECEwUSgv3RIiJd2RuMdIjsFeutrPcD6gQH1y7wYMhvS0MMhERaF5swa 4KOXtjmoStgRzYVixf5hqp1g6aXy7HxBekHoUQObXWybK87f4UWQJ+4fujl/EByB1ebe gHSQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=FhLlm4c8; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f27-20020a170906391b00b009932c4d6c73si4112645eje.288.2023.07.12.01.28.50; Wed, 12 Jul 2023 01:29:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=FhLlm4c8; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230474AbjGLIO3 (ORCPT + 99 others); Wed, 12 Jul 2023 04:14:29 -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+pTtiOGkarHPPLhWBqMKItqx04+gELAoq3YzmIwL0kAU7zBdOPitWmQj2Qzk5n?= =?utf-8?q?UkJQpDi29beiehiJ3AA94+8HKk83eFIgMWM3weZR1KwtBNOTrxHwMFUGqtjVX9XLj?= =?utf-8?q?PpmiYjZ954PO4NVp+9MODrfGwHhJrUhBzBG8XId67KI08FBgLv0Ig2mKlpWA+B+Un?= =?utf-8?q?eOBOmfdplyd29J3H3ydQe1aUlr3yoOxA+4cufcMZ7VPYGxWGBEDugGu0kq5TWkyW+?= =?utf-8?q?BnUNaf8y9IzX6DW6isP72tsfeu1VEKkpAENBjeTHBH7Ze0HRlMoSJh0oReYi7lik6?= =?utf-8?q?1bKdV7h9pVJfcE7GV/Trhn7GwqZKqdcUn3bMf2N53tUJPqfJmPcTV8sC7L/gVe/DT?= =?utf-8?q?5MIZZF1FLulEeuaWWfTmlhLTU7sLEifTpnPvD7e/hkny2tSFYCYFF0GdAgyy1nzg6?= =?utf-8?q?WAdGRk2PCMAmNzKEL/GeXfEhm0TxXyd2yNZXrqKo8MpKV6F9EP3tePGYCMgW0RRmV?= =?utf-8?q?xpmZgAYw8W2xgkYqo+9Ho966j+d+Qt2FRn6hKdxsb88svo1KFWCmRClXdV0gaZwbz?= =?utf-8?q?zh+7LNcRfYSgP2GB52FELxPb04BgmIa6bEnBtDy1DjgO1V3WQnhgIq2wpzm96axsC?= =?utf-8?q?N1gvTXwypuEwGbLRwgP6//E7hJheKtbqFWYdD7hgxU/UXi++kV2GliTlt/uYprJdG?= =?utf-8?q?fBHtUeRI7pYPQ84obzrgQe2pskK4CygyO5e1VcETb5rmNmlSo7Iy6BLoD19k/p3He?= =?utf-8?q?PWZX+VVC27sPgGAivItGrT/EAgV22VsX1zYryv9kmjOGgYbMjrr4X7HfycHX+XTqJ?= =?utf-8?q?NiD/+vPfg3VvKv3KB0slHZHLfvhBp/xfo0UE/aABwjtCKkrJZdoADm69Q/SICUOVP?= =?utf-8?q?hQv6lOpcC9O/IyeKihmjJEsvDH+3FROVCdAHeBNld8wp7spg+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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202730042144631 X-GMAIL-MSGID: 1771202730042144631 The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Cc: Uwe Kleine-König Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König --- 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:38 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: 118923 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp994203vqm; Wed, 12 Jul 2023 01:24:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlGBrGGzcz3WMvAhgcvPmlmQTpLds8cBEX0ZsyQBe2gep/LAlVElOr7EjlnkesRf/uoiDn9J X-Received: by 2002:a2e:b041:0:b0:2b5:8a21:5627 with SMTP id d1-20020a2eb041000000b002b58a215627mr15929820ljl.51.1689150249353; Wed, 12 Jul 2023 01:24:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150249; cv=pass; d=google.com; s=arc-20160816; b=dyt8Rg3Vu0LK6YCnpz3FqeB8wbISMyZXI2GX7z5ICCI5o/cYRVIE80HmxAM0xpRQgr iJnqrbaY2TJaLXjjYX6r5QclPInqaRxT2P6baTxaNpwmoIN23IA93QfqFUG0tmXCw7hQ meoyJ6Ub9oZjHGGzgPctnYHgpUGBPp0NHELCD95d2Bt9O7Y9m+F6hf7H5w1SgIbK86SI PC+9iYQo7gMKOxgG8BK6ARJM8JjsKKHviPYqlsURogxMF809K4Ar8u3N+S5EIRiQhr6U GPPs32TrpVcZTGJvTGjJGLTIsS0iI6auq9VkrM7kYK20JWeOO9wnNMFEwUyhCNE+jjtw JY8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=O9JmYrx0NP1LgLO3UWT+h7gQiXj9+NS7xepB2bMhlis=; fh=GueWJ/CJdsUjC5mckXB0EvWKynUiEMXN20b0Bxm9NIU=; b=F6qjkrKU9HJ1iNjO7w+fEK8x/YD7kIlRndRHjBIGvobHAHFgOfUtOm5NS7XnONaGsp x4YnnLFSuoT3LAO+mg80LZsNw7lUVI9tFaLpKx8AmG5Dj1WK0OARUr/eni4HDSugY9Lt xWJVQcvwn6+ya6NCDCs7U6mMyRkkF3s/gK3BUA3ce3zoaAxFaHX1ND6vLb3k0/eakCdc brVI4aB7IzY30Lto1ZigwTfheM1qWuciOA7CTIkCcj2HlbDyTkfAmQpbCaJQ0gAw/soL 04Ggn8OBBsOgG3wjIf+Tk5XEdzwsuX7U4ZTl614qV9TKqixGS/IxEx1BE8B55hPzKY4q kJFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=hGHtvtj7; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020a1709067c4900b0098d373fa9d9si3885373ejp.149.2023.07.12.01.23.46; Wed, 12 Jul 2023 01:24:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=hGHtvtj7; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231218AbjGLIOf (ORCPT + 99 others); Wed, 12 Jul 2023 04:14:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232196AbjGLIOI (ORCPT ); Wed, 12 Jul 2023 04:14:08 -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 C47E01739; Wed, 12 Jul 2023 01:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HS2QW00QTnkIib3q47e6BEL5w9cKAMlJ6j05+moV4NnMYyWD8ZWlmBDL7d4000+6xOIAGcAR6nY2zaxOQxNfi9sk5d7h+ONvgefTdwnkfJC8LbUE6oPUVrbjqy/XLUQoFDuInKihtXz/ll9CshnpzdkWbgMB5TLARUnjlokPElpFU/7lNpMlerMrA97bphZYGc5urc+M8f5sEWqNKrpQrgNxCgZr6oRs/5bEG1mdOANq08bwJYY/NhrnKC+xa3ZdIyjpO8flYd+B/TmZMjUao3qfS3ZHsaaq2WJBrbT7xwBAG6Yq3//Hh1Sjs/xLycGa244IxfgYygo5EJNN8ZyIxw== 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=O9JmYrx0NP1LgLO3UWT+h7gQiXj9+NS7xepB2bMhlis=; b=nVu33hVrGml95nUSeRo5OM9dH7VqoGfutlX2iwlQX+LJZ3Q8qQ2gUU9gVJKzZYBSUrFbV32pQkJ5mJaKRIE6LxNDDaiNTDLm/u9ymXSYbrWvTCORM7Ga/Zc7/ncwi4s90mUiWj+8bgI+L/k4VtZYjZUju8uxE56yRN8zvW04vAPPFpzW4jhmowAWlhYfkj+WC9+8TN8AYCIJBZSR2eDUEIJ7f4vdvId+2mffioPd9pT75Qc5jZwiHpD7zk4KJ66w50GQOjtRjyKSTPqGnpZrpCWY25zXDqTFqkRENCOtdnljHE4akN7G3oM1M2uQS4t0BE6zMveNhx6rETTb26PFXQ== 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=O9JmYrx0NP1LgLO3UWT+h7gQiXj9+NS7xepB2bMhlis=; b=hGHtvtj71xabR3iGkMKr9GPCztoc6HnbRc9KNxoaGdRqVj9CcB6kbAk6oSv37qP9ndx6kNBHMMRx4WLDG4Y4l8fXq36wun6yW4eMNbIXQCD2aauxz2PcHYzjtFgcPp/vn+5V319gkJt9FxRM6DUrvCn+hiRaGcrpM6UW1sX5EwwOyFogomsBjlG//RGK927HSI/SrW7s4/ULnslhuJYi710oDu4IRlPwvMkDstH3fCM7NAatkFTtpVyz7P3B1S/z7JLOK6wU2CBXfUPt9u8SiOukwIMJTPTz6rh+v7xaFpQEZc3R6/+2Mg9jqqTJc4VfV4WRIf1tF4lCJUa9GkgxeQ== 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:03 +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:03 +0000 From: Yangtao Li To: Amit Kucheria , Thara Gopinath , Andy Gross , Bjorn Andersson , Konrad Dybcio , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/27] thermal/drivers/qcom: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:38 +0800 Message-Id: <20230712081258.29254-7-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: ae9464a5-d92f-4c45-abd8-08db82aff433 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uaCnpZMnx8nfy642RTdF4Bb9wLfWtG2vBj+FnZU/zHMIB3KWjs/HXuStAFa8BN+HoTnyowqw9rssqv1DfasmTZzdhEQUlDO7Fx2IIq1axNMAXK4tGplCaNhPQNKEqpUU8JIBHS7f1RD0f+6jGumi+D1zJK8VGuhi4Dcpa9aeMUNMMQrJ8TpW2X9hdLtawGE33i1m7kQkfkaoAtglbPsiMKHutVmhr3KU4ikFB4nadrsafJHdtcEWGQ2J5rr+ydsaDn29ZbGD4Xm7qwtAn+j/3rDbk2moTnb2bTkKF9ftuleKkmy6OIErfk7oSAT88Ez1FoyW1BgcFrKikeE5QiRnOBOAk9kEuuoIc+xu2+fACJ7FaxDZvFb8vONpL/92H5ReQoHkrfakTLa1bL4HrSJaeZG13y0orpvOyjWdupF0lsf7SfLFqmIpfkO288rHA9smuRA1eJjynoa44erlb/m0hNYBmXXJf7gKbJ9jhzu6R/2f0GGw1Brr30ES0+QZWVue0HBVTx9izroSXlBN8Fia+tstL3+mQ3L/JAcKOTmpP3jkLwcD2BVAOu/ws5p6geFvyHm4o94EHrjdT6VBgg42/2CXSTIPxYMSPNv2OI+r45HQQjHiJln2XEf+WQMzOaAD 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?zyXYTYY6iNqkL9+EwBfgrByv4KJX?= =?utf-8?q?bHop9UjeQf9BZYOmu2+5C98l0c/kSUfMUs6oYXBBxkWUOJKRZlpe4FLG0YgGYdtqh?= =?utf-8?q?cB7SEodhjBylq9dFeMFXn2fQPFT2+d4NwKRMFZIwIO5yOTw/hGg78pZ6l9sCYpJO9?= =?utf-8?q?RU0r6FqB31YCGClwrfNkBkDGAnGo8CjRdddJlahGiSE1vjhC/sE2aqmLxWay7X78G?= =?utf-8?q?oEnolhUtQhz7Qi2FBjnOlUXBgJZ2X2YAqQsqoYzxWXqvQHAIzUw9QRe28vA8cpfti?= =?utf-8?q?Wvc1XHUHwfrb9mdPapB3V7/WtRjVLJORxWzya2T1NV1V0UlI/aRu1Xpyo0aHVXPA6?= =?utf-8?q?STog2TkLfIpjaHTm9vJbgAbp4YSAT+VSK6wI8yose474efTUy/11tGruRSj3zSbwS?= =?utf-8?q?k9FHevu4iv30fMIa04CGZjL+iE2zBdcbwwrA+O6G/rASefD6yE8jwc0UWr+iArLAY?= =?utf-8?q?o40gqZChhcL8lY+fIAQBg8sSOvn0dex/6xnSwoBxe9/hs3diuT/MOwILWuuVJQqxC?= =?utf-8?q?q4sC6kzQ3U/55O0zJXYlN+fm+uGqdkObgYMmoS7X9oJHjTi4J6IGBFVJPXBzTpH9y?= =?utf-8?q?w2Qo7UIunsmBlNel8KG8lU9RBB2tj7j7k+B1VZyH2clu4Njrk+xddJ5DgXOvphk5J?= =?utf-8?q?ksGIhdNUf62kPtfZWydj3ftzx33t0SPS1ybrUaGAdVC7yYOTNN0ghm7xXX9Q43wr/?= =?utf-8?q?BnmxosYv6XO09TWf1ON6S/JKCkHFXPoA7Wc01mp6A1w5AV4ah4vwOYtoyIVYUj380?= =?utf-8?q?gzChx8Uyth60beSt4xyv8xEi9+Q/16Ix8F7Iyv/9FIKpsv/MspAA5tLFYU5uNgQ3B?= =?utf-8?q?0PdCDI9cYiqZc0IFjiUEnjj1H3pPEhMd+5993CPE3fovXVjIhAXrCoHtOXJ2zA5Pl?= =?utf-8?q?saEjlhk4fAI2kvDJesWbnN/HsEAYv8rimlG7W3iAa8OMmc7Ou6DXFwO4zmtMa72MS?= =?utf-8?q?i8asHG2REI03rKYmu6uD41835fv+c/4BFnjn0MUq5mCq2dJPCXoZhRgXeuSXPlpm+?= =?utf-8?q?LyCoYNFKpsHpX0zK9hnG34bx3NMeJygLZj1K15dK74SaywcTnKySD6ZxfvtEerb1K?= =?utf-8?q?ReL0trEyzC4tLSA7vAmFfnQl/yfGMsCKQH4d4pIyWiwVrh+rpl7fWlqNgZsA6QXkc?= =?utf-8?q?r83ideWRgmXixP3IiouKTMail/Srl0jm0uWlonKi7D3od5zvL7Rc8cCGS0ayStF9I?= =?utf-8?q?OYyxkdHb/xugVSaDM8dOi05iqtJG0Dd/EJsMWrQ4Vwik6Tv85nERh51XEw0OlOsBg?= =?utf-8?q?F/+/oVD2pWM8QqtX92J6ZcHcmSGsOnFEeuXW8GCmVma3nRhNzsCbZxcj9CeNfGV03?= =?utf-8?q?Nkzqd86Dq+fE8xFvnYf7g0LLjZ5bwrXI6QaWs1cv1gXF9dAbza1+ELcWpDizDlhh5?= =?utf-8?q?fW0o7WgGZB1Cb9PcKxXiobRxgTUcjg0PE+dF9uGLGPBXLwnUNQoBw08jvF8ZClBfo?= =?utf-8?q?XBeNwO0P4oFZm/QHd1dvzhcYhKcATPALMVBJV6likr1c1xr1qHbLH2tErcAWp/qBb?= =?utf-8?q?FLuhlR03EXst?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae9464a5-d92f-4c45-abd8-08db82aff433 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:03.2525 (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: L3GZB+GwCs6p59PMoObFKlN6PAKgjDuoYL3fzS0tQyAsSFsJ1BF07vttQ9mADapNnv5ENl83hXcZVvPftN7ubA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202411487554812 X-GMAIL-MSGID: 1771202411487554812 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/qcom/tsens.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 98c356acfe98..6d7c16ccb44d 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -1319,7 +1319,7 @@ static int tsens_probe(struct platform_device *pdev) return ret; } -static int tsens_remove(struct platform_device *pdev) +static void tsens_remove(struct platform_device *pdev) { struct tsens_priv *priv = platform_get_drvdata(pdev); @@ -1327,13 +1327,11 @@ static int tsens_remove(struct platform_device *pdev) tsens_disable_irq(priv); if (priv->ops->disable) priv->ops->disable(priv); - - return 0; } static struct platform_driver tsens_driver = { .probe = tsens_probe, - .remove = tsens_remove, + .remove_new = tsens_remove, .driver = { .name = "qcom-tsens", .pm = &tsens_pm_ops, 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: 118930 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp995655vqm; Wed, 12 Jul 2023 01:27:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlFt2MXGj5YwZ06UihdLXcA+8CbX9vcqMU6aq5I6pcxyWDacCU6290DOnAQoGizRxDWOdnqw X-Received: by 2002:aa7:dd0f:0:b0:51e:eba:55ba with SMTP id i15-20020aa7dd0f000000b0051e0eba55bamr11881684edv.32.1689150468525; Wed, 12 Jul 2023 01:27:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150468; cv=pass; d=google.com; s=arc-20160816; b=DRM2e+rU9pZThx+6ehyfb/3Aqnp/N1cL4umDYGsQGGDKPgIrFipTlSkqrAOMf56vqz b9VnzrqMuqK+1iXZLGTksW5DifhUENwNFk0a9q16h0qdfrLRX0TdsUhPqvS6cU5att3s 6/WvU5vUKgFKPVnumvnS1rwsaYUX+7QUAJ8dtYR+hSnQJK5odB2a9AfoM7Jd4aAWT4/U IKhX6zyrAyVvrsb7kUosnXNoFqDrj6A3sb6L2UqtIwJkcAaVHrN2reN8IeV/UFJ99myJ CJvJjsKD2/Gqa55mPFakpucfxKEXSbe5K51L4El3wgDJBS8RbF4Z6V5sonLDeukKACb6 swzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4KfnkcOCRCsGJGl26MPgx9BL6OZU2oHmhp4i4s8PNKM=; fh=gF2itGWmtUVqnmzOcHFVFNxYnJ9SOivG91RfrScPkYQ=; b=tqFK1LpBghwPnCsF6PY3JSqj1cxR9oJp3Zn2JMb0KDw/iAd9hug0VQZ4u2hRPwz60z GNVEMZfjt87zOU50ZVrLI45WjFMzLsWIjKTn96lQ8SkVVkJoPUO5ViMx9KjenmnCnf0t gNtM1Rk2CXqXEdBIWGgPOK6K5lAdI1yRhfiG3RBL3hVXrwxCmHoPImc96psx9LHDqZkQ 0G25cRJg2MZ+Mb3LeQLBgWadi83h+tDYqGhKLqsfZikQXoBYWGMNHucM3MbaaoLiIePh fyFB6n0iHHqMe6kiC/OxNXyKzt7cWWD5L31c8+ybKkO8mbplGGkKhvyT8vyeg3JsDG66 rJfg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Yie0RE81; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020aa7d34e000000b0051bec8e6a76si4108560edr.309.2023.07.12.01.27.24; Wed, 12 Jul 2023 01:27:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Yie0RE81; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232241AbjGLIOk (ORCPT + 99 others); Wed, 12 Jul 2023 04:14:40 -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?ATz67I/snfMBEokMfRcvehVzzjdaGLOk3X96dGF9gmj/tc8vplAz0Yb9nTO2rQBFv?= =?utf-8?q?ATZeIlUFIg1u6pwf2hbjdvJNSAoYFStOnqXUXLCXq1qgYEdKTV1QpAPwlNnItpVdD?= =?utf-8?q?M+RtYGg7cyJujHDQpr+X2lFwkEQGStCdNulO4cO9B8MtY8Pt50eJuePZhxo/mKO7E?= =?utf-8?q?38bHtPR5I3gk5A5jEMKU89kRyaHQKNMrzUCmwy3Z8uVirz8HaSf8VqyABLFsCG+ct?= =?utf-8?q?M+9tMrM+y7iby0kiqGm2ZwSQk3Z1/AFqa0DXS71MyNzeDeFXed4Is6BUH7C/XtEnz?= =?utf-8?q?1pJuEbKem0eBGdMEW5OEyDg/q2eJv1eZl3eLcMioCRLiuRo9jssTysxiDD8cBeCeG?= =?utf-8?q?fHblpVqtPdjDlYEX/iqp9sZt61oCOXdcf6BBdDFXcFlaGTkEFqkyg/ebbdabGTZB9?= =?utf-8?q?zM/1f1mG9NCA9F2Xak+InajvrDsgHUWApVOreeeHzk09jiVVfys2Hp3vSDlr+i306?= =?utf-8?q?lvg4YM+jWnkYyYFhWIYmhD7JtfjkxO3vYEw65DqP0frHjgngczmgGJ3FLoZdqppDE?= =?utf-8?q?Y18XO3zLgX2JZTR4znvaQx+9q5TbOxkHdmrRH8yvljAxEC6Ldc+ha3UchaviC1F3u?= =?utf-8?q?zdW68Llwc6DFyP37xKw5DldLwgc+Gvto7ANKl90O6WCPisS0Ln3pzemBj6i3aI1zP?= =?utf-8?q?G59mk6mJpQ+k8OQ9FIQ3OiEAqLtZFdTWZj/4QL9w8tpLgENaLmmejUhb/B/rHFmJA?= =?utf-8?q?vaAkbvOJQjvYZ8bRkekv7gdr45tlQFVV6KfdlWcBCtEw6j1z4zXdujoF7AiGUD5Zv?= =?utf-8?q?KP6p2ZPbrGs0SUPGqbLuw5e5K2kcuscA0MZfjIcVX0escmbMQ2iXtgriYVVfh6hQ7?= =?utf-8?q?ESnpGfuB7ssSLFdco+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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202641549356730 X-GMAIL-MSGID: 1771202641549356730 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:40 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: 118931 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp995819vqm; Wed, 12 Jul 2023 01:28:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlE4dAy2RZbaqZBQa4ca6kR6wg21asCv0cvW/RwBeYjwHwpeLIwqXhDrGugxd0PX40RRcOoV X-Received: by 2002:a17:906:1401:b0:98d:f062:8503 with SMTP id p1-20020a170906140100b0098df0628503mr13728851ejc.77.1689150492316; Wed, 12 Jul 2023 01:28:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150492; cv=pass; d=google.com; s=arc-20160816; b=UlAMUOIPMmDQW1qNjwiqWGVZgeEdr5jh4oE2CH9ynSSLgJgDfvwcLneZWOESkiqR4E plWJBojiQxiU4eDlZLcbjcOGeKAT0OHfVXvRUEoMLj4ec/8sj8+Yk+jP+eqfyZZhSU8Z 2+sQXwIIf7gp74VMUG3/9BD/VkGLR78e5YRxTP1wozvntNotMq5gC6xA/MOB9KzaXSTJ uISm6vZSpz5o5ANMa6/N8+LIulTIwAaUW41zMggSSxTyFZAH75G/PvZu8aV76JR7aK34 p/ArZHbaA6/D0JqYtc1LU6OMzZ/HjCAyltzOqs8I9BCdzWoMMbbfn20i6P82V5v7JZay pvjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qTSHy6tikfzk9mbKrw76CHlWfY85kX8JtLDPfmC6nfo=; fh=gF2itGWmtUVqnmzOcHFVFNxYnJ9SOivG91RfrScPkYQ=; b=0jjCQfTsfiYDpnZDCPC+hI44Iwi57Brxvbtx+cAnbcnNZXk2x37RnPujsq171PbFKU MhHrlFtW6sMFjMo2sVkWqndwqr9p2217i/vSg5k6+cPMUg/PLJwZlgLoU44LnuoVZcuG nSqdxcmkb7cZ/BJl/zyKzboW/9dWU+5vAjwC8u4XhKvsPjwNISwGWQx9woySB6eKxDOG oXNjN4pddu7EEXvf4VLuydAGLi7nPVBIfssgDBtuPOHqsv6x7uipO77EOzNJdXRNj6xH 7h4r3apBtUoXQH1uKLVc0qaC+OtE89YQv3TmgRoh6nP9xbu5ye+A/Umq2HAXfhE/0vS6 Av2Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=TH3uZKxe; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c25-20020a170906529900b0099332d4ed30si4033597ejm.677.2023.07.12.01.27.49; Wed, 12 Jul 2023 01:28:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=TH3uZKxe; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231588AbjGLIOp (ORCPT + 99 others); Wed, 12 Jul 2023 04:14:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232255AbjGLIOP (ORCPT ); Wed, 12 Jul 2023 04:14:15 -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 4F17A19BA; Wed, 12 Jul 2023 01:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jtE3fiTXW+95h7NrZq+ag+b6kSkTUdhGbCS/RNjpcEBXC5+o0q7kZxwROjIvBfnmzPgpm/aYGNPsLdA6fA76mgCMG5x/RY5iOMVleeP82KjgAYR+FhYKabmkZl498ohVIK8wpxU1WOFuAfQY2c0FeZI+bMEYenVMtZ56v0d787e/iXR9QmgxAMkAbXr1y9SYIg4Mh7PK6aEPNR8Ik3JF474fo+KJbDMRP5Y4ZmFR4rrB6vBfZnCrNxmd6hNJHs/cm3Z0k3HXPrsOS48+bgYyhoux8qTDLHlno91xYFowF+bqkgfxMyo1n6sqevgaa5oxwtHhwkIBtsRxJFZr3LGa6g== 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=qTSHy6tikfzk9mbKrw76CHlWfY85kX8JtLDPfmC6nfo=; b=NkP1psMVF69JIyq3JKpVLsgA/ZjPVw7tQmBWXMuSRz42lB2oCKQrISBGMYOklMyB9+1kDlPRw0kmXGT3NFY6JBGEsFVgl0KdhNxKRUovS0eprZvFAhz+WuxHuLTW5bB43vxpe+gatT5RsozN1c3/JCcP/oO70yQqT8Y2EYqsjCyOOocNVcnVxlkU0oEjob1Q3ysFqt0Uj86DkemOscc6b3qejUrvoJUMyc/P9eq3sGyduYuPFdYCKa2rqjW1WlZyY4HgCqxWTKEukFtq9pRaJQQOtqgFpctXK20geyfARqPNDnN0cmSNApIn3ixkieB1z86oA5KMRTAm2Io+kYXnhA== 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=qTSHy6tikfzk9mbKrw76CHlWfY85kX8JtLDPfmC6nfo=; b=TH3uZKxeRknU/OIyzjleKp2MZ6u94UATSyVRXm4PaajmwPuh5DI6lfef6ZgSfOUxfXpWa5omu40ReeaPlQcvuL2xCR6lvH3oiAgGB3BXzlrnmzn1jyKbuCXLl89jiDgZC/kenpyTCZCnz3tex2TlkKnsHJo8NgqlUuinVK86/mjyMOsTjZ3c1BuaYsq0CP+AqEp5XdAiN82+FSGYvLWyZ4l5H1bZUdlxTYfQEcNAzj4rcnlCQDvu8YYObapQEqAP68ULpQ2PWHTAIgwzXea2p6Kk7g4C7SdMtScXv6pbgq9PO6KpVO/twHvw/z0VVp/aRLpGi+Dsgwlz9hhhUblc6w== 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:06 +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:06 +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 09/27] thermal/drivers/spear: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:40 +0800 Message-Id: <20230712081258.29254-9-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: e3ad1a3d-2f46-4668-680a-08db82aff62f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jh4N8cd1C0cb89OHY3/acIUzGasKd6FkgqlmWqMHXT2/ccQuivct2vF4ppfoHIW8Mm0gKMToOP0Y1j4VSlUBzWg8w+dDl+Crmr6EH/FUjwRkrzDJ0Hklg52dbpffcI7jS+j/Wnx59sSy7S6u1CS5rWUvCpGEjALBUDALvh2XBCrdLxa5QlQE7bPYkV/M6nSOnQbhJd0DTs/BTbBOtZfTFlUpJHJqA/k4sXsZqLS0ZYCL/9jDbyHMTqF1VUDroMXXvAOeZoi6+yRiTDcuVLezO9odCuw3EMXTLljqxaZOrQpwsZAV+CigCfZuXP9KObMaF/dG05pshwTprj27dqO90dy79AgLF/VXy7QLVCeIlaZjiwADHEyZ39c0XUe8sGdpBLXNdJfr4RFJff0hd8x0DFvy0KicYmUpuE9hrpUszT4nLDsd1fG+Ihu/b1VmuBO5VbDpg3RO44UtSSrBoxGBQEBLQEO4HsxdjQmaRJyu5+6LJJfrusrbxdpgNZV1ehppO2rKVgEWGRZOR2nYzNH1NA8WsjxIdNbQ+eUwi+cRnNAhBKd6O5/NJK+HHAqNf1V++4rwgGMdkSh5uhuZYNsGpPkz11WEA62yUMsNwWEMXIYIXKfNhLKFiGYWHj9nW+GZ 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?m3jtXAhC3tTgtE7d4TaM1UKQjUr5?= =?utf-8?q?DZT/7BMNEVEFvrSQ0TN92zOpKcfcQJ2gAq7/1s35PmXyFQvyR9j3TmjX/n9A7miE5?= =?utf-8?q?I2UNKpqBKUGjF2U5U29DRQVHVsAzG/aj3zBoLtlb78bahLuAc1zBwJlbCsINEkU94?= =?utf-8?q?mmqMtSceDVh2RZxJeqwXVi6ZRZ/bqyH0ED7h7soWiHDwsmZHZTe6QX5KuG9BU8D3X?= =?utf-8?q?sX3/EqFyUUvxQqMUkd0BVr/KmQ8xPpJrKqzDnCZTfORrX6sK+tpEgiiYevLuARC5s?= =?utf-8?q?k3RBtpjH+wRtiIDD9McrM7h+dNCVfCNXjmSvmW+pNa7+URTDc8AoOQlfOlb4io7gn?= =?utf-8?q?MQjUOAbXbqEJ7qLHRSDtp/XD5GU5F5rtItWiFsmvuROo2VZhEn4hfEnK8W83KXD9u?= =?utf-8?q?foDwR7CYoWAlUbyxQmWsEzYJfkzRC8A6ZRNI6OxVaXkVohrtMdHQWE6SJldlDwM0N?= =?utf-8?q?CVq5PFZwRz9/UWO7PesXFGPISQKmqKkKJfag0feOGhQtUNUCK62ZeRjH/K2hqKEyn?= =?utf-8?q?qW/+T/rvz1sCtRPZYbcpj5BvnvbJTa52nr0FHqPaBP/eE6Ke9M80ai5JHbRnyHskv?= =?utf-8?q?yz5rcoZfnepyhzRlrVO6sY5chBVPfs9UsV4gC2u57VVAfnQP7YeuZWRBPkquMfpnH?= =?utf-8?q?eZvc8CxonD/vnsP+dg5T4PB+yxoHT/RC015/lAZCXRQgcQfzPGBCZ0EDan9iUsDqx?= =?utf-8?q?7A00iusy8zw19EGt62o4Ty4gJ/3Hu52p7776egenLyv2or7CA+dhT5cxe9mATCYf7?= =?utf-8?q?gFycbBnHcRX+fQiUAqireqvfJXHaLIq8BsvZ2C8J17IsBiKY2veW6jP3DxPLprdXP?= =?utf-8?q?+GjMUoOdSP3QmrN7w5NQCQW+IzGW5TFSI7vftmseIvxV04KtpkRJoxi6qgsrjsiN7?= =?utf-8?q?zzYn5QIvhCMB7sS9UEUcyxNfJQiUscQ/zDs7DjxPP5ehrQydJmxS/iDOkBsvE6iWE?= =?utf-8?q?VbutF5j8g5JQAuo9+lpfC/spqQxbZVOs1etiq1CCBS/PIP8vG2GCFE9frMgMuuc+i?= =?utf-8?q?G46et8uRkpOEhouH4iv4Dzprf8QBchFVSp6MfnasmpnvhudSxIKtjvIVE8+fAmnht?= =?utf-8?q?yC860bfBQdoi5IzUHGATvEnar6imPY7UAKRrIfjbJ2gKUC+bB5MFGiNgWj4ZQMxLE?= =?utf-8?q?HRWvx2vxFqynDTpkw7wpdeOvOVyG6EPPASYsl1FByoKfbGSU/Zrx3C04mQ/N8zW9J?= =?utf-8?q?0xSxSU9+DuMCkqnQe1cbfx7/GIODL5YPvaQbjdPZxvS75iifBl4JfY8zlCjnOmcAr?= =?utf-8?q?XTRlA4/TRbvfNi7IE37VOJ69s5S6RVHmGn0RmedRKbdyGyP3M3Sr6yXN3dqKQ7Bri?= =?utf-8?q?zkyKJUe+27aJpRT2qNFDOS0QNNu+cObPxwaDt0Q5R9TP3EuzSCW32900LscJnZxCY?= =?utf-8?q?l+3anwb4S3WeH/ZWjMhsX80JjAjXBzBNVcXhNeJ5HPsX1yKL1P0om6drmPDV4fON6?= =?utf-8?q?XsqxT/q2MO+KrEDb+IiNed16i99mpcBLsBoQKW4gkaJAnhP4EnsG2b6KAgTzRH9lA?= =?utf-8?q?76DJ2S4CvzDG?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3ad1a3d-2f46-4668-680a-08db82aff62f 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:06.5568 (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: HjIWdBJEGpkWuSHNx85MubFtVDRsAzON1Y8Kd8VcHiqA95e8e0qK6g0vXezoKF3yBomwM3MZmsdvgp8mkyAmFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202666698152672 X-GMAIL-MSGID: 1771202666698152672 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/spear_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c index 6e78616a576e..843fa5c8e7c8 100644 --- a/drivers/thermal/spear_thermal.c +++ b/drivers/thermal/spear_thermal.c @@ -150,7 +150,7 @@ static int spear_thermal_probe(struct platform_device *pdev) return ret; } -static int spear_thermal_exit(struct platform_device *pdev) +static void spear_thermal_exit(struct platform_device *pdev) { unsigned int actual_mask = 0; struct thermal_zone_device *spear_thermal = platform_get_drvdata(pdev); @@ -163,8 +163,6 @@ static int spear_thermal_exit(struct platform_device *pdev) writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base); clk_disable(stdev->clk); - - return 0; } static const struct of_device_id spear_thermal_id_table[] = { @@ -175,7 +173,7 @@ MODULE_DEVICE_TABLE(of, spear_thermal_id_table); static struct platform_driver spear_thermal_driver = { .probe = spear_thermal_probe, - .remove = spear_thermal_exit, + .remove_new = spear_thermal_exit, .driver = { .name = "spear_thermal", .pm = &spear_thermal_pm_ops, 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: 118927 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp994476vqm; Wed, 12 Jul 2023 01:24:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlHzPzPmbTVg3vsyg4P/g11QEDum/XePNRobFADk2vhaTycu8iNVqEdXWpuqeIqfH0yKS2Mr X-Received: by 2002:aa7:d684:0:b0:51e:5603:5073 with SMTP id d4-20020aa7d684000000b0051e56035073mr12326365edr.3.1689150284894; Wed, 12 Jul 2023 01:24:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150284; cv=pass; d=google.com; s=arc-20160816; b=0kmsWYODEHwwdBZoDSzFqpg+QpQpWYiacUZbObde8zAPGC4mYTiTKKk6jEkZVwv4N7 gpSmNwXLSGZVvhktkXGDTxTuwWap2BTImWONnViL8JOydKZCLNIT8YHUbCyS2hzone+G VNmO6mxA/KhgghSrEiQ57j/Cou7gXGwwHbgrLC/o6MNbYGgmMgBDqPlf7nIYvKL1G3f7 2Ct9BKxy9IIIRrCZ7iyBV1pUTXDFdLmuG66gEfwPxR2ocEcLUAE67YrPH2BE/3wXAS0I 9G2Dt5HKnv3fOYpJAq+oJm4zMaAdJ8m+IWSkxYotVhsL20I8ZVgkLJw5k3laHnpK46Bf YWpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2trwrTRv81u40CbsVYU+78HZvkwkCI6xWFO9bsRms6A=; fh=UE66bjTyLc6loU7yqTnQ/gDIN66u4PI+aeGGztz6Z/0=; b=qrcBInnzYR6SyS+HHIEacdnCajjdNALPKsQHn5hCLsgRnothv5l6Jr82tYW032lprZ Q0LMrWLGJtNageGelZJjxzbEdhu9715qFS+64nOqqXwfzdg48svv9gNE6SsiRxc+rJVW vXXUK9sAsAe6j3y2dajUpsd9E2l2kUFfU5ZE3tc7fiBqfTPPpAaT9N5/lLpSYZpnE8GS g3EU68JxgasoFNpPm74x5pIB5vxlmOBocfv3qUJ83P+jeKDA/Bzj+sxwvJf7RrzKNetc tNo64NJcABSENCtDO0M1YNf1Y9yhlRpE5liIipojboSlfTTkX91re3qTXlesSbpD8IcC C4WQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=KukuO4Xm; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020aa7c704000000b0051e186a6fadsi4110149edq.227.2023.07.12.01.24.21; Wed, 12 Jul 2023 01:24:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=KukuO4Xm; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232357AbjGLIO7 (ORCPT + 99 others); Wed, 12 Jul 2023 04:14:59 -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?122895dbOfuoNAtGDkQdUJR4vG3H0SZtKX9p8Ug43jtidcrYkHA/mZjTS+w6VI1Oe?= =?utf-8?q?9QETFpb6cTgrCOxFgGP+DhSj862ucZhjFR5oED0FNyORcegJJKcmiAdFUAt+TSFi+?= =?utf-8?q?kHHbhLc0p9Jj//qobsJ2+ZIeRoO1uTZmQFugcn0N+i5niVAJu+yy+eZOTkRy3e/wE?= =?utf-8?q?mvdnFNlGUEC5wqgOz5gNjOLlkYejiXARKiR8XyfyjLoQxON1FBwVYbTQlvILK/edT?= =?utf-8?q?ge1AxB1Zw3jkUq2xhFEqN13bdk1wU/0CJOS/Wrlh226fWvxc6Uc4vnPg/tkj8hIgk?= =?utf-8?q?eqQy8WZPLUVjHNjjZZa4rVIrH72aQSP4IJMO9rVLdjjwPIF25xSESxfBkohe0GHXR?= =?utf-8?q?Tkls2hJstbD+wNEZ/0sJ7OJ1n/IoD45BT7sj+dFqFLkXhL7dP9reS7fAl5rbOBMxJ?= =?utf-8?q?nMLsfBiLpabLviZCXNwQr8KIqOkVtQ35kJptQMBwSQyNRQrDda/+07KSIYPinbcU7?= =?utf-8?q?nmuCA3DgBwbIdhXpQAx0EtGn3HE4lls8lfslLyYeYoE3EuwO7BUrOREEA2916yrpm?= =?utf-8?q?k5BNr7suTMepbV72b6XbDiGawrX1QoYN5R8aYopBffLx1sVeMsR5oLYlTLmtpL3IJ?= =?utf-8?q?9cw6zuNxNO6BkCzjSOurr0FtRuXBDdau7CJilzhW8a6m37ckWdhHYKAbkdZN/mJSV?= =?utf-8?q?B8RJP09+M3ZdWg1KRJsX2YNyw0bziEbLWQE7LHlGMTyZvdJkhShSxOigjAmWL8dxh?= =?utf-8?q?B3FxkgYELs7MFEFYbUQJ6jwmUtCBmhBIP0EDo24d8Q+GWokBHZUWjrKKI2Dd5cML5?= =?utf-8?q?cspuIReJBE6/zsdxKTAUS+HuYjNx76BNY95QHNzgTnb7FtcQnPLJ38xxsTHSpfoJG?= =?utf-8?q?r6eqMR1tRqMvPC7kZeBNCi0CRnf1Q6cLcjWUr9AzvzTccBzgnlYBinGc0C8MeAfRU?= =?utf-8?q?5ZLtNIT+GEBy2M6VQTxilVHjUaWNQH6XJ871LLpTFHXvPainVFO1R2xfTXgVo1UI4?= =?utf-8?q?UoMsQMTouX0EZmY9l22dGAlbGG2FiXtiG9LuIPWxdWqHI99rly1QK2shvYP5hDIjj?= =?utf-8?q?ECzDwmRWkQaA?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbdec929-d002-4e3f-23f7-08db82aff75e X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 08:14:08.5523 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KI6sgDu/AUHlZNaEERcUO7k/3ZXdrTo0bJALVdLQSiKs0T7wyPZmi5MmrLA4dzHKyRx6JhHFBHt28JVSUGosIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202449522498255 X-GMAIL-MSGID: 1771202449522498255 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:42 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: 118924 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp994204vqm; Wed, 12 Jul 2023 01:24:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlH2F0ZGvxKz58tEReUfYaPCSAC5P0VPlFVKerYXHe7V8MXin7tHz8fX/Y61Xp9bMvz0qr43 X-Received: by 2002:a05:6512:39cb:b0:4fb:8dcc:59e5 with SMTP id k11-20020a05651239cb00b004fb8dcc59e5mr16634016lfu.39.1689150249867; Wed, 12 Jul 2023 01:24:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150249; cv=pass; d=google.com; s=arc-20160816; b=C9cpBnwp1nvcdtkrZp/SG/ttrlGsEMERSkHMYseESce3L4k4eFfFOAAkT8yl0+pLOh QPWbzcjkWMg382KZn2BmeBF/8I0ymXBDdE8RUlcOHaIXIVNo1MvTac6rkQnAGA3b6uIp T49FN6b1Mb9E4a5ZdlfSRMBsOESaumJuAYnCDrhnc14mchT92IS1fVvkhRr9NOhSGcYq tEf/Q4kMgrNT8S30NdcBmwPPSpXZ7an8XttaERGlCLMbCiHTH19dcTlNunfK3UGwsUkN lVGCbdQyorxo3YVohnu7wwYCvmhDLcOqNG34YuV9rVuNiH0R2znRDoLEI+kE203ou1uC RA9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gYrFEyS6+kzQWw8nVis4Vnhn01IbbeVNBEzmAGLb3Rs=; fh=r3CaERCSMlnS1LcfK6XA66sE6pMX1C7goZeg2fP+uHY=; b=XlThiug/PQbo6K4Q/zQCw/sjZeTK7OVwLcwzDhzF4qr/EMk1PznVFefYzR7wcn08ng Yi0WzUrWaAFl9SCgZL2EUdA8dthgafyCDizkjSlRPrI4eSv3kALPQltM+Dk6R8f24rvj ELCb/VsNeu5BxVgD8zlNVgkEwzwsbxEGjagVYM1lHXK7czLa1biy/XR2NUtvf+Xq5XM+ wYYBd3hlQ/XzvDHqEn3oVT2tDw5P1j3vzLUxnZjVjOmRF4gHLZH6QMNB7snSx2VKxiaR /5mXj/8lKaUy+QjjZK+09u2ysFQZeG0fOzeOgBkvbp/6SbLTgfN0AztkRv/hj7fSx9CU zppA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Gn6u57Xe; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020aa7c704000000b0051e186a6fadsi4110149edq.227.2023.07.12.01.23.47; Wed, 12 Jul 2023 01:24:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Gn6u57Xe; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229907AbjGLIPe (ORCPT + 99 others); Wed, 12 Jul 2023 04:15:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232339AbjGLIOx (ORCPT ); Wed, 12 Jul 2023 04:14:53 -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 991971FF2; Wed, 12 Jul 2023 01:14:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z6fJ27s+hBe4wIYM1A+vw2o9OAbxGK1+qeBU92kysCVN8JBzGBRmL5kAHbp+Re1ipa9BBo6D5uveG40iqTg8UMC/exDixs4Sp/oSu1KkNR8mJl2KeJRcyzl39SOVgVo1YNH0pr/hyMX4TQ92xTKb1yLlLzzUQ4xlg40rNoYn8EzBIREbKeI4sM7sPJxZVzwK6wEbbw63wdaVYZnlfRRwsVmxymS0RIcN2kiZjtlnxJx9xidFceZYivUfd+4BcTHsURjFHzmFIJeaJfIB65XPzaUh8ViouQFTruEyzLjcK4928XlxwOvlW045Bz0+BUpERnHzyRylrY+Cph3jbBZuow== 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=gYrFEyS6+kzQWw8nVis4Vnhn01IbbeVNBEzmAGLb3Rs=; b=UJGEOX3pDii0xzMRsxGSfCCnYlYlHWoRUaKlCc5ceU+AdrcGHW6QMU1/wIpUJ7lCZ/GVUWAhVHNqrKmG1IuNqj0sf4mEDnqyeJvEe44Xmwl+v+Ii5FegfhqEkZj0ELwo7JhPCIqV0GcQF0MvXJUWlsLq+qR94wbiel2NgaJYbs1gqOVB2yk9BZaJr/nqxf5oxGWA2amlGHDlq5ii0MkI7KcQ0Ao/PH3mMjHJA6df4QRMpfj6Pw0KhHTFqWtWBoR1rG99QWRElGmfrG2zoo8xMZEYbjfG3KpEbdyZ8QyEl0JKOFHxg8gPBCtTbPAAQWIAyi5mVVkb5IiHMczWGTU9IA== 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=gYrFEyS6+kzQWw8nVis4Vnhn01IbbeVNBEzmAGLb3Rs=; b=Gn6u57XeScyreIqQa+g07qzJm12CzQ54afKoi/Zj6yDDPuJVQogVH+tPIptEx5Pi66Slhq4KFW1Ay+SNHDlWUU9KToxj5kc6f1nN3+U+4vLJBBeFWFChpRMwI4/vgP2c8JSI1+efsT3132/fw3UzOObgM+kuP4uhDx6aR/DFOHyRPoutNpzsGMqAaxzjh8V4scApKx+V3BOx4fXCCvguy2nBIBxPoxQVs1FvTv63WVDynxV0X+NCalKTc3naLUKIl91bYCLpYsdY5Lw52G5zi3sk6Zd9dEe5zzuHc+oG8tqfEXe6IYw+a4YzZUH/ZBUVL7eT2OKhtW33jKG6MjKVEQ== 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:10 +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:10 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Kunihiko Hayashi , Masami Hiramatsu Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/27] thermal/drivers/uniphier: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:42 +0800 Message-Id: <20230712081258.29254-11-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: d38ae62b-e0a8-4614-1b75-08db82aff888 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 38PFuoKpKw7kGC75QAesBjf3V9XnOUVo2c84jwsHWLBwYmLgTZt48CkU7a5KzvvVekmkaOTJQ3/YIuq1OjiTvmRwnC81xg2XShwcpTKPRqAXBGzWMt2rl2ttUsPpOq6+YgehMESGU0s2zykuXX39O3Rduil+vIRLRcZUmSrHLGWN7jijS63YCCxXR7BH91u0RkVu9g1ufqMfPOJPltIHxrODReuhkrwh8bkGIQmSl6O63WqCy83fVArhAWeVL1k9X+SWjvscab9u2SwX83SdG7tmuxBKZx4UqNJtUAxE9FXld7S7kxJ0BqebmIYfUM4GzmVfQlkb+K4XEXW8phis1pVVAUzgDZKLmDxmRlzC88xDHhWAcmNFS7zM5EyzwocURyLnY0AZp4TugY9dQnHWbMGkzGLvB8OF4I4ecjvZf7Cr7Kg7jl//BALjRkwWML7t0UUN+4JDXZMJMLbqqzw773V8TefX9nFXr4HRrZ80C1di13s9K9BAHdmLdsHOrZYiFrovYEri8krOJcGwjWYHtMbSudtX59QqVZ/06YSc06fEbw6oBhgsYvguYUj5vOO+Qav5uw/k6UGL4FnB2T9fXJgv5bMEa//0ASw2rgkBaKhC/KId75gdX/LUhRregy+3 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?Pnky+Ve3c2e2TIsFpUI0OLtdV/Bl?= =?utf-8?q?5nk4pXuT9O/dA5CBbovWjoIHyD2BUlLwoDsEWdE85wBM3DqfmO7k6pKUGs+DdEw6M?= =?utf-8?q?8kgSCrwkmlqsmUE8tzVeDNjw0W5V80mjLyd/Yq2nHM3ROglOea/2InqLMtSWMatZE?= =?utf-8?q?XwILGN3gpwuqVMcfAoMGlR7QiC65hsYVYQ5Dp2IwaUlbHJyv8nhD2T3rBgk3cUSj2?= =?utf-8?q?Zloe4WiTx9ALon95o1w9//+jbnlKqV9y8llvAnih5T68QB6FuAY5uLt3px1KY4tov?= =?utf-8?q?LKn4IdPBPacerb32N6qpG0FZhiTofHwv/o72PVNfnWt+t9vztjdkfEZ7y9VAAgEUN?= =?utf-8?q?UHKf9KAJdpBLYw5R8VKjozIg2ZYh1tbEszb4r7t98HMq8yRz1hLDox3768C1bVV9M?= =?utf-8?q?BQWMZzY+W7nr0RlA59khI0TBS1KQIlMftsaMbbZYAdRFjmcSeugJANd60YYLN70Lb?= =?utf-8?q?1/qYY/OYoQDQLKtXWdWOmAAeD6enuOU26shjJaltGqWqM5TrYlmxI5/yLFnOtM3KP?= =?utf-8?q?zGWnv6Xv1XDsdakNv3fvRe+tM92RFoATB4nM45LLFEWx9IbViA/xAgUIyuiNw964L?= =?utf-8?q?8nzNC0A+Yf2663KHzEQuK3UQKkZ1W9gUDdBXRWxNVv6uR8AsZXE9Do4VUEfpaeSXi?= =?utf-8?q?mD1oi0QZHeJjB759hD2aY1J/7BpLD3j5e2GTNAc49kaDAkUt0gAKc3c624GS5Vz0h?= =?utf-8?q?jaFBzFBBbMchXu4Q90FBtdPUvoX23t83PjMP/wykp5PMxdqOggxoXerH8JQ0i35rg?= =?utf-8?q?a0gmBEVEyUN7Ug0xQNasLnXJV+XlvOih7nvTA1wvVGtXVCW75sys65sXSDlowYrhN?= =?utf-8?q?XAsYSDPh+dNS/jVH5fTtBxCy4WRL1X9CL9gU4X+GPD5HzJFagoSmpGbvWtjcWKuND?= =?utf-8?q?Mqo4YNo+v7f2HHdBXJlgBZp5OKltNMawzSSsZR4BoIUx+EjJ63AxqHDP799mqrioL?= =?utf-8?q?dzjz5ArOx/3nYYz4p0U75x/DfoipaC3NFpO0KtSGUqNTOdHA0bfinXZupe8DqW7fm?= =?utf-8?q?n4FGohfBHFwuyIMkrBZoWElsNTGPkxA6hJNXj6syPekMxYzcEElWVRzbz9N0HhFyV?= =?utf-8?q?UPIc1lMyNMLeWyOWwhDl2qFVXw8iIUjimvX/T15G/fSATuKR04KoLlZWKjnaH7mIZ?= =?utf-8?q?1bdrvzy9VUq2p8/24A+kXMTiAzQVAKnquh4Ng7YUeYYMtrylOJeX9hLfnB9AZ1HNU?= =?utf-8?q?ha+JmoaTS1l8OJJzP0RlZ8zCcEsGnOgQObA6JIo8Zt+VI2pgwlDWfdRwFPyZpLwil?= =?utf-8?q?3TgBg3+ioSftB6tMbsgKiKLOJj3nwYzp+yGh/wgCqczzSSekvyeu+X9MOh1hmhZgY?= =?utf-8?q?ZuM96qF+paMfMK7G6vhgjHF4lFe4G4l5G65F7ORT+zvuQz+shmxTFBNEE9vwnJzIX?= =?utf-8?q?tspdonBJw0/j95mCKlH1bhIJIRCJ1yTgeaLU18fhCSUGArMGIzi9GtTaSRmJhCIcK?= =?utf-8?q?1oEZh9r/rlD1ngSRTIhEGZHkkpFEceqQDrA+hYULPn3Pk6iUUfB0oqByV/FC6fgC/?= =?utf-8?q?LaJiM32T0sRe?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d38ae62b-e0a8-4614-1b75-08db82aff888 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:10.5500 (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: v2TlHxvv8kcHR8GZmDTH4UJb+a4WTClu3T53dHbgNXNkp9fZyj4xlvws+Vt/L3h0CvhrXgag0jO5znoX3cKk6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202412416717784 X-GMAIL-MSGID: 1771202412416717784 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/uniphier_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/uniphier_thermal.c b/drivers/thermal/uniphier_thermal.c index aef6119cc004..a5320ec9939c 100644 --- a/drivers/thermal/uniphier_thermal.c +++ b/drivers/thermal/uniphier_thermal.c @@ -318,14 +318,12 @@ static int uniphier_tm_probe(struct platform_device *pdev) return 0; } -static int uniphier_tm_remove(struct platform_device *pdev) +static void uniphier_tm_remove(struct platform_device *pdev) { struct uniphier_tm_dev *tdev = platform_get_drvdata(pdev); /* disable sensor */ uniphier_tm_disable_sensor(tdev); - - return 0; } static const struct uniphier_tm_soc_data uniphier_pxs2_tm_data = { @@ -363,7 +361,7 @@ MODULE_DEVICE_TABLE(of, uniphier_tm_dt_ids); static struct platform_driver uniphier_tm_driver = { .probe = uniphier_tm_probe, - .remove = uniphier_tm_remove, + .remove_new = uniphier_tm_remove, .driver = { .name = "uniphier-thermal", .of_match_table = uniphier_tm_dt_ids, 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: 118936 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp996110vqm; Wed, 12 Jul 2023 01:28:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlHeTWU+RWRc8Z0M4t8iX5NyDyWVEA3L3au87JPfEp6y0ddtrKJ+5vX1G7PrztEQhZwxB684 X-Received: by 2002:a05:6512:694:b0:4f8:68a3:38e2 with SMTP id t20-20020a056512069400b004f868a338e2mr16174942lfe.0.1689150536064; Wed, 12 Jul 2023 01:28:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150536; cv=pass; d=google.com; s=arc-20160816; b=bDWTwZrRjFMhA4sbM389dZs4+I61XdDMu+EDrIfMrKgdiJwgl64B/BM6WMM3ql5j3q 0VD80TytVQS8i3vjXHjk7liDx80ipHeudoLZayYKsoidDZNFI1vwiZw4tQlhaMAwUFEg bSX9lgDOjpx4UfgMQLBT8CrqhPt11nuTjIPbQ1l5GPoyQVeaIac7PAkdTyKjgSV296vO UGf23fA+JW4EVUupe9Rm+LGKk2zVusPw7FRrqS8LwQAGgm8PpKDZOIzPHly4uLjA6SWY 9fP4/BgyPVFYAK00wTFFNRf2APIyK6GidraqthKH9ZzjYVXcDfO7gIEXsEHUs9Z3dBOm gCHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BuytSjqM/X4Fmb98T2znUym9CSN4FbNy4RZeehwR64Q=; fh=gF2itGWmtUVqnmzOcHFVFNxYnJ9SOivG91RfrScPkYQ=; b=ZFrGIAgBEsdTK/dNQlD4YIEEnEdCjMGta/yFLw2IlDKI4JOZ7QHSEUCju9/3amsfaM 8wYeFsgmQNyvEbRXFMlvtOdhQPyIg3JjUynuwHO/kohcHVNtqEcVapZS5oTE3X4UISEK 6BmGRsphD/qGW6l+cs4X4/NsqFi4Pt/7/xizx/tGTKEFJbg2OWzIKgwHNx68RnHP66Ax 1B7Eo4z71Jcajba8STwHlS7yuicFcbrBiPdmn5hPhuqEYh2AoA4B2THBtnN/9PzDgC60 A9peNi4Wuh5SpKF8ra1mmkMzTLN7qguFBym56/JSVjg37BtNEBZ2LP9iMzh+xDCY2wHf JYnQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=pZjtjQ9h; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t8-20020a05640203c800b0051d7fa84adbsi4173195edw.301.2023.07.12.01.28.33; Wed, 12 Jul 2023 01:28:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=pZjtjQ9h; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232142AbjGLIQW (ORCPT + 99 others); Wed, 12 Jul 2023 04:16:22 -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+frIDUVJazIPfBuZwfryuml0HbTBqgzw65etEWvr8Keuk?= =?utf-8?q?n1Fuw7MXjcKZ0FmgzxDcuDdcIXCbiMmBRY+rrqY/sNrZU0oAlyVRNGp2FJ/gGWXLd?= =?utf-8?q?X1NBCf55IQDO0x/Plm8m67z8ta2hym57/RwxcBsROEPHrTl1n/d16nEZ9DTTFkGGU?= =?utf-8?q?vyPeaS2CsvbS8nPQQryOh29B5LzEvZbwJ1+mkAJUWyVj/8qVFkBTLr9IngAJW4TDe?= =?utf-8?q?eL1mOQy8RNnV2C/4s96PFUu0mgt6NpuOciO+rtzJX86eYJbS6GScy+W22myXBVMn/?= =?utf-8?q?L9ysJTerW/7OFORxP0rlGj9mWxWHfUS/ON/2a+mY9Yxu6EHQgDmoDpf9k6BFurejg?= =?utf-8?q?sSCF1BF6dHC5uQHFdXMnKOGW32JdA4Ht3ewn7YWGQ/4IpR6A2GXqcHrQdG3PIGFAy?= =?utf-8?q?p4NV5R2nnd6DLHs3E2Wg+8tUjya/AKpwZ6tXRZLsayDE5XvH3OSo/B0AGrn8NcIAW?= =?utf-8?q?EIv2cGzQkixlfs6zA44OWnaE8Ir0B2VmqCo+zy4RWf9GJqiFt+2YAuuMdBvzYDB+a?= =?utf-8?q?xWOzcffu2Jnx6Z7Xvgb7Fc2v4G+0+BB7dX0goL+gh7ZJUGRv91R83j3V99wzTPwSF?= =?utf-8?q?F8rT9vv/aH7A6GfF1LVrEwU7LSrvssQM6Y4P1f/Q91beue5bviBJKKrb7LB2U38gd?= =?utf-8?q?UoiaN0qRNPGgu/suBe+4zpmjgtrQl1aOl3EBs33zbCt0sLEYTfhtgzx/mApw7uCxZ?= =?utf-8?q?iVfGwO7FSZq86OTxXidGGJ4m2eZT7RKjUpP5yipHB3wZfCQ7Qyqa7cMbqCvyvATYb?= =?utf-8?q?7F+jN1b+SwpNKcory+Fb+p1DJk2SD38MfRPUfJtpwc9Js2XPfts9BI50OfDAlq4FC?= =?utf-8?q?Cav4ZZcn3xpucyMD3Dmu60bDssb2XmLdW0+vlSUK9Jy1cgapaSGbbt2YPLv+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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202712557871443 X-GMAIL-MSGID: 1771202712557871443 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: 118955 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1007035vqm; Wed, 12 Jul 2023 01:54:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlEBSsJVCBsl22S2++h2O2wXSYxriIe86hBUACPkpyk8L+bMQywb6os8jMk5QvrGJotf4w1I X-Received: by 2002:a17:902:e54f:b0:1b8:a54c:6183 with SMTP id n15-20020a170902e54f00b001b8a54c6183mr21844660plf.46.1689152059348; Wed, 12 Jul 2023 01:54:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689152059; cv=pass; d=google.com; s=arc-20160816; b=kU9BOnek8lShgi1VuQxnLotZq6XyrnUDJO7grd45b+m5LNu2+X952LkjcMErRsjh0Q sMpmz4eFaNAhGHywX41u2VGffBhBevVnqb93oOLqWD6VYLu6nWaAg/dpdXy8D0egpE3X AFijVPp63UVpThLYsaX7vhNQIhYaNnHVcUcoNsXOaJwqnUhVHcBYgMpvM5TiE6Z/DzyS bIwxtqLZYJA5q/vgGywotVsHWbC/OsQyJgmYliubHRRuAvaATN2Vs1DRC9Mvf6f6x7fi yno5uiDZMSUjdtHfszTqcwx1hHKacvpuubsKSccklFk2XsPsKnmgJbDfE/547yCksqtw /qOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lYFoLrIYPPMmZGcgCqfwl0/W4Ed+UKsrtwUWwkise+M=; fh=gF2itGWmtUVqnmzOcHFVFNxYnJ9SOivG91RfrScPkYQ=; b=rB+UH9UqTd+B18hT14CLMj6XeQrCb4b37+Ox9r+WHyBuMCPkaFqdyIuqb1lpYzyJtm xrFVM6Xa7cNdQ7two8x/+HiN84t0DfBblVnOris03xaVl5K+DMNbVMNzymyy9nxF6BEh om32RjJ8cgjKWl512grxqn49zCa7G3hGgGxG+jDHUIZwUsU1nR2d+vo265i+2WB732GO 4XMZbiA/eq05FD0+9xQGvpXD3EHS58wdesbhklc601ppBDio5EUxQWY5D/jyFvx+SszP AkalIgPLObcrUVPohkkPY1/wxpWgte9k6K5cCwkKcV6jeK7Yl7tm00CoZlr1alU6RYPR B1LQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=XAjcqdHU; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a170903018e00b001baff279a5esi28247plg.78.2023.07.12.01.54.06; Wed, 12 Jul 2023 01:54:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=XAjcqdHU; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232371AbjGLITB (ORCPT + 99 others); Wed, 12 Jul 2023 04:19:01 -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-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FYs2+SadwkHAMXS2F2GlqTfwmA28?= =?utf-8?q?sjsyMaLsDaG5xNKBQRol5Hu1BcS76b4iBeifaFgfAuWXimxVzE1mgSNsDCk183Mls?= =?utf-8?q?l3mM6qo6K+IGPq9/bScd1pvgutNaCH7c8C02bWf42LQwsI/NhRp+pZs9HaR7o4PhI?= =?utf-8?q?WrpLSBUyItc83bTKyvRS0ix0lEZSTmHnlwlSu7/K6LrjSxCf2e/CqKdTjiui+e82B?= =?utf-8?q?mPLrBpgAIGlt1CvQTOmWv1Hn4OTfcWTy973yIwx9AJa51rW3UHEBmPpi6moSggBlT?= =?utf-8?q?vqG0CccLkNJR505XSDa2CYaROQXqujoQsjBDTBwjEKlXeF1amSJrvcl7yhXEI/XNT?= =?utf-8?q?bAEHBWQjI1xlKSl8ZGtK7iFICIZ3+2YYGr1nspCf+NfVI1UbeUH7wAWU9NEA+UVUI?= =?utf-8?q?ggKLOfIbUoWtXm+CG8H+iNmryx30f7wckbcnICL2eKX3U1JUWlNNOP7bovFb8dWn+?= =?utf-8?q?3RrNmE8nPBFBYK8vnUxq4nTdqX3M+GlRrj4Vrt30+YLjcEO1SBgwTpJzcY7JPO2j7?= =?utf-8?q?h/+O26n6TFATu7BIwXcgVSXEXVmhJqqlUZG7bN4KMvk+OpE1YaUyhPzcJg5TBuSVk?= =?utf-8?q?TsVl8ptdOX+tpcdXwTtP6MP0ftJNv0w3ZJaUnCcw1cvwSYNST8JQvsv34zA2CkRDa?= =?utf-8?q?Ln/m29ZW8Tpm12fOTIj7/jgx4SpMmFsoiKB5m9lyOMBkWdFMMNkcxTgak1tKrFsUd?= =?utf-8?q?lOFC5Ru83HdGIRYlrJqzitgX4i/uOfVxgSastjwkDD7lISba1r4uqyMqNWQ8/hIKa?= =?utf-8?q?eGcrbEPGbfKMm+WcaQQBcC7YIO+ZGezG6+XS0pTm7TSLW6K9GzsWshblBvRKwWsOe?= =?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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771204309575236343 X-GMAIL-MSGID: 1771204309575236343 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: 118922 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp994143vqm; Wed, 12 Jul 2023 01:24:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlHy291jZWOgxFigF6ZdeCm4H4VKRc1YaXfmPBqp5mwJbSrvRkrRY836dyyHCDl9N3+UMlXF X-Received: by 2002:a17:907:a410:b0:993:da5f:5a9b with SMTP id sg16-20020a170907a41000b00993da5f5a9bmr1508914ejc.8.1689150242334; Wed, 12 Jul 2023 01:24:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150242; cv=pass; d=google.com; s=arc-20160816; b=PyGskpook4ZwnoilDNinZvnbBYHjLpYxVWvPt2eqoubSpDHCjrW25VlI5ENzBn9d7O 2wPSrG7NO1WYsppK4XqsabIl++T50O2daoAo6a7nkD0lNT2WfJlbh246NLd9qJE6rxMW EpGs6Wf/Tlz0bqijJKIxULTRm8FpYF5GpQdrfjwAdXeYikZFScHFahhrKvt5pLO5TqqW v0DHNLiAZxhmdfNvcw60zxvVVcNnxTLPcnCcOxWdgYcKOYWDwP6OvHaDTWy6R5w92/UN 18wSJZvcryg72ylVOUkmFZdPmDtok4jz+g/FCJLalZfHKCVbS8uOwB/T2+u3k6nIF1Xv D0qg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7T90CmrdbjDP4sHSP0/vhp3TrV2NK3fye4IqWpjyNWQ=; fh=wmIDef7ysQHQQNTVbjXvSrgZm5zJs4FQ0EcxDGRFrC8=; b=qyNN/aYF6HoEtxkT5AhlBY5HB7mPZqUV5g71qDjgdPSTsvsIO6fnz+P7XedcDP4rWT ypyCIDc5lse9qTLNWaXaYOYiXuSn+42YL2cN4i5AgyRQZ/6PQSAhtNJn/zaFClRKGwM8 1IvfgJCwdzXvwjkXqJ8NDqohKfG6kD35pFuLWsYG9IFU0u3F0pfFcldUKXbLY25JS1dt N9cjmtu+Sgrfex2/yVzUvyeyq1CKbCDZo2SEqBabTJL4ToHur4Vp/6Q38azJ8Jh15uXn dhcYqecmMhW7BgBzHiePpZbiV33/iVHIOrm2UsftXI7Jpn8CveziuH4tyAfKTMf0xCJJ upLQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fxHkDVDW; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mb8-20020a170906eb0800b0099315b29a1bsi4341015ejb.1036.2023.07.12.01.23.39; Wed, 12 Jul 2023 01:24:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fxHkDVDW; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232012AbjGLIPk (ORCPT + 99 others); Wed, 12 Jul 2023 04:15:40 -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?PJWXEaSSGvukuZc9RBQ7SDXvTzo0?= =?utf-8?q?iFgWHwMAtxPVoGnBix1YbO+7OpZDmkIgr7YTZQig9uKuI5WaBIa9Ld5jrkYMeOtmO?= =?utf-8?q?cn9PjYVapNggF2jLqeKaD0Fussr1Y+eymXyh0xGxRbg5zJgbq6XpihuYvunKuKge+?= =?utf-8?q?5kvmHWGokgbgHaz550xFVtg+f773RfJIqsxKZ9qbYqN9GDobg7TSLG7ErRCLoqnrZ?= =?utf-8?q?cai9Eqk0W5+8/Ecf7rXiLEjI/SBzpoN1LjGqAVRcKC5NuYfFGiG+vH3C0j0UBdhTb?= =?utf-8?q?QT2YJ39VL9ksqpuE/5QtrK61fGiFRLxQyer/o06yEcRKvp+CJyZbF00qv2osq+73n?= =?utf-8?q?Y/7HCn8+nJ753PA87OzwiGwYp3VF6ojvRgk274NoV7nmyuT6p8rZyCbDvsgKLnTLa?= =?utf-8?q?qFEG8uPUl7h3AQyG/y6y5XX23jK6fy4DCp6C4Cf1At+J3+U8RVS8OOhjKy2bocb9U?= =?utf-8?q?nqRfzgtelcaVN6Y3k9LBFdQd9rsj2YXhFO1msUvjlylUAKrYY0iFmn+og7ELHmjlk?= =?utf-8?q?UEcUITb+qsawZrY0sCG2D/FTv7CcvKiw4mj9YQLNmXJDfMkIv8xvJq1FIG9GVMhsY?= =?utf-8?q?14tMFMJPQAzqw/fYUOrWFpjzSvMVRgx5muJWKHN5KIY58SMX7kt7AZPnPT5DygyKY?= =?utf-8?q?bq9Cmxyp/qqoWIUvaF+YFc/8MGZBN2mE8b5eBD7OeajR+fDn2n+2J9lYSPCC/ku2S?= =?utf-8?q?SaWNbawJJ3IXJ0GmpxiEfQwRz8GYozPQjFlEItshy67LsZ2NF/xFtUmwSJuz7sPtZ?= =?utf-8?q?lbxHkAXRyfkbj6wyNzfmk0La/uVyxq3VC4bPlOgjIVRoAVNcRfrEOu8cI0nFydG6m?= =?utf-8?q?B4ZJCt6yw0esQKI2v9t1jT22HgGwNqg23/FyM//uDzGlzKFoul5zA/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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202404544421184 X-GMAIL-MSGID: 1771202404544421184 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:46 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: 118919 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp993572vqm; Wed, 12 Jul 2023 01:22:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlH1zetdF3AtVqf9n2kk7B+fQFo4rT3rWaGXVzrMUh8HFNU+3ySMgGzJsXujbIGNrJ1kN8GJ X-Received: by 2002:a19:2d4e:0:b0:4f9:556b:93c4 with SMTP id t14-20020a192d4e000000b004f9556b93c4mr13423409lft.31.1689150169451; Wed, 12 Jul 2023 01:22:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150169; cv=pass; d=google.com; s=arc-20160816; b=1JUgczruyx+WMr9haVLqpqAYUqd02S3jgId71iZut6l11hcNHiKGcjxq9lGQGqfZR2 q2iy8MekzAX+LBXUSL2J9joh/q5wKoFeI0nXuxy5b32ghbPDOhaaAG9HD1121L2Xk1r1 lmfOawYSC3+3DjnooqOrTYa4EQKar69trjZ72yTSNAUKQKZ2sRvDPNlQhiKe/WFIYar8 D9y6QizXZ6hKaaGQ+6bF3or7w9notuEJsX3ulinsAV2kR9vUQ/0m+F7q62bkOK+eqrSa LnteK7UsgHg0ai/+TAsZ4Yn7fFkZu9gZ31BvL0UXwC0DBZorX7P1/zBirXJV/QFKBzx2 Jldg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5AmRGHLwszoXzj02IaQufMXzkfE0fzmNaTRUxzGYq9w=; fh=IiWTCAiotD2hu6GhmOQoVrQujLqRY2CNTHWh9Km1TgY=; b=b1D3eoXicLrciK43UrW6V6t0PvZkeqTaN+69Jv/zXkp9XTAxWmwwByQbm5/wXdl+CK L0uZe4WHferPxbUuoLOvVVJX336QYmSmLk8103t+GZhYJtdY5Woqwqa/mjDJapqmat5K ekPVNwlMn6hlwyCAepBg41i87EYHzYcwlTVZ+sSWYDa6MLazKC5OHT81SDjooolStR6J r2YCKizSBj/nLuhnTIEoqUGzF7mqJtO1n6px8U570VrNxNu9bMm4xt8YSsZtzmrHn0B6 kY05rSdiXJi8H/7+N+qzqyOp39iXoYf9vH1HlaEbXYfqiN4MYN3MspfEkkKjepitu6S4 5Tpg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=TrrVdMZC; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i15-20020aa7c70f000000b0051e43fce3ccsi4001196edq.393.2023.07.12.01.22.25; Wed, 12 Jul 2023 01:22:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=TrrVdMZC; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231571AbjGLIQG (ORCPT + 99 others); Wed, 12 Jul 2023 04:16:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231811AbjGLIPY (ORCPT ); Wed, 12 Jul 2023 04:15:24 -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 BA0E62688; Wed, 12 Jul 2023 01:14:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oO54yIO1nm2asbrVHbiPYt7GIJGit7/McdLjvMW9xBUPB3gPr8suBCE+zrtFI6QW5XBsIYuhasUpku+wNkx4HkFiR2MYEQ94rC9VNadHMgMxalTUjd9riUCDzTKHk4KTMwfYRrS2CqEYFS4sXfLoQdSWF0e1HYHcT9mQELxM5VkzJ+7f0gJMmQUX0C1e4sKRJveczQiWpLmDAoGMYqkWBQTvsDZYWYoqUQDeMSOAu3Dm2v3J3ZD8g6RA2F7LkmNmWYjKqVE1b4Es60G5Y83eEPBXxM5DeC33bzHxaVfRLnZ2RZ4HENIJaAEzwdLS0oNIqM76YwfLyUTPHXLosmQd2A== 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=5AmRGHLwszoXzj02IaQufMXzkfE0fzmNaTRUxzGYq9w=; b=bJjuLJrhd0Ynlynvm8iult0KFMufkEKNC1VqgH8R4N9TOx9xZrQVv2qQiTP315Gc14Fv76Whan0KiQvnnJV0tQGAFA2rTtJMdWlevwe5mgsXjDQ2IBmoABMk4bZf1jsXoQjjWyDuFMMYItf8PEUFiV/w3+JS1PdJ591s9QUfBO4qH4K9cCDc9xcbm6RgHYpsdrKIL2X984xXnKXcGVwhWdVumuLzXoVxJu7rZm7nZJV5D32u2yL/dsA1+VXb+pxJeCJkl1Iqk1vmsvJxKAgU1VNr602gJnGZxF+K3aWSHQhJzDxJN4CwU01TCr7bIMzU6ibo+eRpxOzkyK/HQ9/w6A== 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=5AmRGHLwszoXzj02IaQufMXzkfE0fzmNaTRUxzGYq9w=; b=TrrVdMZCr781RbBSrdOc03V6YXleWAftYuv+/arDO+h3WPD8tcEfNBdo89ZBzzbqeu4D7kfDel4HbPD9MhRk1M9Gnk/fWFcGv2Y9OIJCTaiED5MoD3YKDD/qxiE0W3Y5Vyk3TOECQe6doV80bewdtIeMeoXSpCtYpll8vqt4vBK687mA1g4Zkg73Gw74PQPfK4TSpMESmAbKBp5qV3zP0Q4i6RY26bdZi47U+TF3nlweEtF/LLnU4oRouWofAvr3bDm5nB7D1U6mul3vnN+4X2cuq29pyH/Uw2XuvVwHRroAwOdT/yi3vvbNlTLIMmXS0QP6nM2IH/himvpapgZPhw== 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:18 +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:18 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/27] thermal/drivers/imx: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:46 +0800 Message-Id: <20230712081258.29254-15-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: 18734dab-774f-4604-5895-08db82affd51 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2A6nk+I9VOI8TS0aD5s6HqtttCUVl2Xe0WR/3VWOC3BcnDjCrWae25Ht1m0pxv2GDkTagp/srCrh9SDD39D+3RoGMiAcJDK/0zFWAv2pCkJSXVPczxL5nRIY0oKh6Is54kyfrliU0pknEup0Em/KzNQq/nQU4Iu9mD10OW2y1+4swuXsEKDlY0h3bppn9uDpgWR0M2lm/KDAww8kpoiUyOaNlFgd/G1ZIXr80tUKd4ttfbs+Bq9BTt2Mm7cNBA2AZuUvxQJRe92mOSqpFanFlY4Tn79T6PTVi5zXhknPK6i1TrDYRo3aFX03D/8ENQ4uS6QT9BVAaJpH+EMLPG+3EgMf9wL2WrlsaTdhfcJjMP/BZXruzpm2Ukxk+2+EC6ooidHHD2evX7BG59mS3tQsjonslDkgSkiM/FdGgaAXbpGvvS/wTjIQqE68vMZTVxccvrm8m+N72zMtfpDOFmbbFicKDebuF1mQXaiooUIORxC1VU+rszoketTiYITBxKdnXXWAWi4UAolaSZM5E1CPr1yZLDuK2VYSsR3NmhNbb21TblHiocTVrr5lgDDjmPT7oY9TiM3s9D11HSDxR5f1Dr9bPbjPlbHJb9vozYyQGWwi1s5kk+EHwAyJsFcVR1AZ 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)(66574015)(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?MQAq0KvVyHJhZ3xzIRK5h3bxuUFy?= =?utf-8?q?EaAZw9jpUEUHINegUwn7zCzH2mcDzW8EMSpBZ/eTGTf7Ca/tQv1rECIMG98DsJ9tq?= =?utf-8?q?LHxNABUAR11Ralv4Xui5K7g6jIgYDRoCvtRLe9OTTm5Zlc+EvxNKQeskzdxhwnpTw?= =?utf-8?q?0h0ETYFazw/f8aqAlxcL7UVqNpMyqAwHewShS0HqQvKSJ52PUDea99+tkrHjc6s/W?= =?utf-8?q?UguZgKWpYnxmxgu4GTNnP2Geq21pxoyhCSOv0vLcQYWILN6jtWZZfRUy+I4GrBy9g?= =?utf-8?q?hk627zDrv0rbXmJ24tWCnAbrjXTHpuO1EpEc+9/PNoGGPkxp2eXawqcdGlIose75p?= =?utf-8?q?ttiD7q/BZfrluHyFF7km+jK16WRcAUJT9ROe80qp9LYs+y1rvoKOs3IR/B8ahYKsg?= =?utf-8?q?cHkbpbE++Ey0liyJcrLgO4XDra0c4brhM5e8m3hjAiiBVYtLow9khvkyftK/PS4jX?= =?utf-8?q?2V2t75W9KoyXvZKNe3T6Nou9QRBUA5LrEXfOsN2v/1fWidhxkZdbkCE37Q4tQaai/?= =?utf-8?q?trLGIBrrsXniF8jCZjOT4F45sTsyEM7HapSk1RdeuMZ8KGzJShQr77+TAofCkahhh?= =?utf-8?q?7HH8rfXLz5YEhodhow+3lE6XGfTErzOpli3L7xLypePxOfKB3iVyCHxxTq8gYUk0i?= =?utf-8?q?sYxKU7t7G+2BJ6r92XxQoudJW40lKhFzvrbLFjxNWzCzK0Gfzj0EGQ6es/YDJxRXx?= =?utf-8?q?ttXGc7I7iEUFlo+4qtndgOiKs3l0D5xxvPMZINWiwVKfgqP61a0jOFBI/UbeHUnVW?= =?utf-8?q?4ms9BtUEB3kwucPYnmaWtVQ9WceZtES/KEWgiR+YVN7tnZZ4uUu4lrQCjIdJ6GLPJ?= =?utf-8?q?0/TUsF+8wFzTIrAKvmFPQFCIHG8nBYselnqdJoGkLwgDRgGQS8ZQ19Hu5Ju2UX7vx?= =?utf-8?q?yR2KVkq41SQKklpjdlGjANRcWAnDBDw+W1A+ItitxM6t7H5VU2GC810hRg2bDdnwC?= =?utf-8?q?VeaeYqC0ry77pK9dA3j3jeb8B63aW9tFa2mTUCCCfeStcacLIfG5Y6Xja1Eg0B3ZB?= =?utf-8?q?Pu2vCPkEV4wUzVmkWUlStUlAXxnCifwDKlgXiEfCf6gVhtObYh+bwHblD9ZS2sFF7?= =?utf-8?q?raoF+WHCKCRjEr4gd1QhJlAhoAputoyTxnR1K5SWdwHkDn5Vf7SYLf4iziGgUaovM?= =?utf-8?q?fmDLd0k6JujDjS9mXODfzmTHGm02EA2ddzbgqigjwufzI6kuFNHruA03b4XuICV0Q?= =?utf-8?q?d2xju+QvSEKaon1/rilenVp8eOYojxXZqmzyaLg2SAde8QYTOTXARlu1DtUin8IYx?= =?utf-8?q?SaWXl8k4rMT9K1Y9gSOuhlA28/fWHZ1l3kS5Y3yoBgNGerQ/iSV3LMfkh9OK/+w22?= =?utf-8?q?5b7+TqFEaKhpS3ABBt519NPGYG+ouMrIpQ1JNDjDp/NM8pDrykMltpAhOpdtJGFRu?= =?utf-8?q?8rpG5YRDCirlCfl9JxdIIh0NwcjK7TEEGDEvomiY9QpYfEllkYrjevNj//naAYej/?= =?utf-8?q?dgiF42iu81jGTeHI53MPUjKOes78+fJoigW+9txlVDi/JX19oN0VHk4JV5qFr5abj?= =?utf-8?q?feSzErq4HRrR?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18734dab-774f-4604-5895-08db82affd51 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:18.5257 (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: U9V6DQjNNXiAVYQQkvSbmL7NFodWXdxZRaYiyeS0SzpgCsL6xQb0KFZxLYtqZC8lLlcFxCQY4T93hvfwtHnqwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202327961832889 X-GMAIL-MSGID: 1771202327961832889 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/imx_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index a94ec0a0c9dd..0f033c2ca0ad 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -771,7 +771,7 @@ static int imx_thermal_probe(struct platform_device *pdev) return ret; } -static int imx_thermal_remove(struct platform_device *pdev) +static void imx_thermal_remove(struct platform_device *pdev) { struct imx_thermal_data *data = platform_get_drvdata(pdev); @@ -780,8 +780,6 @@ static int imx_thermal_remove(struct platform_device *pdev) thermal_zone_device_unregister(data->tz); imx_thermal_unregister_legacy_cooling(data); - - return 0; } static int __maybe_unused imx_thermal_suspend(struct device *dev) @@ -880,7 +878,7 @@ static struct platform_driver imx_thermal = { .of_match_table = of_imx_thermal_match, }, .probe = imx_thermal_probe, - .remove = imx_thermal_remove, + .remove_new = imx_thermal_remove, }; module_platform_driver(imx_thermal); From patchwork Wed Jul 12 08:12:47 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: 118925 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp994219vqm; Wed, 12 Jul 2023 01:24:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlFggqnHsLg183lmkey5UVgKszIS15gngME3J28k3NMK8P7m3TgFfJRRnVk4NnSo+JGx0FLW X-Received: by 2002:a05:6402:1486:b0:51d:a4fa:c62c with SMTP id e6-20020a056402148600b0051da4fac62cmr1834062edv.0.1689150251967; Wed, 12 Jul 2023 01:24:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150251; cv=pass; d=google.com; s=arc-20160816; b=OVAMmvosADJHLul3hMmT2onup/yZ4pQzLpnh9OBtQCQ3OLjUCyWFMHAcQE5Mg/C9oi 27/6qzB8Uj4ePaCoNqt1sGpjBAgqifT4HL4WnEi3jlCtPi/RouSxcvKijM0M2e+YdDoQ Agsq9xYmPXZBlWEScwdiV2NESbTYJ1YJBMVm1iNySKefPnBmLmmQIWCGpA+bW/fK2EAu tAUEz2yX6WtHfxI6O7vDzuO1WSX20q8QBy0O2+Zp0bfsugPgfrrxMPB7/TGKaYQjtGkA EAuHdOSr1kOcz3gNLPnxNQy/MMEJriT7r4VJWoAIhM99tPsf74Mvzv9fooD00A/ryUff p0pA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eSB/KMZ2qmrY7kuTIjDmatHss0WgDykp8vjAB+Q9Qlg=; fh=y+NLmohyVnO3+WEghAXA5a6UNlaVwCBTXEzFVpyzKyo=; b=jhU+ngjqjleU8V5ODewd4ox3Jo1o3B+Cf/MBNZtXZZqzv1/Y56beCXggrtjxssfhxa OklDc/2ooWRE6XrJ2YH5dT7kVY8y4phctjWr6TMDpkIK5wKeQyWBEUR/eGUAF4Ickzz7 NuzKG2L4Kg9gPkrCzYkj0dJ7/UbrVQzdlT9z7zs0Wgnn/7d/IrvYCKmPwNl5wmc4elqM 7lA+TBAyp65I+K5z+THvreloMQJM8bTzOrB+Id1PMFgENWaGvkLVEYXs+zgSHz1hV+I1 Ka5bWBa36B7Gzie2tvDqNwsA+47rtIpcJ6g2Wv0BXKW//DyFsxV86ekv+k38lkYz3ue0 0ZWg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ChzJhou2; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r4-20020aa7cb84000000b0051e248ee5c1si4024668edt.670.2023.07.12.01.23.49; Wed, 12 Jul 2023 01:24:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ChzJhou2; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232333AbjGLIQa (ORCPT + 99 others); Wed, 12 Jul 2023 04:16:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232279AbjGLIPw (ORCPT ); Wed, 12 Jul 2023 04:15:52 -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 263D219BE; Wed, 12 Jul 2023 01:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BWrBO1/jHf/8mTTLOx3kWSAA0WW+AS4t7oIdSDHU/wkBcC9tswZqD/r0NoFBh+pucYWia22Iq7xxSbTiGci32csbo3rV6B1OfCe2y6Pulcb+Jq0fgBImM1TSV1180fzXRilGxi6fzf58XqaH+MmPE9aihxFlgZ5tNjTGDm5P2De5dTOJ3cP/9+V/X8gIhSSpen1PgYJRzD30KlneL0LYkbEumdo1kDpZ8eULgyHVN9BjxcD/BE6HivK9w/zugKrcfwqzf47BowrsVdgGvnRFi1kBrhcHJWn1QwaFurSraoa9TrkzQXdBYQgTJyRyQmvxTD4BUiG1MoPex6zWTSfL1g== 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=eSB/KMZ2qmrY7kuTIjDmatHss0WgDykp8vjAB+Q9Qlg=; b=OLQFYZ923x2lLmi/B2dnUCpFldVgJ8/OJ67eOh/2KUnrlKKYPw2rd8F6B70RXk+nywqid9WzMKOLhkQj/qwgisHNnowQ5+ptI/VtB4O++HuWiJd07m3MAAamfuYaQ+Kv78SQfqgpqd5CPgr3MdyMKteQLTTQZTA+AZGdT8kIEJ9zAcXAOtT0u2CRdyfFDMXcJPF266l9KKx8IZROjFFBHaL83+DBW3P83MC1aeUFXu6reo+Ff6kf8/v4++3UmlT10bFDStK0S5827/Ms0aS6JAE1gB/xo4IuQQGQI2C8emAd7ZQ3O7EEu/vwjvEGCo3JJ4VSLSFkxVslh7XMMraGdA== 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=eSB/KMZ2qmrY7kuTIjDmatHss0WgDykp8vjAB+Q9Qlg=; b=ChzJhou2JLragFfPctlDraNLvBw9k1MFWOouiaaPSqe6YgjMx3EKOxF0AfHfLhq9AkgFUItt9onWGbeh2374C3HognKbqvuX1OaGDvWF0ITMmf28F1GBXvBiyb2V6Fi46dY8APZrRKk7UayYluhIlfRDC0FscS4HmFMQ8AVSXu+QCXm5Muh1sMwDArbbjLNnq/yN94bx/21zbIEQg04eW5SZTg6pqCksnXREmEPBPhavZ+JE37fAhjyNpQpND+RMRGoI60V3BKjQjF6Tbsj841/Hp4/ZGoNsEHp2uT3MknKkYpc+ia5vSMnrgu4HcDO0ME1jrDyvJT359L+K+BqaKg== 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:20 +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:20 +0000 From: Yangtao Li To: Support Opensource , "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 16/27] thermal/drivers/da9062: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:47 +0800 Message-Id: <20230712081258.29254-16-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: cd2e76e2-290e-4ee7-b52c-08db82affe5e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N80hyibjdVBtnXq4UTFTLqCeKXD5+qdC0O8KYiSLJPx7KeV29xI9P9d+39OP0VoYiQelLWJWeA3v4adtCdVTx0zL4EQO+fGhhz7WPswnuYPGIKLPDyNxpjo7BYWPufRSqshAFOPUp8RwtU6UEj5SOgrgZoY6MMMXGEkfloX/aPH8Nc/tRuTvMF2Joj635bIcwhAUb5E13CDbayRS0Ofolwj7dR6Re8g3AGE6UzYgKrOFMGMhS9mMAQ5jz4gdTRplkuQVrVxgY5pJeLE28bQkCaz6HhBl4qUPvKLbOGLQ6neZ//T3aNEfsp0J44KVXcrLJv1ymzAOUMtwoi1kM+Lr47ep951n2HkgalGPP1coVD83jRRLOU67zqGdIr3K1mpDl43XI9M7r02P7f1buLyh5dTx5rdZRkWiTQF2qBhCN8J5xc/Nen0+fDz+tgega48wkkclHMacG33GPCYB2vIVeSkD2RGjWJh0RaMHX/ncC7YWfHgu9wiVSlIySYBVVYjTNDo3viwckynm5NtklSaQCa+TUn8sS9zyTQgNmY8Dpbz8QANO1l1kkGD73RujGwg0Uwa/FK5gy6QcUhmz0kv7W2uzDpxDnInWCkcPoEqiXtcpQiKxwHqt4H+dox8e8T9l 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?rwHJTjkJrSIkCmoHoKY+51cuwSSS?= =?utf-8?q?4LkZFtZx2I5rcswTHra4RKga+9BgOgkCTiTCYO697Xn8l5vyQwAAnCGYMfqPNDXmg?= =?utf-8?q?2KBtv+iqBO7fI7LgKIEiiKlAVV9U6bj4OQjvBmOpLA0JvhF0GBXyh11ilvQHpAZVq?= =?utf-8?q?ZBSKUjFcnWsmm8yUFah/vh5AaawNfEE1nFWDctnshqByUDLx7llQlAR6ew6SstmYV?= =?utf-8?q?29AHSXX5mRqubqiBWx0v99dfm/mKIA3UAQyt+/bDqVf3hY7MeBFsEsDjHjUzj9S3F?= =?utf-8?q?ReeebaKPT8MgwnFvYJIMrkY+4oBk7cf7twsIk+G+suJ8KDY3Gie9WzB+mtcrkXocb?= =?utf-8?q?stx1Kauj/BYXDS4xU5FOQzXXrQi0OW2yesS+EeJDoDKkA4hxD8mAhtdo59sCwfq3h?= =?utf-8?q?f+QEpESUnj4vZqg2Zt7Hp8Uh+1L/CB2CTZBc3f4b6nfdcN1mabUpWzDzzAMPa/0/2?= =?utf-8?q?tSp/vkrtNEWL5/tCAMbDxG1oLCgMqJ8tEj8abFEN//7CdiQIHVCLAoeXAYLHD7dxm?= =?utf-8?q?it49euagZinm/7WjafgL0T4rftkvbb4z4SvElaPnjUby2bB2OP7opHPNR5/X5L9cf?= =?utf-8?q?nta8fiktqdBPDbOznwPTYfb+/sdPdZVagMkh77k7oVtT8ADGBeCY3Gc3TeLeXW4nS?= =?utf-8?q?n2zke8wALUJPZC+3uJgAD48puapJql5+QWLSuacw35i06/X0WpcEMHj9YwYjzFMHC?= =?utf-8?q?iTSEvLaTytd5Fm8InNq7Zd0nL4e/bKa1jpP6xMzlbozJfB3xwZoqn7G0EZF8AgDkf?= =?utf-8?q?2tuWQQliXMxAqt4vPybWjKzj0brqY/0kbYjeXJs561l+ax2I54lx1WBujSY5Xzz0f?= =?utf-8?q?E/ctrl7RtFN+78qBShLBvdXUqNqoRxdpoj7XpWcE8lI3501oWgL/tr+RXXVybN93Y?= =?utf-8?q?WKAJxNvCw+F0cgYrqKbMtWz7b0nhjAMh1SNLqUXrqaLhq+cE8NOd0K66wVePf4xph?= =?utf-8?q?zRG5Xk4i+r+zXuhLDQltoO7UYRaguCTDu8GrGcYnlEHxb8Vvtc1nD9crERcUbd4td?= =?utf-8?q?bfxWWxWvwvKPMogiVtpnSTY5zFoMjPyq8zFLH0q5TlqsTTmhAsiObtVkfKrOxF3Z3?= =?utf-8?q?FjO5iOZVnNwDk+M0XFhbIJHkY1LrE/RySNJgOKMNahI+qepvBuTu5tFu0apUP/nJ0?= =?utf-8?q?M/2EmCiPrmjnYN3wioYJeKT35uSWn/z1Jk/WX99oMQqQ8LAf36uEWZlEWrIoia7OD?= =?utf-8?q?NFYyFRfHNgZ31zOjIN+VqyQ87nqmHXQ7bLAAtpDbKeuzXlsAXuBqVAx9xXHTI8g83?= =?utf-8?q?nX/Nkk/+yaEGHIMFeSFTKz+1rToVDApRiAGvRrij2Tgug7gbQzagFUaotQf3s5lat?= =?utf-8?q?oaYJmVhqJ1rp/dNKLzSF5YWQvkwNvecFja0qDCNlMWgq6XV5aeP1JvAFld7L3HLzo?= =?utf-8?q?wS5RK8ZgDjUu7YkLt8HR/u6uJTUUIaatNMhxTqha1HcEF8nQcJY0P5xmtos8lbzi/?= =?utf-8?q?jANT5h2E2ezdpHHIDnp09+kcWeoyaxWntImpfqSy79lMY2Z5TnTyH03nbpOHpY+EU?= =?utf-8?q?eKRT5Hj4Ak7m?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd2e76e2-290e-4ee7-b52c-08db82affe5e 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:20.2995 (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: kcqPFc9FFjtTUHj0he0dsfJzu2L3YQh1dCAwGxP0wFpnB1OyrmQ9tQNU5JhqriLEEzUZet2LaJVnywlEXy47tQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202414150394624 X-GMAIL-MSGID: 1771202414150394624 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/da9062-thermal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/da9062-thermal.c b/drivers/thermal/da9062-thermal.c index 2d31b1f73423..160d64913057 100644 --- a/drivers/thermal/da9062-thermal.c +++ b/drivers/thermal/da9062-thermal.c @@ -239,19 +239,18 @@ static int da9062_thermal_probe(struct platform_device *pdev) return ret; } -static int da9062_thermal_remove(struct platform_device *pdev) +static void da9062_thermal_remove(struct platform_device *pdev) { struct da9062_thermal *thermal = platform_get_drvdata(pdev); free_irq(thermal->irq, thermal); cancel_delayed_work_sync(&thermal->work); thermal_zone_device_unregister(thermal->zone); - return 0; } static struct platform_driver da9062_thermal_driver = { .probe = da9062_thermal_probe, - .remove = da9062_thermal_remove, + .remove_new = da9062_thermal_remove, .driver = { .name = "da9062-thermal", .of_match_table = da9062_compatible_reg_id_table, From patchwork Wed Jul 12 08:12:48 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: 118921 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp994093vqm; Wed, 12 Jul 2023 01:23:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlGNRxCugUVth4I/+RgPR8OmerybNMTj3Dvlke+Jbz3vntqbrMV1mm2RNusoG6NS5oBKl1Jr X-Received: by 2002:a17:906:51d4:b0:974:1e0e:91ee with SMTP id v20-20020a17090651d400b009741e0e91eemr20256953ejk.13.1689150235571; Wed, 12 Jul 2023 01:23:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150235; cv=pass; d=google.com; s=arc-20160816; b=Zhipx8Kn7VjwcYr9U6/HHirE/J6Cu5tV+9fj7nMhmVPC+RLW3bGNq7ymzI6cYziZcc 1OF8kXlVQ5v8+LdaUDPLMd2otzK/j+EezGZnRnN1nI+YzSpiQgKxwiPTU14MzBpRsZs7 cQbd44HcbWeK6kf+HTxuXI0iTaSY3E5kKBPJFdyfHWgQwQk8mYPobvJeowNDLJgHzxog ATndbpsw5iwxy3MjWA8GQ90m9dVIDemHJ8K2FkznC3qhHxBt20wGK8QjZ2oN87ElhNjZ +DULmPrH/wMHmb0+bAqerJTUxmhZlymbjm0A9nhBLIGdp+BXz8g1Ya5IqAQ1uVTJV6Zh +Leg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tq0HW8yWGfsTAj1AUMyJGhWa45HMaun/D7Tu7/SM/go=; fh=gF2itGWmtUVqnmzOcHFVFNxYnJ9SOivG91RfrScPkYQ=; b=m0fA+zVmv+HFCw6Bn1xOVog+GaLeH7OatrSMGKUZa2yCv3FN+TlxaONytpc3jPHHTQ v5dioNTeUVu6CeoHlzXPJDC9ZIE+J7yxsrmHtPBVs+fB/LDDoEy2jWC6hzjxUJUWcoHo 7h6UMH6YsYggiAAgEi9fLnb4rD99Qi5kSIHSEm/5qnS70G698LO9m6zJZUnri5pyuiWW msX3cHKNfoBAcsGxZmIeDcA7dRWrAGNOWgdizTr99H7RQJrsPRbrB/0AM3E7TE3AHu+1 LrY0DDizFgHtvbxz6ESycDRbUq/gQpK5jz+Gnrx6t3xJnfQEofLgzuLM9i3ymdD/NKOF 0onA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=FVVIYQE6; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca25-20020a170906a3d900b00991dfb5dfb7si3995687ejb.573.2023.07.12.01.23.32; Wed, 12 Jul 2023 01:23:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=FVVIYQE6; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231145AbjGLIQv (ORCPT + 99 others); Wed, 12 Jul 2023 04:16:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231241AbjGLIQI (ORCPT ); Wed, 12 Jul 2023 04:16:08 -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 0CE691BF1; Wed, 12 Jul 2023 01:14:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YC7wBwA3UKuCTu1l5W0RmXaPYjRlKEq3olLBX6FrzPkKyvKoZ9evKe+6LabQ4W6l3IFjGrbFMl/emt66ieQ0PFzny6dQqfjq0CyvG43D5f8h2lj3Rhsn8lZgmRBpQwiFTsWY0LQ5Bm9Ybz1fgLhcC6Kd7rVkWpopQh7Z7q+lXh1WaUYsjU/jZqkypizwKt7vVLEFrAcSB2AAX+wg3cJ5t57kDhMQH1wbmFE0mo9J12tH4E7Cm3BD/1eOP8rQEES+UKBw8fgAqlp5KCb5z45YiXiKAKakuVhVlgIiogdVy7W+UwYFEh3CPfE/MTzjYebTfS8ZmkYHq87ayGu+JvbpzQ== 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=tq0HW8yWGfsTAj1AUMyJGhWa45HMaun/D7Tu7/SM/go=; b=e6OaUrLaF2N/taRBo15FXpLx0BMneur/n+UVa41+aLEGeNN49tbvMLSUCyA08qkw16ToUZikP+6LMj7atZ5XI8TuHYGuUeGgYG4RCs77190ZDKL0LQEO7H3LQleeypu83shIO9+GbI22ansrfyGHf4XakvNzQj3DYEY34sUMA+7l+56qqQByz7nY48J0nlsvDd5XtSchS3BUsy+baMa966QmWPNp307kKyhwOhuRF+AOGI2pbLn7y7sD2UTa0Iun2QNXrC+wEJ5eDPhcTAuHYGkcUU0CxfVBLl7gtXZ3ly3y3hkSB0j12Xpo9JOW6hDZ4lr0j8dQOZx4KhhPdh4Lcw== 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=tq0HW8yWGfsTAj1AUMyJGhWa45HMaun/D7Tu7/SM/go=; b=FVVIYQE6jL/jEsuBPx7KaNRfncMepozXZGaJH6w0VLrLa3X42JYDSCIFS5F83UtMULGtkrkPiJSoGl3atDCky+jvqamxwD6Z1tYG3NNme2ZUITPxTBeuQc8exyfpXbmnT37BichnbLjE0KLrExWIHMhTNj1uHSsisBOaRf+p4WkYfnayH8shijO0yeebpAB/cmb62vrxblo7DhA+cwYjG6C/h249s6I2Wx31dqFsMnphbpo/zmb0sPGXOpRiCZNfhR3Ied01kdm4sP8usGNA0X1J7QgiTBIVRNqnYfSDi8gFiRfO/ABHJ6q2soyLV6EzfWF2mCIVt8LbQN4a/grA1w== 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:22 +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:22 +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 17/27] thermal/drivers/broadcom: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:48 +0800 Message-Id: <20230712081258.29254-17-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: dfe06b0e-7eef-4766-26ad-08db82afff60 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QgwLnGrajoAY/UW2PkzMGwcMbt+dMSoKv1X0AijOR7ZvdpvHeGfvm7w8J+EdxJez3PQ0lCDc2FJk90qncuH+f/kqGDcnvm/UnN+5BUC47jndNISnD4+YFvbY0olxL/wsyZv1VG3KyokE8ZVccjX2fI1RnXzU9YcrvlioGllIpHfRsuWwHV/urD9Pon2Ti/rm/P/oZszPoguflJjUKv97BOqP7eg1yWDVoEBoFPbimBwhLYts3AYsgOvFfutNxMSAkU1qI+yAdEJ963uCU2LbpTJN1MWCcIAwl2D7JOQeADHZ0FsfKSKBBDAsq6j3r6AgRDOthWDDq6l7dQpKES9t4Hji0sNC9Bnf3Qlrviu7l+EYH9NQFAvJgq7igV95dPoydBhxcKM50EE1vBXl8J833P2lMRtMAPlp3cRWDcwuWiaex/Eo8+OC2HN+wJ3SoWvEuCp0rCZKe6zV4OcQduh9AYtyBngHYNfZ2q2P1jic649zM6ynRE7stx+PGLuQ7hOcf760X/zLl2+FFnphetttqbcIp4Xx0/aKgCZWUQnjtp3J/tjtLGs53C013ea3oR+SHuKF36F5PAgFcmmcYliOtMpyp4CZLws8C+4b/SAxTfxDveoJtH6Z17kXWnKyAyYG 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?EUWHXD6YHEs6MluPLKsz6ZrGz/HK?= =?utf-8?q?3mf+2zHma2BG43fT009EXr+LFPO5clLzFd/RInnbeoA33Rmqid45kqnofbPFC3yK9?= =?utf-8?q?QCSH1d7NK4Xra6FjA4jN6/Hcp8ANXJzxbYLYuVhXFacfRzilMC/bEbFhuBy4QsXEH?= =?utf-8?q?KHstuL58LnMJkBY4Rbv/2TAs0cYW7Swockj8WpfXeJSJF8z+Ejs+6XMD2ad1Q59Qv?= =?utf-8?q?dQ61JRLgn0jYmytCp4BQagw0AfcKE04BaRsJhbtpkjzqsWnYPqkBjrq4u17f7PzxL?= =?utf-8?q?igeB2h0qTxDPqHkKLYrX+w/mTOJedhK/XtbRBY7/WCFVwOrytCTT13WT6BzkJ2Xfm?= =?utf-8?q?yWeHpDN8jogQ0KiuM+yWgQGzw0ecy4ugsaNgSAwBrcAH2Ei9n21Q6ALwupYL3sE2r?= =?utf-8?q?Lxc3/Nhv+Ch1HvWhLVA3BgzB6NaZY7qg0qrAmrLdmn4obl1MHTzfzW8zJ9lCcmqP3?= =?utf-8?q?Dx5220WWhl80OOVzt8jGtx9R+G0dm8EVNpIYvw4+a8LYJ1joW5GAikGjvhwwHE3at?= =?utf-8?q?TFpD2mGzX+FbB9WhpjKd1JD55aq89VoaIA//5a3A8NmOOA1iDBv3HVRkIc+kpIUSs?= =?utf-8?q?zm8Z7pRLAg1xhP8tQnGPDO/fj5U8XwhZB7c7bhvB84wPsIhQ+zWwctGCGw+E3spxX?= =?utf-8?q?KRsgGJbAIYI5hrPw3zQpARBtYWU07bmfNdKJQ6AXMxREqKMS6A6Sec2V2Rj1IkpMg?= =?utf-8?q?y2bpkTVdXE62rPtnp2pBnnsb7M22Uv7zzN0r8P18bqFYO02/c285nMDqxCja50I5g?= =?utf-8?q?LdML0ARlZQA1OfNVxiwTFwyK1D9JD/SoHVXaUkbrkKQOz062gFp9USwwekH34361J?= =?utf-8?q?7O6hthxwCiGB0SxEGfQAJQ+O6oiXYL9Wl3yIh6S0uRskDqj5bpJp4G35T1ilRiWPd?= =?utf-8?q?z6t0Mff33nJ5hcbWZfSR9F+tQjsSO2ZalYw8zbCltGX8kdvqdlH7P7My5z6ydYFqk?= =?utf-8?q?m2oYtBbn9HLg40yrhJclIW9B+CLHk7b2Ml2Yu4QRsWUHufu7Gg9VXV53lAo7cLhXa?= =?utf-8?q?RqumB3Sgl4WzrS22V8vFHcmKWMrQIWxQT8e68osZFRCx6BwVuApZUmxk/my5l/n4S?= =?utf-8?q?aYs/W6ihx8IBBKaRab+C8zW5OdM30HUgC+HR46T8vQEyI2BgfNeFuBCuF6uEzh1d0?= =?utf-8?q?BO3qVIe1uKpMSYfTUU8RS8SOsCF+kTIL/+aFDMt3x7DxokzKxNxbFTnKVSpwXM91k?= =?utf-8?q?/qxZsRqycJ9/LMecLqVNpApfBgDzMBjZKUak0jZB0F8DEwbL+c5TyDRCicMB9PShI?= =?utf-8?q?00BylNl4CENYSZkAIaj8UDUY7///F+XUDiAaQNas6jlg9dKh7z0lipQtkyj0CnOOv?= =?utf-8?q?u/YG5TZAVC03MFAEfKVYj7UIhJF0ZLQZc1BAG3xcmQyORDKtJmOpuXiBIWvOMWvqL?= =?utf-8?q?pQUf3pSJ0T72YM1NfWK9JGb9vIpvzn5PR5lq7cg5ZB+btaH4T7LKRCJx6WLcSgt/D?= =?utf-8?q?Jc/iLGyzsdioMONkfa5qAdLzwdkNyiAevS+DK34+dKDU+gvxCi2D6XUj/uG5vJwok?= =?utf-8?q?+tbpYQla2ARs?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dfe06b0e-7eef-4766-26ad-08db82afff60 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:22.0092 (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: 4I8b9lLPU/TWt2/2XlGP+0G2Ktv4fC0Egwbiomm8WJwbP4cYoLjN9NUA8+pzqry0g9m64VerKzDlW+TxYwxOlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771201971704783414 X-GMAIL-MSGID: 1771202397455007855 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/broadcom/ns-thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/broadcom/ns-thermal.c b/drivers/thermal/broadcom/ns-thermal.c index d255aa879fc0..5eaf79c490f0 100644 --- a/drivers/thermal/broadcom/ns-thermal.c +++ b/drivers/thermal/broadcom/ns-thermal.c @@ -65,13 +65,11 @@ static int ns_thermal_probe(struct platform_device *pdev) return 0; } -static int ns_thermal_remove(struct platform_device *pdev) +static void ns_thermal_remove(struct platform_device *pdev) { void __iomem *pvtmon = platform_get_drvdata(pdev); iounmap(pvtmon); - - return 0; } static const struct of_device_id ns_thermal_of_match[] = { @@ -82,7 +80,7 @@ MODULE_DEVICE_TABLE(of, ns_thermal_of_match); static struct platform_driver ns_thermal_driver = { .probe = ns_thermal_probe, - .remove = ns_thermal_remove, + .remove_new = ns_thermal_remove, .driver = { .name = "ns-thermal", .of_match_table = ns_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: 118920 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp993695vqm; Wed, 12 Jul 2023 01:23:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlFmA3yGT4VIrVmMwLLKJcSsUUOxC0JzehVa8pllYXQC6fK1FbCQEJAhuS4pvG6jP4rRqTpd X-Received: by 2002:aa7:cd8b:0:b0:51e:1656:bb24 with SMTP id x11-20020aa7cd8b000000b0051e1656bb24mr13615577edv.26.1689150186837; Wed, 12 Jul 2023 01:23:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150186; cv=pass; d=google.com; s=arc-20160816; b=HdUSgMSCa57irSqFD83ct77k68jabF7umyqUrLqHXrxJTC13PdhyItcdIDzi9Dkqgk 1HJLtkFdR1ny8H2PopPXlW8wnDeALP4H/khNDAj/Hd6CmGY+e2lJ5cecI9S3uJYsRs7U FyqnJvVveN5pv28BBk34jIWJxQVDiFMgPLml0C+UVZ5KcoM1evXdfPWe+ghXPZI41f/c xQOP0w1EKtruCOGVuCIdgPkZs9PvbVpnX4FdzPrMXaOngdnizQ5+Tp3cC9q5i1aoYnxc wMIzHUNdJm13koTZQJFwvJN8DXhdZemkhEuDMRWN9J5jHBmrsJxAAiaKKYb4cIFj8IIf WcKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xFgJBXXEtiM5Mp8+y5LGgXWr+IbVRZHIo9JtSR+Nias=; fh=gF2itGWmtUVqnmzOcHFVFNxYnJ9SOivG91RfrScPkYQ=; b=F4LZmmWyahIfIhV7vJfBIMpmtKfU09VD115WXXfgqCGCUynFPDRFh8G/jZSOED8Cv4 3JZ0abqbmbzCGPRaDZYyx00uQDwcZ+eS9d9GiM9w48DqBIzXlMSyMDIdW1U4q29nTcu2 +3WKTNAlXVaAdxPpDTWl5FgV/aQJjCTw/Bc3r4PokM2sm19XzVuwLU+a3ROSGzEVNF9A O1QKSu+b/0Rf5iH0WHgyyIDkBrO0kljb+6OhYQhU6lTWxK8pq0DSZq5BoC1y70+fxwPz vWrqsico0fEDNLtRebfg+dHLiQwsbTudx6VSzBYGr9p7eLvX5cTI8bGVEk2GcR2nT5+Z WE/g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LnSLxCOj; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u4-20020a056402064400b0051e28d0feb1si3718986edx.382.2023.07.12.01.22.41; Wed, 12 Jul 2023 01:23:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LnSLxCOj; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230175AbjGLIRa (ORCPT + 99 others); Wed, 12 Jul 2023 04:17:30 -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?oNHp4TohEkFNLz3nWjITtU9AtALeOonMKPFYuJ3A230QVjAYJR2SVrPVzUfZeHjvk?= =?utf-8?q?KKj1vZshyTBUwGQBx9sx9QxAFaVRWe5T8C13yHzxLeIb2bbZQpgbg9/COGt2t8NKG?= =?utf-8?q?bL/TKZ8Rkv+9mFsI+3dimZ5728Y2s8ulBviEN0VCtNV888oe6e19HQP2pUG2g22tS?= =?utf-8?q?R5XZ6DE6KuMj6lagFmDR+K25M0FKlFgoCWkkQLy7bTcI+sGfx/Wo+ALGrUJMToNbn?= =?utf-8?q?pyJyhe2qt/8tjW/zWg08wL26ANfw+GQ3y7/ZMWw1a8+pyuF2qRwrgPkUmFkNMbofW?= =?utf-8?q?e6wVXu4LkgH9ZMLq8/i7jDXOLgvr2YNtELes/VC6pynIQeNRTBRr7vDtmOt/oDELO?= =?utf-8?q?vREUpTeigBq3c+Ftc1+uTGHxbwBbDSCywbLho8WMgoZk7pVzI0AnKUNRk2h3Jzwle?= =?utf-8?q?4yd3fQqLCUMB6uE2yrISofyq/uEludtqR5MnHc+SSq+vIOqZlZo1Va8niddUDP0AU?= =?utf-8?q?2fWIXx06aXdnphaXb/QPXfJSxHfurMjdTs+1Ky5hFP1b5m0RNtbm88fmn4FBTL9NG?= =?utf-8?q?kvSV8K9ZDPcmDlRqeiUTwFlPQjrkzGi9/eGBTp/HiV2wdenRcIcGUyJvAgzKLL9yJ?= =?utf-8?q?OI225iXTnm1w8meqqvenKl/YLHyl6ouy/DHUGHSL0A6nsSh0CaZPiBibp8uI/EYwJ?= =?utf-8?q?sDnp4qt0/H6r8EzZTS5Dj7/hI7CXQHW8iR+CXiD1L2z3jg/CXXvkqDT/zRZlVMhW8?= =?utf-8?q?sTe3BU9vzR1vdpA+s/BGo3iRYX3hnU3EEKu52PjW7UjImi6s3ZNQcyI8BW7SrOnKk?= =?utf-8?q?Z5o3PZ0XRMMZduqlCk0rxvJX01vjGw1EipUhdbDf0uIpjGXZ9D6Uy9KvwPfgyt6MJ?= =?utf-8?q?0zcmKj6Pl5KELcvat4LGvZG2gWT/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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202346410775549 X-GMAIL-MSGID: 1771202346410775549 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: 118934 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp996093vqm; Wed, 12 Jul 2023 01:28:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlF2ORyYql4LB4kdEnJICq4AGdcfO0QYXKKqQIjYF9u2P8eX1nS8qh4SGDp9XrFJizsxagUZ X-Received: by 2002:ac2:5e30:0:b0:4f8:7528:50b5 with SMTP id o16-20020ac25e30000000b004f8752850b5mr12719916lfg.14.1689150533545; Wed, 12 Jul 2023 01:28:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150533; cv=pass; d=google.com; s=arc-20160816; b=D0hlZ3DMlwsv4sVA9wXEP75u4fwFss24Av1EcHhpuvN4lswuP1An07OuFnDJAtvSl6 nNiJq4gUhxMbqBCjE+gAD5WEKbH8AJ2aLIea/SCPllKX+JYzGDwn3YoxYLSp+xqBFeAu qU1vPlbfUOUwyxAl7CODIgNPnqW09Wcc/UIZLM1ako+zAbu78HYgMw2MBrbME3BotlV3 teEIP3uoc/m+xUD0N1/G8IWD5+Eqz/FwPjI4myDzwFg1wDN6QVI92g4Pes+YwjBX1nc3 HDznKtrwTavm6bMxcidcPpdwwoEjJAvXMFkb6Pf7f/RIG5yGBTIzPEo6qSfD5wN4dgV0 +aSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=t4anR4hB8BWzDaOgZAWI1NpEZLsSC9kJ1QyDsNU8d7s=; fh=gF2itGWmtUVqnmzOcHFVFNxYnJ9SOivG91RfrScPkYQ=; b=xa6y8cnxXfSqh/3IM1/Hw1H/esAZWhKMZuRFvdoumcWBfItjBw6d/V78yQ0qzpzc5Q No0OEGfO8QCo8PL41N2GJMLUP6y8nh6wrLc9T5XCli65F2u53u7wDpqfo+AiKIEA/ohK B9pNccJDlleEWI8s+2t88qlWsq8qUomW6VyMIJsUT55DDPDGzGRUFBDRHyaiArFmrpHr Xa37wY8ZTarbFxejPCsSwZxz/snGiFBEKJ8fp/8PfHHcbpSk894Jiq6/c5voPeGlh7gk jynQL3qIxk4vWYzmDGqO1nAsf+QThBb6sBh6hgHaV8P5KTsgeY+B8wijgAiCglP2KsAu +4Xw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="A0YTbUy/"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a056402516900b0051e065bbc3csi5005745ede.8.2023.07.12.01.28.30; Wed, 12 Jul 2023 01:28:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="A0YTbUy/"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232364AbjGLIRr (ORCPT + 99 others); Wed, 12 Jul 2023 04:17:47 -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?xKxlBm0p++4T2NivVlk6fIPkARsFuXci9S325mwFMVanCXQvbcoMLNJTQ/1XJYfx6?= =?utf-8?q?DiT5NQqa8PYUztZC1gqVBZv7jZC57wnPE3cHYj08DitRvmrNe8V1N3ngaROZWVmKo?= =?utf-8?q?vbIkxYcMhyDSve9vyldItUvkL4jAuyb8ynG3nAxCnTBSf/GHl4bnQiiRIk1ieoucq?= =?utf-8?q?A9fSGBfPT/xqj2gkR06TNVJFNmN+l5ZtQSze1LCkxGkZVCaXSiegnOFRA/RtsLtW1?= =?utf-8?q?zSXOOYTOTWR7sswLiR2iURAAYLE0S4drW/CAd7npzbqZvv4lYxLLxxyXM613ysqfW?= =?utf-8?q?OzeMNhHCJFUpbw+K8HvYLs1DnfASGMsO7fT7NRtVz2kUp+BB8ocFvlhSiK32Spm1v?= =?utf-8?q?ErSNYhNwrYt7+iviBp1Mrv0bqCp+56PYzYpWmNcNexWRk3yVi4HRkgyotiau09+Kc?= =?utf-8?q?r9XlWkH+AK2RTYS+HXTRPtswMY96rJpFF2W4VMHoU7E3j968t6mlxZ7i8DuSZB0k0?= =?utf-8?q?SgXgFrW/83C5mWTTh+6kk9Z3VNPTN7+JAKxlj5nNPrjNJQgQ+86n816C/KZFBmvyd?= =?utf-8?q?OIK8+eoLw6AivfbyVynv1YcPPcFBrlrJrDh4fiXFGwrQosd1rYjA3iEUtG/Va0j8A?= =?utf-8?q?XPdFs4OeTJkyViLPnv/oPUFxGdIvWfDujcG3if9ZipzbqBBR46AeR5ZhiKYvr4W66?= =?utf-8?q?ySC4+2toyx8l0DxYNWJcTzA40Ej1ITtwyI26/akBAQ3NfIY8JfsUCMc5PCDd0nBij?= =?utf-8?q?SBgWTMdKnUinqW3Knzycsi18fml4xUhrRo55wAy4zKZyDzYiMkwLV1pcT3Q6EvD25?= =?utf-8?q?YkGKmJ6QCVba8GglxS14xlCqU3N1pub0bJPSy34Msw/BpS7aGPQW/s3u03vo6ataZ?= =?utf-8?q?1oCMAVF5iw7av93lsHNlDVYcQgxeoNejmMpGObbnzSE2VmXUYvwDUFFb39pAJm6/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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202709892633188 X-GMAIL-MSGID: 1771202709892633188 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:51 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: 118939 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp996744vqm; Wed, 12 Jul 2023 01:30:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlHytiOQsj30+7fpky7/e+8lZg6CWgC4wZAUGOgLFHM7/izSmbq6Tr0CPvwDnPKwyZVSG8a8 X-Received: by 2002:a17:907:cca0:b0:98e:a451:fac3 with SMTP id up32-20020a170907cca000b0098ea451fac3mr17254128ejc.42.1689150619439; Wed, 12 Jul 2023 01:30:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150619; cv=pass; d=google.com; s=arc-20160816; b=hhiUK0tuQz2sWDNwfmhJlX6UKZdDtY3Ei7QfXm5pazHhoQ9Aej4zrCH/HKIEMbtAFZ 6MP9lBKMD77pSJUKMcf0KVK1JKniZK1qtMpNKBPf8MYBtn/ADMdMgke1lVT+PKwaN0Xv hynbmDk9ruQvFGf/azpbuulODQl2Sm6nuKFsS3R4IV26CCitdLll0wkU9s0Le02NdPkL fKFMXkfsiDLnl0CbrmWDtfPpMRNXRis0oDblWeN6QvFpIsvT28Tu0EX0pg3wuJ6fsT7b dMHslm15IBPnDyaGM/hZljx3z6xsetN+ZAQnP6q+9DJGKKHSazQ+8bEKsj01kgPBK8Xw DbHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=k7FwGtw4e9f+mAIMZLaLeQAhQ+nQdAGktLRvdZX51Kc=; fh=Y1lSEII/uTD63dAvhSXdvuyJQ0CmkMAalQ5E6tB0tdQ=; b=SZmSiqbWcNSVqQBSKkvWrRYdr8XnrzpC1Z5iAa8tRQYtkamool0hesXgfJ/pF1ecC+ LXBlPSwdCenpdiWSlkkd1ue7OVMYw8LOvAtuEeiDfx8gdtQoBABEXe1UBV3X5K9Y+ejE GiZku0hC1oN2RXM9LeSBTXwIKH6OGX1NhqqyKjSI3TpCyUBAQDayLatFOnNBr17GE2i8 VJ7RTT9nP+SY40blThtdzOpwvEJpRSWzkqgHkF+n/xGxfFttBpbRUl2FIFFtfMSTpUQp vRvdW3Uft+SubIruPBCz+rmxQNHtAm564vbmybxxSfs9xFFUf0M67vbzgEDVixDSYsE3 LXKQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=lgdT5b5y; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id re7-20020a170906d8c700b00992f8116abdsi4023015ejb.480.2023.07.12.01.29.55; Wed, 12 Jul 2023 01:30:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=lgdT5b5y; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231183AbjGLISQ (ORCPT + 99 others); Wed, 12 Jul 2023 04:18:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231213AbjGLIRd (ORCPT ); Wed, 12 Jul 2023 04:17:33 -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 34FF12D5B; Wed, 12 Jul 2023 01:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RtovODxjYznE7RzaQvNq3KyfOYcddjpvaqupXdMvCXWG29mXnS19CHiknzymrXzqzqWv5a9C6IgrSvNsAwMqWU+e0fgax27o3msD1mstH+Ew5gzwiICnfeayyJ3lCQ5QncpevcTa+svmUoHQGpBIGY2+hgBCv5+AQlH5AKiyatJ/vhOHmCAFUiDEyHhZ2brpc7Em6ralkNS+4Ol1NRhPfsGT213hOvFwNHHuw/3EHOQsu/0t1wTxQ3V/UuSmxXqEn0Qy217vp4xugYiVn68PF7Y6elvpu+FC0alBiHXjZKSX/8SrNogyNiEL7/tNyg+4w2icgA62V4eVg/t3RztXlQ== 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=k7FwGtw4e9f+mAIMZLaLeQAhQ+nQdAGktLRvdZX51Kc=; b=k3PSOHVl0elr8NsBQiOb6IbGnnNcoyr1fqYYqdw9tLNIQITb8seYrv4XQNqVrUjUb0gkgO2qBkH0sirNUaWITCeaXxlaHg/ueyYqr3ezp6eG1LrQuj53XmoDBzLZUmQVYbXSlrIq7orqlckd6BJPrS7LZXTzOOlFflQwUTqkKSPkhmREUtaroShWdMJYaVwDo3qRNrf6OWrFyj8c3vwR8HQNCNy0t5UXvW0K1nnJFBpSdyjWKfUeqW9tY4RHs3tHH0hgID3pYioCTghn1SecYzxsGvc8e1JrmbQL4Cl870Z/T/hvJ6WQ0BIo1enT1T6IcVaRoQB+qP4qVkMkKJU36w== 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=k7FwGtw4e9f+mAIMZLaLeQAhQ+nQdAGktLRvdZX51Kc=; b=lgdT5b5yuyOI6q448rckzQuXbRVzu/iutg+DVgEbNusdDo7CkMWtuykMRzBr8JcbLCvKi6XbmGIxT/mln/TGK2YV88CJshTOF30umdRRm80DfbG2HHJdtQQqOkIa88uIBhErUWurW2d6Ij5SHPxXow3/UTWfI/KPXsm3tVTdN7W1xYIhDnC+ZxDhmZ7A2CUbFjUxI7WYl1q3TrJkNqpb+axlTvjPA5VvXTAZg++qz6bMQxVce26oAkaYK29J7J2EaU4aCOgPIIzKdq9/Q6+1MwhrfXjGF+ZdrOC7blKd38ZL+WAC4EdKUql1DYMRM7Pymt8yfnVYTuekBEwU0uAlNw== 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:27 +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:27 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Orson Zhai , Baolin Wang , Chunyan Zhang Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 20/27] thermal/drivers/sprd: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:51 +0800 Message-Id: <20230712081258.29254-20-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: 2b73e176-a3c9-41eb-010a-08db82b0028d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KAS7ZB4mmu7igjU77C8Y/OweqIpRdBvKupMxEH7gfWCbAZMMVPjx3HemdqdexYEG0fKDvYNiWxkJuM++lTZrNbma5tPfYCkJ6gCdHuojCfrMje9sZu/N8O8oeXhb+jKeLYdQUM423+VzOYDY87d3QF1sbi6DAIpB1jfrofhUOwrEXMSdswXwnSNOIpPTXZ39Yyr0mjFlxh75n+mIYD1QylS+P2uYuqYisfj/QNEOQ4W1iZuk+YQM/8agGtnT92I9kB2Kyw5VKuJFKia9NpcyyB6VQ18pUPlR2JvyxeTVsf8QGDD++98+7vAup559NThCqTeuQfH6wCad1vuxQAu+q4s8d20xPRBelm6hM2GMVQG+16xyoSyqkpRlKn4MvW26iwlPUgLH+ASMtQMvQ9cKuwt99rReneqDjqXGQl0tXRRhzpxW5gQdRVId3Kwfa+FfAOHMeM3pIJ/scOAqS3bPeE/NNo+2L2XzDdBNk68aZiB36MsXxEVsmThtmGLZLNu5+qn7xVGgoO/S9IblK3x5dV9b1oNwj9dHrNtiUUmWKqHi7SBqCesvlscZcveySO4PkNFUEM8mvSHEFMRKTj2CvjBJ8EQawDWxFfRbg7LaHc7bJfddes/jQ00u4O9x3mTy 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?lulaAJVp40LNCqOIOXoCNTPFb5be?= =?utf-8?q?JqMGKT0wrTzbuEhNxmDL17Gr1rrWukd0uBBQN6ZJ0QReG+3gDbLA+AfTllByjGNEg?= =?utf-8?q?bM2iODbmwhV4lMp27do87uIfm6RLPDvVR3cv2bexm0kinyxUB0q47GTthWd/Ph3Ka?= =?utf-8?q?XN2HEYfcqKDcts+a/tEqa/koHqkR1xVZf+erPfOZBy4i/jTjuFnn59kwtQPGnQ0Ar?= =?utf-8?q?TAVBOP7phwfZczv61RrdErLPU3Y6MYMtLFI2V3sbmjSVxXElFzz6UX8s9qUWIlyE7?= =?utf-8?q?qZ92cng9+6tmaHSEzLtZPsbFwtVKIrXdXabgjJVbuRHNDDhbckKuW9DmPkekg2ASj?= =?utf-8?q?n/Ps5wPODFYPYp3oZK59a9ZyqkyNpvG/7Cp0Z7330Z5JfyXz20XJnk4UbumNdPxpr?= =?utf-8?q?2XckSiePK0h2T/3CF/0ohXtCUy++L/XTL3280+W75WSRJEldWSYjzxet0wzqIRlSs?= =?utf-8?q?+xZckrADgYIogLj/nqo0a+tLbCc89A8B6BvVhbjO2M8pmJYP1SU6wvM7MF5F5Icay?= =?utf-8?q?myUXvkDhjWcz0Thql9quNbFB3wca5mKwSWT35U5Ux3VB21pwP78GfIH1aKKT8PUMt?= =?utf-8?q?ltaIC6Rxe8agzhqUSeK4M+oraC5GeaPVWVVjzlmr241FRihONuPEdVak4zxMo9J6i?= =?utf-8?q?SZADEoZnxdkys3dV5EaHF3lVYgGrvgusq54ufAfWJf9BQKTE2x32g+YMo1LnwAKYr?= =?utf-8?q?BuOmLpPZ7SAq9qmHPMi9BVo4HD7lNZzTcis4rWGwi+8uC/fsB+BGrAqVv7R1PbEFk?= =?utf-8?q?8lQDOhFXXgcB4gXXALzAcWwPwteHjYatxqToNEWTOnSzKsW67VzRXW/Uc2KzNsXAN?= =?utf-8?q?WLMIWtnXsYcJ4UmU8sC2OIv8AxIEolfG5dBo+UPSHJROKdzMsvumc/y7252SwwbNh?= =?utf-8?q?421eU3YGPFvBV5ZSCBKrZ3zN80sO7RS3DFQRbCmtukCJv++dF0FZOnc/Haa20/f1F?= =?utf-8?q?woZGT+Fesdc3RZ+mb71yz8fMuqFjx+OjESrHN58JrkK0+8rkLYIBzn8toiZdIqIql?= =?utf-8?q?VDH/PhPuARs5h4ko8DGocRv1fKcyffS4PJdlsoDGI7dRDMD7INYSPjOJpN2/wxPBN?= =?utf-8?q?3sQi2h9CXcP38FnUpCzrVfUWP4lwkD2Qx81vjh89hB9mz6NbbOPv1X6SyYz7GS/TK?= =?utf-8?q?lwzbqe5zoUDItfzMku1hfO2Yy0dUgWpuomU0SlDaFppddCw5K2IdxTLld53aP7KUF?= =?utf-8?q?jPNaWZDfAsaJuMGRShgirdChGelxRiW2EAMFrDtAb7AW3QOVzpu30OyUsxJ8w67PY?= =?utf-8?q?+KgXmEx6qMFysScBUu1PjwrEj2fHAf/KOCkGYc4JTb2nadSAPE+HV76I0LfGvOKN+?= =?utf-8?q?trqfJkong2yG8bCJQ6jfmx+cTrYgPuo2IHRBOwYz4OEQXxWJoMF48FNMXGjAxn4Ts?= =?utf-8?q?gtrfEWeS50Q5TdAP6GUQP7/PgwGtYcfe0hd+7vjfV4EueS+uox8BiV9jCzXidsIbF?= =?utf-8?q?iIjPqXA7MxBC3Npyn586N++mgJ1JTYGYorhXurYv2b30Xg9QRjrO0HXaR0JlTdEIq?= =?utf-8?q?kPwwE+waN4HO?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2b73e176-a3c9-41eb-010a-08db82b0028d 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:27.3056 (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: yqHXXueky8Zuyn3BWR7H9mDtgAvtZk4/LD+FLkbgt04ZnkdyYyNikPC5tcD2IvaOXJsyRwtwy6YTabl1icwmCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202799911720427 X-GMAIL-MSGID: 1771202799911720427 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/sprd_thermal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/sprd_thermal.c b/drivers/thermal/sprd_thermal.c index 2fb90fdad76e..0546096f7e2d 100644 --- a/drivers/thermal/sprd_thermal.c +++ b/drivers/thermal/sprd_thermal.c @@ -516,7 +516,7 @@ static int sprd_thm_resume(struct device *dev) } #endif -static int sprd_thm_remove(struct platform_device *pdev) +static void sprd_thm_remove(struct platform_device *pdev) { struct sprd_thermal_data *thm = platform_get_drvdata(pdev); int i; @@ -528,7 +528,6 @@ static int sprd_thm_remove(struct platform_device *pdev) } clk_disable_unprepare(thm->clk); - return 0; } static const struct of_device_id sprd_thermal_of_match[] = { @@ -543,7 +542,7 @@ static const struct dev_pm_ops sprd_thermal_pm_ops = { static struct platform_driver sprd_thermal_driver = { .probe = sprd_thm_probe, - .remove = sprd_thm_remove, + .remove_new = sprd_thm_remove, .driver = { .name = "sprd-thermal", .pm = &sprd_thermal_pm_ops, From patchwork Wed Jul 12 08:12:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 118926 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp994435vqm; Wed, 12 Jul 2023 01:24:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlHO81VEota93rT5h5KWaSgf4JGv11g3jrNTuK+F2gUfY/Qon4+vnGii8HuEyeQ2Ak2j8RZ+ X-Received: by 2002:a17:906:5356:b0:993:f497:adbe with SMTP id j22-20020a170906535600b00993f497adbemr14752175ejo.19.1689150279202; Wed, 12 Jul 2023 01:24:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150279; cv=pass; d=google.com; s=arc-20160816; b=0mMauNyhflbEnfSVwcsG5zJKPq2baYGuBSXsu2kysUSFNItjhmCm1MaWwB828YWacs Hs6gamg5Jc+UED+07Ishg1FkuVmdFw8kib9ntAnCVoTxO9RaJ3kvtpE9PTqTc8MGV+k1 dkM1ZdazPUJKQNPD3v7/4InStxLiWBwm0edYFe0nWUALpmYTPcIdcDLSaexGdD8//QWI dSe9rX6G45olDbP35VR5CQKre5IOFxs957yXqiPkvc0qKHSLKnzOt3NiG0e9THA46lid JPozBoIw1nx3LVvrtLvPxTrsilt5jbVEiNSjrbYOXckH4Vk1euJtaITfF/QXWbdzEB5w DMeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BmlYxUlZMLn3gJYLM84Y8qIS0SHt06c0F82wrEX1jIo=; fh=Cmjlp7r1sVwzkDkoKftLyginZOx26MWtlgTL6TCUiUI=; b=MZV4hvL/eRjOVoU1hMZtI0IHNgUutub2QoHe7gYeLlqLzxvj9WiPUcV3CGrvQA8cxw 0CQ7XsdpH4VoKt+izlFFOx7s0Jz+uCHFzMCy15WToQTMWo3U2d/Nv0u9Uy6XjEfOioFJ AgtbX7hAqAN54+2HbRUD7dw7nqcw7AVI/jSCHcxZfZmszaNtdrGT1Se0FWt6V9a3/qgV 280XEmtuE9s0hqDXUqcqzXwDYz1KIB/n40L7Ji7/ZKZQbc2eeRcZSSwP7oegIDE3wU3z WblKMZao46SuM9Mw6GYpVNd57THIgFrDKC/vaYJDEkrqQkpbYQTG1pxbcpLBFbJsICdj maCA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=d4dzxt+A; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w24-20020a1709064a1800b00993320628absi4002900eju.675.2023.07.12.01.24.15; Wed, 12 Jul 2023 01:24:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=d4dzxt+A; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232329AbjGLISt (ORCPT + 99 others); Wed, 12 Jul 2023 04:18:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232422AbjGLIRz (ORCPT ); Wed, 12 Jul 2023 04:17:55 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2090.outbound.protection.outlook.com [40.107.215.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46842212D; Wed, 12 Jul 2023 01:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iyhx9hgZCVgEeOfNtFDRqoECWF0VGaPFwx0+suf6g9n/j6Fkgf4nGOOpvOWf1B9pkXCEawsDEVh6yrdw3Bgmfw1Ljqk11Rl0yoUDb6slaKnN6d43sM0czTK24U8AP36Xa2JnxoWNi9tM3bCBCeELXiF05xh/78vwu1jUsI++FVWn4ghf7LS5Gm513Omfl9R9jg1eosU5D8kYBtnsM1wsBrO709mLnUSckivOfID92rqFvPHso041JgVDBSIyCGfrqZifhJ3mR/anedIruZLl/s9AGokiQqW2JEMNm5xxxqyZVv2q1TnoyHTVjbRoA9UoW4yGxkopVRVopR2vue5C+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BmlYxUlZMLn3gJYLM84Y8qIS0SHt06c0F82wrEX1jIo=; b=Ww9kBS/6dp7n0yRxFkYj+KcE4Q7z7G6mEgXweg6neT+1hkF/xbgnbHx4uBeCIeSwkwpnoTbMuhvCZwsVl588cQr+8zWnilz9+8v7/aU836wmfw0alKZN5UKKv2FU5YF3SvsmL8FHoPWTwxcyTEafaKJ7M8o3+RyNY1JZOIqtSCG/eJ6BB4ilfzm74mifMOVrfXZnvbwVzQ1/fQCBtasRyRSr/BkV48l+pacbgiaEPIMNWIMAzyvez83hiL8kTqjmR+Ceyozj349N2pON4fgcMgNvmRaavyPXHqgHEHxbRsj4UbMYldPZqpYV9/FJscnU9zEhEcnGaaiJZdyYu9bCnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BmlYxUlZMLn3gJYLM84Y8qIS0SHt06c0F82wrEX1jIo=; b=d4dzxt+ASED5iSMqaBLFBG72lD8vHeemBAzz91JEMBbWIt9W68UGiJ9O6K2Np+HOsgQAuplWfSZkjL6AsHf5+vn1u/E1pFpLZ4ILDRA3EJ5g089IBS6x3u3YaAIzof0bxGyJG99BaqYuWD0CHq0j0P1VjqPzWr4GCM7IgPIccLCg/BoB7LJxjm/yP7GY41yRDhHYCMyqnZf4GwOHYbep8YpqpwE21LxD97lNyY7nFj+Uu+dUzW2ojxMXQM1PU4JgdEcYS7ioH7MjaMMevYj7w1SOFaWRGuIu854G4pPbwxp56E28gPlZWpYNdV7cJYxmsTehEaFkj7QGNa4tf6qbbQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEYPR06MB6524.apcprd06.prod.outlook.com (2603:1096:101:171::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 08:14:29 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Wed, 12 Jul 2023 08:14:29 +0000 From: Yangtao Li To: =?utf-8?q?Niklas_S=C3=B6derlund?= , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-renesas-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 21/27] thermal/drivers/rcar_thermal: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:52 +0800 Message-Id: <20230712081258.29254-21-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712081258.29254-1-frank.li@vivo.com> References: <20230712081258.29254-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR04CA0208.apcprd04.prod.outlook.com (2603:1096:4:187::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6524:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d0b128f-b9df-4228-7e7b-08db82b003df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NHDupBP443ajH+MN7hcS0xHZ8IKO0yRmOQLE+/gbBYlJ7VIewc4gZ4Fo4XSz+jnSFLc0wGb0w1eIYkLMuFWoQ4Igj3YJonBYnmya5wZ666QWA4ZxkSk5qCvMTrL2Hwg6pAuzEIoBk9njn2HpCS6jqjkVt06b5O3AT2zzJfsYwXJk+sFRBgyIzoOZ+8ZifsBInb2MinSkgAla8h0j+R82u1nQzm6iHAmKE7vOomC8ZpqI6sQXAZdcxrrcBBnhblDeRv8zhkUwuCxXtP0kuiVrjuQkjYIO/2CuqXXSa1g5G7AfZCf/ZbjuNdn1njrmPuINHs+8UQP/WaK6IRp1Pw0keMyRsubd1BnYD/F539lCOcsV8/ezzlhLmL8NkoFnF6Cx1SxehoX2oCHSw8QbpS/eyk0ZGym9F9g3pOyVQ5q1L61r5NG+NZk0d8xvJ7zV/kQeMXLe5x9r1fuGKrFCVL9gzLSghGa/MKsMHyzL7Abvk0eJqlN/Wzk0qCBiWcYRyEVdKdJnDB6Vdw0+hsUPIuFj8G8jTeWPDQsf9bPC9haX9aGv5EM5NTtQC4MSk56XfPvXRW3qmtHCBA9JgBiZQXzcPo5lZ7i9A7Y1YL3IKcALnHwdujP2rbocyZVP9YQ3u/MM X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(366004)(136003)(39860400002)(396003)(451199021)(8676002)(8936002)(5660300002)(186003)(2616005)(83380400001)(6506007)(26005)(86362001)(41300700001)(1076003)(6666004)(6486002)(52116002)(316002)(6512007)(66476007)(36756003)(2906002)(66946007)(66556008)(54906003)(478600001)(110136005)(4326008)(38100700002)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?owm8pqKS1Vgfts3QteiDAaDT5+GD?= =?utf-8?q?inpjgEmgYB9frqkGhLBPa2rfKna8cphQJ9eoEsgVUWf9YaPmBY9K3toryZKhRfiV3?= =?utf-8?q?QRZeJf/6+638TpyTFEQb5miglAJ4ftGaitY7A0dujuKPnqDRN1RbHX3cDMuR9KXYv?= =?utf-8?q?QmGSA9RxknmUw1OEIdVjlUY+hASC+x4wy8Gkf3pbv7uh0+C1u9jqd9hT1gJB79w7v?= =?utf-8?q?Sjwtq42qrqD/vYIWPtSx0CbNmLQqB6Ynv6O7yfToS6KJC6KbQCuY4s3ln9m7AlYu3?= =?utf-8?q?ygo/dOKZv1EpgkL4f7KAL3qWdyMKgDYj1N7Y6hd9yac0rgoNLbsw6F2yIJSHFxq+F?= =?utf-8?q?k4n/W6jjXYOWZ6TRuirHZTyZpx69Ehy2Wj4HyNu6c1SZJqKcdllszhpYJ4Syma/i9?= =?utf-8?q?nliOu/Oyo0oNf96CDP20wGNtlxdXuGARzqwl0z18dP6IIfhmOkjbBaduCd/vwLvab?= =?utf-8?q?il9lTqdb8k5cg4WmzxkaUKY+O8C4QTE1nmmRE/czGpkAu/x+SJcj39vGIVaJAqgFO?= =?utf-8?q?pKLJj1GQg7552weDZQVKN0RzNdjC2J1bavMyxy5ByUnhnDXK5qDAZm3lO4BWwVbHo?= =?utf-8?q?B2CUQnBLpvU1djaGrJxOuKmYoVpN9sA3ZN2O2FTQe5Q2+dFMKg4ZXqFVoDjKt/6h6?= =?utf-8?q?qUJKPuiq3ilTNYjLtUJaQ9qN55tl8mEwje5SOP/NqR/ZVmA2jCfHE5THJ9ejWNL0L?= =?utf-8?q?Ozj+SUkvaiKVJu2q9SVSKAnHQ2M5He6G70XsAsVmOWj7RCvzK7LW+UQAjzhyg0WuZ?= =?utf-8?q?YmJeJiQQ7AAA0ONcwq4A1+a/aAWlFyMcG3p2mPRmRYlSHw0K3YqtfLzkb9XiV3aHZ?= =?utf-8?q?9+35SaIDz+MnNn/OLR6NVfgmh//gQd4sXiH6Qs1f2E7FCmusnM/95bwAGQr7swV/6?= =?utf-8?q?mLd34pdB9f3omk2G+uz9ZzgRuIOBgPUT36WWLhbLwv3LP6AwrPj3RKNmRct+sQ6Oy?= =?utf-8?q?yDU7h6Z7FxqZJS73tMb47qr1XeULs8nTLimcXY85LyrCIoVkyJ2taEn1iwClaHZ0D?= =?utf-8?q?PQWNAlZrUsnFCKqh//UPMjuuYnBwi2qs1iMfn3MBH7IlBxAj2oW/nrfloVBBFtN0A?= =?utf-8?q?YTpwLbZ95jeYihV7Lge0dX/DrTt7+biAlG7jnH25bYvtvoB/mZUNk54wWFVq370Lo?= =?utf-8?q?F+/VJx+oT1M/ObL72YJHWQGA112Z12JtdzmmcbNYnlHYY2Y9bxgyc0BgxU4vHRrEa?= =?utf-8?q?TDqwZC+dlmSQ0QrUBY2yu1sxw1dy0J6qhypfPbB1kbQeWVVOYCmZRXPBfUvhG5K63?= =?utf-8?q?zo64DySiLk5N9o8AyViJSCWn8vkhBcWIOhl2aXslsz8w0uCDZ++eGagxNdNgeHwj9?= =?utf-8?q?wwB1CPkNgzjGKrDJMjR4N2QkwAjSQvJUz+as0jVX/yyJ7oO6zKgRwEqyBdeC7SXIP?= =?utf-8?q?wEKTFE+lwpyrVbYw/vmCmMKnubczOoSnPV0fMsVQ5GbxbT/7NvsKiBW2qEIFeCbww?= =?utf-8?q?HZoDLQzk8KPfLNh15w0ptfBFIUgKwCrmEdgTAsnYyGCRtises6j74tHyo9noa1bTR?= =?utf-8?q?FYfA6/aZGj0r?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d0b128f-b9df-4228-7e7b-08db82b003df X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 08:14:29.5389 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Lq26VdSOYwJAvEAVYEkKk6nAvmL0S4NXogRzAZsVnBYcDB826147ACMpPaYelsLNIljjySmNRAhyFJVQ5ex6Rg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202443622739553 X-GMAIL-MSGID: 1771202443622739553 The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Cc: Uwe Kleine-König Signed-off-by: Yangtao Li Reviewed-by: Geert Uytterhoeven Reviewed-by: Uwe Kleine-König Reviewed-by: Niklas Söderlund --- drivers/thermal/rcar_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index b8571f7090aa..b4c58c5f6f6d 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -371,7 +371,7 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data) /* * platform functions */ -static int rcar_thermal_remove(struct platform_device *pdev) +static void rcar_thermal_remove(struct platform_device *pdev) { struct rcar_thermal_common *common = platform_get_drvdata(pdev); struct device *dev = &pdev->dev; @@ -388,8 +388,6 @@ static int rcar_thermal_remove(struct platform_device *pdev) pm_runtime_put(dev); pm_runtime_disable(dev); - - return 0; } static int rcar_thermal_probe(struct platform_device *pdev) @@ -581,7 +579,7 @@ static struct platform_driver rcar_thermal_driver = { .of_match_table = rcar_thermal_dt_ids, }, .probe = rcar_thermal_probe, - .remove = rcar_thermal_remove, + .remove_new = rcar_thermal_remove, }; module_platform_driver(rcar_thermal_driver); 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: 118929 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp995083vqm; Wed, 12 Jul 2023 01:26:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlGPAZHJGyvFFZ7hXak5p2yM/B4rcIfEgiz+oQwjV5tL5xEdVAhjGxfhROSJrS0nVVgok9MH X-Received: by 2002:a05:6402:1b0b:b0:51d:a6e3:81f4 with SMTP id by11-20020a0564021b0b00b0051da6e381f4mr16222052edb.10.1689150383873; Wed, 12 Jul 2023 01:26:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150383; cv=pass; d=google.com; s=arc-20160816; b=ZzhTK6Hldaew2gkTXz7F2M2cwEDfC4IqBiS9IcnGIqLziGVvVz0ZcsykGwz8Bdm+nE aF8fFo84UKslpK76nczM7mMm02WRe927X/C4LySgDWZc3pLB9veaiLxJNQOp8d689GIR 8iRBbeO5SCMLM+H1hkYB/REcwb2Ao2kF7d3+1V+2iDryZVCjNObZ9j/a5Q8/zwksuTT3 DK3CSCn+t08ZE8utgiaMxJ6vaDpBK/5+k+mE9R5rgsWWYWOC7c9hCF3fOM4lT1Llyp6+ quz+HAySpyLLtJp+QARJCwB2qNhYZa05ezUmMVQ2JMrixkPvbzLhJV8BWxBzleQHvA93 QTXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fhP46AB2RhUS6oqayVfe/eF0wD+5UJFy3MIxYFrPY9U=; fh=q7JVi1xs7j0f7NcmZgJvA4ABs/GXnqbkDUJRSTFfDBI=; b=O5GP0dEXjHva2+SGiHW8XXrCDuOibdUuMoClc6lDF/Pf1mrDXxRUZswQQeQjE/tZQT nyDfrCLrl24y4NO25sbb/PKAFDjIvWbE/I//3FHhyNopJmzlECy2vyKEZlyjyQj2UX7O Tg7RNGF1GSv1HA6LKUDD5169VvwT63k+GMe4hHr/gRx0EfoxFsmIbquounM1TCCbdOEg 3jeWU4imwOJUMseVRAVcfBJZ8zKcuW7w/KblMAy6pWNxnWUFynByCp+WYgh684823UfQ FntSKEBn/3YyM9ibzYljWdkoR3CAlULXSZZFIRcZXPOCMxeL18+EycEDbm0v1BCUUP33 e14g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LRGitOod; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020aa7c704000000b0051e186a6fadsi4110149edq.227.2023.07.12.01.26.01; Wed, 12 Jul 2023 01:26:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LRGitOod; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231765AbjGLITX (ORCPT + 99 others); Wed, 12 Jul 2023 04:19:23 -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?q?gnNl10USb7a7D8ZqosBm8JyW840z4SbTk5RT8sn7SpNQjzMR7LV13AvY3A6XYHGCR?= =?utf-8?q?JetVwoQNUl3KDtqDsQLUDt/bMOg1k9GKMj3hz2YtxW0KJ0Or32M0baLPcIiGMPzZC?= =?utf-8?q?2E+wcqIcGAsIeta1GscqE2n/v4IYcSuCr40nEbLSVNF5b6gCowsgy5X+TVn1o2aTl?= =?utf-8?q?U+x+EPBkNG/ugdV8Xb7jrRZTtdid42n9IBBZNOyL+OcmEO4dbUFBgzTxjkuF3/NAF?= =?utf-8?q?VVeU2tHA4luzthspP44pi3rGLUN7KsQeUGsprq1VtR6OiFs42CLWoXvIzXZhp5g1o?= =?utf-8?q?4ayEzcwKyeyu4AR5l09riYyY0YFD5dQSU6uzc9JV8Zm5QbOg1VTxJOajDwe64VwcM?= =?utf-8?q?UtfO8x2UaEn7CMz953WdAfLsefrhJc0d4p3yJPtLQlT+MjK3lt2NHe7OSIwHO3VAQ?= =?utf-8?q?ApGvpn4M6ck/tTUEB7WFmrZN7qtM0trKkYtbp/TuTbC2cDV7QJVxlXu4vPl+G07B6?= =?utf-8?q?8Gh0PqTXqpsOaCTHSGlUhKYc4k0c6GgkteliGZdz73g7YQNLOzBTv2SgEVTGZXK8j?= =?utf-8?q?cLBBI6AQxLQ5AQKaCFdsjbcs1T+5G0rL1kyc5UNFz672bEs99PEZLkHhJnGAr2GfO?= =?utf-8?q?DMeN3Dg8+oP3zPOsJFxGTVbp00ZPipcP+hkcaY4DT7DHPfj9dWdP3+kdiJ9c6TsmF?= =?utf-8?q?VqCUb7L32vw9Mc4wGOfMQ+TGw86jqh3OxYqtR9nuuskWhAVqFKU1uulR2vW71uKiQ?= =?utf-8?q?8v5zmeVk+voMWoTtmvT3t/Prmd0MDoE72XBN6Qqndb3yhVwBMvcx1ZIvMIW3PPkut?= =?utf-8?q?7pAiHSt/VUv6gxTu92/IIWe1n25/t08Zc/Li4JToLe5iw/FBP1GLsuAE7jKr4Ilw7?= =?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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202552957480413 X-GMAIL-MSGID: 1771202552957480413 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:54 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: 118956 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1007801vqm; Wed, 12 Jul 2023 01:56:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlG8sU00A4URIfwUiBC0C3uSKvUuwBtGItZoUMCpTeUR5Kn4UFo4awmCOu8lvdKnnV4XSRt4 X-Received: by 2002:a17:902:e811:b0:1b3:d4aa:461 with SMTP id u17-20020a170902e81100b001b3d4aa0461mr15554457plg.44.1689152169403; Wed, 12 Jul 2023 01:56:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689152169; cv=pass; d=google.com; s=arc-20160816; b=hUsTwsURrN5eqXChD3CDkaZzZFt/OhsyNJbdSwv8IkBK36Y9zKogCCwWa3cx64BANI X8Z5/CYdMo/EhoQ47n7XumDqE+6V/MLciySjjUh1Ev90HgU/ZDNW411TwLAlcFCoe8jB NgvXybp9ptVarHCwx5CoKx4XAt1SacINtX8rwWPqvC4TEhAZbJXgFDPwZejpBzkg9Vju nAoTu9GaryZAijVCM5alXnGCJ6pQIoTAs4Fx1T1/XFUfw3wvg5tqTITKfgDPCMLidiG0 ht/QSTvBPyACRpF3/jiA/EYxPwMDkhTVmTXA+KTs1vUMSk9O2Q40MCIkjbSO4+yZNVGd C8KQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TNvjmd9xpoD3cwxwNpAAcC7ffsnPu39nlxJUxUcHiFw=; fh=/+YfUBGFURRbgMZs1WWqXVi6bqlIw7Ev7Ycddjs/2qc=; b=kfxO4ks5u9m1GYeGG+2r7Wi/9IIRID48iQxGvEBi8Z6nPk5ywBbirQ0GfHEErqsW03 GwnJsmQlsX4LqdLVcKRcBcnHppunvSR8C+okiLUhpCRKw12Flap4nCsyQVuyPfzJyLpU i+o8h8G+pk47elEdsCCcJ2VJfz6BhUZThvrJiNxIDRTrjG1hvQfEYuwJGuOdNqAjnpv3 K6ih+UJmRgGdETPw1zvemaHio3yYCiIWp/SUfWP14P4yRog5bVZYIwNr94zSHcsVNbgP FJvvG3ekObU7C2yTeThlW8kqvfDKKUWfIUGpduCMfIxi+wLOG6xLOfjFPBfbpIqeCie3 KU0g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=nizB2NtW; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3-20020a170903234300b001b8b2865f38si3158990plh.170.2023.07.12.01.55.55; Wed, 12 Jul 2023 01:56:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=nizB2NtW; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232484AbjGLITi (ORCPT + 99 others); Wed, 12 Jul 2023 04:19:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232261AbjGLISr (ORCPT ); Wed, 12 Jul 2023 04:18:47 -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 42FE526AE; Wed, 12 Jul 2023 01:16:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QlWwXf/8dT5EtOA683eEblNmUo1ZtlEuz+lE04ZHKWl+XWHV7FG3MLFivs9LI21rbYWiN9I7pzm2QqGn27yOOcHnjDFAHyHRG5wZ0EpNrSC1bu0xvmydS1WojoqZ1ESwbQgWkX15234ksCnro1egZ2HZX6h/YHsoeKyerDXE4ktBSb4YPbylgnoUxcpvSiw/V1BzoYYkd3FZpNbwXRAsY70KORfMHBwh42uDyTWLoVBS04dXIkN3merEHsfg89D8AuPNZX8XpNPW/apuCNvzWPCfWt+8s+zIav0aUYfIx7re0NUykJNJxsqmLA8Mnf4RdHnhaZEw09gFxID4pypG7g== 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=TNvjmd9xpoD3cwxwNpAAcC7ffsnPu39nlxJUxUcHiFw=; b=B9cYnCtw8QIkNvTpBJPEiAcbNubYrxuvao/xWv72mhMOutknj7iil9cAETv5l/C1U971BfpIZrxfal2J2gEhr4cig3XBevDN0cUmGZY3n2IRmzhgZHUh54FpxYaWskJ9cDYsT4tBZ3EjKq+slhwDGYpn1/qG/aksnLli6BDvFSat1WYv7/8nU5H3PJFy5/PO/DGR8pgmDw96OoI0ucnmf7i775WORPSTPwTeCCGlRU9aQSgUxqnu4kjAUsKoFgTLox+d5jqKn0FBp7skwjPhbEZQlL7cqfVMSAJQVeCsDafBTzWgWws6GbC/ZrPPiyDj+T/G0H9ptrziPf9hxDi5cA== 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=TNvjmd9xpoD3cwxwNpAAcC7ffsnPu39nlxJUxUcHiFw=; b=nizB2NtW0n8Gdq9M9GwvYz3veDjnFOQG/ZRHKBYUP8l8+xW+Qat8AfTOrTigKYDwskb/lvnu5fb0ItSwrArHOXYfUhTv7WCFD5B5n0LFYC/2cSvXa8I2C33w+Qm+miu0Mt2537qdOfwfIagJTYNeHrWf+biqaFU/DmeWmp/VBdVcxVNve8+lQTtS+TavLQSk4TmPIgVcU2vZpJtDuW3jkxkn9JoLVTuQ6LqOoD3bTDPp2T0DmN8lpQs5z7xK0P9Q2l39cB5Pqab56+MEfasTedXb5C4U+absnEetan1Z3lAe6WiQndWX3Z8YqKBL3IXnQx4PNsbn0AYsWhvTY2HEkw== 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:33 +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:33 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Maxime Coquelin , Alexandre Torgue Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 23/27] thermal/drivers/stm: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:54 +0800 Message-Id: <20230712081258.29254-23-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: 27b486b0-7e43-4a13-054e-08db82b0066f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c8DS4tOMH8XHisE0YYw3lrNVFmQaLbMvdP1761dYBUi5Luo0t8OTsjPfB89yFEZx3mt2RZOgMwnMhy8FbSozK7yBOFvB6WFZ38rdsQuHAMO5DqaZaAZRaO2vQ75i3Pv8EcpUWPn1DpSqnjHrl6rw3yCjQWfbTo3Qdr53WCFk4rUi9Om/h9QIz4Ich+A7h25Yd8z7jVIDahgmSU+1oO2KP8a9KNS6tMR4f1FqdrQq+AbUez6CrIupp70c7aVSnp0ZNEWx0DYWFuzrdEpqhKFdEgEhxOucPeFc/hiOkx9GgxZmCV+qBBqoGS8LZQ5qv8DUD2NCs+YFdna7Ydyxf1D1odgpRWv/r4ai0dCjWGW3s7omMn4v0lzp5lZ8DhWklgchagbl9jUpaPRSO1fCSd9AVholzmmVpi8w5bBFcpZCS/316Waeh/rDnYTJRKNbhhGR9HII4bEkjvSSi9aEaT7DUk7l2XqU7imICwOh5Q8W8/Xw+UzP+C2lmVqkqUbuY4NWgtquyNc27+hcp1AANFx8UzrD3UtuJqyOtbl4V3w5GtOr0LEJP8mY4pt5s7HzObcT6gunhW4r6BjcffeJcrmpHqRftsufEy16JezNb8jtpzFf2Jv+tLShrntCSohqckav 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?ogqNSUiUNSWBlNrZSQr4Q3GYyAJ7?= =?utf-8?q?S/PkwxVa6VVuKeMZMiGHLO77hLtUFi2Fu284RISF21kcQ5aoNS4K7wXfGe8/d2V5F?= =?utf-8?q?8D94AzC4AUgNl6rzhj5vmg4s3zGDT0D3DHa0MY3pSrHpGBLexIqvRai8IWZqt9j4P?= =?utf-8?q?Of4KO+zvVYvdTnx9XWWXg4K1y5XXfqVKkfMzUwf190NoyeEjRTnqsNNntqOHwCJa0?= =?utf-8?q?5/KNtMiAgfdcqyNdVBRIgW80FAP/2mldB8T1Z+2CyKblbRCY623gdY9ObRJEE57/j?= =?utf-8?q?WcGPxUpDNFQGOBlclyJVi4ilWfnWOZ3SngRxqaX5LRfHdAbuoTjmxErREef8XTxQc?= =?utf-8?q?ePNsAsdQO6JHOXi9xzztMWNiSsq6Fles21Ost+IWRTtkNI0MSOjyMaS71A6zhH7qP?= =?utf-8?q?Wh7cruucPU6TPA21/itIpAppjsGMLqNVsd9nU9QLkJ989xbFbszFeOI1CVZbU3iJV?= =?utf-8?q?gwSs46gY1N7+eRyXTTLEiuVIXmI6rRuC457liA5aIRuqbwMZBNlO4E8+wzwBHiKZX?= =?utf-8?q?3D03gOAJc14I1ZLUqLK9vND0ZXVRd2Rarl0qIT25tGQP1oOykrnVtTenIqnDtpmk4?= =?utf-8?q?pfwW5num2rSrfAC14RyXQ9xQxY+8KQf8LxHSU4ETOgQtEc0umzA90nF4IAygcgFAm?= =?utf-8?q?Piyf87xjCP7x1C+RKEL5ZuhBSp+ZxmDUSGpYmVMnl6QjRIzIs2qi5Una+fy7/YcA2?= =?utf-8?q?OQamrEs93DeAEPAyZwIwyS60PZE3XKEANlGNUj81yGyIdJzBO3/zMXxOeEdUJZG9Y?= =?utf-8?q?vReofD6Hnz4eayL9jFxdyOIYES4XuNkKu6gMAqqyUVFBBav2Lyj+WEwPnbwBVhxjA?= =?utf-8?q?/c5AIm13yilvtdwBJr+NSmS0YArk0eN4tQ0bGwGZewXy1bQn8kJV+IaIOlseuZJoD?= =?utf-8?q?CgjjSOuu/Bm4TGhLnu20RYKVkP4rQ/gW3DXv7Eua9lpzzAkhI2gBUt/DwwhyyEBat?= =?utf-8?q?JBH3dl0yudiCdoC6AUg8gdp98emcrMXf7TFO5FuJL+CcDJRDxy31e3a3C+Y4KgESq?= =?utf-8?q?CzbpF8ZDWZz4IKlqfuYuja2P2IEQCmU1BW6haYxXLuMFgT7LvE+CZt4SS+YzZWQmD?= =?utf-8?q?MPmzcFmlq0Ej+TPoDmTavxndOoKuLGJsQDojGnHOtIWE5Qb80MtEt07gqRsKYhbh/?= =?utf-8?q?axyuwuOvSuWaBuntIPvWKM2xfjiEV/0/x934+5pLLWOyrOG26r/g11wr0UwnitKnd?= =?utf-8?q?JBy8rWiPbaTyW1xgxD+TeCc2ub2O9KiRQjR7bO3KxxlZOVr9oPi8GlSyKMFuZCTU/?= =?utf-8?q?0K6Uc/y/3gf3gl3jhdRG9noBIQvZuWCDB68zMz6WFt64Fu1zK7I4tl4YPnIyOAh5D?= =?utf-8?q?DZ4zz/xjbWEhKw9Zdd4ZBlUYz3xJylKwpo/ME71Zhaq/HyXN9vi3wxKSfOrgkDWHJ?= =?utf-8?q?MWtOt2dorHmRhhIcKfu8OjYSDR0alF1/am/XdxIJmJnHW16s+ozeXNPfUIWrMytib?= =?utf-8?q?a3ZU1nM3yJfyEtAzBkWdhYh7y08agFCnj+56yWxRuKsiLmEC/pmeJQ/jBFcNF3T/e?= =?utf-8?q?6mNE3MW9+pfl?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27b486b0-7e43-4a13-054e-08db82b0066f 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:33.8278 (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: FZ8vk1G/h3HSFfMkGQQVO0ZNey1/SRHAJLLqdy++h+qQLa7SxsiqQq6AS++JXSaGUXJD1CbtgWZT9Pm+zodeJg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771204425200510889 X-GMAIL-MSGID: 1771204425200510889 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/st/stm_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c index 903fcf1763f1..da6a25ce4469 100644 --- a/drivers/thermal/st/stm_thermal.c +++ b/drivers/thermal/st/stm_thermal.c @@ -571,14 +571,12 @@ static int stm_thermal_probe(struct platform_device *pdev) return ret; } -static int stm_thermal_remove(struct platform_device *pdev) +static void stm_thermal_remove(struct platform_device *pdev) { struct stm_thermal_sensor *sensor = platform_get_drvdata(pdev); stm_thermal_sensor_off(sensor); thermal_remove_hwmon_sysfs(sensor->th_dev); - - return 0; } static struct platform_driver stm_thermal_driver = { @@ -588,7 +586,7 @@ static struct platform_driver stm_thermal_driver = { .of_match_table = stm_thermal_of_match, }, .probe = stm_thermal_probe, - .remove = stm_thermal_remove, + .remove_new = stm_thermal_remove, }; module_platform_driver(stm_thermal_driver); 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: 118940 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp997570vqm; Wed, 12 Jul 2023 01:32:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlFvJ0fn5OmqgqAju8ovTObWsT4/ymjAYwK3WFn5lytsyLqQyZEF/BOBYpApxBv1p2eLZ53j X-Received: by 2002:a17:906:f15:b0:98e:973:d39f with SMTP id z21-20020a1709060f1500b0098e0973d39fmr3642535eji.33.1689150719704; Wed, 12 Jul 2023 01:31:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150719; cv=pass; d=google.com; s=arc-20160816; b=HsiBNbU/wY1QeSRIdTOdCiBczhYwyrJpc2AsMm7JgCcvr4AF97+CeyfrljrDIl1nXj hu4H/E/6rmqVoFj8IFEQl2oYm6umWdUl5XaRUSC1+o5NPifWOBfXTkvrtbJxCuacxvsk chy99qeMuxxBirFRqWd9j5rC6RnPf9cAWZ9N1TuhFf/H1jvn4efHBzqjtzk62D/BRYG2 pISePczekdK65YxvJUx2VvTx4cq3JU+Z1qV4ZEDKsaE+GJg6M09R0gN8kAZFOaW2WUG5 0PJHV3QFol66/lcqSvD28/wyVfdFNlQnFSXy2Xq5wGs0LgwF5jEveLMYiTbASSibHT5G Twtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YDpghUfsAcmM6fKD/5o033Ckp7CnOvDpysz9Vp/fg5U=; fh=wmIDef7ysQHQQNTVbjXvSrgZm5zJs4FQ0EcxDGRFrC8=; b=sW9t6LcoXxm7a8cQJ0L+kEx9/36tHd4javWupsa67CkZDjdvAbB3Mv6oumrccoYr0U eqsEsz7yAXX2EOQEhFe0m922cPf5vHV585tD8eXwb6p+5hDGE3/pSeu+fRjl0QoQd45c FIMHIzts1THOAWqmbpsZ9cFYudAyD3FUcE+lltJTzbnbVIv81aG7y4W1jplTYT7uYvj0 2vP800D86dJfbU0LTkJDTbdYq0Mytvbs4xm4Qy4hxVlyDsn1cGjg1u9agwzSpRPWPAfa V2B77cRb8lrPAWUu17A42F0z/oqbq+tsHCOb2ivRlC5lsR1m+aHB7RV1rt26WQnrFjb7 ARzg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=C+VyypNQ; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c25-20020a170906529900b0099332d4ed30si4033597ejm.677.2023.07.12.01.31.36; Wed, 12 Jul 2023 01:31:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=C+VyypNQ; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232291AbjGLIQp (ORCPT + 99 others); Wed, 12 Jul 2023 04:16:45 -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?k9XgzZkFICzANypEPgaTxDswWEG3eysPjmr1qpWKXZil3gr7wyGI1Id9RB11nOLNh?= =?utf-8?q?Tp/wJePnZ/mHHUDoDW61lVWlAvxgWinZpVVUyi+zo/iX5Ddyi28rJMtVRarPhlqAo?= =?utf-8?q?arbfPiCvndN3vaZDSYtktOT0/9Mngbht5hd37D/GqsZam5d6SJ12Ef6EYN+WB6Bpq?= =?utf-8?q?jC+LUulPio9NOxdyNX+lUMXao0O4LVb2bbquXMc1fhe8JaUo1LeXGuksjMrtz2EAx?= =?utf-8?q?UihebOXOyPtxxk3FKSHWI9QNxXQxIBLuXqXyyva1gbiB3crnkkGcMJ2BYRXqzTPtT?= =?utf-8?q?rNMdBGTRF1aAU2mFjrs1/PSgJpTySJ+z00RDdK//AGs1Vu1Tf3rV9Axc/KQ7AHLHM?= =?utf-8?q?BJZDQEvAXZITVAUmdvh0kChjd6mXiU5BxxOO5UMLJhJlPj3V1UWakpMbHerdXBlt7?= =?utf-8?q?bmfYK6bLQ+NR0PpiXqHvTgAmC44Zf4MliJ5J1AgY9E+IBxrvxNQOOFBdnl+EtEWml?= =?utf-8?q?+WOn/x00cL/LsaCuWv3hBUTVR9Y+b3z0xb1KChNSw7PlSuzTSnq7wZe99y2ty4paH?= =?utf-8?q?HLx8s5kzi1kjpud9KWrzOa7WPFQSLwgWXlrzTIOIxT45NxTfTKgu5RNa0pPe2zY/n?= =?utf-8?q?Krc/PYsFEJshmy1eF9nSK14D+IM8300h0DMqUsBEI0ZncbNeFEcKfe6mr1h19RD5T?= =?utf-8?q?RxGoBRITbEJnb7AjXtAdrV7vO/3vUKgoi0ci1d/uAnGaCyk741XCB3vYQ2q4RaUm5?= =?utf-8?q?tBMbk8IitW0un4azC8cj2Oxkf9ZUmrbx3Wvbd+TZPOi4W0RzfG153JerGuhA7IMlV?= =?utf-8?q?mCM9TZKSdfakz+iWxfKHDPquv5lq3hkrqcWmMRgmj7vHBmBSd/NaKddB6AvxESW8z?= =?utf-8?q?CUWD1N1q+Yh4MT6XLbLQ2gi+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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202905339699164 X-GMAIL-MSGID: 1771202905339699164 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:56 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: 118933 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp996091vqm; Wed, 12 Jul 2023 01:28:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlG7qF6EAwmqcyCM1Q2zFqeqZFt8W5NGJMSHiJ7JkiQ2YXBzcSBDp1gYlHeakv1YVSt3PhEp X-Received: by 2002:a17:907:91c1:b0:993:a379:6158 with SMTP id h1-20020a17090791c100b00993a3796158mr18566996ejz.17.1689150533320; Wed, 12 Jul 2023 01:28:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150533; cv=pass; d=google.com; s=arc-20160816; b=KNWMIylzCh7MItdxWhLEY5j20m8DatXlsf1/dDjr9capjQ48LUvQJZjcn6GxaNuEyy 9Q27DztZpdj5DRm0zUvC3H5hbdb5neQrDUotpJt2pO4faWXNIRxjFa5GeWBOuOYNLOX7 xaHFs4KE1UZPiC8rjNLQ4/St9NrNoRXQvsIfq93LC+KdU/q3ftrqAlF91OEGhHLQzPyr uV28hj4Q5yaz4ukNfmu++u2l/JvKrvRdU7wvP9JkjwZzIpMjgHwG0dfkSkJI6aXUu8nI tYu1rle5ylejHxpMFwb8e4rZmKqg2LsBqqU0I+R0E2MS3pH1sbwzYZu5hP9GgFr1cNIg F8/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zwexwAivTuXG9PH+vKIuYHomSb4dE8f2xbl35x1I5FM=; fh=QtdtneqZzcCQkAswUkze6+aB3S8+j2eqrSX6oTpGKWU=; b=NEEKuFEi0cXqMkfRdE+1f2h8+3G1eEE/+Z0j91NNS6EuwJo6z7Rbo30ioD8z0zNXPM TRLs4XIw/Ob6eKPT4KYAM250Oe9UOORYobXQPnOPitny7+slqg0Ucin3IEEu61BP3GOk 7jLvKtgsx+FOX9HoCyhxsDzotf18FFmprUe1boYqupn9W/nVaIqsu+N7Ajk8YAoiR5UP ynjW77aXHszuTnsciWDf3UtNxt2oV6hW6sGNs8wFOqMKRELVV9BI7PfqwvOLQ2MIwIaM IPtn5BTzsVhjZy/pmDpLrpiP81LOldxLhaF6rcNESKo+Qv5rvK5ExNyd7BJEZe9wPVDV QMMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=D+CjgTze; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020a1709067c4900b0098d373fa9d9si3885373ejp.149.2023.07.12.01.28.30; Wed, 12 Jul 2023 01:28:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=D+CjgTze; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232432AbjGLITO (ORCPT + 99 others); Wed, 12 Jul 2023 04:19:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232559AbjGLISI (ORCPT ); Wed, 12 Jul 2023 04:18:08 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2125.outbound.protection.outlook.com [40.107.215.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4798C268C; Wed, 12 Jul 2023 01:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=itgAo1XV+z+mBO7pOrcWLlfwh8KXgzXBBZPE02o3ZdHGM5HAgA9CVEAkJVfEg4PouEyC33bP02OD54MRyjfDB7zlaOJFEpfBdw1cgz9bSq/NwCsIp6cZyKj4/9Wzd7sSHXFIKVPVZ+mRzyHIUyZHcQg67lGTHBNAbzibitQD/Gy55E4xpdkVRdeSD+W/trkt92ZDi5ZSZwuEnWeOBuxOpV2I7HaB06WzNUL/R8CBQfUC4hRqSp21p37PFrOeITWAAETXpucSuvlEDGXOJfipaWgSKK28MrcS8M6qhtoCEkkbQ6YsIHRybVOXLE/Ks0X3/TkVzaxspvwfXyHQ6eQF9Q== 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=zwexwAivTuXG9PH+vKIuYHomSb4dE8f2xbl35x1I5FM=; b=Zh3SbAQHHed5/jZDSv8mOnm4rlfHHq/SKFDMtjaMJPZI7+RCagn4zriLFZ4tUzKWfy8anlG4/pQOHFx8LKMK01335Y6YywqARPImZQ2kxzxhQPH211lcYwwWJCtHfffB0NWn/1pwKGP9756jALrpbpQIZYj6FW0zndn6wnq2Br8gCXE9sSe1liL7GbBM5gqx0dCZ0Gmdbo0q62VfbucZkTnAwvhXF1NSH3sJyANQXgfR0w4X0r/zzYGT+pWJL9KT0akJMgUaV6OBRvBrct35OwcFFjvjpwbTm7P/GTJD1J3Ev3Ddhu+TaHybq2kg9WAqysjbSBeseK/CNau9M6tsSg== 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=zwexwAivTuXG9PH+vKIuYHomSb4dE8f2xbl35x1I5FM=; b=D+CjgTzetb+FFhhB4Cb57Ks/Ep2sY5lQPhZRTizEopMKkDfNUDfO37C71lx3fX8RjEN8/biheopSajLSP/AdSYbLciF+cSz2vgnRDLTee2S+gO+6Rx3LPcj6jClGSaT8FxVmBjayGqCd6kgB+WUnbQxBVpJc7E6YbyiarAWVI00W2okg7GAw8jN7jgh2blijM/uLarBo0nHtdd2TUSOphkamqas53xMg5zSGUJBeUKHta4GGaCMxSHiS0JjI764e6qO0Sjr378Cii5Jz0EyC3cCb36PRkVudZz/F9iVx4ERiO1fWJ2KMOSncqF6h6RazOdcRbscaT2URYGUnP8wkhA== 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:38 +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:38 +0000 From: Yangtao Li To: Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Alim Akhtar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 25/27] thermal/drivers/exynos: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:56 +0800 Message-Id: <20230712081258.29254-25-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: 8eabc445-a10b-4a4b-8649-08db82b0093c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hv5mdTmvnI7IbTR3V1DsHDFHdM0tFZqt68MMsRYquQZlnqnYwouYAr1unKj+XQLfllow2qyt0WF9pIBY/i8L1nPmyZuiDweQWGCT8Hsi7AdXsDt4vD2HRAO1z9B7/NLSQCpptqkajgH9KYBwhBXFgU3t/s1ppnEBZW9UPMZuEziBIutVWiJbuKIBCoAugJ+nWthlrVSw6/Z7m4RMvb9+hbix338n8aNY3z/wsAr44QzM+N9hVo/tkFqMb5uNsq4lXLL9n390Rio+vMxVbN9bsQTOlMo87W3BG7EP6k80TW4Qm5YnJ0+SPCLFilBacDss9SkPHOkNyVLbH7cfOXQQDiqemQZs6rF2J4Osa3Dkueb28WhP9dCDmKl/jBSe7X3ultsBP0Vn/zgfAwyF3VSHMuj13EFWkUGnhAvmtkO9+58iO5fOt0osV7Uul8Oq3LWCd6HJX0viCQ09crkkikvo7RbnUpOpcvzNAYOr2z9jTWy2ifRfqAZuR6b7Pre68IgJ30GosYHRY1zV7dG0WvcLRVS6vubJYFVoQX4brc1xqQ+dkAV4G+bp6CDENzlHnfByqB9F5lrkfpj55BX84fW6JgQ7IGGk9a7SxUP+/eof6XnH0Qo1fjRGzCaAlgerhYYd 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)(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?uz5Vl4RYhl4xB7JUAgaOqnvRdBQO?= =?utf-8?q?vg6JfV/7BS/VUlVxM58IKq9uG/iyT+w/5s6ca60soanYdkmSHpl9nCyGAuyiWHdAt?= =?utf-8?q?eacTpQd3Lz2/cO/bLZ6RmzjK+Jsl5gsVLhwGTKACX+ykn69p883gF4Mj3wRvDYmyQ?= =?utf-8?q?rHfddCYHIGTE8KDkd80JCQeRK4rOP4s92uDJXBRwwIyuWr3iSLUKRfKWkiA9KFtvg?= =?utf-8?q?f58NV6HuNxbwwEXpjmqpocjGJyCbwPSVLiSl1gAmNvvkxYfkhQh+3q5lIiUkDQ+/r?= =?utf-8?q?HmWpANg+1nLSR53zJ6Zzl7B6rbzVcz/g3LTcCT8kuzbfTCzXp+IUglBEVBGxXPT9o?= =?utf-8?q?E1R/ncHZb2VGR8cNg2anCUCidJl4lJagXiDL1X3NnS7W9hdmitsTdgXlbgB2T01gJ?= =?utf-8?q?CoLYcSmMkN3dWAlBa516hlrSbqFxw0iXKZxbLh9w+2TInvRHrsqIpScF3FgcUR8hm?= =?utf-8?q?dI0m+aOeq0JR5y2zPjD/7i8UIscPuDNkq4YFyhlgbIXC6YsRH7m4HY/nRPZaSTa58?= =?utf-8?q?plTZQ2VwH9JjuT/fvEIcXM4jZRCQF8COkWMaHXzE26FPnpexxAmr37IP1fbkt/L3U?= =?utf-8?q?fHMVXnq8xNK7T4bQCIcsHujdbkTXjsvSacSXx+F5PTp+gw/WknqYG6tWqTcG0rrqe?= =?utf-8?q?JZABV2Moh03aqdEzD/As4fWBVfdO2cRIN9RplqSss4fZPgJvH9Rhw2xRmLpx57wem?= =?utf-8?q?7C0bzLY1OmN6heidy1ZElodZCRUIXl920ls9oODfgbNJhzpXF3Qvfs/kDI/NBYIgS?= =?utf-8?q?We/akjizsR6aB+3/ctpye2BjmKCMEVKDWXjQLTTVFgYd206/ioVR7ODNz4DiZVXuL?= =?utf-8?q?1w1/k92bmRe/FK55EyTnud3XA0n66nnoiyv9XWz4W7iqySeWPJFjrLGr7w4OPHIH8?= =?utf-8?q?0uNSigE55QES/Eoxq4RFxB2YoYPUICfKqWD178yOKcfljX+hWKSHMOB+7pyRSPOUU?= =?utf-8?q?WFPNl2KTGQniKAWU3MBdxUQ2j8oDWKvn808SG0THMQO/+uQUb4ImPXsml+UEL0qsr?= =?utf-8?q?KUyr32dd8iV+gWGiVCSSN8VNArRU13TXR4uBm8yN4Teg0xHt/mp8QBp9HNFW2HRi0?= =?utf-8?q?iJz+SGpLhg+SHF1zCiU/pvPpl/xoeZQDfAhCHc2LDY3ASOU+qtTRQOLD4fiVwHXdT?= =?utf-8?q?PuFVOwViHIXXvDB/nu+G70IZXxQ+u7fiPphyDaLPXlYOe+UrToj4HCjdBwEx6/aVl?= =?utf-8?q?GlDulH3tA6Q7ka+kQrimdjY0OYifTeFi0GDCjv39e2FpzYgDOvY7W9ZeklOHGLJZ8?= =?utf-8?q?cXGwXIVh4+YxLkwl8g7jasAFIHY2zvBLR49wn1ElcrvIgY8r/vZoSY3UFQbFCRRaE?= =?utf-8?q?RTkwwwk38Lq2m1rLAtAUR1vMT2KW0odaE3HQNFyBZ/8NzoF7PoAX65bdqMRcw+a6v?= =?utf-8?q?ZxbAPosje+OwoS42Ez0x1jide2Dw+8TdV9pXIiW4ltHQTST2CUze1kdjyy5OcfZCo?= =?utf-8?q?td+n7k8mnYz7xvNoyzPGK0rUyqtsk5jcbid39Bm0bxcdMYi44fkMYDiIiwtQzHVPR?= =?utf-8?q?VPcqNkZLicy9?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8eabc445-a10b-4a4b-8649-08db82b0093c 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:38.5280 (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: 5a0mwpVlssaeNODlpSoH/B74qhPdUPwdGkLH9FvAPfzK3SyyS8u8yHmMjPn00MLD+8KKAr8I7UrzcfY4FrlsDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5027 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202709450796428 X-GMAIL-MSGID: 1771202709450796428 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/samsung/exynos_tmu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 45e5c840d130..576ad558cfb7 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -1124,7 +1124,7 @@ static int exynos_tmu_probe(struct platform_device *pdev) return ret; } -static int exynos_tmu_remove(struct platform_device *pdev) +static void exynos_tmu_remove(struct platform_device *pdev) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); @@ -1137,8 +1137,6 @@ static int exynos_tmu_remove(struct platform_device *pdev) if (!IS_ERR(data->regulator)) regulator_disable(data->regulator); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1173,7 +1171,7 @@ static struct platform_driver exynos_tmu_driver = { .of_match_table = exynos_tmu_match, }, .probe = exynos_tmu_probe, - .remove = exynos_tmu_remove, + .remove_new = exynos_tmu_remove, }; module_platform_driver(exynos_tmu_driver); From patchwork Wed Jul 12 08:12:57 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: 118935 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp996104vqm; Wed, 12 Jul 2023 01:28:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlGkAPMTdqDRMKp2O3BCyzH7w1c3ZwJCd7XsQU2G0uWRFMMuSWegPfZt/AMsryZLepcCewi/ X-Received: by 2002:a17:906:3f4e:b0:98e:2334:af12 with SMTP id f14-20020a1709063f4e00b0098e2334af12mr18411671ejj.45.1689150535462; Wed, 12 Jul 2023 01:28:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150535; cv=pass; d=google.com; s=arc-20160816; b=F2RHobgzSf5CH8LfVEy40HzJyzF8PMw7OzHTRIYqYeS+j8pU0RpqOv77ajiyctKO70 h61S+uEi7CGq+SnT8yVFLvwx0pjGrnBy9wvjQ0ULJraPuEPTrro0CEf1E+tolmd5uk/m fcYtjPyzlGf9pWt1OtkhwNLq2OtuAVmOfYudcfeGTpOX9uqOQIBuXJtyR7Wn2Kx/ev2s xShN5UPHH/scw8TXqcFL/6JnA8c6FHyvXLnuIqyPPBT5owzEeyY0xh3zJPIYWt1aoecp KPXHc7ElFqU99aXT3E+JHf/zk0UjvpfXH0QarZOK/XQ3orI+4Wdnt65BSKUyM+MvWUwb DnCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vkE8UIAMl81x4IEXLUNUoD00xlsLnumBQtjcFmK62/A=; fh=gF2itGWmtUVqnmzOcHFVFNxYnJ9SOivG91RfrScPkYQ=; b=QMu68pQ6Uc5maZh/eypkhHR8S78BXeNnAM1npOfj3RRj5s71VzQ32B5U2Z1ZJ4JOxj 3HCG9lWUHg+yPYOSpeIFbGiaiWbukZPEVVtRBfsWSsrCD1NU+TH4MBYdHmJmJNzdM/F7 fzmG23BH9Y3jImLbb8wFZTXe7mSmG9VI1hmlntoE/pcFNViI6L2pW02YZwiUNv3pveGk T2FWQGYQIZFrPt25qxMwAIwOqMnzeqtVsvZoZ0x3WACjm2mOp5fNG/U9aOWy2wLDGRnq 3C/QwhtxZjsK8xvshDUn8aoIfBWVtbbos2TMg6bsNFs6TI99C2AAGkwqPcB3Fg+795+s BflQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=duSF143y; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca25-20020a170906a3d900b00991dfb5dfb7si4003117ejb.573.2023.07.12.01.28.32; Wed, 12 Jul 2023 01:28:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=duSF143y; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232375AbjGLIRk (ORCPT + 99 others); Wed, 12 Jul 2023 04:17:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232364AbjGLIQ4 (ORCPT ); Wed, 12 Jul 2023 04:16:56 -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 5AD721FD7; Wed, 12 Jul 2023 01:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MyC1QjD0hcqSk+v2ervN8vezHNPx+DU0rKNj7S/K/tCs8OqxwfzeP9YXZQ/bwFn+ZwW2+Ketwesf8GUqm4rMcimXo4O4j2W3VMJVRaJn/Wy8yiRMVNr5qo1cts6iXm7XkyWjhIiIvmGyAedEi1Ywx9LtStPXiAPttBepbN/6ERYec4xElvR2v1C2Nb4GvviBtneku6KkHpmKd1Huf0jn5s8iIKkZ+FmU4eKo6QebdEaC8ua9h0y0tI3K7koS/3syObbkTy8Nd0D1s6bmB5OA1i+xFxrvQ/RPzz4RtlY2z+24HVxSXnBFa+KUywNVYOKq9k65QGa1G1bQDRl9xHjOYQ== 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=vkE8UIAMl81x4IEXLUNUoD00xlsLnumBQtjcFmK62/A=; b=FtxARiCNw7GgPdba1Tc7LCxr9o0gSsgcHUMQN9uCXS8vdq7FzZis6gMAu3smg8TaBlsGFakvPvhm3FbR43UPbJ6wylinpEGJT12FxuM0PBm7c1YbJTxPZjcJZVxXhR20vO2xkdqe2bCYqSkQC2NM+aOZGqLQsoBNJ/yrAJtmIh5rEKH5xmZY4B84xAcae0gcUY5MgQXdz9ukuJikqYsP+196UpIvCYKJIjOtyrVmbCqGvOBqY1l3O5aYH6sqfysu488bp1ouBgSnt9gCc0il7v1iP+JDxgNQm9M+F+U0wg/khUqCpHV5NInAns+/TcSYqDsIYslJN6QkjGTLrr8NUQ== 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=vkE8UIAMl81x4IEXLUNUoD00xlsLnumBQtjcFmK62/A=; b=duSF143yZnR2YoqVBwPV3YDEaag7BWm9aB2TjwVHfhlCXiFIt2VymumHAhj7H/JGXV+oLeD1vN4KDjqV/rn8BULX/yinz/+vTTLNWDJCUgHEiMcRTEH3P91/oIFPo2qB6zQnwtO7/mAE4u5RBltVm/YTCwcPBebhyN8n1rtfEKocY3QIvTnkFavIC3JyAUCxfdv7YbZcMkOCDZ4DZDer/t/X+FXYp8neyRkSb9ge1UAmBtCSrWv5EwFpygzU9D2pA+T52kggRfg8XFFM8bhQMJWoYVmdqy+eygLQJYOD7Ub6+cxYo7tCsT7P1yGKweiKNoAhi+cKYl+xF3r2rN0iTg== 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:40 +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:40 +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 26/27] thermal/drivers/kirkwood: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:57 +0800 Message-Id: <20230712081258.29254-26-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: 54a29f5c-bc1e-4786-8fbf-08db82b00a79 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EG7FypUVyLIRFKds2RAt3uwkrGAMkIM4d9QQ6Wo+/wutVWOCU1wDHhumCmuyZ4z05dU68J2Fl243DZgtIGjjBKzywh7QgchAtDx5VsFg4QGKVFK+ZHf9xFmdkrBhQWr9tunN9x2oK+M3ILVE7pB0uYC0B1M3r0KTbBjIELQ53eCBGCJks+Req2UZtMnCdvMLEqBnVTyr/e/kOWt0LrtFSC1me6Fp5z+PmP/NAUKr7ZD9xuB4jDgqcrhjrExFZJJCAnvCaqwoc4j31iIccyvJ+rsIVutE3gOUWN06yyUjyc4bycy63muutPCH5YdQuy/Nm6HxW+tHIapqsfxj7TUEQ+PMK72k0HyshxrzkllO93aYrbG9nu7fHd2RfbSORlExdKev0+KEQFDv0JP/xe2Fq1czYOyJ2+Xm3L4DfygMGzZj52jZZ7WeO15VTC1NKmhXYKL3yrPML2DJDoSHo2q6wyffidseqkX2fm5U/lzD09oPzuacaOpxaCyE7sFZlr8stimCS9fJ7vwxxM2AegCbLiLJ4EMc4p2sX07r0bus5sN1WYPlGgxickzR0CtLkPYF8pjlCvG/sl9Mf7NNmQGghhvMNf8TL6tNSvQpk97BVggjVvi14S+JFB0jBTlazkaD 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)(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?abvB67cfGfYkUo6/ENS+NkUlZgJH?= =?utf-8?q?tNz4IWxrr+bEFkw94hMeDfHZU9jZ5+0X9hgh4LdDvAu3xfBnOFPnIP8HmOxeqrl+a?= =?utf-8?q?xk/30kjoygnGYSsCQqKCpm+EhylF49aNCwB+vSEEuzlDuVprS4VAr342ESmWqkbrB?= =?utf-8?q?RouEFX1f9d/owrvruONgg/AV70xaHrBaPI5iRT15CgDZLZLoSnXTgyTZlivGH3+HJ?= =?utf-8?q?KN+46Vur5f98eHPs71SgBHpJXT2JaRVfC8u5PPixaomVCDHnIzD61ikRz1U4HJWDf?= =?utf-8?q?1lvsOFHdCGcS4HflK2/qUEddsK9RtITltwYYjnIDcDwMBgaQWum0Ff5x84jD32pIQ?= =?utf-8?q?HyKo9IllCaZALnpLBFyMhp0xtNjbTN9Zzg2pSPW25a7S5u6W7l7wgW4W10tWUBTV2?= =?utf-8?q?SPJEINtiaUvP9vzyJLGxaaYUBCjzJ6U5in2w5TgBrEcyhKVatVocjT6QZJJZ22BIZ?= =?utf-8?q?LkSo+dPmjTVonZmr9q7I3EFoJYV6b6wChohCqxBIQexLHpa0tRwsJboEGEFtiqiAw?= =?utf-8?q?52a4VYSbdyOK32BVENQlMCjdcpurSVpf7o/rLqfG0e04D308prpjcxIB5GSmRXEBy?= =?utf-8?q?r615rF17NnAwpV8ZFFj03XkyImFcu1J4um2l4+ZRTyhaoAyhPazQDpaMkgdpyv31i?= =?utf-8?q?/pNiaSOcI3M24wTZdUNVZ/mCCYQ5nABby71gjQXZtpI5ROsJ0mgc3mwmuxSOzRYVH?= =?utf-8?q?TQPEChV4xBiOsgTuWlyQdbw6YUu6igHZjUq0goRoW49P1oPmBwYtCBY4FgH7fz1iJ?= =?utf-8?q?oCkeHvPEfirj/+19Tcq44nCGrLLCrSwQSXb3Fin5zB2XWNAOE6p7PSuOug8/R8nLQ?= =?utf-8?q?NSifT3QIw4b/lYYQLdaUraP3gZ/Z9f1pQOwSZNfzvB+pArmXVqW6JuoYEV9WNUEOf?= =?utf-8?q?Z/4inLrYtKsTi6kyZQ69uKNjOigIocHpjAU9AlUyx5ZHwyyHdAtJGgPGGsNBa7TbL?= =?utf-8?q?eANMi1+96jOe44uYbUrdnhsnPZMzqcKjkmD4yJZ776eYSEYVItx95zv3VnOMoh81j?= =?utf-8?q?r5dXN5TH5YoOZ0T8taR4PolUbf8R3ZZFc8TLs82T6Ca+BmhXgxNKUffkd8UAMNOyb?= =?utf-8?q?aNRXY/jMs0s0l6TtXEkDSUFFlKk+tMxvD13Zv0AWE8gLKNdC6fr5PwrA0oLnHkMgi?= =?utf-8?q?xAq/hTbpUdr44TEnYX0mLwpLuwsfbfj/klndnkrNulwm84hhPIC4quYMZ+G8Ybduh?= =?utf-8?q?He+ymNlUUPVA4uid4kBFq4I97ZzDvjkv6IcnFLsEon9CyzyDHl4hVDCO4NdvIrbmG?= =?utf-8?q?CebAKfgeZJZVMXtK1+RacWpJIQ6Ghva7qtL2ppn29YdDxY7NDWpgtpoVfXCIedJBT?= =?utf-8?q?ZjF47n89m/YsHHWyi9lQdgkA4eP5d44sSaFMkh101mZAwkOVx+zj82F6JlN3nr+/k?= =?utf-8?q?FDUyk6YOxSAzv+IIIoCe352jRfxX+PdU109bO+0E35r942vC40TLt3XfC0xLpDoV+?= =?utf-8?q?VPGEsuQEwLgUIe+Ol2m6jWuZdTx0vENxjTur8uaExMkO8oxY72j8qr9lFgIDs5y3j?= =?utf-8?q?WmVpw+Oni6N/?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54a29f5c-bc1e-4786-8fbf-08db82b00a79 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:40.6021 (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: veqoWnYkAB38GEB8w33CGmsJ1CwnHLpBKYyczsxkysyx8Lzm526fUo6e9zOovYGwD4YZV0Yrr2SF/vyumc1dfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5027 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202711623670580 X-GMAIL-MSGID: 1771202711623670580 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/kirkwood_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/kirkwood_thermal.c b/drivers/thermal/kirkwood_thermal.c index 668747bd86ef..94c95870f277 100644 --- a/drivers/thermal/kirkwood_thermal.c +++ b/drivers/thermal/kirkwood_thermal.c @@ -90,21 +90,19 @@ static int kirkwood_thermal_probe(struct platform_device *pdev) return 0; } -static int kirkwood_thermal_exit(struct platform_device *pdev) +static void kirkwood_thermal_exit(struct platform_device *pdev) { struct thermal_zone_device *kirkwood_thermal = platform_get_drvdata(pdev); thermal_zone_device_unregister(kirkwood_thermal); - - return 0; } MODULE_DEVICE_TABLE(of, kirkwood_thermal_id_table); static struct platform_driver kirkwood_thermal_driver = { .probe = kirkwood_thermal_probe, - .remove = kirkwood_thermal_exit, + .remove_new = kirkwood_thermal_exit, .driver = { .name = "kirkwood_thermal", .of_match_table = kirkwood_thermal_id_table, 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: 118968 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1009250vqm; Wed, 12 Jul 2023 01:59:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlE9ej5UCgjy+9ro22CA9yUzJwOuA1mhMRQCCLleIphFEnUXAUhS/o9XoFb6XAjZTXgkSa9M X-Received: by 2002:a17:907:8d11:b0:967:21:5887 with SMTP id tc17-20020a1709078d1100b0096700215887mr18334470ejc.40.1689152377732; Wed, 12 Jul 2023 01:59:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689152377; cv=pass; d=google.com; s=arc-20160816; b=uctTevPTn4a3uy1xCfHbi0GYbIBwQvPtqh+K2/7YvGeKCCiu5T59AvUdo9YF2Iefbt 1wvrdh+ldJ/Wed65Q71HTX/vtNJpi7ofgGxfn9IbhW78cvYLuXMzWNCZnzCGWCJ+TyiM uyUPAP1gcIFCUgeeuSFYVkfbpl1UT30xkH8H7fvA63wxAec+EWxaeWBg2Mb3z9a3HrNt cYWE05yv6D8jMDfWX8xGC7efxpq5nhA7m7dDR8hqiuXtPa7B+3ZB9Jih+tVI1Bi/Y/dX ZiFWCeYKEuAQgl3fjTzwPeV4jIsqRVyH9LJBpUui/7rqusBQRYTVMtJVr6Pi8cYKvzBs d1yA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VBLuBcb0aq39A6ve1LIP7jQ8bQkSgTkbFQP14gLD+wI=; fh=gF2itGWmtUVqnmzOcHFVFNxYnJ9SOivG91RfrScPkYQ=; b=s66P9UddQmANezZXGO2kNzw3YOYC2DVXKxTNr6qGdfptvZX383mXFryy7+GKmTeaSr OnZZC5PlLz4lxDjCjjRrVUlp2RuIvLUxfqKRGFSUvTHU5+7s2JuwJxTll5RmIKZxM8+O sFZG0RQqtzUjr8GRxNRWrTZMsVsinAyHqp1ZahQIZhCwyrT0FQNHAMwLarCrRAz9PnWe oM5DsmN4hl5CXSBQ9juZlSBuACVF5NKrtNJ62P1P2iZnZVTjqGrw+FNVBi88ssCzVwD3 r28p8Bm4v6PaSv1w3HrgFxGKuYF617kzl3hueu/hK44sFknua6ytZfazpbmKfc4PqKmN iVLg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=grsi3s4a; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f25-20020a1709062c5900b0098821ac27b7si4025940ejh.39.2023.07.12.01.59.14; Wed, 12 Jul 2023 01:59:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=grsi3s4a; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232082AbjGLISp (ORCPT + 99 others); Wed, 12 Jul 2023 04:18:45 -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?pGe/8ylF5ch4T6If1YpYOQkfADXfTq7/C7HEzSUv6BxqsRnCW0tC3wDsrLHGT/YsL?= =?utf-8?q?/BxjTvG4n7a0JhYvw2AVeA7bRWmCTQcAzkZdYsZvybLM2alVkkPsgaeEpip+j65N/?= =?utf-8?q?upHEdmTLm+yjaQgq9N1JSpatf1QCkeSZoe6GuocU+x7SpJEupYeXWLlRqVoz97AB6?= =?utf-8?q?oJNDio433W/lSPeq3MyP06GXjKDaoC6Oy6F6cGlBFzKxEcLaRkUx8iKF7H8jSt8ZW?= =?utf-8?q?okZqQPGubT2MkyuFhIhvXywKz/Q6xQk3XhMy33W7BuONPE6TH6CrC/63D2YZSlSwb?= =?utf-8?q?DEoxDxliSYMRT509KdUasRpy6/iycFm1BQ8UQy6v9lNp515S6wOrdMsKWi47U4nEv?= =?utf-8?q?z6s2y1woBdlcHijXRskCSgv00izOS1JdrHwYR4XL4Fs6jS8Frtf8mOKUzGemD3aKj?= =?utf-8?q?BgEmr1DE+lOwl1MtZqKJT8mpW/UJxultQ5H6egDQ0XTO/pHPpexG1oqsedc3Vii5N?= =?utf-8?q?+7XRk6Xtg14cxGZ+3uSEsZ6eqQVhphys9r15eYG1svyhJAu4KSpPNar8Cu0g4+VYi?= =?utf-8?q?M1rfYWAOYwM6bBU2nMd5XNyEbsLmtvVwYye6w8WLJhlIH0ZQXNiDNM4cQB0UmmSbu?= =?utf-8?q?3Uh9kvRaO4DsCkkjO+a7byvfQMXuJCszpY5mkNtvHh/iGiOw4Ozdq77bqCKohKi/O?= =?utf-8?q?RMiy2bhDy7UjLo1usX6THrUSbS7sk58s8OoOvVNI4I4t46bdF7x61CuUwg7B+Xjmq?= =?utf-8?q?YT8LlCQW0Rl2MTipdmVxZSduquGjhZd/OrUKDLCTpvvhhzGoPXp6cAeDxQupmx/Vk?= =?utf-8?q?qLkRfdr5kcDE4LxAYsYMR6K9HapHu/mlVQE0WM8bma2M4TzyGz16kaTDa2XwmAqqG?= =?utf-8?q?Hbt3nI/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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771204643462283138 X-GMAIL-MSGID: 1771204643462283138 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,