[v3,48/62] mmc: sdhci-esdhc-mcf: Convert to platform remove callback returning void
Message ID | 20230727070051.17778-48-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920877vqo; Thu, 27 Jul 2023 00:36:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlFxo+qEbaTLJ1rff98JBtWFaAm3WPnP2XHOM0OKUEtgRh8h11tj0k3AdIb+89Dnh96hkCJY X-Received: by 2002:a05:6358:921d:b0:134:f326:e819 with SMTP id d29-20020a056358921d00b00134f326e819mr2121772rwb.29.1690443390658; Thu, 27 Jul 2023 00:36:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443390; cv=pass; d=google.com; s=arc-20160816; b=hqAFEiquNz/OWlQ+p2WZ40rigapdAEAHcLNbit4UCNjGaJSmJLfOw/1v+VSci9f+Jt V6Ok3z0oBn+SuDhixYWTjDEtKcVFoV2udKiKGlbKNzsdb5/2N6KJW/m2pvr6oR4zX7yG L0fCFmmLeQa9fkDwIn1EoQjkkpNo45JNZFGeRBXdm7vRWHkkAtjr8oA0DNG4iqtVkBRA p7zDK4n5wdHJu9jfavXTWOaHRh/m7XUS7dzDoYgEKDTlGtW6Cbz84EAqJI+nrO/phVLj iKw20oHKcM2fEDc6vJ41EYHvA5knyXY0HuzhuuS7st7ixRrclr37LKThop3oaXFwRnwV 9xGQ== 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=Qi3BsQ5K6HMVxVVaKmclXYMikJ6itGQu0ZOMQX+rjdE=; fh=z+i/Quk4ABo07Efd9YkyIGotDWZtW/0CaSdwwBXCkbQ=; b=CjWun2gYUb//oX8/maJ2BAe9UHk6cF/1A3R4RhOeOjtq09LHwHg0CrfrRfLZuSrkf7 hOeDMPLRqnf1QYwK6NKgjSDZ8ym0zAqFPLSnnLYkAlgUhA+uUOMjjFxc5PGcx0iZMS8v y/21o7bELbEqEEwAtHjcrZR1IYWkSV0ciUtjFtMrTSxjONLmkX1Mh6dbilrSfat/37v0 KAZLP/Z7D3CnJ4aZgB69pkldYP02+x0AJ5qADYf+AOo3/nxgipWgzuZkHXq4nEpM8nvy hZrn283/vgpFxkTlfG3XbSQJbcS/qgJSv+6tw4eUnymP0NGn3oMJKf46ywrUheIdb6cx 97rw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=S+kUvWkg; 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 m67-20020a632646000000b00553d7157e86si901025pgm.338.2023.07.27.00.36.17; Thu, 27 Jul 2023 00:36:30 -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=S+kUvWkg; 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 S230294AbjG0HI3 (ORCPT <rfc822;dengxinlin2429@gmail.com> + 99 others); Thu, 27 Jul 2023 03:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231661AbjG0HHN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:07:13 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20725.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::725]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC37C468B; Thu, 27 Jul 2023 00:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P0VC2JSKZMuMeKx/F6NU++nG214tV5/zro1CnIm7dL2OU8/kdJq/wIs9J5vafHVTw4VU5bwH7CnNfiLXCAmcHMnYSZOX72zmYYOFoMZZg+TcyP1DD7rJSAeg8L9iXuUUtXwn9PmEMaHk+ITCT+bUZZPZ0Nrk2OORv5dcp51cLseSjM2wa0b25nn6HUJQ6kLWuuoQVk91jCW16JXZe+z0/RvZGEWjCo8jZ240pzBvF6z/T3Feng8t3JU+uwQa+9YLajB4bwS0h1BpwCKfTxlApwFqvPdFuSGoXvzgKIDJWbo+9l/bj83WlnI+lPVxkVhQcbxzPaE1vc72l2Ch+TgBNw== 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=Qi3BsQ5K6HMVxVVaKmclXYMikJ6itGQu0ZOMQX+rjdE=; b=aQIKWjyznAFrZJ1F1kavvTH4qrOpRnjskoRk42lUdiRovGiHSYIuDpAtBItewX870b0Jc4PSXQo3o/hDayEqlQluneYQ7P3yeImH1dnQOACMz3fJIN9BhbKK4XtNQeBM/5keLu7WNuPCLoP0RJwF+oZRzItpmSDbcuORKxXrCzwsBoietxBttyXzG9/YBS/8phAdlHOXz5I2G5h0EZdIIXRqxd6Yr0mbtYH8tndQCxCg0JU2UtBTejzuIzvA/0q+StLyH071lN5z93S8WWRfXbmTUYecICfdoS6QXWD53KooUtbwI0v+7SUrA55nJhlc4u64ueKkQ82TwctrkjsC9w== 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=Qi3BsQ5K6HMVxVVaKmclXYMikJ6itGQu0ZOMQX+rjdE=; b=S+kUvWkgsUcfQBimio+7thiVFGCBtNRZaJvKOZFFTxzv+Nh3sHDnOs3+EQlY3CHL9NrGjWvAVz1Y5/b6sLcmWAlCsgzId5vN+LRR8JaSwYRoPq5fLgmAdaE9WkrxK5CiTl5rW+jx/gWsIv4Pa1Ed0xZwff8J1uUP67IG0BMR+KMc6qr2ftQNv5opMHWUWgGg1K07kZRmwMewZDQ5QkpVQC4kG4je5kuvAGtxBw0/XnoFGcQcjaOM9DnFPuWDg9aZMrevBvzEwsr7btDag01H7neSkKiMYLjCzKsEZL0e4NavNIoGbVmnwf653ikLp6vZ0HcFfRzn/DGFU3ACgWvB1Q== 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 SEZPR06MB6644.apcprd06.prod.outlook.com (2603:1096:101:181::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Thu, 27 Jul 2023 07:02:43 +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:02:43 +0000 From: Yangtao Li <frank.li@vivo.com> To: Angelo Dureghello <angelo.dureghello@timesys.com>, Adrian Hunter <adrian.hunter@intel.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 v3 48/62] mmc: sdhci-esdhc-mcf: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:37 +0800 Message-Id: <20230727070051.17778-48-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_|SEZPR06MB6644:EE_ X-MS-Office365-Filtering-Correlation-Id: 89a6310f-b0f6-482f-c96a-08db8e6f6db2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zZJNecrEJYWQ+v0H+c9ZEG3vuaV60lIPxCfPe9DwVgox4nHSpDu3cQdgqWV9BFTCIQgkpHGVyxj3eNf3/7IQsIAkLdjQB5aLC8qcxhTD15bRAwDvojbEwFFkGrvfpAEoGuJI5XxfP/3H8dQw3bp42iBuGKBLKbwL+GjCkqUiqnkVZsi9rdqPy4NPJih6VVIWyIuI6/WHtHzcrFFzBSFB1qqfxgau0dyxfnPrfzkDhAx/BecEMXRStyQxTcW+pTj5+wKC/385xsgzXdZklvMuEPNcujxvSqVmkqbxgVu41Qakh1XuWPiDB9npmiIRY9Z0GCJa9ZiUk2It0BE3G5TkvDgm4GKSypxRV5XgimIB9OsCGqR/b+wXU+qKW1uDZ11EtqwIHPYgtrCtA0rYhOUrWWOq9epIGzb6Acw2saG4gUHqEJRvmOFNrbr/5TvdO1TnK9HIN+au8ZMrVzrldX0oZzh2wWzgrI0V2W8Omq5FmwLxAEZpSLe+xrkAEoR8ObPvfTjcDLRKS0SsrLSmgvsOM+rUs1zbYXG1lPeKxEc0HPNo9+ruyGqaQAsf8sAXR/3xJEQ4u0A3T6pJxhO9eVzjnspVtBnz1flq18y0JxamUxEq2Pqr40WZzSj42je8SSBs 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)(396003)(376002)(136003)(346002)(366004)(451199021)(6506007)(1076003)(26005)(186003)(54906003)(478600001)(6666004)(110136005)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66946007)(8676002)(2906002)(5660300002)(8936002)(38350700002)(66476007)(4326008)(86362001)(66556008)(316002)(38100700002)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?qgKeD3fWpswqh0ivv895aXysTgUM?= =?utf-8?q?nY78tuLDDlquwcd7uTRIkfA641xiz0DQxj37o5cc5NYM87wVfwx1bDlVllNQfyslH?= =?utf-8?q?hFt3P4h4KnTwQNdBJ/bVXjM/k0ZBfshDUxArm9ilj+UYUV1tyRncIEOANuOPV2fhm?= =?utf-8?q?q2LPfCCqjGEnb7mMsvoklVtTU3d6gfWY1aUvwpKmqR60sKy1rS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7kH5TolPs?= =?utf-8?q?g4P1rbuqiGmmGacGC3wghcn3rzE2NJNAKtsjU2DTKDLKXLG4nyTHYen4vzs8TrJqm?= =?utf-8?q?fAJqYkXbBMCCNTYKjBtwkyXS8mmJZO8s8iVjwxx9M/4a6UmGuJ4uanEHcvRh2X+uZ?= =?utf-8?q?akxEVwVNo0Mq1JZrEDIRol+yOCCtVTZc32nlwzUc+N1NzpQh3ZgQnx7af1d5psi77?= =?utf-8?q?YBrD8e0c8KaV7/j9GOu/s4a38FJR/+RSOEktxVl4a/LsrpXU/8GZb+TBusHZ2gpRn?= =?utf-8?q?nkDfnUpXGhkya8k/WCbMrSRUCBhu90B/a9Uja3AarBiaTawKCqyOIcCRkFZLHU/nc?= =?utf-8?q?1iw8EYtPALJt6cgD26zfY10dpSH7N0t6TcoDKUP9oDdngdq9zXtoiyn3ZbLyCuES4?= =?utf-8?q?736ohnGrvWLNUf3Dd9R8EHbZTsn4b/qtFB2IJ4h5YSH2/nO1swk68F20K+DRvK/LY?= =?utf-8?q?YVGW3vGlpR0C?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89a6310f-b0f6-482f-c96a-08db8e6f6db2 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:02:23.7631 (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: l6qZtsKcX/P9EELv9oY++AMTPNF7ymWakIX0YNSh0fnZiqJA+zeazMdrkmuCgGqTLeMa11PszLRpzJgisnGC3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6644 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_BLOCKED, 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: 1772558368949063955 X-GMAIL-MSGID: 1772558368949063955 |
Series |
[v3,01/62] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 27, 2023, 7 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> Acked-by: Angelo Dureghello <angelo.dureghello@timesys.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> --- drivers/mmc/host/sdhci-esdhc-mcf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-mcf.c b/drivers/mmc/host/sdhci-esdhc-mcf.c index 05926bf5ecf9..a07f8333cd6b 100644 --- a/drivers/mmc/host/sdhci-esdhc-mcf.c +++ b/drivers/mmc/host/sdhci-esdhc-mcf.c @@ -489,7 +489,7 @@ static int sdhci_esdhc_mcf_probe(struct platform_device *pdev) return err; } -static int sdhci_esdhc_mcf_remove(struct platform_device *pdev) +static void sdhci_esdhc_mcf_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -502,8 +502,6 @@ static int sdhci_esdhc_mcf_remove(struct platform_device *pdev) clk_disable_unprepare(mcf_data->clk_per); sdhci_pltfm_free(pdev); - - return 0; } static struct platform_driver sdhci_esdhc_mcf_driver = { @@ -512,7 +510,7 @@ static struct platform_driver sdhci_esdhc_mcf_driver = { .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = sdhci_esdhc_mcf_probe, - .remove = sdhci_esdhc_mcf_remove, + .remove_new = sdhci_esdhc_mcf_remove, }; module_platform_driver(sdhci_esdhc_mcf_driver);