[v3,38/62] mmc: sdhci-esdhc-imx: Convert to platform remove callback returning void
Message ID | 20230727070051.17778-38-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 t5csp911717vqo; Thu, 27 Jul 2023 00:15:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlFemmVp9HTdfAT3wbbeBB0KJW3iWgqM+rdPYzLviPSsrDhG++qG9uAR15pFsOOcFBc7uDb1 X-Received: by 2002:a05:6808:1920:b0:39a:bd0e:449 with SMTP id bf32-20020a056808192000b0039abd0e0449mr2937133oib.26.1690442127060; Thu, 27 Jul 2023 00:15:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690442127; cv=pass; d=google.com; s=arc-20160816; b=SGn8zIkAp4BOApLItbpOkygLaujz/Zyp1F6V9e+xfSM9UTtvZDRspfjfT2bsYQz8Uo qYBah5ryx18v1C+gMjNxkFZjmd1Or9c93sBj7BJxrJI5eK19/Ww74e15qAFy0ZQ9IR7o fp5bV27aq9hZNLzqzN3it9JQZ7SAh8WGfrQ+Ano8Lfygj9EGTgwqy+pbOa2pARMRlJOC luTaIfXZ2lwxC+emLz6ruJNTf6oMlwBOx4KY/yoQbLar8Bnybgyve+3J1cbwtTulxY5u KToXK0oY1WN7Alexvj6mY231AfiCJxEqZF9GoQQ0pY5LYW6HECCEDrLRuewgl8EH+oj6 sZlA== 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=OPSNTeLXONTEaPi57VHL+ynklrh9VhUEOFx1sXYVmls=; fh=jUa5ltqUT7Iy0+ACrj0uM9WLh8iVR6Av8BrXSxp8zzQ=; b=tC0nZVSouN3GJgF/oEiYfE+0cKMv7k4iDWVSSgfjT17sNJHT1/LndxMrqmC5FNisNx viDTeSKhAJGhb8W2cKvlTj27hP8nYa0qoRI2tcu3rERWyVrElpH7CGn5WFFwpJIE55nn xBFaYdLuLVea8sFK78xVUy2z1HKPhHhTEO3yPWqYFytXr1o9kdiB5RthsngXZ+6Kho8u LAs7Edhqis9MmdnzNy2ti8OaOpQuq3ucUStslI1rppPb6AvXqMYf51+hpqwk8jsfWoR1 nYGrJjuxmMtwdcYor5ywUPCFL4HZjvpcRYBW1kWxHjX9xN0bCvMzhdeWo7qAZsU0wNj5 PWhw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LdEFq3I2; 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 o24-20020a17090ac71800b00256d7cc5b67si969799pjt.133.2023.07.27.00.15.09; Thu, 27 Jul 2023 00:15:27 -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=LdEFq3I2; 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 S233004AbjG0HGt (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:06:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230060AbjG0HF4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:05:56 -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 56F38449F; Thu, 27 Jul 2023 00:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kk4yMts3YIBZc0JbunUycCnqV/qq3KFhyc+MPdEw6y8r4FzPuuBOcEU+6XpV6Iv5LZ1lnPVpx9PTKM66AhxMKS59pLOfZuAqoNswoQjrEGEH30m6uwP4qNIzPv/FcINH4Ivv6+OhtqPO2ZdSaGEPKl9y0ZYiSocSvRLng9RLgFPpka77zrXUdDwx8ff5iEHfXvm6LfcShEVdff3xwBB7Wa8AB13Th0IUTYDs7MbHp4Gu8CA8LjJQtUVW9N9DIO+u4gc7vgG1toCMik6NHuqPuWOzrts9g1b8DrjmCqO9cj5YM5PxFNggLJur+Z53mci89ggIQ8VxQBksA9DIRs0N/A== 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=OPSNTeLXONTEaPi57VHL+ynklrh9VhUEOFx1sXYVmls=; b=gKCWw4ZWnLA0z7BDvyV/jZnwe8r8bIGRjoK5PNmKxnB9wAUnv3YH7MpFYanVLbhrYwwan5HowfUH5A7bEhnUJAXHfRicPgYEiHav9mxpUbxSs8+u8GR0QrDJj3NiOGgBcz/40UIxFMzFdr4/SFibeuyeHHV2UPrw5F+9gPpE4x0Eq18L1qCfcX12cCSZFnqH1otfZlFgXbi64sjaypn82reqQs7tWJMPKB62oPqxETF20fOJN3E3fofwyadTxeyQaov8rZKpixKDgzRrliNAKv0bpuFuC5S16uUNHrN5LoL/k1eOz1UmxCzPd5Uf4VrvamY1/NirlCg9S6r8X5ULLg== 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=OPSNTeLXONTEaPi57VHL+ynklrh9VhUEOFx1sXYVmls=; b=LdEFq3I2t+yiRRqbfKyQvW6vXgITdpxgoEvX3GPTdd9T0saTIvH49Tjp8Ba8ss19cHU+tiEvBpoagnvWj+SCpFBWH52c7hZR6mW2zDNO0ScQX+C28HDs2UzMYhQmseTEDihRZkHC7vnA6YDFm8QfeaeJvCFshGBqIFNBYAWDrVqNC2wS4qTWtHRGP+QT5vp+7TTMZLgQrNiSbvBDoinFt9ITxBjBDJTPpZg44h3aOQaqWbF/ecEG+HPNaW9NwDVyyTvFkcv5KBHJlnTpGk9dzp+SGQBbFdoZtIBDv1UccIBlYKqllqhl8tfFG1YXcw4h0d4XbWzYa7WuAcNYZU48Zg== 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:02:37 +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:37 +0000 From: Yangtao Li <frank.li@vivo.com> To: Haibo Chen <haibo.chen@nxp.com>, Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com> 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-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 38/62] mmc: sdhci-esdhc-imx: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:27 +0800 Message-Id: <20230727070051.17778-38-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: ee10a6ab-ae4e-449a-a610-08db8e6f63b2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uob9SX7imQAdPQD/G2QEkdGOg2mH+jdz7EQONmVVS1w838kjlr29i89xV4zSPq7T+jJDzkipDSSJ8x77kbJ6ySv7LV/HaQ0a9EhhQYFMUxBkYW+sQLjpcNTfzwDVfQrzbqXfpUbowU3Dozm3173pvGHnIPH3aZxxZmiNA3e4FyEIxJNTmfKxoFleSniLNgiSMuGPr2w+ihMc9Qs+4TCgxs+GkSZ5uYaeM3UC3RTuM1DEyvZH/tj1gCC7MXqUapll17WSxk6BR6jDruJfnpf8KuFr8biGfwxHWRYf8VMzwh71jPKMxrWx2CPZq928RKvVeXCFr8qwYPftd855kZXZEmfBy6wBmM3G+0tCW02W9Of5bBOtNap/7Oe+OPBYbchJ3udhlZs9a0UFKI7swFe4DQGUC908QCm7aYaVwhk09nIejjuh5bvZPsJA34HuyuOBqTr5phXnPxQrWjYcFR2JGBMFKkUiz1JOUPPG8CNqH0Z5f+ElKdSEuQwpOn/Ysl6a1vJ2UWjDULMZmY3ohOU3JIhRiijI4TzLO6DEc0G191oeqCwr1PiKNCM5kVrShvv1XKbmym5+XF6b6X42/zXjvOvstRECp/LQ1zAMJe5uVgz0xc6JuCbOoSR1ULkjSxXr 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)(66574015)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(7416002)(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?nSzLBHppU7xeudi08F9IENiCxHz9?= =?utf-8?q?9S1Hwvp/DEC/kIgYgMpO4wyiJIup4u+R215yjnn00Ei5ty5x8METP53ksSWqX9WpD?= =?utf-8?q?0cYxjO0Zop+TH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AMWkbhwtDsqu3zDNNCEJMpcaupq6dkKu?= =?utf-8?q?/6brswuGO5jRq+/3/85Snjzaz4cr9Z+7Z20Uypv/3bXk8ZfhObhFiCWa8Jw9A7DCP?= =?utf-8?q?PMc/Z5O7Xtob5PsGdhY8CiSlr6O2Z+G4jCywhM/L+E41s0J5TH7kWJTkrRietzwGF?= =?utf-8?q?nEujFcgeXRWJGH9PouPYxZf5tQfDkEX+A5zVxUVFQbd9YDD6Te8VPAZgy4Ix2r7Go?= =?utf-8?q?Yxpl9iGpPcgu2skXvXmK/A3fGSMpoHINMay02SPiXgvBPOkiqi7xi4iV42amSXL6B?= =?utf-8?q?upfddCkxXz/OuG+WTQ36ATtCGzSr4nB3KuB6SHX0I7dqnEPPW6FvXWP+hTyafPf8p?= =?utf-8?q?V5BHXxsoZt1r5K5prCCR+Yv1+1vWGGdLJwMT06pcn8Neieu2w9ovE7lxfycEUFSmw?= =?utf-8?q?d+txBuSdGjtW47irODbOYk/2dUjUq8s2slRrh0f+fO4MDd47DAnP3klg5woIf1zD/?= =?utf-8?q?2Hd2FQZH6PkMRn/sUJC85MOPS1Atf6/X0VnGfLzpj9oeBsmAfyRzT5ma4I73FsQky?= =?utf-8?q?XPk2vuiDu5dP?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee10a6ab-ae4e-449a-a610-08db8e6f63b2 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:06.9647 (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: HkKM38RbTZJ399X2+EDPjZfd4j84cM+tgkTg/E/86ZTNB5Zxe+QVEtFzr2tl5221htEPRQ+LpBEZ+TA6anmAyg== 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772557043891950392 X-GMAIL-MSGID: 1772557043891950392 |
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: Adrian Hunter <adrian.hunter@intel.com> --- drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index eebf94604a7f..e882067366da 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1802,7 +1802,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) return err; } -static int sdhci_esdhc_imx_remove(struct platform_device *pdev) +static void sdhci_esdhc_imx_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -1824,8 +1824,6 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev) cpu_latency_qos_remove_request(&imx_data->pm_qos_req); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1986,7 +1984,7 @@ static struct platform_driver sdhci_esdhc_imx_driver = { .pm = &sdhci_esdhc_pmops, }, .probe = sdhci_esdhc_imx_probe, - .remove = sdhci_esdhc_imx_remove, + .remove_new = sdhci_esdhc_imx_remove, }; module_platform_driver(sdhci_esdhc_imx_driver);