From patchwork Thu Jul 27 07:00:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13328958 Return-Path: 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 3D7DCC0015E for ; Thu, 27 Jul 2023 07:02:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232895AbjG0HB7 (ORCPT ); Thu, 27 Jul 2023 03:01:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232888AbjG0HBh (ORCPT ); Thu, 27 Jul 2023 03:01:37 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1531A2727; Thu, 27 Jul 2023 00:01:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QQk7J/btflcwKNSyLJsis62vKBpMBuuLgI3CZUU+yAINtqLIicEusbttmt7YyRA5Eyif/NB9VF/EvScmcmMrcqG2P3o7lS1kUbBxlM1JjH74+ryg2QtnBDMkgD6eRt3AUeN4Upwiz7BYwZ0m2kusE8NlDOM41+FXeykm6aQh/+gkFwSrycoqTP8P6aehbEJzI5GaLNVL4s8TqSHyB5d4kA//q3EJhcBhdmHD67VdVrgdPSCXE05GyIDfga3rdZ5C+TRtWWA3ZOsQTHHkZ+uhWgQW5uz8UiCQvldaBZzlov0GmOElWWjczAwosG222mHJjiB8jQ+76PFX8vcB93iz4Q== 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=mjvydvAOnf9fdqZRVZUVRLRXIIaoxUyvKCR2No+4ygk=; b=Ddarg2Hk0u7sKmqRUAh7UsEZdqoEhGY0iGaOfcSyb/1j7Gu2vJ65wlOo+yN128ShXsvZtfoNA1BYY3cecEYxta+yeO74F7g1H2WY6etiyVaw2eNU+8aILEd0aFLE1L8tRZaQJMZCXXIVzDXgLvJvvUGzu1e0wtAqdFh2tlQVw5fKDIQaYZI6vwyQ+HzKrIAD7onNuy9GYbqHapyM6wsIV25EGRbEGZ2OvjcbovxOeIWnbm+4zGUloosrClBV4vwLlrB8GRw9/bH/OwKbwOo676qv949k1e9jo3q4Y1uldfbCRB1lHTi/lfIvGITF9m+LPw1c8C74z2MhIibv4V7BoA== 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=mjvydvAOnf9fdqZRVZUVRLRXIIaoxUyvKCR2No+4ygk=; b=lEHToHZ2X6qBDugXZ6mkNEFchJVvZzN0PzxIzhXHWZxONFmI8W3LI3l0GrxwTr0+D9bco2a/cpbvnl9zZRNG47SMfbfPsE6ec9pVB6Zb3ADADAx7tLoivKNjElMlRnjSCqZKiDZV+4nJ0BGPgeJuzhN9DsrQS9fbYSer6trPevjLUh/TelvsuBIJ8UG86PsV/MHOJHunU06bZu8gFrT7on60PDm+2WqOTjDBLzuEnMe5rub65LtwxmMVgvmdReRFN4fd2TiUZERzQmXdvqwcA5TVEmU1XNlaGtK1xWXSWv1h4YbkKQgBQiE1PPMh6BLEDU4Xjm1X4iJzZ+ij+8c6qw== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07: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; Thu, 27 Jul 2023 07:01:20 +0000 From: Yangtao Li To: Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 11/62] mmc: omap_hsmmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:00 +0800 Message-Id: <20230727070051.17778-11-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230727070051.17778-1-frank.li@vivo.com> References: <20230727070051.17778-1-frank.li@vivo.com> X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d4eaba1-4d70-42f5-f7db-08db8e6f47ad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g4/6BkalZYL+Wg+qjSluOIIZYqqqP5CiizClEqR5TP1vY7gZkOaVLep1OoSe5w8Gc31B4aUnyz5W0kwQmxRT5CIboKdPA56brs7HPdSC5dmVOr6VasCrg8IRKbr8YxX2Q4EmAjfpJj9g+HJ79+Ovuj8tVKM1WwDzsSE08XEO0MBmA9HL7oH1n9ORVeWIR/9BbQM+X5mffprCn+NgZfQwzQYceh67M6vK9yJaT8GC5XOasqZLEfjUFjU/pUOKCrVsz9sJPcBBo2f296BYB5cRKYBXuTXnhqjhbuI5D7KMWYEaChCalhwR+ilOTb9PsxuySeUaZ19k573Ewlt6He2iuS63Pgb4rlCPfEQcDJ2+cv0c++HQkaGduMOL1irBM/E0cilhmzhB5cszcHbjjko0T0roXvA0EWX2tBlssAeAm2MurVrz5sJUee1jaFDRk/Xm5+xzgPTt+eAZa2jFQjtOa2WIuVPTGqvPZeIXHpDcMzt7Uub0/PCQF5JYt6Sjoabg0t9mvuiLPSYjcSDrPEjKIy1zjRuj3LxLBcxYP1nwRYJRQ45n+wAUrGEjKGi/QmscKdkXCD7uvfWa2VCsUflMx+ywXRWZHIECHeptVp1CVuZj6dkFjE3pfnJhrWAj4kJC 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)(39860400002)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(6916009)(4326008)(316002)(54906003)(66476007)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0W1VUFwCeE88WOeNapS0FIzOkC0w?= =?utf-8?q?Jek3C6ikFSNmwmsKeNflm5stDgqA4flJLhcB45npyyPxQXHhwH62OH75f224/yNj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utf-8?q?AIFLiF24weiZUIj8qYjpMogUi2pAilVIY1V6tdNCFRAPdH8Co1RS3mp4o844kkT1G?= =?utf-8?q?yKVgZKMzwoobCPvPkKS3vaF1SrTx6OS1N9S0M8CcS9n8PWuxSKlya03qVjYajeSQN?= =?utf-8?q?SSpwmIIq6SqgqqG7Tg/vwFWUh39qTlYZcNtJ07Lan5ocuQ+pGWNyjH6bmuLg6ZAoI?= =?utf-8?q?N+hOx9Z2LCC1b6PhVt3nD4mapIN85ODkK7/HzZxIMJ0z1FUVqwjwHERCb9/pTwFFg?= =?utf-8?q?4NzA2OlGdUC1ZgDPJTCwQcwazjcp0LrNSjfwAvvmM8Yfmakt255ypIboSnMGvh16K?= =?utf-8?q?OJJAyHdvonYScrSS5Y7oiHPvHVBKxbVHmbEd2I1HL4K5XtYYz2IcuNvy77Npj9cmH?= =?utf-8?q?+EvAMI4z5m1+O/XstDsr9MehrCdCj1BNw7zGsVzHMhWtXXVd0jixiCQDQDG5Lqtte?= =?utf-8?q?Y4D07CEdPp92QMN6HNV+JemNGZIT/qUZbpCkUCTx55qTzmnU59/pD5vERqTRs29Pw?= =?utf-8?q?UBgfZIx1biXpYTyVzmWV8xDlOJGHpCihPcXFnVOEAwZayjpd3AOormzvSVhuePrse?= =?utf-8?q?yzOmPDakT1mc?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d4eaba1-4d70-42f5-f7db-08db8e6f47ad X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:01:19.9596 (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: HXt12BNbAVUDkkROB568b0HAmx9IN55W+CMC8i6Em6judpS9f4APWqG5lljGlNmDFuAhnSF+jOYlNdmbfuqfUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 Signed-off-by: Yangtao Li --- drivers/mmc/host/omap_hsmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 93de00a06aba..e120aeb869b8 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1979,7 +1979,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev) return ret; } -static int omap_hsmmc_remove(struct platform_device *pdev) +static void omap_hsmmc_remove(struct platform_device *pdev) { struct omap_hsmmc_host *host = platform_get_drvdata(pdev); @@ -1997,8 +1997,6 @@ static int omap_hsmmc_remove(struct platform_device *pdev) clk_disable_unprepare(host->dbclk); mmc_free_host(host->mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -2123,7 +2121,7 @@ static const struct dev_pm_ops omap_hsmmc_dev_pm_ops = { static struct platform_driver omap_hsmmc_driver = { .probe = omap_hsmmc_probe, - .remove = omap_hsmmc_remove, + .remove_new = omap_hsmmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13328959 Return-Path: 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 23A2CC0015E for ; Thu, 27 Jul 2023 07:02:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232959AbjG0HCt (ORCPT ); Thu, 27 Jul 2023 03:02:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232932AbjG0HC3 (ORCPT ); Thu, 27 Jul 2023 03:02:29 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B19E3592; Thu, 27 Jul 2023 00:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e9Ko/a1Xzq86tWXhh75VtVCOnUh268CpV92rTYVJMnRiXvL24iP+08Yz6Is01BCXoHBGHNsed0tM0v4Wei+cdczn6668WWqlyNAumDWa6tTszjuVkM/61eXaWaZz1FR8w92BtjqEQ9ermZ0j8yQL30qkTGziyYbE3ufZ1t4DUkcLn1BbAMVF7B4cYimztePBU8gPqOC/qhD3JNf8Myb+kbynfWDvZHXh4WunUGhvNpffHztUn9oS6nZx2iyIqJEa3VRc70IAHHqvTWMTIl2AwmPtw0DWLLrlZ7oKmDx7JtOpJ87+9xyWUNfWz3gG7RWAFC7L/9NLcSlc7mAbY2HJTw== 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=Xnt/151wqkvC6/Jh++5/hxtruakhTRH9p0xtK7CMn9LjD+OWi937ql35eD7MYqQtaereSx+IHyWlLBXJOIYy91wfwnJjclwapgYosHy56Mu5EJc9PAi4zXWgU7GshUMWl4QK+78z/L3ujH8Pc+KraCByzIDru5S7u1JKydMizQS/5GKMvM8n+T0NCEpTlNsCyy54dyH6bUSSR/S303irzf2sc3w/IJy50DZsW+0IZGzPOgWIUKGePljq5u6FzqFo0E5SnMDriPWsaNJy/PG5DbLRePt2s40C/NPLhTR8g70OCvCbITyw1wkMMPe3LDnUU1NKdZW6uN5lXMbtpHKPwA== 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=YUNtcaKLwv8/ZZuC6U/6lD7lFTqlpXVZsTrnxJlTyzfggXETkO82fJzLAUVV7YJN7yatuhTq3Gp9B015TYIpIbxPU+Vj14f/evPp6FGcjQv9PDIbQh6RQbvm6frfo3AROUFI0JEPKxrsnQI+hMxCi56ZbxPIwbZmr/jMa/GHrTbAA9nVlMV9ZkMrduwb+9NGpJtk6RI/Xwv+dx+Xwi3Q49VA1Jp+zUuE3AnOxIrI7wy3gXzb7pA2/zHWOE/WTnOVUy0oHG3xzwZSsyLg6ty5+KQKCTbYQjd3vlMgZGvELiFvOJIkzXspoTD/mrCwLdpMP5eShnyFT77zoKIWnd+oAw== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:24 +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; Thu, 27 Jul 2023 07:01:23 +0000 From: Yangtao Li To: Aaro Koskinen , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 13/62] mmc: omap: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:02 +0800 Message-Id: <20230727070051.17778-13-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230727070051.17778-1-frank.li@vivo.com> References: <20230727070051.17778-1-frank.li@vivo.com> X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: ccd3b512-4acf-469f-0e1c-08db8e6f4a09 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fzd4MR0jchwhJGrpDR7ai7lg5yVhvNXKpX1X1oTRqYUMJuQle8gZlZzAo9ihkKbgxaGf70QUbqtWDwR2IacvN+CzynYfGaNrTpD/UDoTUyfn0ARdxYjxlpfKx4cnafYxpJBzoa2saHJd/XXSuUbKx+MSKgPMWlrFIqjtnx3/QTazH6l5Rxz7Ap8wRSewk0zxV79Kkw+p9EjBnSjT8fFeU3SZ46zBwpIkrBMxtS8vm+6pfCCw/dcUEYNgccZP+OUSfNKqzaH5NEABi2g/CfoZ84xjOldVuOb+XKgPwl4e/5EDs4lvLpsXwtb+X2M/NXhdN/cBXofoFenA4Tu4HWEQzogR3ZZwsozfwFasxtHzuOzbdYd65F5XXNLDx+iuMUsW4r7Yz8a7WKnZN+80uroGAhtg/OgaX3l+FSq6hd/d5/Xa60BUnoqvHuvzK7FU3CdLIrWvfLG5nXeXSZHeA7AD6+AHnyak0e6rgMuJnI84T8oH6eLdjdNgbxtyTloYdPvo3WzlU6b5SpMaq54zqLwVY3CEcYk5SnR8GqKsiZvUpmOJ1iQjBqx69D1ri6XyANEmvszpTASLXRhDElsj1YzZu/KDr5BqaJgwI7KtykA3gWL7HVS7nJNhoKptvtbE9fnD 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)(39860400002)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?vrT/u+3HLWu53B/jWgJOzqndOiY+?= =?utf-8?q?rtfoSdD+yEA3dZ4zgqOyyHZjX1rP0i015gdD+gMkb6g8VF8mciUd1UV1dKKaoVjmU?= =?utf-8?q?ugq5vfRoMhZ47aHWFTRw4do0PFstgO7jIqjqsz+wrh8x2uNk+m+XD0KGgOpIRbQWW?= =?utf-8?q?vgIY6tHQhcLp1r32Axk0xNepyZ4582sKf+saQq2lK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6YBFkAGnkTqvVNG?= =?utf-8?q?BtBlzsBtDzilYoNE3A6qACW0ENdv04/G1Ynt9Za35c9wt9Lz8mAddzenctHk9RSV9?= =?utf-8?q?faUFRbPbQ8rEB1wLJ7/Lh7ZcK8sCw3zWc2PG1oSkFgYOrWWe47Wt6or3Jxyd4mGIb?= =?utf-8?q?gjRCMx791F6sCSGL/asd6YZwwPdItMrtQqQZKJ8tfgM0UWAG95a2BBn7mLdRoEsNB?= =?utf-8?q?EISeMrsBHlDttz2gin/YpsCjVKjYSuOARne1T9dcpd/otkWNFbq9IRBY1cY1yYD+R?= =?utf-8?q?2u3gdGt1ubBGPf+nXPau+yIprgRkUscZPJNvCIfXY6HuMQgViFDFJk79jgWrW8ivE?= =?utf-8?q?E56r/1XotdB42EquppoSkpJX7LXk1CsY8oq8jkItmemMeQqso7cPNe3cir5anVS1L?= =?utf-8?q?HjpNx2zf+FxwgnyQfZpUl7Av6ssha4IUvUtkamoRYugd6LPFa/LkzHFCjrwLfSfIL?= =?utf-8?q?Kn7wPs378Nnq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ccd3b512-4acf-469f-0e1c-08db8e6f4a09 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:01:23.9121 (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: qnifgsNW4mhDCHADTp3ThZiQqtwkSGzv5MOq6BUPYTA1vgX/iMt/TMEB8niwQdQDS3Rs3VcyIfdNC60DtgGPZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 Signed-off-by: Yangtao Li --- drivers/mmc/host/omap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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,