[v2,39/61] mmc: sdhci-esdhc-imx: Convert to platform remove callback returning void
Message ID | 20230726040041.26267-39-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp184220vqo; Tue, 25 Jul 2023 22:15:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlEExyaca77aZw681B+fpS1hUpGu+RnSKItq0cNxzlyGu0rGUApy3QH3YWv2hWEVLlKoomXo X-Received: by 2002:a17:903:32c5:b0:1bb:377f:8cbf with SMTP id i5-20020a17090332c500b001bb377f8cbfmr1594764plr.16.1690348540845; Tue, 25 Jul 2023 22:15:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690348540; cv=pass; d=google.com; s=arc-20160816; b=PMnF285UVFAvDWCPzzXVWm5XAsZ2gMEudk0hpL04xGSIOAWE5FUao/fDC90aAIZBgL dacVNydoOSBjAAHa4N4vjdVex7QpBuVyM1Ki+e9bWOvaG8VJdKgtbLkACc1mQ/T5azFX v1gvoDIDPUCAlr62xBx86NzN4ke4DVquND4ekUJiKy8qPVDp3dJak+ti+xSl4F4qXq3L OsXKWFaWghcktM13LzWce2X1mgnHGTmjC1u/XIeNC8s+0MAjaOcuPFXBb9vksypMkhfw D77w+yvyiRnSN8Bk6mXtSKTnzQjvtdRRPGLJ0jp8QR/Yd8lH8wrYHj07aq9UGSONwaUd TlHA== 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=ojpLTgBzv5+ZNx3nkgEvgE/P4GpJkxrZ7R2nyuhf08k=; fh=b9dHX9k7LQUBH7MV8y7hwirzK4SEG5gZGgG6c7DQpKM=; b=r0DBQ5VqR9usR3bZe45pOBcLdLImdxRQxpzcuAMM7sM5AHStzyc7UMcEpjk+4YJkS/ i4EODWVtTzHmZ4xZV1EBoEcPHUZg8O4n23Cw7N4sKaC8gz1jyrnKF4ykqTkGkYsL1tcT bAgwujxgj3StSwmW2D8Q9MubFdfojd4PQ7RwrzgF43dwIEKv1F0ui200De2UiTUa6K4I PktKcPKfHv4b4uSndcOshVqyw0YubKcvRS6DPMXzMHdh92HVTnyuBa2LZprSOpNOIcBx k/6HXXIuKxmU3p1sXQ7GSD4dayZbybVmpYVIJINeJyQT965c6lBcYLFaK4JS7M/5NrgD mrfg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=XqR+bNrb; 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 z10-20020a170903018a00b001b9d180fd9asi12879628plg.121.2023.07.25.22.15.27; Tue, 25 Jul 2023 22:15:40 -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=XqR+bNrb; 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 S229956AbjGZEIi (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Wed, 26 Jul 2023 00:08:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbjGZEHv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:07:51 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2071e.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::71e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 020BA4C33; Tue, 25 Jul 2023 21:04:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gh5W0xiBJCF3WANhwgZzi+AmCkigtVOV20QbfUbEkOK3kucjD0bgI1apsqL+6zEdrga+3Qs5EA6T4sRbM5s7OSZiDqcU760lL047AbtYvgIIh/lCSXy8bKdKXFi1q/vAMeODl8NaBR3VqfJVdK35bZCEE2trlDEnC4CiCZAp99f2Exnfmvgs0DL1xC+ku1gRnh6scdlNRwUiuHeTOdh0qS8qWouKBvjtFuTceN2wsuzgmEP2ZR2tDz4VnMf2g3KsDQAL6mjiiCA07H6p0SKdztdttx+9ST4HLLJuPP/MkldDF1Xd9FEDixINXVD7Hcgj6I6KZWpXEphOEP+n4td4CQ== 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=ojpLTgBzv5+ZNx3nkgEvgE/P4GpJkxrZ7R2nyuhf08k=; b=gxWc0SVul38YkHEGB6CtfTpa4KkHli3SLYgjN8/jyiyEkyn3j9aGIh3NvlYRGtAAbHAinvIjagJIsmSFnsXROV96NbcaahvA3eWFFzf+N9+i6TO2SCFhox7Ttk5AyGdXvwGFb/QAcvdfsjtb3tMOMPARlkzN4RhhIYU0+oO6rYuz1QeCYHK5GO7m3gplnZpi8vGJhhGiGeI4Hc/vdqM+YGbIa4uvEFGh7Guc5+KfoJBFFSrxwY+oZ/FSSngQMvvNpnghLPqA04weXuFMgS7BEwmtmnEGK7wgkjYZzJaR0ZtbsN64qYeTmrzpizEgfI4ZiJ161Klz+MlyrbBdgbKrRg== 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=ojpLTgBzv5+ZNx3nkgEvgE/P4GpJkxrZ7R2nyuhf08k=; b=XqR+bNrbpJrse062qN2STVA9mrFmZmXIFMdHiePX/VgvNQ63RZo9U+PeCvCCeOBq4cRMsnVhMtdXZVsJlP3lA05jncjUi7v1/r3i77NWKOuvylWQ3m7c33FldRGJV9q1qA3mjGMzOoK4iwJhw+EJLATcjpTgJbQIq3gZKyQqCADloho3UbzsOwiSh7l0LH0f6Pn2HYvrBeesRpUIf8lhvGfPYxr7UPnboFROwDsYDd8FHLgBonVFeEt1lKjK/WSb5bWr1pkHYUqYfceswcP1u3I86LfUUHRdOFousC0TjHTXOOSjyS0iEkQdc3/HFxKoJjqb+7l4fkDTyUlf3N6OaA== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:26 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b%3]) with mapi id 15.20.6631.026; Wed, 26 Jul 2023 04:02:26 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Haibo Chen <haibo.chen@nxp.com>, Ulf Hansson <ulf.hansson@linaro.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 39/61] mmc: sdhci-esdhc-imx: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:19 +0800 Message-Id: <20230726040041.26267-39-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726040041.26267-1-frank.li@vivo.com> References: <20230726040041.26267-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a480c50-3244-4a0e-2f03-08db8d8d13d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: itUbjkEO4zZXJDKYJ5XKGOc0eHjlweu+/kHS+hwqgL/VrIasvJXfELWpO34T/i7cwnmRmtKEU3lgrbYSuGJUuE13B0/bnm2XKvZq96/MZwy8/vKawFmYxMhvKxhGaAJLNozJT/EujJ6k7lbT4Ey5OB16UeMqqV1+XxOY0DcEybuVkAd3qHiK4+XAgPnPeYztaOVPeEDApP7sfuDzuyx1Bdbc2JZl38c9YUKnvtQzmv8bQhIXTKz49JEU4n0b7JOqzGSZ6N75ImDcI9QCi6vO5KTRTAHc93NPQRqsIsdqbKn03I4Q4BNXr3v/MiIURu9d0H2SvnfsGhHRRkRf+2Eaa5My2HBCXz91M9Je+c+hix8Yh0jAQQqTTkoAfRjVZzNgtssEYQ3zl8WxTwGAd06xPGdNuZDHyqWo1K6sJUMH9+3fsGIL5AblP2NB8ghs/7F/CT0U51hWuGu6yPHH3JNWedoBR2eTeUBxSSgVRYHaCrbtPJAP0nuWpAAZP6SE19aoR8dC77c/2dnJ7v4YgQeQ5FIq7Vv1a0cJmxavbLAZ7omWNVtK9ixQPyFts+0HYyyvA4t8DDst04KHib6J4V23UdFinXlAo3D2tUittdlOxoyiSL1YVfdMvtIUpDcZUBUZ 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)(39860400002)(346002)(366004)(376002)(136003)(451199021)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(66574015)(6506007)(26005)(1076003)(86362001)(7416002)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?1O2a953KBYE/yuAUHt2UDRjxT4yP?= =?utf-8?q?hwZ48UPKPpputvsuAvSdx2sW1a1JlXqeK3QAnvadHIp+veobqZQVOrtJ09yy0bwj0?= =?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OD?= =?utf-8?q?4RGgaTkdtZx//wd4F0CHKrJEFv6yAT0GgG1fL3X5Gmh9pwnsw8wrAisIXlUbEjQvM?= =?utf-8?q?P2uWsjXWrNJ9JwHE0rSxi6uxsER6kYJeAOv++E4uhuCeU7qxE54AA/52xCi93e+uw?= =?utf-8?q?LxCcc5tS75RWLxhF/yVYq1xWrX/+KDwdTmM4d6v6coRM75rKA63AMhVClK4uSA5Y7?= =?utf-8?q?rxqWZvyW0D26/US7xprbM6isF0Qjkb58SgBKhamY1U/JXlE871NR4X+cH1+9EeAhY?= =?utf-8?q?Cd4JEY1YPFcyj9M1UbUTBscUvvIlbkVMD1AZjwr/CN3Sq3eK0YsXwceJ06M6oIdIo?= =?utf-8?q?1yRsYRvLzxUGaXH5ajj0g0Q18jxSCB08Dskc0/rqz8Kjb89YEta/PnJLfCvbDTjmW?= =?utf-8?q?+tTXigkFmDsMy/Jxtmg/zMWrXNbDHIxdep6sZ3OOAW8jBHDvSRTj5ZSLjwMI0q/F+?= =?utf-8?q?ZJn6pK5oF6eGkx9XHqknXiFTlz1apQs0sqwyngfPiny8sPSo9vgOrqTBrk7kVDqoT?= =?utf-8?q?Iu6TSlqkrJaOd7OejgFGIClqx+iVkcBmvaAuSrAFCK+5/kLTjoXAIwx499ChSTz4n?= =?utf-8?q?i4PAliQDMqU9?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a480c50-3244-4a0e-2f03-08db8d8d13d9 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:02:06.7239 (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: uEdxugz02KiGPYpZA1W4cadtHhAtloN/qBMSOquU9d4DKGgWIRQ6Jy4cp+VE2laxW1si5ZLCcVaVm8bBUxxo7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772458911403276522 X-GMAIL-MSGID: 1772458911403276522 |
Series |
[v2,01/61] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 26, 2023, 4 a.m. UTC
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/mmc/host/sdhci-esdhc-imx.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index eebf94604a7f..e882067366da 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1802,7 +1802,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) return err; } -static int sdhci_esdhc_imx_remove(struct platform_device *pdev) +static void sdhci_esdhc_imx_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -1824,8 +1824,6 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev) cpu_latency_qos_remove_request(&imx_data->pm_qos_req); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1986,7 +1984,7 @@ static struct platform_driver sdhci_esdhc_imx_driver = { .pm = &sdhci_esdhc_pmops, }, .probe = sdhci_esdhc_imx_probe, - .remove = sdhci_esdhc_imx_remove, + .remove_new = sdhci_esdhc_imx_remove, }; module_platform_driver(sdhci_esdhc_imx_driver);