Message ID | 20230727070051.17778-24-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 t5csp909694vqo; Thu, 27 Jul 2023 00:11:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlEA7fAjnJwOXruEo20kLFVDw7aRtz9Oed7F2b1/J+Xw3BK0ovM7Zeiuj4eeuE5oXG/kxcNg X-Received: by 2002:a17:906:77d8:b0:994:1fee:3065 with SMTP id m24-20020a17090677d800b009941fee3065mr1290547ejn.15.1690441874712; Thu, 27 Jul 2023 00:11:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441874; cv=pass; d=google.com; s=arc-20160816; b=fk4bPFalAVUU/+hGGXjIJzLXAOpv5cROm0p3cflJHClfSR+NKt7ZpxewuPR0Gw4ERh qVj9HwVnq/Zl4umDtDa0HX8dSV5WBf8S55BgnAJoy2EisdIehZ4B///wJlvYNFahgmiE aUGUN7aBD9N5+I4A1MdIUFaliUd/7efBTWNHlbbiP8aWer3MA45e1JIAg+Em+Fp9VAgk hvxXd878LA1096ueDR2goUCN1CFa0kKdZ3n1m1ZOR39dED2AefqsOHwsNun8bOEnn/ZU w9xA2LzJc+rzEn2JpjBQmr+aH/LuV9wjUXi7y6UA0VGA2siSslyCsV4Vc3lWvrk5VzCV L1PA== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; fh=wkz2ovt44M2hf1vcx/1C2T6B0OZQr2IK+YjLz7QXoPI=; b=kiWDsLaGHhv3TEXvg0ZvLvEtyjxg/ljspqHWAQ1XApG2zKWBdR7kZVAvEbeGBEAEaO xPGwjD8akOK/2Og8L8/7tHurfkzgw8JbhHz94g53/U0v5u4vGfMaa5xmt8LMDU9nKJsm dZpf0fwV4xoQNBx6xk0col2o/H294XX83FfP4li2LtdaLaX2sbqqcPvGq/DzmbR9V4/3 /pHNLFXLYlCNWDoYnRP6MFFvMEXJUH+Bcs3p0wwnMWeUxkV2wzDf59MyBoYi7gEbtOyS 3E5WHwzzm//ToslZwIeGyrNZugTJKYyOLdtak2M7CR0gto/WtjvnF+kveG3i7h8//jN/ shSA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UQ8EgVz7; 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 sb2-20020a170906edc200b0099bbc75eb36si607766ejb.47.2023.07.27.00.10.50; Thu, 27 Jul 2023 00:11:14 -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=UQ8EgVz7; 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 S232984AbjG0HFb (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232909AbjG0HEi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:04:38 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE2FD3A85; Thu, 27 Jul 2023 00:03:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gHBSGuWwsvKHN+7rJoOrILYLu5wcaxzXM40jxJpzCtWdS1wFgS0ODfwfehPrGipSCRKnXnoxxCJASyn0As2MWXNzYFBsNGB4YJV8LyqME0m/BMsfnBtJmjwR7lKuFwljM1CpF6n/4jGddkbila2x09qZNmGmiQCdZyiS23HX2JYqkHlyZNhEZhpVdyrZwc/tQ32q7u/KZOndbFP8jlkPw5vKmrH/gtM0FeIpMcA6HA8qpZdreQS8Y8wsas/OIOq566FONVQ3mvRDnyGdxhxCKGA6ebwBi6s1XT9Gevg+3c8pJlx5Fc9hFMR2L1/c2lvD7x5BJ7RDeTPt7mAq8jjvbA== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=Ik+DbOF05FHOv/qke+mj24r1ssqdQ8CmsFEBPhObqhDSjZghwBan8qOiSA4WrHCk7C/rzmKya8RL8z3yKOegrjxzfl+l6NKZYRsxDt6RtfW21yHwi8myMSqgce73IoSL64kfpPK5MVzhne8YBYuXHeXgqGYvSQjcMBZMTFpH3/f0KX6NRnDBMz52ipOoYDq88xsjQP9SIqyhhxbeHxSOsZ6CM3sUzvXY7xsaixdaxaA78vMsh/kp30QBqwoa+8HfO2YJNAasDQp0qaHB28tH2rI7U6HOHCn2JeTI1ssWruiSi9zLtlQ/MvBXnd97WKmD4SWOcyuO0F6N9IcyFQ8vMQ== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=UQ8EgVz7Wx+8m5qzwTJ43XDYw31X8/SklE95zD+eZJ1ICCxluoCUVhlSAHHNUZfRdY217TRKxAYfFbMsF0AloZQEb/dNubIWek0WSmoq3tdwwN4M8G/+nyg5biIi5WcGNE4+uVzlmfvdr8rxb9k9JNw5YuRKulHmHiRXhQQG2EAUlqhO7CgLW0apcWdoNKCYjq4zyeeuVIgdYFbHHjpJwSn4RXrp9pIsugkySFXlM/+LPP3gcc6Br0WKh2tp0D1LRLxBks2cl45JaLmjwr+XsTAAJEmYrOrMj4nteRk95ukc6Z9XWu0w8vDRg31+KBJlnrWuFjvMA56DY2XvyUQtxA== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:42 +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; Thu, 27 Jul 2023 07:01:42 +0000 From: Yangtao Li <frank.li@vivo.com> To: 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 v3 24/62] mmc: mxs-mmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:13 +0800 Message-Id: <20230727070051.17778-24-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230727070051.17778-1-frank.li@vivo.com> References: <20230727070051.17778-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: ddc2938e-9556-4c51-df1f-08db8e6f5505 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 45K9sinYp2fD/GfRcK/Gy3TNPXxwuBsTtWu+p970jYiqP+xQHQrg0juL5LQFsSMzyuAG82CsQyrs3LfArXhlkAlTRxEV40raC+jzgo9faPVMmLfVUa/mnTaVQP3pfFi3ThPw/3Es8bzwAInR+QgBs7fBDORnDVgsdhl0hP1nQaY8cedIobzDiMHbCagEusoihlOAmmyqMrj40VLYhikvjlZab20zkKUZax/ESP+95SzeRy6UhvzsXI2XLHPW3uRkz6amj+weScwLsTll2nyTWvg8DOiiwOgDajn6Xpn7jbwa1eJJxng+n/yLHAsNnZk3wG3lM34bHLHd1lKVPd2gQcr4iphwRFhUakd1rO7+GOc9R3hKmMdl0MlWo3EjpYCX+yhy0xyKgAeCmt3P2AYLp7EayKn6MSsQ941sEaHp4HZuPfsk+QtLU4fnUYpIf4N6J0u0qQj+MhfpooUVAhM1b4atTH/LOM+E9chVEtfy8Q6qlcGTKrGGuM5NAKgHP43F6b8GQK11Fsn4VK5XRJOmuAXLeJgbOyUKbVNq36KnrONdDLROy7eTPrKIfNVO23HukQ7KDt9MG22UABxXWTEgJ+v2IjozIQBgrIOjZPRO46k+00rso5I5nFSWwyjj6RNV 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)(39860400002)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(66574015)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(7416002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ZUQzpHTAzQS2B++nPM8r9WoLvFky?= =?utf-8?q?+5lx4269TeMfn2hjZPIuXv+xbh1uTVtkpJ5wh9EnCnA17vTJI6a+Vjh+D5r2GoG0b?= =?utf-8?q?aFT/EAYgcF/KWrI3ZVHCWrYlNEkUSIKS7G0xxH6Ve/LodtB+cFsZjFeYG2cU3KfMb?= =?utf-8?q?UcQKIypL9TKmfKKWyZ5g3fBnXH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rDbNJl8LmKn+nNLHxXElOsgFjuJPJABU9BrkG5HMBld66?= =?utf-8?q?TjFjr+BUm4syn2wdCasqAlrXg8e/WcecygR39N3w2PGJCzu7Uw5m/QMeUdKQblDUM?= =?utf-8?q?OrKPXZDp67Q8AnJR1cYJ2Yn55EZS+vB5GGHyUo+z3ecFGTUn5ywlib+b2SgTJyfqd?= =?utf-8?q?U1niAQ3Olnty2qYgUukGvp207no6FQD1pt3FAy7w1GsuJQaPPEHnlcameb3TN6fi5?= =?utf-8?q?zHSEaUcihmSPMqchQo4Cd/nOIeoMQbtn5AoXyOBLsU4rHIzYvucwjxzs2GKlJZt9W?= =?utf-8?q?Rf9CbgSBUf1k+hylWMbVJNXn6T5guI4SS9GlNYu1sVoRT8aEB2f4FlmX2wpzkBi84?= =?utf-8?q?nMICStd35rJNui/kBv2KDag/SuJstukgTn/Q8KcWiV2ufy+/CaAmYeBfwRFxsXBs3?= =?utf-8?q?sFKb0LsYmayVs4mOSvqoOuboexC08iXUTMCno+MqblYHiqWIVyM9IGEPxq9e2fUIg?= =?utf-8?q?/lmRc4FRbSnY?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ddc2938e-9556-4c51-df1f-08db8e6f5505 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:01:42.3343 (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: Nk3IKa3ftWMV6/+2ZEuIOGE8VkgkW1IbZrLMSHkhsTJ75SUeGUJcuybJoSZNlPN3uaeS8IOy6IPGksr6Re9vJg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: 1772556779006075976 X-GMAIL-MSGID: 1772556779006075976 |
Series |
[v3,01/62] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 27, 2023, 7 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/mxs-mmc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 8c3655d3be96..9abfb169464b 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -674,7 +674,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) return ret; } -static int mxs_mmc_remove(struct platform_device *pdev) +static void mxs_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct mxs_mmc_host *host = mmc_priv(mmc); @@ -688,8 +688,6 @@ static int mxs_mmc_remove(struct platform_device *pdev) clk_disable_unprepare(ssp->clk); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -717,7 +715,7 @@ static SIMPLE_DEV_PM_OPS(mxs_mmc_pm_ops, mxs_mmc_suspend, mxs_mmc_resume); static struct platform_driver mxs_mmc_driver = { .probe = mxs_mmc_probe, - .remove = mxs_mmc_remove, + .remove_new = mxs_mmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,