Message ID | 20230713080807.69999-33-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1677498vqm; Thu, 13 Jul 2023 01:37:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlGkjHsAo3TAerfuwgWGTB14iFuMGb9NXTUssvXvMhNrsgARvjNIicJ2isANsrRSR1wNY/Lc X-Received: by 2002:a05:6402:344:b0:514:96f9:4f20 with SMTP id r4-20020a056402034400b0051496f94f20mr1041274edw.41.1689237461672; Thu, 13 Jul 2023 01:37:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237461; cv=pass; d=google.com; s=arc-20160816; b=q0WWa8N8oNX+t/XXJ4qPTIr8RTRTYZEGA1GrYB1XROCftG4PF61FtcTKu/tH3tAw1P aoB6IpOMfLZFaVymAP/oz3UcBblepzIU4PdtevBuoqtDan9f5mmPRPUnUlEhb6VQH7yO kIPyg8bLyFZwg+n3C35FhG3uiSd/9pgUqMkELO4lfRxI2bFgmQ3w5LtMpJdzXroVyXH7 VjhpG2s1ok0R+kGKmuT44vbGzO7T4ar7tqld/vykn9KkOHAo3k37P3W5WWscRmHZbjxn 3ULWFJ4zp5b9A7YRN2f4LjkoPpWFAPvvKFbPL6dOvWg5RinKc4+YpaJy5Zu1wVt+TLWt kMYQ== 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=ZqLHw9NdBMcVTHEOA1IaAb63aa7Km95uMTjhpgdnf2w=; fh=m57JEiI2nA4Ac6xsvVbwnYCRCX9O68E28ZTLeMZC4F8=; b=oI8UDrrQn6x+fOGoPnAEbcXzwvf2gg+F8zEyL838iqEiOM7DDDQ+4dXlaHHGBZRTCJ MYzMsCm134DfISnXZvlQ3dNgwoIL/co4pm9cooGIiECKCTf1ubqfAsIHFWnv/h+gbQKL a7wJ2wo2qBrSSjIPq6SAFNpE7pTolJMjjB200lIQ4SKIV9JMZF63m9eiIH5MOVyRHriP 3UNGK9VNL2iusJWPPSgOfjep8F1szJJYZyXQaa+/cPEtGJlC52sip971lTkHodK9uC4Q Dcw9Q5DYCxc5/WwtAiOkUoe/+IBaa/Adu+k7f+YvlzU/LQ1zSOrZ17krhJQ+d5UooEUK 6oMg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="VxvKT2/5"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc13-20020a056402204d00b0051e249f6229si7485516edb.75.2023.07.13.01.37.18; Thu, 13 Jul 2023 01:37:41 -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="VxvKT2/5"; 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 S234384AbjGMIMy (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Thu, 13 Jul 2023 04:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234024AbjGMIL3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:11:29 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB0DC30C2; Thu, 13 Jul 2023 01:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I1y8neyrvkY65NEuUIK5m49Eary57PkagbwpYeJmAxtl7S5TSoI007cggurLFqMx9tO2s0i+i/J6SQD+qExW34Pl4/cVFHXv8NSSh8A7F/fNYAYVbWyUoWQATcOTHhjXNMxQrrbB8k3ThLFyJA5m65QLx1+2sHXX3WfMCQH1SHzNpKmc58YTmqst+rAQ8j4CRoxMCd7/+Sx1YTMuy1ccjH8+YQEAfwWVo583aDGqe88weOoCke/bt+x+n1SQp2r8UNcqV44EJjAEUXsDn75SqEhDRRVT2TZs3st3FjreD4OpulaICN05+bTKVm/87aYTrHa5jM/e5PcvwaFUfiAFMg== 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=ZqLHw9NdBMcVTHEOA1IaAb63aa7Km95uMTjhpgdnf2w=; b=EVXNV8ecrIrej4j/5Fx4IPtLXZlAAConec3HU5soAM1+88RqTMwTdM1eVzIPFiMbUOLAlDquDoyhJ+BDvA+FfUM5Y5PpBMISMD5DdsEiRziWUPhrIK63wwrqasnN/znqIE3jo9T/+NdTXIZMnWs9BhwDjI/u+rtR+DuRxmf4c2RvaaAV8FpUOw8a+hEAK/01g86w3m5BigCxvSmts+Z6HOmXeuSoVKpSY4n160NMcUIG6qcADjU/dKjg49/5d1lf4ROfCL6dXBLH2hd4uY0+AQZ1MbAafHoFDziRgdhx7SMYZ0r+wBXpt+WF1gdfoD7nRqjAlmdu2iAYRKLPqljf7g== 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=ZqLHw9NdBMcVTHEOA1IaAb63aa7Km95uMTjhpgdnf2w=; b=VxvKT2/5PJdjIsLYyj7IdiiHSWsgkT+8HMoOJTiJVbkOyJGTCXEiJvDpf2l+koEs/OFeIWNzo7Dfjfaa/o/SIUqEVoPrpUKlk30oBurgFGCq2kvgBQ8PYM7MG9HdoCKAqNZRxEFDSu2eCJQdMhKMRVJvt4bUex3kwTWe+L5B1k4kuIVrZhNpJIruN36ANajd2hxAk0LOhHiarWVE1O1y1L6WnLgAUihhEAC2Ot3x8lbO6GqssxnhIWJzX7sO/QMEuK3tqU0xZQ0TQmhosQP7cTKfYsWDvYt3so4BUSKOauzGfs0QA6wE/oaig/V4BmJk5TRgYBN/8HKaDKP0xJfDhQ== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:17 +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:17 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Vignesh Raghavendra <vigneshr@ti.com>, 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-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 33/58] mmc: sdhci-omap: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:42 +0800 Message-Id: <20230713080807.69999-33-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: e953bd6a-a935-4e30-d894-08db83787407 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: orirhwI29w7CNbDYiNKv4hx35GIRk17RYrM5KkvGP+WFTAiOxh6EGWWb+tG4GUIbLoY7mD/R3gJmyRnME8kGEkVjtqC150P5u2piQH9a4ymOAOaENkX9VhJwV8dAHiAZLJM+ozMD5g15r7vZx87wgbmGmCNgGvTjNjXGdmKhoAJPy1CmBurGFQqZzAh151AnoBevvLF1Rhjoa8jBjT1md04Fntw92l4jYW+krztXcAlX6+tiqFpZdvnCEjXFzL0OlyNB9q3W48ChA/3z+rXT+a/Os8AnlctnC8QjIh9/cibHPTlTn524SM8bqwhYMrY2gHaxhRAaEZC8VNXxUFUm/fnjtVzufTteucBNo9eMNBPxQXVOYJsmJ1764XIQG9fPe+maUS/osgmSe462y9wpPztvrjblO0NFj5jlOoFAxu+mTQsA8HDTHNwRFGNsGwk8JL+ro1xu66k6SSbxLVXAYagUzatNePL0mXMHP1tapVndTOgo7oVTpZSrtg5Oq9hQecjoloN1En05jIWtBq2dJJ3aWspI7bKsysurx6PXMgASllA6n5Qk3SXRA11XdydB9auYg3iY2Fucc7ZBuecxFDyYCUcvz1RgY02jHDg8VcTFNpn3yuJIWcxWqVmwCW5A 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(66574015)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6wLQRrpYvH+sYnGDucoxt1ePYeR7?= =?utf-8?q?+sCcsxDjumHZasWNu2LoG2l8jRmrBIMexTUjvDHs1T3uqbGroGITiiwMjhaPIKZHJ?= =?utf-8?q?Fq096I3kufAOkWQvawBsGyU+basTNxvgPWUOEqOhWfOMmL9NsbY3RhMliJ2pwnXMx?= =?utf-8?q?vMuz27sQW0mcf3yYU1v4syQ/GtvkaXXnRu10VGZV8aOdZkGQUzaT1xwExAAAFVYpg?= =?utf-8?q?23100terOWR0pCcO4z2ay2ejO9qAEoUDoU9NmziMsdlBamo1KOmoR/JhBUyFMo4iS?= =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f-8?q?fLjVsZt632G8FM+MVq230fqilNwRzb9RCq6u1S0KwLUre1jws5xyaEdT+qmMV84fA?= =?utf-8?q?t1JPefYuF2crQXahXz/LfMhq0F9NQjNQGDLsSwC6QdivyKvWEq586vBa8AkGJlB5U?= =?utf-8?q?qlvjAlY54oqSQvsJtLMST78k6ElRMTAsz5SrAyUNnl22P5XHCVRDoD896vDvxal/w?= =?utf-8?q?7s22jQUvyzitCxg+t7bmaanI5LAmbAgAxMrc/xCMgZbeUflH+1Q0c0Rvk6Qbzb6Wr?= =?utf-8?q?7Zf9XypYA5rjb236lSOmyJTjxn6ZA791cjnTfjKYwb5e017A1rAU/UhlfQsHPUSCR?= =?utf-8?q?E+XhND4JNZVTmmi5rMfpWi3Ypg0bdBHZ4vSPtaADueqs3ZZAT2lhvA9HPvefB8eFU?= =?utf-8?q?JQ91sD2TcnuB?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e953bd6a-a935-4e30-d894-08db83787407 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:17.0410 (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: EgYoXJiUfqbFHwRqCB0XpiVpYRXFTIrkLD8EE5E2ZHzfiVLSOJCiNOKwES103vRqtqulJyPUT/mPkHP58TbaLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771293860472039966 X-GMAIL-MSGID: 1771293860472039966 |
Series |
[01/58] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 13, 2023, 8:07 a.m. UTC
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/sdhci-omap.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 8ed9256b83da..6aa77eb4a3fb 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -1394,7 +1394,7 @@ static int sdhci_omap_probe(struct platform_device *pdev) return ret; } -static int sdhci_omap_remove(struct platform_device *pdev) +static void sdhci_omap_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct sdhci_host *host = platform_get_drvdata(pdev); @@ -1408,8 +1408,6 @@ static int sdhci_omap_remove(struct platform_device *pdev) /* Ensure device gets disabled despite userspace sysfs config */ pm_runtime_force_suspend(dev); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM @@ -1478,7 +1476,7 @@ static const struct dev_pm_ops sdhci_omap_dev_pm_ops = { static struct platform_driver sdhci_omap_driver = { .probe = sdhci_omap_probe, - .remove = sdhci_omap_remove, + .remove_new = sdhci_omap_remove, .driver = { .name = "sdhci-omap", .probe_type = PROBE_PREFER_ASYNCHRONOUS,