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