Message ID | 20230726040041.26267-37-frank.li@vivo.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-mmc-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 101BAC001E0 for <linux-mmc@archiver.kernel.org>; Wed, 26 Jul 2023 04:07:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230286AbjGZEH3 (ORCPT <rfc822;linux-mmc@archiver.kernel.org>); Wed, 26 Jul 2023 00:07:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231176AbjGZEGq (ORCPT <rfc822;linux-mmc@vger.kernel.org>); Wed, 26 Jul 2023 00:06:46 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2070b.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::70b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F01635B7; Tue, 25 Jul 2023 21:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n+5TNHiqleWCIH/+9g/U7+ocgdnbvZCb+4tmCfkMalmEqUNuQ022LPdOsiseQ4wgY5MXgfoJwOQ6ybFD9FozD90WoeFlxUoa0o1d2BH0e+img+77tpSOunB9Y5VcEjA9KqbYRprYLTWHoVgjy1wb522Te9+oL8+4ltKH+5gjEKtL8qdB2hWRSMk43SURWk6kQ0CX2djgt+c9ctXoiN7WABpqr+1YQnEmmTDiPahiAxdGreOmCtvRaFkj2FeLNwLjsfQSGAdagCTTGYsjh1yEnwR14XhokIB4LL7rNy1LJrSlOcCiwGVT5bvyRGgVur7/9FkVV7EMOz60rDuC4cLTHw== 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=vyhbeNXUgBwkQepDAzaYajBffSTDYfSaQABURS0z/Nc=; b=SWX8e3QHPYzEBpXESt95y8xEs6WfsOI5cxTqs1erwlJbUHjbhMWLPNczWRO5jKD4yujQxm+pStjqUB2R5WA4WzBKJJiZqyZch2MXtKTuVKd5B15yU6KS2qUJMJE1NY3nBscRVq0TPdIZ50nYe1ktZhlsiNYup1Fzp5/XnyGlb5oAdmYcug6r8X3bxhjOPZGZulIGNJ3gYr/vq5qJTiVMZYubug4o7m1RbfJxJev58NUbhowMzP6ngUDg1RKcEfjol1qYRX2QUF1Lvr/L0QUatlsvvG5bPlrhExohLdqhX6cdER+s3zh4Yp9QuZTIFktcZH6m7AyvAvbKMTfF2EnvYQ== 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=vyhbeNXUgBwkQepDAzaYajBffSTDYfSaQABURS0z/Nc=; b=K7qIgoDEYmQjHHv6rwMfmhvUY0Z6VNIJv4uc22BozO7YhRHl4ta4KWxgTI/pDUXoubJQ2ZEGcCtiisxjc4F9Sj5A+iBMPvbM60y3zcl0Q0j0i+pfVsiO/Bjz5zXTqqWB/I+XWOJ35AXnY1LtvgaDiUntjShGROVi8xBoEx5Ng6YGq7o9GRX2zNn05nZ+j7F2iEgGeOn8Qltu1ZKgpA79Ze3+/zc4WH3pyxeesVTR25YTYAuSSg/hZzy+8/Cmwaf7n9UfefAUNp4jsECKhrQxHh48pxSJrWa8IfQ3XSQILOIgJxfBi1rav15wg1STqw/82kSIUv6k/AVo8uH3ySLePQ== 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:25 +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:25 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.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-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 37/61] mmc: sdhci-tegra: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:17 +0800 Message-Id: <20230726040041.26267-37-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: f4e702cd-3a7e-4bcd-1b5c-08db8d8d115f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ioyyv0vlWHmSbvE1dObAAe9sQe6zl3nXNC42xzl/A2afPKpI4t+28Sl9ce4vmtx+29w2w9jGiwYIS+C/a7ZgKDOChgyR6mIfKd4vs/Ox2lyPuS4O56Gs5mPaGbz9u8oErge9MbCet/UPp5OsBixD244YfnlEc2AFeiX0QP09VlayrR4Pra3aFqPTZPYcEYforpN/oNWnpcR3F5xiXzTU2/6RnD+kYlUcaFv5q3Gjr1FSPdvZ3gA0814H/5qDC8U4zpD06lKHrYLLB0W48YNl5MbFB/qywmjgSe/gG391Lhhc1ycO7orC9B8jmWlH9dy0zWF59RxvwLDFgoZxF6wkQKsED6sIixesySsgbWXpMSygFcuwoa77lGda+UczrgJDsYkywCnMhLi5+gmiRqJiIZefBNG3MMVtuK8eUXM9sPoDqduvdjcGE+rYbHQZ3VTEiXuiTnFwy4GkCBMC3bpccOymhw9kMuDETzBqawqVExiXiMWdzb6TUCzD9kWuzFivv8yW7cEudt1baz/KeFIZxx+rMTeYTK7Dss0da3WdGGB9flnM/mzLtcss3x8Q6J7/ZDnkivypV79Yk62WhVW5tGTalPprcI3XA5J/RqQPORmlivTMvj+QQmFrVoOD0RBO 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)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?BnyDN/EqmK0+f8J30l+eX9YBRnvi?= =?utf-8?q?7JQchMH0sNWq8WcJpGwePLSHbz4x94QOij9S8iJuKYoiVi03al7jEUGt8oPEi/ZOC?= =?utf-8?q?u7B5yD8x2I2CIBZ3zHD8bMLCRMEL+uClyR8HWKkPj6fIGtbkPpdauqCepR64IgscR?= =?utf-8?q?fgIOqRT71Wv6HoASjC9AwQaG+J2/dKSdc62yVafzaIF7pDACYBA9pKo+nbymv0gN+?= =?utf-8?q?ILqIy/V5reLhZXXrzYsCmznxnLNq/gGyL1nbiVfX4nohA+hwzU1Les2xLpRX/J+P8?= =?utf-8?q?+3e8QrvbI04EWzZpF1Ob3xJHJyQb3huppC9j6VZS1Ov9CF/VDjcQFR8jmYzguJ3LB?= =?utf-8?q?dMzUwiKllcGly5J6M50GSyFrsxwMJrCno7kMrESxZyVQ6qsY32LqpoVyXC+2cRAs1?= =?utf-8?q?fUWpMOK8hnPcGW20nhQCmCOcO1rPx+LVsOA+aFgp1PSJ18Ram9ToYeu1LKZEgbpbW?= =?utf-8?q?EDBMhtA+GbsxfZCMEg/f17Vnx3Lznm85jULRYFGhXDCFG6rKYQi5DbexiWakDw7An?= =?utf-8?q?rDh2hveoRQc4q3zc37Ey/JLBtQk27dsvO0HwZZ+q6idolGbGpvCDrorB1YmJL+Wec?= =?utf-8?q?/0WpZdDryFJk7vyTLWcdVg52izDxGWrzI1Xfhr3NxhLp3ZSQSOn/9L0FC1wkXqCQE?= =?utf-8?q?t7zSNZMsekxYsLJ1l/pI45KQ9LWkrqbUxUkXqU8SpQ2iIAo4E7gpz4FPAH/q21+nv?= =?utf-8?q?SwWfE0dSCQv9UdKp2aGePTSD8z+6nqHn4LRWrIKYpmtl+kEcoeb9tKtjKpDl184S0?= =?utf-8?q?ls+tQMnIGyp1w0rNv4pUinmFwYAwmTnkgFzVwl7CZ3tO/3rsJU6N8f3+owqZusjgo?= =?utf-8?q?x6SUVvA8bnErWYOpPf0brIPmxahjAenJnuTtVKJlshvt26vJuj6Kv+8AZcT1G6Kx7?= =?utf-8?q?d6a2/jSg3S+7oJCn5wdX0ajIGTwcwFVF/teOunFm08fOfsOoGYDGRBSxkMlcdQ1tQ?= =?utf-8?q?P4iONjDwONlJf9pm7Vcn18pPpujpH+qdvHRqCvKialR4F+5xtJV/eSwZIlhjAOmId?= =?utf-8?q?jr6d3A6Kba6yv45jFBcElDZ4VA0787Q7yTm0rNJAB76+M2I9cVKUtTlJdb6awOb61?= =?utf-8?q?98rMIHsX/40So+0e2HeOo/VeBnJQbgYtyyYuavkwM6fRQ6t7aXulLGTSG+lWogj7O?= =?utf-8?q?SPqOW6swVjqCGUUFOFaAiMDLogJiOk3YUKUf17VmZLlbSqd619SSd1laq6xeTjkB2?= =?utf-8?q?2bESIkWd07p9p17j1SYFoheOb0GEZmS8iV3uosvtgG+qm+yBaSJ1PjYBEWIJdKvW0?= =?utf-8?q?eqxY9zkqc87XkQZANr9z+zSFp+Y9WJ9WKdgrGi5WlcXuT97q0+loR7l5HCKdEJQi0?= =?utf-8?q?mp1nCWeR3gsH89VfyUmzixQkca6QQjZfOPVRc0SqacfsoloXTcHZmpyTHMFcse9y+?= =?utf-8?q?XGyzWbrfu6NNLm9X4pSXMniGjlUEvfop0CQh9t3mwzrekpndvGbB96hvdsy490Rcw?= =?utf-8?q?4AygCwDAPdj7h6c+t+g4/KG+SQtWdkhTIPf/rC2Wu2DYGeaTt2CPvbHyrZIYur2ZH?= =?utf-8?q?kWeWzP4UitEX?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4e702cd-3a7e-4bcd-1b5c-08db8d8d115f 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:02.5632 (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: XidedTjoX/aLnEy9wT9E6UyMdi4EBcR1Ulc+Wi5ID4cs0xUxFPh13d0WsN+21v2tUa7lCbYPWSJO4C1czcIc1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 Precedence: bulk List-ID: <linux-mmc.vger.kernel.org> X-Mailing-List: linux-mmc@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index bff084f178c9..6a50413afc8d 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -1818,7 +1818,7 @@ static int sdhci_tegra_probe(struct platform_device *pdev) return rc; } -static int sdhci_tegra_remove(struct platform_device *pdev) +static void sdhci_tegra_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -1834,8 +1834,6 @@ static int sdhci_tegra_remove(struct platform_device *pdev) clk_disable_unprepare(tegra_host->tmclk); sdhci_pltfm_free(pdev); - - return 0; } static int __maybe_unused sdhci_tegra_runtime_suspend(struct device *dev) @@ -1933,7 +1931,7 @@ static struct platform_driver sdhci_tegra_driver = { .pm = &sdhci_tegra_dev_pm_ops, }, .probe = sdhci_tegra_probe, - .remove = sdhci_tegra_remove, + .remove_new = sdhci_tegra_remove, }; module_platform_driver(sdhci_tegra_driver);
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-tegra.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)