Message ID | 20230712081258.29254-19-frank.li@vivo.com (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
Headers | show
Return-Path: <linux-pm-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3264EB64D9 for <linux-pm@archiver.kernel.org>; Wed, 12 Jul 2023 08:17:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231796AbjGLIRo (ORCPT <rfc822;linux-pm@archiver.kernel.org>); Wed, 12 Jul 2023 04:17:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231361AbjGLIRJ (ORCPT <rfc822;linux-pm@vger.kernel.org>); Wed, 12 Jul 2023 04:17:09 -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 428701FD3; Wed, 12 Jul 2023 01:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h/shaG558dvme994EaCEeG0kf9LRYgccjtgWR/e+17FtKiH1sH5/w9WuGgcqF0X+LBT3KmNOVDR96DzyXWyvdvmHkBCe5RA93yLqXTiyrtnkSOV/7FB/+yTnTRrbog0MaHPYDhWhov4scrgQLH/DIqJAK09ZFVeIwA5XcA8SrKDlOUK/4ySPnxZbKIAIeN6gJJAbK69DfoBP09j+vnSsfVzS3zM2OqtgSdslfai8BZukv/m84BfGwrkM80OQz7ah/UzCJYjUXY6VcujH9/qPtDAnirE5hwMMXVwbNVYUtBU360MMLd4Ep9z4BiD4+mAlGeQkmnktjKVo9FZGAYl+bg== 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=t4anR4hB8BWzDaOgZAWI1NpEZLsSC9kJ1QyDsNU8d7s=; b=IjhD7Bg/Qiy/lk016qrph/Vcy0MinUx/iZo2d/QtpCpaox4jLuxMdg8/AdwCqeFLIVI+mRnOda4QBzBf+/R58ca3hEOMg/KXbeRPn6iQeDUqSaOZXXWORWsgKaiywLcQBG29WACo+c+XzmAaXlYu1djMzYEPzOhDT2YcQAu6/JDfO3SrgSr2JKB2vd79dERvVnG24jr1Kwi2BE0cekAQj3oQqjwzoKzIZSXYy4yVSFl2HQGylMnYLS7ElypRdbmFTTR+fwTilmyOAE6NY2RZYxFhC5V6a+B797GWZkx1snw5KfeYEUPtIUBfysfZe2S88h3gQUaCaOLAPyBOFdt9SQ== 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=t4anR4hB8BWzDaOgZAWI1NpEZLsSC9kJ1QyDsNU8d7s=; b=A0YTbUy/dLPH4j0F9UcYAt4LSNWfbfyPF12zRiKSAnYRiGPT+Rg+griFiI/QQHFIRXB3IA1poOy4pgH5p266B6lGin1oKLpR2hMxT/KzSwaS1KrgUvPP5z3maK/U3RYIwowvqLRNVrn/F3OGVh/iNdK0cd2EGjRK8DeDEQJaNCGGTDIUtipP66MdEzrPM2gNNXgiA7rRUORGRluJdBYR4gKMC2qvCu8nFN4o0e9+nnh2IDqX2Yhxj+CGu/ZSoA24tsc7TMAL0zZJKeJZRRMy1vkhE4UJ48xsR65h6xr10LdT2yBtkY/P8tT+dnSNutErl6aAh+6jMdNGgp1kYoQX0g== 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:25 +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:25 +0000 From: Yangtao Li <frank.li@vivo.com> To: "Rafael J. Wysocki" <rafael@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 19/27] drivers/thermal/k3: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:50 +0800 Message-Id: <20230712081258.29254-19-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_|SEYPR06MB6524:EE_ X-MS-Office365-Filtering-Correlation-Id: 4774065d-af07-4d41-451e-08db82b0015e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tfJKjhxM6rXUZbuejCr5mo0BBYgGI98SGWZnWZL9z/F59Z79HfigjF0tyPwhljwGLpQ2IioPYm275pBiIPEqyLXP/YKWlEAD/Ut6miZpnmAdvGYQV0j/Jhgd652tN/SijZXZCe6SkAlgkueJdUcsQXTdmELiEpcov8o9RsvGb6VUCB7HUqYOPK+Wn45UHtS5F2wj5KftLDXdSQ+7MPnfTbslBllGsqUP94yDaTbccKWTCB1QZmj0PMB7IjxGmaN8AImdkZYsJDt8UucU4Q4pSio7DXPpwmls7wmZIapn6YRZu97bCHJm95MXJ3u8h9SSnRVMXNsmp6yfiGpV3uO363LkI30TAT4LAiwJDDaFxuwVmdoz0HpwVnwT85dA4ZguFw1aJ12X7QDOFrOQBoDsKQOZucWkkdPeaPhSVW/21uPfJP5Sqqwy+ed8Mv8cvAcrYOCSmTK27n0P0RL77ASP4EdrsjdPhjFS3+ZDkvcZTqmWAetsQYRxuJsStZB1CScTd9+H8wJQ3nrIDyFP7O5EbfSC93m1MxPCpLMLh25W9EYW4fUB8HClZ4sJyBkVGPHgO8yrl4Zkfn2m9RSh6cMFnYrNNVMlUZ/mUsba1t1HaxmDu6qQzFirFlk7Ypd6Drpv 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?p1Ose5tkOwl1PRDbS286W+AmvdJt?= =?utf-8?q?j3lAEbW6DcxFzwJUBJ5HdXYl7ksrXJp3dhGSnSY4Zm+uSoHSQ3eOeK/tDZu1OUPku?= =?utf-8?q?Wc1U4f5RH5PcaET+B4dv90urL1nkv0VfxatFBpRIZTY0KRVqDRAkJKYMJfPgh7jb4?= =?utf-8?q?xKxlBm0p++4T2NivVlk6fIPkARsFuXci9S325mwFMVanCXQvbcoMLNJTQ/1XJYfx6?= =?utf-8?q?DiT5NQqa8PYUztZC1gqVBZv7jZC57wnPE3cHYj08DitRvmrNe8V1N3ngaROZWVmKo?= =?utf-8?q?vbIkxYcMhyDSve9vyldItUvkL4jAuyb8ynG3nAxCnTBSf/GHl4bnQiiRIk1ieoucq?= =?utf-8?q?A9fSGBfPT/xqj2gkR06TNVJFNmN+l5ZtQSze1LCkxGkZVCaXSiegnOFRA/RtsLtW1?= =?utf-8?q?zSXOOYTOTWR7sswLiR2iURAAYLE0S4drW/CAd7npzbqZvv4lYxLLxxyXM613ysqfW?= =?utf-8?q?OzeMNhHCJFUpbw+K8HvYLs1DnfASGMsO7fT7NRtVz2kUp+BB8ocFvlhSiK32Spm1v?= =?utf-8?q?ErSNYhNwrYt7+iviBp1Mrv0bqCp+56PYzYpWmNcNexWRk3yVi4HRkgyotiau09+Kc?= =?utf-8?q?r9XlWkH+AK2RTYS+HXTRPtswMY96rJpFF2W4VMHoU7E3j968t6mlxZ7i8DuSZB0k0?= =?utf-8?q?SgXgFrW/83C5mWTTh+6kk9Z3VNPTN7+JAKxlj5nNPrjNJQgQ+86n816C/KZFBmvyd?= =?utf-8?q?OIK8+eoLw6AivfbyVynv1YcPPcFBrlrJrDh4fiXFGwrQosd1rYjA3iEUtG/Va0j8A?= =?utf-8?q?XPdFs4OeTJkyViLPnv/oPUFxGdIvWfDujcG3if9ZipzbqBBR46AeR5ZhiKYvr4W66?= =?utf-8?q?ySC4+2toyx8l0DxYNWJcTzA40Ej1ITtwyI26/akBAQ3NfIY8JfsUCMc5PCDd0nBij?= =?utf-8?q?SBgWTMdKnUinqW3Knzycsi18fml4xUhrRo55wAy4zKZyDzYiMkwLV1pcT3Q6EvD25?= =?utf-8?q?YkGKmJ6QCVba8GglxS14xlCqU3N1pub0bJPSy34Msw/BpS7aGPQW/s3u03vo6ataZ?= =?utf-8?q?1oCMAVF5iw7av93lsHNlDVYcQgxeoNejmMpGObbnzSE2VmXUYvwDUFFb39pAJm6/0?= =?utf-8?q?LLVHZ17Mtt/hUZB2VtOTNf/OrF/Q5yLZ1AeE8F3ntDzXtn5D200UkBVycuEpW1uED?= =?utf-8?q?/eqBLN2sbNvHzrQjlSgPdit5+Bdb9N7u/u7bHdeISPm9K0PTJ8aLn3Nxlm71ZVn4F?= =?utf-8?q?ZGJuyWqCENvKEkCt2Xm7YPDc4UFqutwGxRZHMM1S5ixx8igKaxuugaJv6hT65Gvay?= =?utf-8?q?UTt/gLFrhX5AikpG8I7l/lDwY4zhwxgdWLtNlKUXwvSWogTyNtLwMwdYe/NAp+BXF?= =?utf-8?q?aYzYO6AkRSa23FgC/XShrvDWzg0zv/GK7feAV0yvOIiHyrAtcEJlUhgnFp3nZmkA/?= =?utf-8?q?vtTzj20vIArK77gLPiA7bB9vfASHmrEnv5zzOxZ6LgCIb+VGNY6tzJQj5p3RnD7c2?= =?utf-8?q?r3kiSeszShjgE0NkvLj39DbfOGe6gGlgeYHx76ZfzyueQAEIFCrafyMcLiSJvEQTj?= =?utf-8?q?pvjLBwKW17M9?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4774065d-af07-4d41-451e-08db82b0015e 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:25.3351 (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: Ix7dVL1ZC9v7fm0wHtK4dQk7yZxN+0QVxzOtATuNQ3GtOI17efKADa5VzMn/fveGQcDTQ2xUnmJj04aa4KxYyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 Precedence: bulk List-ID: <linux-pm.vger.kernel.org> X-Mailing-List: linux-pm@vger.kernel.org |
Series |
[01/27] thermal/drivers/amlogic: Convert to platform remove callback returning void
|
expand
|
diff --git a/drivers/thermal/k3_bandgap.c b/drivers/thermal/k3_bandgap.c index 1c3e590157ec..ae03c5bdb5f1 100644 --- a/drivers/thermal/k3_bandgap.c +++ b/drivers/thermal/k3_bandgap.c @@ -236,12 +236,10 @@ static int k3_bandgap_probe(struct platform_device *pdev) return ret; } -static int k3_bandgap_remove(struct platform_device *pdev) +static void k3_bandgap_remove(struct platform_device *pdev) { pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } static const struct of_device_id of_k3_bandgap_match[] = { @@ -254,7 +252,7 @@ MODULE_DEVICE_TABLE(of, of_k3_bandgap_match); static struct platform_driver k3_bandgap_sensor_driver = { .probe = k3_bandgap_probe, - .remove = k3_bandgap_remove, + .remove_new = k3_bandgap_remove, .driver = { .name = "k3-soc-thermal", .of_match_table = of_k3_bandgap_match,
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 <u.kleine-koenig@pengutronix.de> Signed-off-by: Yangtao Li <frank.li@vivo.com> --- drivers/thermal/k3_bandgap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)