Message ID | 20230726040041.26267-19-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 9D256C001DE for <linux-amlogic@archiver.kernel.org>; Wed, 26 Jul 2023 04:02:07 +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=zWTzelKEV/zE4/4a8qJZSiB5X/PjoQEirOzBBLPLbWI=; b=dp7d8Ti3JPtO7S 4ijvumrHWF73b4DOvdBcyRA7hPiw+CKnqjTMwsgKZGLmQlvaGsCJEJPuzgUMVkxM17pVkcPxR7eM7 11QB/HXZCgzuQyyH6M1sZ4vj4XOpf7LBhw0+TEBraS0lYoE3xZqCNf/3TqtXDPhopGzneUx1YIb64 zZ/lVFIMv4gR3MxR1ZUhMfD6c7Tog8Ep4TQGQ7xFlK7yOE2K+qP1/J+NHUs8ehJFNDTS9Xoa+t6zd DlCgy+v0f9r3EZmY8m1dl0L/iePL0JwrEmIWMtk3dNt/MLgkD2xtKtnElhtxNbESTi83pITlCRfoc Q2DzSOuAo+QDLqVX2sTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qOViV-00940y-2t; Wed, 26 Jul 2023 04:01:39 +0000 Received: from mail-tyzapc01on2070d.outbound.protection.outlook.com ([2a01:111:f403:704b::70d] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qOViQ-0093xB-1o; Wed, 26 Jul 2023 04:01:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TbXHsr2SfrsSqt8WFFzVsKTLmWka5EbQGRRdyTUbYdKLAmMJygsII/haJobW2eqAzW0X/pVApqgS/TAK2BLBcvabdDAz7uhecmkFUtiIDQj1mF31lhc9DXKNVEjDtvRWqxCDdDMBrZQszmjw011dfcLH+LvlXAn3k4hc2NRiyXMAu83fWTNzqQGtOR7oK20KB/tvRMEDgC4w64MwNFzePDEF1q2rP/bhuUFvOzGUXiRvdj77g9mH4hsPt5BU8fRXm/Lcz5TM7fdZatBaePJO+wZu/3sZs3F/auzuhVeK1+wDGZPuz89L8E2zJo4tNhNjNq4r3VE7FaCM42C5UjnShA== 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=bTCEmJzZRC/a6SHh4C2nbpGEXcRFJ6SVNGbm/AwkaN0=; b=MjTZu5C1PBdfXLvYrzWVmO3hnIjkGj3YPmW4f7q/kU1ZE0VNDajI78TSXoRwcYHeQLjqyoZccJrsX4DkHgtH83mBbDbyqYkmm6+5OQr3QkRgjH8F4O4YYrqXjap1KemVlIp1tdD86rqoQnnvKISc8JkBpjFPNoKmcD8PwMKurUrQKUYwmslS8EQg8oFlcpOUo8JSYYp7I5rnFd56j98o7v8hfr74gaBWOpeg4mz6qK4+cNefifVzrPdd//f3JC4O1+VxFpMJUi/0QD7ElHxk+SX/qvt6QYaAqRnZzQzck9Aqp28BZlCSJCbVuyP3Pt1K3xYRafALwn4328oytaS/7w== 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=bTCEmJzZRC/a6SHh4C2nbpGEXcRFJ6SVNGbm/AwkaN0=; b=fFKKS/Gh5hmWJVZfF9P+zbvtcMDVZJvAxjqBdHxyoUGsIL2ib0PXmILaZiDYGwLPhgjvz1HxEOqa63vr8Kh6895HT9dxB676mllcCWKcSwh9uuSCZV02k2z5YaKeCIfKk3NPqvwE5aHSa6NVSqo1s3/rJOe1CZyxAXFITWI1MRt+bsuqNy+nXCLEhFosfDY7ZLuWixLZ6UoMqDeNCjOlB70yUkYhuXcjLK8RFmCuxzACmy4Mz/MPZF9WKRLxx1f+DfjNFigFB3tvUm1dhfArUDsZOd1IzULSLlJ96543kbZg29ocwVVKB+tiWwV3cZjRNedrWwWww6+JPDXpGh3WbQ== 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:31 +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:31 +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 19/61] mmc: meson-gx: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:59 +0800 Message-Id: <20230726040041.26267-19-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: 113f54cf-6a28-4450-3a96-08db8d8cfe9e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4i+GW4ZCuJ2TzDRzX/d6lVv9THQuNO3JKJaFjG9KKdh9iVRdWC8ryrT0P4Wkw1KyRjaQatkpZu7yM68LPtwyMqqeaftczL4EorImd+H3VxVbrYhWb11qBzZkHOfe1l44udzik1jJ/TIWT7BisLDZ0oERWWuXDcA+1uDcEdntYVL94CB+ySSyGLymfGe+yXwWzdl1FqE68nny7yy2m97XkoTsrQW8zARTOG4x+CEAhesrq7Qs932fRRQPI3zcAC7oj/E1IKkh/7N5gZAmbXbLtM3c8MsIUyEB80F03F9eypJCnJN+AEB8TI1cotVmocE8l3dgynX9EvNw7NxPp6MciUU2ErBHXoQKFbgm1Prs/lYAdkPwAh6kO7dFvY4EPKJSLSJSSGVRXa56hRRsP4NpXVglTqULCeRCumFo6OC7Ru0wO2eTIYv7p6wx97h6/WTQMlmaUmeXRfwRT0X5DpYo7AG995i0D7Py0OaTlrwvKTOkZCmWi/nd9xcF0mzwbjRqT6BIaZfHOjQZBLw/z7DKzP99ceV/qPOQjI/i4nAcmxuPCGo/jyAngXekGap7V8+JqqdKN9Hgyn/vj+lWU0YVHub1Nz4t5CS6oNuLdamHU8wbwnTBiWIoKZpDGo5NdGCq 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?gp9rmYgaeJKRorq1/jCgpSLaEr4A?= =?utf-8?q?AunfkGuL5hiHNkgTciHcXGNMpOdDCGANTrpaQ+vx2UkyR9issu1TttBRUEZcZ26Y3?= =?utf-8?q?lq5uxDOA9CGZRa5ywIcq+0LqaQG2ie/dQ/gNeLkuCuGqaueu26TArC3mNCPnNAhiL?= =?utf-8?q?cGe45uE2ADLQSqV9eWrKysMkulVWPjUsycRhIr0/W1k49eMYCX3k53rmpXQRkLH0D?= =?utf-8?q?Sidr/Nqzvjp8brj8HZFHXpssjgv9SMhddbfPcRrIPPvyf3RcE2b8ztob4fo/5tcgY?= =?utf-8?q?1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EsAyV1f0NNrDp9LDU4FZI8FcVydG6nFJuIzQS3hOLdGGLxD?= =?utf-8?q?YHkrNOZlUOvEjsj6lQbWUzrsafbBr3+Yq1a1w4KB5qQMbvX1VpemEAPTYNaJ4dHnZ?= =?utf-8?q?Omwx1MgZD13FsPC1q/3VypIWBSBczOeSiSN1hffscO39ypzcR5Omits2AnbZL2R/2?= =?utf-8?q?smEMXaqGrriU5ugiA5NGEvQWqDuE/DyJxNTChJ0cWiW+TNegpV7nT3PeSLgXnj6VH?= =?utf-8?q?bi5ho+OkJhajKpWsOBdz/Ww6E0IGtX8YkinK5Sab6jMYGy8D9Bh3OwbX5Oa0JaWAZ?= =?utf-8?q?53qF0r8BGemO3Ub/+7BT+Ekoe7vFcaLaDT3tiEOt2nKsxRe5N8B1siItjHkjMM5BH?= =?utf-8?q?b/3taQ/J6qBZ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 113f54cf-6a28-4450-3a96-08db8d8cfe9e 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:31.1017 (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: xuyG4YWJ2HTz7FBNxSzQWRqJxmPCStqp2IqjNbn0kK+npngC7Q3nxtfvLEnZMp7EjUUKH+0xDwE+6VuI2FbvHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230725_210134_603326_3879D7B2 X-CRM114-Status: GOOD ( 15.09 ) 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-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index d652374f37b2..a2601d0ece71 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -1294,7 +1294,7 @@ static int meson_mmc_probe(struct platform_device *pdev) return ret; } -static int meson_mmc_remove(struct platform_device *pdev) +static void meson_mmc_remove(struct platform_device *pdev) { struct meson_host *host = dev_get_drvdata(&pdev->dev); @@ -1305,8 +1305,6 @@ static int meson_mmc_remove(struct platform_device *pdev) free_irq(host->irq, host); clk_disable_unprepare(host->mmc_clk); - - return 0; } static const struct meson_mmc_data meson_gx_data = { @@ -1337,7 +1335,7 @@ MODULE_DEVICE_TABLE(of, meson_mmc_of_match); static struct platform_driver meson_mmc_driver = { .probe = meson_mmc_probe, - .remove = meson_mmc_remove, + .remove_new = meson_mmc_remove, .driver = { .name = DRIVER_NAME, .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-gx-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)