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