From patchwork Thu Jul 27 07:00:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 126746 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp921970vqo; Thu, 27 Jul 2023 00:39:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlH9htNVYXVuyZSXl8GT1kzAZIbNdUvT4q78eJ6Y3zLEPkhJEOZn3wAghQFASzSl5/Xq9xWG X-Received: by 2002:a05:6a20:139a:b0:133:215e:746d with SMTP id hn26-20020a056a20139a00b00133215e746dmr4359835pzc.41.1690443540632; Thu, 27 Jul 2023 00:39:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443540; cv=pass; d=google.com; s=arc-20160816; b=BA4LiuQ7y6wuqaY3YnGiHiKfa0tPvngBFvMVrZtq/B4O9SR3dFOLrnm+PAew2bACgU 2NZc7Sr31OXyvEG0rLSpInpPnIZb701lciQ12a/BqkLCjKlsgQ4uK4tCJznoH/zRPE9v 6/EJVckR3AdCqkCSzAt3L1Sx5rxwpcSSJnA90fG70qBqTBoMc/fanJB2VWhtF1KVsZDJ QgQ+Zatl1uJ1REFoN5aptz3AWHGfgqx3HWLQxSzjx3sMgcHaV5wAKpg3UH4tqzhEBaD+ 9haDuSo3+7t5+19sU2PGR1zsqYVXYMIsSNlbPU1CdNT3d3vrdsgHM0oSeKdzzXiRcGso Xtng== 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=ZHeI4VADTP325Q2WM85PJChNJujdvQV/fU1uFiPIvKM=; fh=m57JEiI2nA4Ac6xsvVbwnYCRCX9O68E28ZTLeMZC4F8=; b=bt0BlGPGKqEq94VlLuGe29G/yrmVYD9j7atgsCmplz7Ho0zdE/OT1dwSj8EvZITHns 7yD2yqkxSwKnb34Y6Z38Z9mnqBxDbEZB/5za9SOYHaaRo9P/llPAORm6agxBgkgAz+oP YNeQO/mHLtTFBpZy4VXfc/vOonMK2EYGZU7ZNUVNWW0yFvOuJ6XgC8EEMeLHlXwK+4qP TFXD6BsFxcIN9PS+IzKUdNUvq6SKjwlmY/YVZk+BLvplnVkfKR9ORpykXGibdTBsVsYO Nvbl3Txo7Hh+3TKPLp68SgnrfD425EbIXY4s+HloQVAl9HfumJYafZeqStL1yJh9zwGI ZOTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="gTt7/Xli"; 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 16-20020a631950000000b005634fdd0979si863146pgz.496.2023.07.27.00.38.47; Thu, 27 Jul 2023 00:39:00 -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="gTt7/Xli"; 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 S232941AbjG0HFI (ORCPT + 99 others); Thu, 27 Jul 2023 03:05:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232938AbjG0HE0 (ORCPT ); Thu, 27 Jul 2023 03:04:26 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2990A4226; Thu, 27 Jul 2023 00:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OsDZ53fe1/Uvctacb+IdXGaC4bF0q8ox8SfJjyavJYo/aMPgg+rN0e/LZqsYn/axPlC3oJ2rILGhi6r4HOzM22cAC7+nycs9old97TQWBQW/DRj3n9PMe9LMQZwqlNqHj1/BaO04scFbiRdJIyp7ITO1y+NT/y5fhahE5pJOAuSavWbmHvaQb1SG7Mf8SCBJlaVcuHgSKQ0TFqIJdwcO0jHpxNgJElHUYULR87+QdIHOOBK2pKq3gVt2GuH8xa/XuhgLyPt0aXASNsjpRFwexcZJDzkM0aBzbxE49wvJA/C3JF09O2Akln2x40dvfvGvpQRcoYDmUOW/GANNU7sXoQ== 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=ZHeI4VADTP325Q2WM85PJChNJujdvQV/fU1uFiPIvKM=; b=du9zBbEpRGlS0KRA1mOZvDh5GNGc0dgRlKfQ3bGfycQ209oQl8BHoBB5GG/IU88ceVlJ1cXrMqyGRTfUO8SfFO1R/9kpU5tYPcywXMNLyQvQdPAzrEQR9U//uEAPgVX3nsD1gfprsKtaLsVqzqjQumA9HsLLau+QbaIsYjNWljakhD/BQwt54iVyO0dsC/BNMVNmgOkeSyY5YThduDq/jJoB8hID17Bf8ep732JX+tWAAlFwNYM3EV69EdpYWmlshfTv9IABj9m94vGxwLhsBuIKJ/GqA3RYbYJXq1elmLToVf49xNLBx7wYvIRkFVK2UDeeOZFkwlFfW28SbJ1R1g== 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=ZHeI4VADTP325Q2WM85PJChNJujdvQV/fU1uFiPIvKM=; b=gTt7/XliYlPZBfoJHccG2VVfgTatatCrtpPXKm0UL9YRpbn8cOzjiEUWzJTHrgdMH5JavqzsvmeYYVxfA+xh9jL7KrqTALJu7l4KbOeaaYaFeFZJVNAh7qqctsqX5MIx2nGZpTo8CIdNHn9R0KBTJyxR1JT8w9n7fZe4e3OlU4/GC0QKS6JQqWs6d0Xd8YlzpQw+9Fh/XDCDljmmnT/La+Fb0gzU7EEAPCaYxY5ehOfcL9PNzUvG8b8Pc89a6DzFboddrfjra+Wi36uSldt+YYze9uDG8Mni/ww3bDF/zowF73WceAwStq4F04A2ewFUZgN0wygS/bAz9xjUId/jCg== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) 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:53 +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:53 +0000 From: Yangtao Li To: Adrian Hunter , Vignesh Raghavendra , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 31/62] mmc: sdhci-omap: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:20 +0800 Message-Id: <20230727070051.17778-31-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: ac22902d-f09f-4094-b92e-08db8e6f5b85 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s8hlRJCG66UWq1xuffSu8RcapNknrYaMW8cF1ybFzF1sRDTyleL8QkjMGQebCsk7HgKAD/ke/W2uhV2obWs3PlOvIEXt1JnUnoj+YwdLEwLIfHZG8NIUoNAdvxPPIe/j59BRaA/qhzBNzdReVQxUnULV6+ftJTpQxM2QU7sdkyfQC80UxlIO3kpKvQ1MHtQOMAtWeaHJgZtToqIqhGbzYsEl8tyRSZPv3HO5+7vDQwpZP9cWcYme+Fl+vXllaghYMJA/llFuj8A3wHX6kQvYN2xvWR29PWijoex8XCdBB4krbL+2DDotKOVJIMwCqL1KBUokNLcO/GuvEjgEJ/4/4gV4VY8TZrdueNfGjKTQ3Wf/4zxB9TW5/EWTBQaROW4Vuw92UK0pMuyzcQ5BKYuqzWbTCHgxLYpS5TP30s8dyDWrs0b0lKYBKnx63O2JlauUmS1QqFQgU2W5o3i2INj+QsoB2IO3RmWKjNRi9B5IDQy4+t4wMo3d35xQz5i7Dccg61lrvl0BQoeAWv5BQ/toqHCSNnAPKCdjNiv0Fw95gWxdPFUI75DAlj03sTO7uT+Qh9Dy/N28laepzH6Bj1g0H9F9QtFAWBrsTVpI7j+lH4JeABWHnrbNCr70xeMOTwH2 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(66574015)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?YElxQCGnsRaJtgSo/22O2i9mzOBB?= =?utf-8?q?IPbYunaXvy+qimw8FIC+Xj+igJp9dO5QdK8NIWhaXK6BEPGiIu9D0aTFplc8Q262i?= =?utf-8?q?Cn4c8bxPgELh/hpO3q7bovyw0VhbDK0nCWHYvYcGoaG96WZCGmGVHJPpnfADuw4g6?= =?utf-8?q?BcZMhSI41WA52tHqc00is0Qd3wniXQOlEpxVkNkT97EJQuRL4IjXSakagobnkmli8?= =?utf-8?q?HDSPA+kGspBxNUZPcyU1Ft9MzWMZYPT2hfolnXtc7Dr4xt465A/dCerYASMSyg7Od?= =?utf-8?q?b24A46gZuxJKEWTwVwJpsQfyxeWuPITmyht6ZLTCF8l8f1cve9G1EV2H4ZZj1CaQi?= =?utf-8?q?k9a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q?DV/Pi5Kpz9Q/i9pUqi8D1gJ+oK9yQG31q41wp5TT+QoPi5rrdHU9FbZuohJpKo6+1?= =?utf-8?q?o7/36xAHsEzm+6pzkBS1eP0Ba5aDzOD+ZH3OoyQsVmCRU5sZbHrI7Xm+xnIyUjWXW?= =?utf-8?q?n1Pw9Tl9Afru0yKzmBDRLWXCaMBCZtZ4rTJwjzp4ZjTXPem6M18m2K7Eu2f5CIZK4?= =?utf-8?q?Ay3kNrU3EtnodBOLV+8MNpXGsi09EpF5XNGd8Aq/cW34BA/0f7VcwAaQXNngZKd5r?= =?utf-8?q?kixfDV+HxP0bzvgOnjwQwALSBxMIFw26smo5hg7qLaC0GtGOyQikt1VcV3IMR/f3C?= =?utf-8?q?tCBStTnnmBrj?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac22902d-f09f-4094-b92e-08db8e6f5b85 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:53.2385 (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: AmgXOYqfA4fLru8d+dPhCENLGGSGx1TzibUQQwiWeylr9ulQXap0wm0qFkjB7d7Gcx20CKcjMj1zSOBN+mCOxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772558525940139968 X-GMAIL-MSGID: 1772558525940139968 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 Acked-by: Adrian Hunter --- 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,