Message ID | 20230726040041.26267-61-frank.li@vivo.com |
---|---|
State | Superseded |
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 9654CC001DE for <linux-mmc@archiver.kernel.org>; Wed, 26 Jul 2023 04:12:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbjGZEMS (ORCPT <rfc822;linux-mmc@archiver.kernel.org>); Wed, 26 Jul 2023 00:12:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231703AbjGZELf (ORCPT <rfc822;linux-mmc@vger.kernel.org>); Wed, 26 Jul 2023 00:11:35 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20715.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::715]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60AF759E6; Tue, 25 Jul 2023 21:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mgAsCjfdC/TUybPe7ZxwmyGgNKzdlDO0oxtyHwxw1C2EnQqX2kGjFrsGkFCd4PIHLW+6FsYvJ4CaK3FW3RrPM3ZSJlHbJO6f61Lbb0nTH4z/Oi4RrY8BPXXPL5uhoK/XKkTM8x/k+RMI9HwR1sx68Ok1ipk1pBAATl8L70bF/tL0NkHAaOG/0hb1ZDQf78TRhWvX1U3AQ9lHSvrQwDVYAew3pTFhOrQ7kC7WB8ceYoiqqQtsZ8c74wOCIszujg2zrfpWpr7US7it0NjcIGCOMIEB1/ME+Q38JsNK53O2GtgUUwD3UcKz14y0Yng8sz7KTuYUprXl9qO6cK+xe4UXmQ== 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=cJjqUjgHWeahu5kEIR/X9k3lXldr083Lgzi2wWxD1eo=; b=DejwugKGuIOnjmGLkiLQov4/9RwJa1yW3zMn0jeDYg/tW4JM0/5mYwWoWHbo7GHTmjQIeTCXCVKYx73H2vL654ltkgqGntZi2s6or5HlsNHUnOe7zX1Dwl9wYND3iX2GxgD+vRqoDhcs5fNIsaqi6sksMgLAK15dmO0wvTYbQ8QSJHPWWQdnbkhSXTiikyLvZ8lHMKCLTP70OduovhC/jDLsNwWGkC26GKxKC2vNwp2ktbHtH+OGU4aUFo0ub1V0NHhhTLUJif2yEfQpDHz7ZPQ5WSLPTNdfMnFjMA+lIjLIIZQ2mN+ZqatnMS3rXd+87uM0cQmxotYZmqITiQaGWQ== 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=cJjqUjgHWeahu5kEIR/X9k3lXldr083Lgzi2wWxD1eo=; b=dYCKlaJKIj8PCUaW1/Pn4s4RQShxCdV+PdA6BdZftg2Ym8SSgbeEbO8FLjCFNfEPK+qpS83sCGtfzBqILy+4VMdZB4b1AgmkeeJy3/INu7/r0Bz88vCEwFr/vQN6j5dYOitoqCDNBt4G1KL7i7qV2vL5ZdGsyCH12P6cAVo2wJL+WY4TggQFs8y8rYCUY/HhFgXVbeg+j3oKBpfwnNEzWCnJkDC7mcq0rQrx8cSt4h+yt8RcSEebbYvjmG9xRMPcVKGhz4Nj7vBiFIhZK+MAJvFt/7qm9jcd/1xLTvHJYVfLz4cWAFScqps/7akjhY3SMw6u8vf+XUcmzmrn+b8gzQ== 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 KL1PR0601MB5463.apcprd06.prod.outlook.com (2603:1096:820:c3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25; Wed, 26 Jul 2023 04:03:14 +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:03:14 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org> 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-kernel@vger.kernel.org Subject: [PATCH v2 61/61] mmc: sdhci_am654: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:41 +0800 Message-Id: <20230726040041.26267-61-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_|KL1PR0601MB5463:EE_ X-MS-Office365-Filtering-Correlation-Id: d0bc3305-0b5d-4b90-25c2-08db8d8d2a8f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n63cqTxZRuX5C1c58SSmh8ZcPuWf0F27TU04u7WOrmce7VpeXxft/bWrUlusJr9UUI0+5Xq6LzAsEeLxwkqxkwCA6ITl4IsCzoVOSNp3OC3ZwCpsjjMWhlXgiJUj2L1HngkVuMdTWWit5InONPFEkq4alA4u37oxPFJGXEvXfttq6HAbFT7fgrjX0nSLrRnEo4AfgvJo3kGfjts07n1hQvWbQ4rhP/BNF6Wf7z4ww+EvjKU2D2nKiPvfmdG7UIsIE/NCkgtjboobQT6zklD48+q5chyWBNtBovO3n/JlNynir64ph481Dss6Wv3vTCkEkguHokqRoDw/YXX+CDTYe3/Du2Xla+isOhyOvV89kI2zFDvbjKntmDkyDeFomz1CbEpRHV0+CSDWib1tVqxbJXvc2n8Ir7awRvM0gWDvjbknhkBxk643KDbjoc/rDs1C5+Z5u9NtWgnpJ2k2ZJzeY0pCtjz+KUt4Un/fSlTm/Ec= 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)(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?6xnWqi13xKh73B56wqNTpGGMfkoM?= =?utf-8?q?E8vP16nVi52aO71Nk4dpfMa6I/6BYJwD2PWjdBFiqbdOL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shtT?= =?utf-8?q?c6grxkRTrbq1xkfhvzdHArzNaW4QZq7D/Qpb6VMriVPNKN+8o+deUdk4w79QpvQsg?= =?utf-8?q?G5Ku8YPyTB8OMPO57W1VN8gY6RfuesC6OelWlvlhWd4Nfh28mft/JembGgjpTepz6?= =?utf-8?q?JEoIBybD7uuZRcG/aQFMPPKKU9DkuJzJc6fFUzGhNXfNOG5+9cLQnBUPNQW6TiXIA?= =?utf-8?q?0ioyApr5L6jeN8b+sByyqveLw3x+Ft3v97IFacMvs7tTtMXyCDF4WGbClVxDX7XMc?= =?utf-8?q?vJNmXmalI7J629oi3G+DpFXxt6ghdfUO+O/2rmrcK2QmUFT5AR2DQFtwAPxAVRVap?= =?utf-8?q?wzoClMcWrROWaXPLPGwkvuo5KBgQRiJ+jG8WAGHEB38/rhec/bbBhXT3Oe1KisGpv?= =?utf-8?q?wsJMd6IiwcktGkfeUOhdso/D1BlYu+OqN4tmsf2KVvzRutzbgZtas9RX34JwhCzEd?= =?utf-8?q?CH7EbYhG1TnnNFGFReOhUe/of6UR/mko8jqGnH4QBx8NVkHFx8RoQU8W3iVgaH9eG?= =?utf-8?q?HFCYnDmpGpHlp6mGV4/+EnIcKaVDW5MLJkYSeEJKxMsicB/IZrtooymwm7zNeO2of?= =?utf-8?q?hcaHHYxz7CPk?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0bc3305-0b5d-4b90-25c2-08db8d8d2a8f 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:44.8292 (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: fMCkyedP41wVUv3Adej1EieyyD7LzSzNalaygVgfMYvYHfpKuhkADKWJ0va4cNYo+b78S11q6GNFPv2l5Kb+Pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5463 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_am654.c b/drivers/mmc/host/sdhci_am654.c index abe83736d396..a6ff09ead28f 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -866,7 +866,7 @@ static int sdhci_am654_probe(struct platform_device *pdev) return ret; } -static int sdhci_am654_remove(struct platform_device *pdev) +static void sdhci_am654_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -880,7 +880,6 @@ static int sdhci_am654_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); sdhci_pltfm_free(pdev); - return 0; } #ifdef CONFIG_PM @@ -992,7 +991,7 @@ static struct platform_driver sdhci_am654_driver = { .of_match_table = sdhci_am654_of_match, }, .probe = sdhci_am654_probe, - .remove = sdhci_am654_remove, + .remove_new = sdhci_am654_remove, }; module_platform_driver(sdhci_am654_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_am654.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)