Message ID | 20230726040041.26267-22-frank.li@vivo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED077C001DC for <linux-amlogic@archiver.kernel.org>; Wed, 26 Jul 2023 04:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=P+JFEKEYGnr0v0OitaiZ0CrQNtcwHLwALQ+9bl8mC10=; b=44EDkAiUKhEeq5 Sw1xJ+LzY0h1VbkWmpC4nFLIZWd91gKUBBVcdJGwp+9rFcMVTFyIF0+PocLi/gOTe9Eu9iYk992hj 8IYUlDiuVpC7CICEGeIrx1ioqORLLk+LUyWJF7TiGunwgYSFhLdtj5jE8Cn3EhX1HgJ6/QuYq/xne IlFE91G3JsLmWOQZ5JROb3R4QINxyCIwqiqck5AmskkNe/wcVuJZIHEw9kS1X1O6y+IprGdsJih7b b2+sfWlcMOeleNS7U8pPDe6hBENtdKqVs8IXmK6hzU3jAYxzuVp2jI7xrYD6Oh8QzyKOZs5+LTMyo Cplx4ghVqIRfqwFx0vTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qOVin-0094A5-1j; Wed, 26 Jul 2023 04:01:57 +0000 Received: from mail-tyzapc01on20709.outbound.protection.outlook.com ([2a01:111:f403:704b::709] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qOViZ-00941j-0I; Wed, 26 Jul 2023 04:01:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bDi44R6Md9yq3qOWSMrz6qhSuchzdVKpi2j2QJmVK5Hch2p+vgCrQqMTPo+txgvUoNsjRe6HIoNXp/Ayi6500ROkb+CRhhafDUBpemKHHOqib4zu3yKEGtV60C6NqlEncj2F7jVJYARTMDLau2d9JgjjLkjmxmw3M9646nFFIgdN3M8o7oZWPd7RNNsUkfK0UEW2gjrP7/WT4ZktPKckr0xou1mgcZp4dHgGsBV6pXSGvUigBlDjT0Il/WcpoEoszbdawRSpdSGmE99mrE+Qpia1REU5PZ61112t40Q7R+oZ+XXe2LqetxUZfD4j4tYwz0NqqvQoGuAEGjFdO6P8Kw== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; b=Wdi9oykchzSYOHzFakbeSpINkVgKy+QTw5Q5GrYzXQO+311YkJdUIde5EyBvtYmHbFODMe8YCaO5FT2mMDH/RutSzRaByL4O4zLwU/qhvuYnxB3l0BTbiX+dZkRUeiHK9EOsbSB4ciKCPVvzGAVKrUvij/q6fV2GmeLmMhrrY4/967wv+iyfOkYjDYmM22buAAZV3finv6OpMpHEVtrJ+3qsnS8yHalgdtdUdKlIJquZsGluJ2iMyMJG9mu8VpeLy4BMuTtkjTHZ1S7JFtTcttCEHBFCOeYUVRri25X4IA2rvJM7SrvkdjuTcP1DBBV/a4/gKYOusuJIrDnThzI+gA== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; b=JQwIM4Gq0O6mme9RE1jswUqf6RS9Szf75iyXc4rFsf1GN598M8FWYshlwrSAk7iIs/8Q9jdtnGhdxh0lfnCBD/IW3MvKsQ6ZEpWKl92Zv6brRuzOHs97X046PJmVydWVKUGaKGuWm8KZZd9CNTr7kx4ofhQCALvFq5ITmS+0QhSSQqX51et0WwVW4BkAH/T72IAy8kdfaH2JiQ/cxLGz/QYFqc38fk1nt+CEvpynkg+nhPbneapL6kOb156wxOSg0/5R4ov6qwW944oZBPVC6NkrT2PorR5nC+FoFmkVcUROxWgpAikskf40AiNzC4zmuVHJMjTLIuKcA2GKvWm5zw== 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 TYZPR06MB3934.apcprd06.prod.outlook.com (2603:1096:400:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Wed, 26 Jul 2023 04:01:37 +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:01:37 +0000 From: Yangtao Li <frank.li@vivo.com> To: Ulf Hansson <ulf.hansson@linaro.org>, Neil Armstrong <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, Jerome Brunet <jbrunet@baylibre.com>, Martin Blumenstingl <martin.blumenstingl@googlemail.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-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 22/61] mmc: meson-mx-sdhc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:02 +0800 Message-Id: <20230726040041.26267-22-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> 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_|TYZPR06MB3934:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a4784e7-2cf4-4011-9701-08db8d8d0231 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v1qcFDg4jJKOW6mioWJDixaMChjEwPeXpm+RJCxZaz9gpykywkHSggCpOGZqtWASx3iVPhkLfB9sFW9L5zttE3QcUWSSXy182mbpT3lDgz0G+Xm4SVsvp7+zIA72fs3+q8Gy3tX+uqgPwyWvLnq0IwkxTjhOsFYfwXaFSk6mOcgSxm6sSppcpW04hcm0QGIoxk0wiPgCL4fMdwABI61sf/YpShMKdDjVLzcx7OPAjuJAbxy+hQ9TbPtza5ANqnVkspjUYplDB6YbSBUHkSu+Hqq5VFuMrp0BDJJuo83SgDpkrsA6AU4dkB/lR+U4cFY1zSBgHFSgdqyB+94aopS6u1EptVzStgIehkDXXIMn6615SIyRsS7zxeXks3bKlqG/cNco3m3qEYl7pGDConyoOz4/klbYXcOdHn++OO4iuVTD/+IWUEzSBU9YQtXehD7rZAfpR+8mB6+FhJBIjakBzhvH0IdG2lci8FPSj3yQfyyvb52MuKwXNWnQ4iPMIqWsMlZtswOO6lznJu+wSIg1fitz2KpHmQ7z+886afI8cgp/a/NF1CYD9T8QIM9qHYgxiKtR8gilJ4Bm2Qtigcs+InDjeRU/blZe9qi2MtKBAsW/3rgMdFtRTXcZa7lXC0Gx 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)(396003)(346002)(39860400002)(366004)(136003)(451199021)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(110136005)(6486002)(52116002)(54906003)(66476007)(316002)(4326008)(6666004)(2906002)(7416002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?u+/o+m6kTUNt6UxLMyO3aLhQ/NMi?= =?utf-8?q?KG3osmlR8mqaUYI88RlLpU45rH/ceTwgBHeTo44aDEajA3IoUvqkUlELkEuSKPKZh?= =?utf-8?q?dMYCzM55zzg6N/d+jM+IUqAkpLkmMiPjf43c51wIAU+gUuMwUXPqwcR8zR5pSUtVz?= =?utf-8?q?S8+gcXa9vEUABY5Q3Z/xMUwayfEDkVyy7ZlZKpiGcMab9wOGK/E38jiVV0RS730r8?= =?utf-8?q?C5xr6FZWnJ/4py3vFKaCHFZZ57Jpwfn2Th8XS1XeEFRqyDWkoCUk57rxv8GV4bZBf?= =?utf-8?q?p7Eyckt7FD/EPCz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JDGKg3VuY7pFe9ZXU1Or1vT1ICH8Odti1POcC8yp4?= =?utf-8?q?uInyCl7vxDsP4G+SrPgdbISj/qNq5mLhpd1fFeb49gsWgDUczeUxadjNNY98/arv0?= =?utf-8?q?pb2xRAuCn2fqkvAgR0aMBB5aZzCjT6EHgv5S3bQ4ehvG1W3aArZ7q/gthFOq1Wfpt?= =?utf-8?q?7qsuY0Kbv/m0xYDt55yu4Z+KKGUHzZWuk+9BeM59q0AmC5K2vjMQsKg+DtoRVftui?= =?utf-8?q?fPPZkwbMIZQ5/hhkic0dEoiUJMuvjKDliWToK2xAit3wmWUBCv0hTHbdGwKtEKt91?= =?utf-8?q?yxrV3YtR1Lwy2HpDGkRJ6qq2Orgec5/VvJfZ9bo/fHuP4zvaEIJfjNz948tyFN2YR?= =?utf-8?q?LfvIcBX3bfz3?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a4784e7-2cf4-4011-9701-08db8d8d0231 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:01:37.1039 (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: +9W3+n35eQ3N8Ur8wrxX6ggzqLhKuGP3SpdFsoFfkefJyLzixS55vNNXwmcOWg1W/mb/KM3iq2g4g1bs6YBtdQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230725_210143_131352_45F71D64 X-CRM114-Status: GOOD ( 15.19 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-amlogic.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-amlogic>, <mailto:linux-amlogic-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-amlogic/> List-Post: <mailto:linux-amlogic@lists.infradead.org> List-Help: <mailto:linux-amlogic-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-amlogic>, <mailto:linux-amlogic-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-amlogic" <linux-amlogic-bounces@lists.infradead.org> Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org |
Series |
None
|
expand
|
diff --git a/drivers/mmc/host/meson-mx-sdhc-mmc.c b/drivers/mmc/host/meson-mx-sdhc-mmc.c index 97168cdfa8e9..528ec8166e7c 100644 --- a/drivers/mmc/host/meson-mx-sdhc-mmc.c +++ b/drivers/mmc/host/meson-mx-sdhc-mmc.c @@ -880,7 +880,7 @@ static int meson_mx_sdhc_probe(struct platform_device *pdev) return ret; } -static int meson_mx_sdhc_remove(struct platform_device *pdev) +static void meson_mx_sdhc_remove(struct platform_device *pdev) { struct meson_mx_sdhc_host *host = platform_get_drvdata(pdev); @@ -889,8 +889,6 @@ static int meson_mx_sdhc_remove(struct platform_device *pdev) meson_mx_sdhc_disable_clks(host->mmc); clk_disable_unprepare(host->pclk); - - return 0; } static const struct meson_mx_sdhc_data meson_mx_sdhc_data_meson8 = { @@ -925,7 +923,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_sdhc_of_match); static struct platform_driver meson_mx_sdhc_driver = { .probe = meson_mx_sdhc_probe, - .remove = meson_mx_sdhc_remove, + .remove_new = meson_mx_sdhc_remove, .driver = { .name = "meson-mx-sdhc", .probe_type = PROBE_PREFER_ASYNCHRONOUS,
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/meson-mx-sdhc-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)