Message ID | 20230713080807.69999-42-frank.li@vivo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-rockchip-bounces+linux-rockchip=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 589E0C001DC for <linux-rockchip@archiver.kernel.org>; Thu, 13 Jul 2023 08:10:24 +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=QJZzTEEda2FZe0hWRouZyKMvHw+Sl+vJAIAGTieRWys=; b=1yMUsVXfRwCr9H PTcTSULCqEHK2niR60tMd4VnlcJO5bKHXjDcUXeyVc0ln7HTA+QAJ0eFx/ZH5NZMDzYxtO3nNfE2w p4vTyg4eG0fVhyWukjZagas861ERYA0QS7evP4eyZr7wkeZdX3tVI47Y5Toj/Uck1UT7dcVHpmuuP yvVXKvk2oaIuN+6MjNCA1AyQ124cDLcrNj2THFTBFV2v/XN5QApLDZy5xU5Z/RqFYlAYau4HkyKOm nY83OgtFAHePTq/DXfUsnLI4QtfdqAWE2dRJPZteuRCA7CYTSNw7S3nTFfbULx3xOH0b7aSsZrx5j KcIqN98U51OIXZu1Iiew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJrOw-002O8M-16; Thu, 13 Jul 2023 08:10:14 +0000 Received: from mail-psaapc01on20703.outbound.protection.outlook.com ([2a01:111:f400:feae::703] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJrOp-002O1V-2W; Thu, 13 Jul 2023 08:10:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hTUbUiVDjfZdOcXaVRu/p0N6vHQA5JA2/ECziUbeEHEqErDPiPVbp+/OdwgGHorWBTjc7eNELMHUfKpoKvVEZcn6GcEoPoLI15BAbeyq0zV1+B0YvsCamUHjXFp58t3knXpBvLrC6uSvFBAif52H0BqRKyJz7d9sfwiiK9LixI2TvZygHzojX9DYLOPrVfpzTFQ9UVui4Dj9MqYVyTTj9x0WjRF3BTES3dIqI+5X9YlnWMYQNhVwa/F7U79msGqekljBzh4Swa5TjI0hlXLkiKCiiAnBw7Gj2rRWaKAxrMP3mzjAGxi8c1EKi5m+8IsbGZ2VDpy0QRw8IooyGPaUDQ== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; b=PO7qjlb2ETwxoA6GsYJt8UH1sBFIoZNuQyQDwitOxvDnoFgrV+dttWgGs2TFUP7A6KKhwjV/LjFf44nffgTEO/PHPJouz0JBtn6NgrR5SQiI6jh8p4qpOgIznUq8PsNAnGGnjO0DqxrDPL7IzyaV9Tho/AbugJd1Ftupy/S+ULN2qqRvYrnjvzePFm1LEwyrLdw/rcc0EylqDpSItoezrVZkfLxp9BzsF78R3VVwLAnLZaH6kWvi78oQCpwxRSuEpgJj/ELScoOBfYCQNr9QXj33kMnvNHtN9VtXEYCzV3ZaipeUUF+k+gfFqFBRHTDldfeKOhF8cOBemKWDFlNmpw== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; b=hoCB/9b83bukOsm8nihD6dKhcasQrUnfxS6UZgutGtntF3HYC79UKPXBqNSJz3IHMJ1x8C9PQeiodhJneed2A7gefRwK0/kmTcZnbs9s2UAxpqLva9JsIModSr9O87wKt6eqD1k2FCPwftYlOgDQAhKPIKAS6WRJG0cw+YmEL7V9vwiPeN6uCWzXNdCesSHqN9wBMjknT8UB7pkix/PqFcyR8i5IB9+G+bH21ZvDPqXwL90oqPIfJ0ZB4xT8m2bz5+6iOMxC5rxY3mpwgzzSkAdHTOOP/WkOwUA1NECjIHT0GrNTtdumeX4BJo1c4mIg3g/9cV23MRiH71zyUZF5bQ== 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 PUZPR06MB5984.apcprd06.prod.outlook.com (2603:1096:301:118::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 08:09:59 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Thu, 13 Jul 2023 08:09:59 +0000 From: Yangtao Li <frank.li@vivo.com> To: Jaehoon Chung <jh80.chung@samsung.com>, Ulf Hansson <ulf.hansson@linaro.org>, Heiko Stuebner <heiko@sntech.de> 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-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 42/58] mmc: dw_mmc: rockchip: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:51 +0800 Message-Id: <20230713080807.69999-42-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230713080807.69999-1-frank.li@vivo.com> References: <20230713080807.69999-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR02CA0091.apcprd02.prod.outlook.com (2603:1096:4:90::31) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|PUZPR06MB5984:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e30de44-7a3b-4cba-ab6e-08db83787ee5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bmGr9M3IOCAVX8UgHFFMApI5ddUQePQs27B8Yk2fsvj+kleKSuG+pXFRPKHOlm43AhFlQ0lgna8BYPoto33LmeRToP6rkjEFY2SgpFLWMPxCEo9p4oFstf29UD9j8aurYBHzwmZFgKRvpGaSEHor62YAJHUtxOGcb6iB8fo3r1g+yaG5IKC9NntpuIwgXl0CMLreL6z0pbKADdq/KqI71jVYcq5z77ILiYT8RdOTn8JiEV48nrobVqer0YQ4zlzFq/Wt0YYnYozhvobYfJqEvloKi0tQ/QYs3mhX3bD6aRVEG9WwwBUXlGVxnE/oZ4K5Z3lPP8cfZrC1sevVExISSZBGTZSxasUOqwQXjeK84uuaS5tXBfdfhWIQzuo1wFraicLnd5lkkc5w7B+tN2vblzSUHMIEWP/w1mEtrw/dAl3R9e6JdfhUvwb5i4W4cOHtlyvXSgWMvOX16YLoYWlczN6wxL1+7qOeMfGqo7X5JF0RY4HxlPQxTpE/8rnkmmqy+ljPPrs373uz9VOJ1QcMgp51p1chXvqrJwHSq+k8uF1lHKBx1NmhiOtn9PlzxGKFNCqcFeiCg2+oJpEoO5t0tEJKnEgeYu4UOXunLrmP+nJJfLy73np5iMgPYCwhmdMv 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)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(478600001)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?DikxVcGBjJgTbwsq9cma88Tb1P2r?= =?utf-8?q?kcp9Fr1X1NRH/JKK61TdyzONYQ3/aQA7BD13zKMFs+pTM1ZsnefatCGpyp3WHKMYL?= =?utf-8?q?JODrIGLtd/01cVmEwGi+6lRYN55QU0bF1i9kqoGe58/IgdQYnEU2l1pIUDsHe94z3?= =?utf-8?q?STd5CW5MKnn3ZC36mNDT2hFepUTkdNJ+rwuU+5iMPyOfVdMZe1FN0xyl8kBbRaCod?= =?utf-8?q?PnplWgHgp6q2ra6GuejIDXimoeLvslu7YovsZ1xdPHb3pRn7c80EbOMMzZGQsM60t?= =?utf-8?q?FAB8VzCe5nJd73AK5N0IP8a3//2Z9WfBH87R9tsYYTrj4CLtAp0drTDRCa5yCf/zt?= =?utf-8?q?xvrUL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j7C/fFjWZqbt2LarM83Zvc5pxmNli5vw/vnzvtavKqAMEs799PJ4H1c?= =?utf-8?q?9cm3JZI+52//8riH82rRqWmvjUtfeixEpXmM1AxCrCM8KzTnPoT9m4B1dVa+K8mJl?= =?utf-8?q?taRh18UU9W99FfbuKY1IAzj7nOo/mH55++mCgOUsxCqjuAoZ9BqOpX5oZ7i6fnw8S?= =?utf-8?q?9acHSnIWbFitXac5DkOiND9dht8pICTyPyKOgbgVunawXZKrRL7x3LMjQPrrL6pld?= =?utf-8?q?kS/SkT4drAOZ8x64WOoPduBJs8S3A6C+cFwDQyzdOi1UjgimV+C7UNvhC4Op+krFr?= =?utf-8?q?kEJqbUfRiqAE?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e30de44-7a3b-4cba-ab6e-08db83787ee5 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 08:09:35.2673 (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: sHsObpeO0K3sjY/clh6lllkMVflWjT1m/CsRKPqg1LK/tEdnRsbB65ABlgufvV4QO+26zs3fK9OWTOzXUPBBQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB5984 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230713_011007_829606_0DEB90C0 X-CRM114-Status: GOOD ( 15.93 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms <linux-rockchip.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-rockchip>, <mailto:linux-rockchip-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-rockchip/> List-Post: <mailto:linux-rockchip@lists.infradead.org> List-Help: <mailto:linux-rockchip-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-rockchip>, <mailto:linux-rockchip-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "Linux-rockchip" <linux-rockchip-bounces@lists.infradead.org> Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org |
Series |
None
|
expand
|
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c index 2a99f15f527f..b07190ba4b7a 100644 --- a/drivers/mmc/host/dw_mmc-rockchip.c +++ b/drivers/mmc/host/dw_mmc-rockchip.c @@ -371,15 +371,13 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev) return 0; } -static int dw_mci_rockchip_remove(struct platform_device *pdev) +static void dw_mci_rockchip_remove(struct platform_device *pdev) { pm_runtime_get_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = { @@ -392,7 +390,7 @@ static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = { static struct platform_driver dw_mci_rockchip_pltfm_driver = { .probe = dw_mci_rockchip_probe, - .remove = dw_mci_rockchip_remove, + .remove_new = dw_mci_rockchip_remove, .driver = { .name = "dwmmc_rockchip", .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/dw_mmc-rockchip.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)