Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2113096rwb; Thu, 27 Jul 2023 02:09:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlHquL6W12OVTq1qU3zHCP+dQY/q6+dhr8v0YH2xWGI6Hp+lXXvym14XYUVBmiYcYK8ytmE7 X-Received: by 2002:a05:6358:783:b0:132:ce36:ee31 with SMTP id n3-20020a056358078300b00132ce36ee31mr1530397rwj.6.1690448944663; Thu, 27 Jul 2023 02:09:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690448944; cv=pass; d=google.com; s=arc-20160816; b=f30p/lQ7d3s2xMX2zg8AOVidLMAytz9D5lqd8whDnldgLIt/If7tvTwRLf24VdqH0K xcjbF2Inz12dAEpvRk9rRyM+14yZCDTo5roKk6/5q1ttq/3YzMJi2s+Ew0lhh9erYT5U X43jhwf0IudlOlp6p5ewuFoJSaRa6eDE3dM5avVDWMBz89QTWvbzxLf74dDf1xC9oeXk 5Yew/LOXszCFzPf9F2bPCwtEVdB56XAuhpInnwoTfsGGqCYCuOffZ+YcKuf/OGf+5d3W eglX0y5sbPGzSDXWnL2URfr67Q4CBO6aG3OZZhfnOSdthwt7aS2Om9X+TbFMMvOJwXxp Ae6g== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; fh=bRV3B52BlPCt3YSalSFThXK0OPnKZx7pv8IR77jUsGI=; b=O4pruA3RZ2vgRZ1CddCfcIwHZ7Boy3UQU1WSIHh/6NhgHVFY8CP2/vJ1pIyGJTE3+5 XoaGgyXvc4HfeuljnPcJVIXJiHLzPqLKi0hnRtNJ/xjiq+o0tiRsaUP+9XVhtHDDsaV8 7t+rXOfTxXykIAvZU9cAcxMkuUxvbVVHUm9qERkY3q9QdqK+GX4tyuo6Z0aLWpEBNjHp CJwkCQE/YRuajmAIMb6LeoqFDSjDI/vV6bJbS57+fdRhXjdE363Y+CNTyX4DD2MhQPIA ZtardThpVFXIPA5O41ynlhPb2RxOspzrCxlDmytSFCKY9okFiCJTH0CNu618GU66PAuS qBtA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YUNtcaKL; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 207-20020a6302d8000000b00563f8e5d42bsi974414pgc.800.2023.07.27.02.08.52; Thu, 27 Jul 2023 02:09:04 -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=YUNtcaKL; 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 S232971AbjG0HCt (ORCPT + 99 others); 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=20Kleine-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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?B?dnJUL3UrM0hMV3U1M0IvaldnSk96cW5kT2lZK3J0Zm9TZEQreUVBM2RaNHpn?= =?utf-8?B?cU95eUhaalgxclAwaTAxNWdkRCtnTWtiNmc4VkY4bWNpVWQxVVYxZEtLYW9W?= =?utf-8?B?am1VdWdxNXZmUm9NaFo0N2FIV0ZUUnc0ZG8wUEZzdGdPN2pJcWpxc3ord3Jo?= =?utf-8?B?OHgydU5rK20rWEQwS0dnT3BJUmJRV1d2Z0lZNnRIUWhjTHAxcjMyQXhrMHhO?= =?utf-8?B?ZXB5WjQ1ODJzS2Yrc2FRcTJsS3R3bmRJbms5V0EzWDNhaTlnMEwweHZKbXdz?= =?utf-8?B?OEZLL21waVRsdUljWjhKK2FJM0QrQ1RMY0hYeWtpNlZjZzhDdG5PbkQ5K0dD?= =?utf-8?B?NzJHUjRFSjI1VHExYzdVZDRZUEtxSHpqUGVyS0pUcWwwU2RjRWdmTlJzNko5?= =?utf-8?B?YnBvW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ant-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 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 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: X-Mailing-List: linux-kernel@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, -- 2.39.0