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?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= =?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,