Message ID | 20230726040041.26267-22-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 t5csp166423vqo; Tue, 25 Jul 2023 21:19:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlH9lutDjQB0geHozmUuXiHwWU+ouS08su/a9dAFbvTB5K9E7TzG/FnQ6qAgrBFbadxH3+qu X-Received: by 2002:a05:622a:14e:b0:403:ea66:80f8 with SMTP id v14-20020a05622a014e00b00403ea6680f8mr1329769qtw.15.1690345157546; Tue, 25 Jul 2023 21:19:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345157; cv=pass; d=google.com; s=arc-20160816; b=Dz9XEBnF0aNSkzsm9RuUk0dIkVjMwU0HT36uqPlAjTkwr+sed5rbaGLWij2ZXI9pX+ ZA3pQ3pa1V23fLA3cN41sVEfO9JQF/tqmNST9G6iL0S9OwkvNT254OMN5JDoZPtodEii 9RFpznvo1OWeT7/CTeBHlYTlt5fS2ikVPmyNwQz2s1nfbD9Pk5XWMEfWMebW6I42YDMw 0E95VwHB3mFwLaeL+N0a5+Hrn2Kltjx1dO6iQQYtAdaM+tMwbQ32DCT96BhMzmWOzOYw W08VA+e0Cz7/daSBIABrKnmOOeIZEXNkiwYuqsbzMqcZgpxR5q0g5VBcQaUTljK4hD+t LUBg== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; fh=sy30M9eLByds7Tlvf2H8U/dRo3J3gGi9Sy6vmtIbxfI=; b=dBo/4mRdoO878doCmCYb9aroXtioUnRZJ4XkstPs11pilMSFHxHcYynNk91I6hzncP JEBI11rTrVE8ZG3k0DNKROt/I7vT1ELyNKnay9/RMe0m3NKrTmnzKJ4AtKHMzdnmowL/ mqpbQGWcor/Imld8Jl0QbqkhsoW8opP99W5Q4uuuGbIXaVDY3LbOEQyDCdU6SBiBdrO2 N+Kwytq8GMC9YcG1Ip1LOyAQGXWQLYOwO6UjMNE4jrf6gNOjVYgKRvs64pwFjomRxuDQ SPLIDIhipf9SZnN535E8GqqfjxDXhl9heDDFThV7p/wqfzlzMivbwmRBkiKWJbr5IdPz /XrA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=JQwIM4Gq; 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 mt20-20020a17090b231400b002680f4e8969si498354pjb.95.2023.07.25.21.19.02; Tue, 25 Jul 2023 21:19:17 -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=JQwIM4Gq; 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 S231741AbjGZEFW (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Wed, 26 Jul 2023 00:05:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231611AbjGZEE1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:04:27 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2110.outbound.protection.outlook.com [40.107.117.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6046844BD; Tue, 25 Jul 2023 21:02:35 -0700 (PDT) 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> 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_|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/xMUwayfEDkVyy7Z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7QfGds0Nc3tzCdrd6/cJx2zZ?= =?utf-8?q?UUW4PxHom89uUWSFtontaWYA4KYuULWg3XaBx7dDKVvRm7OWJF2hElqmeZjBRTwjT?= =?utf-8?q?cB+o9yezV5JDmYrTsU5MbAQNJDGKg3VuY7pFe9ZXU1Or1vT1ICH8Odti1POcC8yp4?= =?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-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, 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: 1772455363746569525 X-GMAIL-MSGID: 1772455363746569525 |
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/meson-mx-sdhc-mmc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
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,