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