Message ID | 20230726040041.26267-13-frank.li@vivo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-omap-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 55A43C00528 for <linux-omap@archiver.kernel.org>; Wed, 26 Jul 2023 04:01:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231335AbjGZEBe (ORCPT <rfc822;linux-omap@archiver.kernel.org>); Wed, 26 Jul 2023 00:01:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231340AbjGZEBa (ORCPT <rfc822;linux-omap@vger.kernel.org>); Wed, 26 Jul 2023 00:01:30 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04D33269A; Tue, 25 Jul 2023 21:01:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c9X6JJstVeMIx1NYbrC4WUzNYBgnH6G2ZuUz7oVfQO8VVUhW8GFUMsZlqz3EdopbP5IpvYgf68hABT+FNEcTOBsakh6tjxSQ878SQtChvqg9COlCQAD8CPjrE5Po22tiH1FwmPNYbEpcoIwsDrwuMTun8BhJsPn6eDPEAlDS2BoTrBGKvYW9aSn7/brBcvimQHh1eOydqTSXh+k2Aoz1rwU6/45JabFCqFydDCZjNWPUgaKM18NvBI3b6rKbaA8YJ8X7kXas+oyEjWMFYSayZdokKbm0ia+2VXOlZ/A3LK+aJkHZOjiiVJFsuPfGvtB1O3GqVipX9XPrYXJJYJkbGw== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; b=iadOem73v7RXXT/6hi27s3h8fcc4guU74W62GRLpHjkuP17OCDWV1Sl9DxiugzTn4FDV+XjId8t2fkxfLqPn9n1IM71cCV7jaqAUMTzVS6PBH9hBGg39OcFNBjw7Y9NQziy51OWIU1uv3R3ZieLs4ofpPfFqcvmIteGHV4NAwPk24oXGA6Aja0jnqF3/WmaMMHKTIa+XiYZYSrpnJAxKAnLgyaoqudRB34l1wSCEetzamzm2jd+pwzRFgsWosgRP//f8Hb4J8a33cGqF9dn7xerf/f06cIFGbfzTgT40oiUyLVDkHsqOSLK3itakMZKKc5QNf2yvcpkXU2YqsJR9yA== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; b=EgGE+KzC+majlwTJi4W0ty+AboVwpEOkkZbYHUc+jjbXQ0cOJzIv03jjWzLeOc0tCxdVXWBzvFtbqA7Xcs61u5mr75nF/WOCDRTOgh1feZ6FTM71E3izPiHpn2NRT6okr+8XidqT07ZKf6FgM4r4nMI2F/8mPeTw3YNAf/sb+gc2t+q+dF7rAVvsxORCdGxf+yrdAjtnIiIJiSAQhv3P648p6jDjfa2QcFxdrmCKys/ojrZsKsx2ekJS6+wWUA/eK/JrVkRuEFJs2XTMXKYp55FUwIShAv4YXAg5ERX89oEAMnGJsQKQ7/GmWhiT/l5OrFijKcLCK0NhmB+7ZAzAgA== 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:20 +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:20 +0000 From: Yangtao Li <frank.li@vivo.com> To: Aaro Koskinen <aaro.koskinen@iki.fi>, Ulf Hansson <ulf.hansson@linaro.org> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 13/61] mmc: omap: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:53 +0800 Message-Id: <20230726040041.26267-13-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: 617605d1-6116-43cc-f12b-08db8d8cf808 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jW+iTGM+43YsHqyvCaCon6EC6NKdNIjHh+0GRQRWyLRMuYL9FZ1jJFAY5veImEP3Fzn9ELdytPrh+ucRAbyETUied3OblbXgFL04DURd+c4eYPF2s1/fxVz95ZgQku6y14B5Qr5Za+3WZ3yvV9Qp+aSB8pR4xqo2o+FP7htrFqqcNKq0VMC1RGm8FbgNpAAROHnxi0bQJjYuUuHTQ+1PoevCBtvd/UT62PRw9wCF2ckg16g6bCw9BtpmtfPzwmHD72adEOXLXvVVQUvQrjT2+VccPqppwCgNu245f5TcSafoOTRTCgz3EcK3+Q7LJh3AVfEqPC7QXdcMtxR89m0971ptG1Q+iqHuRY+L1VTx1mUCmnCc6RRt+UbUAjMfROEgxMdiX3cpeyV5QZvE5g958bzxK2IsG/7eVypHKF5b7sU+h6iAGwEW/6WaopMDPIwxTCZJvOd7nPmGwp5tu9tGvixyUAi82gQSbjUVNID8Baw4dIXChaXQb4BS42VEp8SwBzu/mrlgbodnJ2nrIjg7Rn5xyGcCvhtohpB8bQWdgJEyln1Z6Dfq2Yr0x9wv1QFvR+vKb78fHMU76wJMWnrjiocSfGl1jzh26h9sYzo52LxjgmEMV7fGWBjxfsaffbeY 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)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: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+T3?= =?utf-8?q?WJu8s5Xwvp9F89jxJmtyNpdkSw4vz7rW8fraDGiv11tgm1mbngSVdzi0DJk1mw6jy?= =?utf-8?q?rNPIeEz+9iBJ/a1Bmeeo+4L0SB/2PaXbRMZo8irFkrKb7V5Ce5zJh9EMH+RVyDL/4?= =?utf-8?q?odAte48tuqZfNflP7Yodk7EGAP9CCHrlxYPlmjcKGTF+Dg5GKj9F56NEfbc0UjhVI?= =?utf-8?q?k1fo3JmaQ11wYOnn7Z/yu7HawU2Kk5fi0TyIzLzPbR28/GKxgrLWzMF9VN/g9Kkfw?= =?utf-8?q?VaGXBzvoIRkrOtF9r8dI525U70I1VKykzwlHlQs8YUv5PL5hw+C4s5FE2FRV+Kv5u?= =?utf-8?q?RDUfO7gZnQIV4gX10iet5uAkHlnUQyB4G9QoDNjKb0rCjG7YFt+i4H1UQn06Ym1Ep?= =?utf-8?q?JaAIPi3CjSv51+0KYiSMEuageGj6B1LK8DohpDRd/fni75iQvX3GeMj5yLd9/BkB9?= =?utf-8?q?jYKwCjAUBHA00TsIxr5JIDcGBf/+ZH+Z5SFQW3WpoRV18EqJ7YbD6R1drRAHkElKw?= =?utf-8?q?VILuPHrWUdpszityca7NVN+lj7BczyUCkG19mcATM8LAFldnWTYEGRn42g2u5oNXX?= =?utf-8?q?C5KzedvDAlnmuttH04kTVsyXSzIk0yKzLlNM7h7C6LxsQWzgBR9F4upTopaMp1ac6?= =?utf-8?q?KyQUGbJeZj+dCfNmxTcGjbCs6TFeajMnGjgF+fxI0Z2/UHtx2xxTrvHRHLViexc/O?= =?utf-8?q?d2QINPfT8Y7X?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 617605d1-6116-43cc-f12b-08db8d8cf808 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:20.1025 (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: YpqvNS8WdZ/1FbfJR8LTNXfYiY9IQaddFbjszeo/fb+B2sF+TZynsdW5VIUEiYb48ZyX6ZzXg0OGWmvOTvfI0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 Precedence: bulk List-ID: <linux-omap.vger.kernel.org> X-Mailing-List: linux-omap@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 6a259563690d..9fb8995b43a1 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1506,7 +1506,7 @@ static int mmc_omap_probe(struct platform_device *pdev) return ret; } -static int mmc_omap_remove(struct platform_device *pdev) +static void mmc_omap_remove(struct platform_device *pdev) { struct mmc_omap_host *host = platform_get_drvdata(pdev); int i; @@ -1532,8 +1532,6 @@ static int mmc_omap_remove(struct platform_device *pdev) dma_release_channel(host->dma_rx); destroy_workqueue(host->mmc_omap_wq); - - return 0; } #if IS_BUILTIN(CONFIG_OF) @@ -1546,7 +1544,7 @@ MODULE_DEVICE_TABLE(of, mmc_omap_match); static struct platform_driver mmc_omap_driver = { .probe = mmc_omap_probe, - .remove = mmc_omap_remove, + .remove_new = mmc_omap_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/omap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)