Message ID | 20230726040041.26267-59-frank.li@vivo.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-mmc-owner@vger.kernel.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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14C60C001DC for <linux-mmc@archiver.kernel.org>; Wed, 26 Jul 2023 04:20:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231909AbjGZEUk (ORCPT <rfc822;linux-mmc@archiver.kernel.org>); Wed, 26 Jul 2023 00:20:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjGZEUH (ORCPT <rfc822;linux-mmc@vger.kernel.org>); Wed, 26 Jul 2023 00:20:07 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20723.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::723]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDCBA5B9C; Tue, 25 Jul 2023 21:13:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qra3j3Y2Bt84uI9mArcwYulDpPtgSh8BY0Nq0eQDFGfYsmlo2IeCjdus6nUnAwxeGQJWnUjqRz/hMAR+6tZDqi+wt9L8r0trm520BXW2/omfLjgCmU0SPVc0tbfd3nTtSVH2icfpAl9XJibgXmUs7+O+ffeBdjMmhoybhv9XhUOYWLBsAzKwAmOmc4KOdkUievD1XO06+UPTgL9u7agOomAuVdrmowKT+MKnXV5m9LV12DHhrkHvo0q5tORTytAqz8RJ7P01O9Ur37TOmjLcISm77++oBQ/o+Bc3TYhOXF8bDsrVOkWyeda29IYqgg1ImfHCSmG8U7lYa/imqnEqgw== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; b=F/14DRGxIniXezdfgCrCpsVo2hpRtTvEivsLcjiwAUg8q6RziN1uL7BA0VMbomdzcPcHXzbXNZOO36Tk418fEcKe/mixzZlZgCnkRfP1Dgkk/ALHUK9cppW1JSiOK090r3T/zCC9RZtax7Dgt6VHB2okAZjburWP3FgadWRnE1mG7c0+utjoxNL8yEYQmNq9IkR20bIiztYG87RsqydGApi3Hnipdxugs0CwBCDyYFyjXauHxLnSGHAvrJWVZV+GXHRSyvvw78X+OBvo3drqR0rOEZHUIWX1v+UNPE+B3djW0EuhF6O4GENQGw2zyoB/HXDvQTtDTfXKsn9m/4WFpQ== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; b=p1LexOyjqnbBzq+FoyYzcoSDgywW22IRtWTdyv7SbeHEirH3FL36OYoWH91hMeTsAWdZD9h46MhKKMEgWLLv4yifLXvuFIqvs/oSz9lkYQx7hpze0akQ9VPXE86oYhr5UXLsWOlwEJaOwNTUk+gTh8FMccNMBZmeqOkuWx/DOV7p2bcC1KSEz24CgV5D/X4xbyOpoImkr+YGK++eH3MO6TibTy4yTI8wcIasfVgQJZunSgm93sH2wtcAWcLFHYp5ljDB0kNvePy7dBLTD+xL5Pk9TSSRKftnIaU0fFbSaiCSotj+29Cy+hgogRSWqpJBAo4X4fS+Ya+HWm05MJc0ew== 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 KL1PR0601MB5463.apcprd06.prod.outlook.com (2603:1096:820:c3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25; Wed, 26 Jul 2023 04:02:42 +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:02:41 +0000 From: Yangtao Li <frank.li@vivo.com> To: Ulf Hansson <ulf.hansson@linaro.org>, Kunihiko Hayashi <hayashi.kunihiko@socionext.com>, Masami Hiramatsu <mhiramat@kernel.org> 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-kernel@vger.kernel.org Subject: [PATCH v2 59/61] mmc: uniphier-sd: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:39 +0800 Message-Id: <20230726040041.26267-59-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_|KL1PR0601MB5463:EE_ X-MS-Office365-Filtering-Correlation-Id: 77260e1e-3cea-48bb-c51f-08db8d8d28d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kS/072Ljm+QuZ3gkGCffYjgIRNrcJ9DcHAz9hpUY8S14vurIsNoYhZOIVoMjx2H/FJmjhH7JoJxtFIiV2/i4MY6LRHIWuvlsqz2ELxyoNHBTwUm24g0Xg6vy0YT7yN/VQiNlU50h1Gbjqsl1EbONEVRdgQWeaDT+lU9PkvkvQBe2j+7sDAU3M7xNfwy7Py3zEe66L79Tw92mNoRYHuUCGs2pkK9MIcFDO7GpSMEJCt0DAqnvbsde4/sC5SsAFAJyI48FbpRF80jVFbe3UAAq8E+9czHmsXe3Jadj2ZfThLIAzUn0x4apw49Xk3CUzIxVg4TdsT1/H2U8XHzdA/vy2pQq0UBg42WNpVpRz7bodnDou2zj+ik0m4OjjNyOZi6/WKyZ2YbyrLHGxd4Oz0opXCk/MUPPNBJRmG9fdpPv2RDOCMJQMVz/KsAUjVeSb9/T/FU4IB4nn+YGVQtS3iLkUfVtKBVpKDUBoqGAdNafGaIxuZERZjTrb2CFvNA9VhMmWGjgvlASjaJuDSqNdERM+99FgxbOPmaaj3+Y4tyimnNDWaQkuA0RQ60udgxiOIQ1g8j98o6J0eaQ7FXtZw7c+X65aTrHtWHaIoMyQK0paB1Xxj6wifssXTsqytYanoX8 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)(396003)(39860400002)(346002)(366004)(376002)(136003)(451199021)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?kCVy00+Meq1it1j8//9zhbHUe8p9?= =?utf-8?q?jd5BnBK5PD3/LUwJGYcABwHzw+kOuxQHeUEErmC3GRYed8UUw/yN99/0WKFBTPolu?= =?utf-8?q?O8W0bNmHKMm+78IO5EYi2tddaA6uSZraW0BudMqIDuMdVwRpy4qfMMRabJdNrFBBc?= =?utf-8?q?KzuIlg32Ngh24FPKSZObVXmmkIlrpO9ruuCImiaCFfK4Sz8LdABD0l00NLis11kyL?= =?utf-8?q?5JYIj/izNWNqSyvdbmsmw2H3bbjl2awoZKrdykpZs4Gw2HkqRepsSAuA31akhSaq4?= =?utf-8?q?5z5wRjqr4KiQ+f+4Atk3DUmzdkoXhVHERtrl6bpt0BmzBi/T2Cp9QWm0fB6I4NtlG?= =?utf-8?q?bE8HVuxwFKJ4vxbKDZc9EfBc0tjlMve3ZAlEAVUsTc7lIu0uw5zMbVsZbn7wsaSaX?= =?utf-8?q?312K03XRqZNzbRVaPQH9WMg+HVencpP8o4XdSug/jXwFQMEx8HPjLURHr9Ixv9upu?= =?utf-8?q?BCIthyGNR+hatqF4TecXh58V3PdJ1NXB5GVEUP//N9E2OTXmRj8bG0LpNEy0qK9Z5?= =?utf-8?q?VIaBMy36jVfh+cEBw8+auTTNRb4ZodpjdBA2iH23oa7v792hoNRqTiw2UQs+r1cMw?= =?utf-8?q?B5m2UNWVCy/SayFxE5JwCUBkCO4qsL1V/KW9FHkH2nLVo2G63iVViR90solqKn6oK?= =?utf-8?q?4d1+dNQ7TQ+t0sMguY2fTMk2p11cF0qwaq24WYNQk4XguX/dYwN7znU8xPPQ8d8vp?= =?utf-8?q?CxnXIrQg3uzpg6em3QkRXPSRPc2PGA9mpIo/a4Vzifb5sizSuwE43Y4D+jWJNkhLG?= =?utf-8?q?JeVq99bFSbMB8jINXU5NcDbspmX7Dd8hLwULFRXP+GSYLqYjRk7CmYqdwzvxu6jsL?= =?utf-8?q?ymPLSWczE2PfxxkEYSDymHoat/iIZvI1nKP1PatCBBgoBkv6MGGPR5xlIRssCR7XJ?= =?utf-8?q?lTW7xCHrejcbNgC690A96mr++mgW9OHzQhP/3WE6MBxPU2WMAEQUCa8n3u+0Gr8HY?= =?utf-8?q?NIsAisaGJ/v86UBPyn0FGfvZAYrHvQBstuzZ5tYyZH1CrGGkjsZwEDk5fUmXRGtgB?= =?utf-8?q?fuKchl8sKUWdwboQ4QXkIPQ71grN7gtfbrxZmSiYKY608qG0ldPSCsLada3awlGou?= =?utf-8?q?TUOdcgmNh06/Jsdut2HQZa0A0NHy081nLJ5+E/LO1A+G9M9crNaDKXvXtCVHEtcVM?= =?utf-8?q?LQMdhxuxtUHmoRnj6le51qIcXzb+G8drWvqNB3DiB8SsWgz5HfkE0Lyn4Jn+MCiwf?= =?utf-8?q?we0duiYBhg1brlXeSf3yHlY9GYEFEfNOswDgFfgfqt48JAYPNNl575UEtDNMLdt+t?= =?utf-8?q?dElGcK8Qvy5bzj+dzpNwq9JyVTbT1rN4V9c6ieQBrk8kD8oR0iDuGbWCjf9RRjyrU?= =?utf-8?q?tvjPofP5IAH7LogDWrUKk93DwRFRbYuUHMVsLzD1aWDCEppMYqRc0oqYVVN8/y4qT?= =?utf-8?q?q7388Jh8HXP+6qxhLRuudstan/grxvr2HfpIykW+CooLjF34mxRet3SKvoTvkUVLz?= =?utf-8?q?SAdg4UGYQYVqX0s5BOGIL1isElMldbyGYNoB7NdFuPATjx2KC/IchlZ0igw1KzA0Q?= =?utf-8?q?HUYnGiVIyao9?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 77260e1e-3cea-48bb-c51f-08db8d8d28d3 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:02:41.9288 (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: iA9diAx8kMtmcQ4RVlwGZy4aLJ48rKAME1kPN2SBTEr8MC8Me2QwinKFdTF6tNNZpI/03iIK+4s6yyl0veVieQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5463 Precedence: bulk List-ID: <linux-mmc.vger.kernel.org> X-Mailing-List: linux-mmc@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index 61acd69fac0e..33a4d1c6ef04 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -727,15 +727,13 @@ static int uniphier_sd_probe(struct platform_device *pdev) return ret; } -static int uniphier_sd_remove(struct platform_device *pdev) +static void uniphier_sd_remove(struct platform_device *pdev) { struct tmio_mmc_host *host = platform_get_drvdata(pdev); tmio_mmc_host_remove(host); uniphier_sd_clk_disable(host); tmio_mmc_host_free(host); - - return 0; } static const struct of_device_id uniphier_sd_match[] = { @@ -757,7 +755,7 @@ MODULE_DEVICE_TABLE(of, uniphier_sd_match); static struct platform_driver uniphier_sd_driver = { .probe = uniphier_sd_probe, - .remove = uniphier_sd_remove, + .remove_new = uniphier_sd_remove, .driver = { .name = "uniphier-sd", .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/uniphier-sd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)