Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp38003348rwd; Wed, 12 Jul 2023 01:24:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlFq0KcX3Fjd/Zwgt5NJqaHrlOwp6Ttp1S1wHdg2RunuvTU82MOneev09eb2VDFIYNLu4AeI X-Received: by 2002:a17:907:3d5:b0:992:764b:90d3 with SMTP id su21-20020a17090703d500b00992764b90d3mr16693205ejb.70.1689150271624; Wed, 12 Jul 2023 01:24:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150271; cv=pass; d=google.com; s=arc-20160816; b=iMbgoPLH7dZksJSiKJVn4uCe9GjDqLmLO5u/S2F4Wv+wyPd7oBFk47VLEGT+sC7bSp DDjRkSlLY6g3oDqlTh4l9ZHFSwwY98X/9w82Nc5NzR4Kv3MJMO8pQn5j/XxE/AZ75/6i ZIBUVqJMWk5ld1BAETqj2LkGxYoziHqKNc5URuNiKMLumdyFJEOzIR00V3Gu76a1eCU7 RrZromSwJ1xXg5NOb5F2KD7cTgw/Oypj/Yl45iHNOEUK1JT/pfSa3RtpF/WHSmVqf061 3VEva7W7sTr5HGXZO86Yo8AywPylAmBBVkNDzoR49Kl1w3+HAkDDGqCnAb3RVh//91nT hpBw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mc27-20020a170906eb5b00b00992d70db610si3741537ejb.524.2023.07.12.01.24.07; Wed, 12 Jul 2023 01:24:31 -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 S232269AbjGLIPd (ORCPT + 99 others); Wed, 12 Jul 2023 04:15:33 -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=20Kleine-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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?B?UG5reStWZTNjMmUyVElzRnBVSTBPTHRkVi9CbDVuazRwWHVUOU8vZEE1Q0Ji?= =?utf-8?B?b3ZXam9JSHlEMkJVbEx3b0RzRVdkRTg1d0JNM0RxZm1PN2s2cEtVR3MrRGRF?= =?utf-8?B?dzZNOGtnU0Nyd2ttbHFzbVVFOHR6VmVETmp3MFc1VjgwbWpMeWQvWXEybkhN?= =?utf-8?B?M1JPZ2xPZWEvMklucUxNdFNXTWF0WkVYd0lMR04zZ3B3dXFWTWNmQW9NR2xS?= =?utf-8?B?N1FpQzY1aHNZVllRNURwMkl3YVVsYkhKeXY4bmhEMlQzckJnazNjVVNqMlps?= =?utf-8?B?b2U0V2lUeDlBTG9uOTVvMXc5Ly8ramJubEtxVjl5OGxsdkFuaWg1VDY4UUI2?= =?utf-8?B?RnVBWTV1THQzcHgxS1k0dG92TEtuNElkUEJQ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a8-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 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, -- 2.39.0