Message ID | 20230726040041.26267-19-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 t5csp163919vqo; Tue, 25 Jul 2023 21:11:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlGpn5d9el9y+FH0EEWBnsY78SlimyLDfnRpWjBKPQ0F+EhN3aHwZWHm5DS7pBmjnwM7Hb/i X-Received: by 2002:a17:906:9be1:b0:99b:49ac:318c with SMTP id de33-20020a1709069be100b0099b49ac318cmr651443ejc.70.1690344667108; Tue, 25 Jul 2023 21:11:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344667; cv=pass; d=google.com; s=arc-20160816; b=0owAPfHNDUAgXudfh64yMt9Z6doI6VTk6vPn87UXEkSUBiY6W26DVotGlrAueZ3k0e puTOHVkyQzaXIpPJuLIkWHYYU5R4liMGF9mTocNWseLlSsBDVwGDXCeynx79z7cIDxe0 rppJZppfffZtQLazgrp9ngtINOMJK6kZySIpJglCqNY7S9rut8cyvrCzMbxnLDDpXXQU z88LXNPgpIZ+g3gMoxeJbgZKDDkoT2TcIaPirF29H8HbhNvIz+Bc9WWnG5oWa8EqG4V0 IBNoAJE3Wpt6ssaXr2uBKrR0f3+I5FMGe19ntF4FrK/7L+OFyj1dJ8aXG/a9DI2iIjV0 Ovdw== 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=bTCEmJzZRC/a6SHh4C2nbpGEXcRFJ6SVNGbm/AwkaN0=; fh=sy30M9eLByds7Tlvf2H8U/dRo3J3gGi9Sy6vmtIbxfI=; b=ocazOEl168md3fKmnE+ByX18CMvKt2bGMpu4ORckiOIN3x+vaaMfF0mLIORVybn8jn nLap0lBHSrPzefg72A1pEHmNym/dNVO5OrwYsphGEDcpedGAaC6BJ7Mmnt4asdMWV4+x /RBCeYX8+haRgXVPxmsBRb2i6yqYzqmgVRVash/BLYedo1uzJR0/jUWEywaWwpTh/ikt mE3TQLuHJZ9XgxDv7rVzJU+XF5St7B1NW+TFaPoL/oMzwLhe4MdzUmgq7hsWyn6/4rvN ohnNjlt4jp/TkUKYP+aMVBUSnHdSSaxdcyI+2v5b1sJASS2fYfIyi0yhjg7iRPBT96LX y2hA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="fFKKS/Gh"; 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 ks27-20020a170906f85b00b00992e90ca00dsi8965693ejb.16.2023.07.25.21.10.42; Tue, 25 Jul 2023 21:11:07 -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="fFKKS/Gh"; 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 S231577AbjGZEES (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Wed, 26 Jul 2023 00:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231587AbjGZEDi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:03:38 -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 A7E684209; Tue, 25 Jul 2023 21:02:01 -0700 (PDT) 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> 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: 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?cGe45uE2ADLQSqV9eWrKysMkulVWPj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Z8hqtKgzQixnFWfcve?= =?utf-8?q?Yj6w0dDsqvahvcIps1LRI9w1Qy6wr6y8wfb3iwBxS1vRfE809o3IglaCznM6FW7V8?= =?utf-8?q?CHkB8xKdu4ig1beNiYEsAyV1f0NNrDp9LDU4FZI8FcVydG6nFJuIzQS3hOLdGGLxD?= =?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-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: 1772454849322380574 X-GMAIL-MSGID: 1772454849322380574 |
Series |
[v2,01/61] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 26, 2023, 3:59 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-gx-mmc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
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,