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: Yangtao Li X-Patchwork-Id: 13309728 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5D347C0015E for ; Wed, 12 Jul 2023 08:14:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aTiSV3we3s0P5A/+aS9L6aFScS355e1u2a/QUZmqPto=; b=l7ggCUqvNPDKnO Hfvj9ulUkRBLuYloe9uls3kYjuJCXmXvLOCZYxvJsR3h2x38un1HXdvS5m95q7UwGEgJeZQq0eQ7O ozjZCVMWUlf38F7K6ZrcW94Jz2fDggVfxierG3zkAfGHm+X9A4isojPehlO1ub79hAJ9RjwvLQTCZ wAs6+kU3Cp3W1VxAsSVyHir42zgNu45IiCJ1/1GM586aOJBOu4jDAyKaE7Y/WXjyPsQDMVfV14mr/ 8z0sE4KjsMMsA8evoKVSvHtAxqzJ8c+yq2p9HsmSOmYqlGo4KbqT+1QhIndNs+befIoKsN2mu0VEk o6vgscKBhFKEs7NLMArw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJUzP-00GsWu-1l; Wed, 12 Jul 2023 08:14:23 +0000 Received: from mail-tyzapc01on20711.outbound.protection.outlook.com ([2a01:111:f403:704b::711] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJUzL-00GsSx-0A for linux-arm-kernel@lists.infradead.org; Wed, 12 Jul 2023 08:14:20 +0000 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?LKn4IdPBPacerb32N6qpG0FZhiTofHwv/o72PVNfnWt+t9vztjdkfEZ7y9VAAgEUN?= =?utf-8?q?UHKf9KAJdpBLYw5R8VKjozIg2ZYh1tbEszb4r7t98HMq8yRz1hL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il?= =?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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230712_011419_094275_5E36776D X-CRM114-Status: GOOD ( 15.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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,