Message ID | 20230727070051.17778-15-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 t5csp940665vqo; Thu, 27 Jul 2023 01:20:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlEhplp/DFCOvCPlb3afjse1zCpjjARJCfsiBxp06AqWazUEnnNoyVthX3AmKlBDxl+XnSfb X-Received: by 2002:a05:6a00:23d3:b0:668:9bf9:fa70 with SMTP id g19-20020a056a0023d300b006689bf9fa70mr4328902pfc.34.1690446057950; Thu, 27 Jul 2023 01:20:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690446057; cv=pass; d=google.com; s=arc-20160816; b=WGjMLKvMJ2cf0DdOgbf/0MU6vaJiCn7+K7E0gMVf0bFBdFJfQcHcIr14N4a1nPoFND NmPGPxMCthzw51rSfwDTs78g1ETOaZBgL+Gpc0fMqSBzn4GmEty8I1y77KIp0wHeXmyc lf86+zXjNc4rupPwjqlyQYa8AgQa57PdQjh5r+MADXyW1kRXe1CGrou6wELXyj7wU30t itSAqXDSFUosRLnXw9+P5P7pdQIr5wa2PT68ZdL6lEVZtRZhCASNipCiBKXU0sw4PuOn ugde8K6HFMqohqPhUPd2UxwtzJtsH2cQIhhzjplAO+G4NZSN0EFIaIjL0jIHYJoVedoY WVfQ== 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=d4WNf4YdQgPLt01IdeoKmo0VQ8uGwhUq8MCThQTK3fA=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=adDQP77t8ffYMnYRs52doyG12W5d/1+pYaHddwyLiksLqJ8zfK4Ldvd0r4le7uugjn 2E3WqtTsZDRltp0cPFCbO5ND+WHSIGqvXt2RASb8ixJrYTfRp9dE0SywV3nVMgMnNsWe LvC0VI+M74RjBBDPi9qAieNsr156fHiA9xV4Hs2J7InYuj9+ia0ACdFU8WGYK+7muCVg ++lxzjGOdL1ZwEv32nRBWRKmxCjVDV3cysP+o6b0okLXrwvaOJwkY8T+qzR2/JuQBy5p NMwIOw9VZRK4V9wkDSP59xldA8RFSxQphAy7LTkkPYA1qHv5WgPoErgqAh/nvPmzwuVY hh0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=U1EUq1L2; 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 w67-20020a636246000000b00563f0338b03si941595pgb.113.2023.07.27.01.20.44; Thu, 27 Jul 2023 01:20:57 -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=U1EUq1L2; 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 S231772AbjG0HDY (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:03:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231359AbjG0HCu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:02:50 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2094.outbound.protection.outlook.com [40.107.215.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4761B3ABE; Thu, 27 Jul 2023 00:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G9AzfFUttcn+qHrEEt9WGAWWvF1tflGVJXIlP3/UMrpuTTMkVUx7UWxaRi4h7Sro0GZ9Zh1xjpDzIT7lraPqu/eiEfzK/yydlIXE9j1RYBmlIpzMfCkQDsgbhmrq3+133LBmN+tXe6AgXTBdnMAwKEtKGvunW+2kfDlyehovcPC15LE3GojQ37jTjaVLRKVxK7ah/mmtvKbY+IyI/qQTHIikL8gy7VvmqRjfpwQgipj/iufaeE3OllpoGT6KbbJiPwTLl+uAYu46DB5DAmyypdWmIqK7z9J93A1ikxqpmCFNFZMbYeESFMXTG4hN9IiYnU799FPV+AMGAOqt8ZbxLA== 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=d4WNf4YdQgPLt01IdeoKmo0VQ8uGwhUq8MCThQTK3fA=; b=Cz/HwabeP498kwWVKSqAN/W+o0PXq10qiZ6soo5S49n6H83jqW3UR5qMx5HgbmbjSgjfdlqTUp+BEh5Usnn4jWr5JvXTb9fie5PcRJ23R1oFl2MjTgoyORBU5Y6TXWKUVSsLGDBDfHllu8kdtr5zdM4EYCd+4YIpfLIHeZSvqFmEB+DLfZeXarbpmdVkQ/8FwxJb6oi8cDC9nxDkc8mDm49p5xhzRrzXuDUx/pNW8lGEQW13XnZVxO6RqW+XvPfeVDOnDxQFjQCE8ldYEJpjhFxl7XvAj/KIB0hXiY9HvOyH2xheca9+f8TUMM8w1pTNNyb1OuW9prw2IDq9Vt6jgQ== 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=d4WNf4YdQgPLt01IdeoKmo0VQ8uGwhUq8MCThQTK3fA=; b=U1EUq1L2whdYL+lb40QA7K3uR/sKp/IVmUAeehZm0IpBEgTGrxFkwmt3IiZr0WvAEiyOinF4kfC3tHyK77fEJdfQB22T6/ZfWwGJ8SZOJDy5s21723/SFj7aLOPX/n5Vedy/wu1C5OdlZjpfyu/f6xjYbkm72Elv426M1Nsp3GgukLNY00G62bOfZ9Z5Sa/8zApVWkJzedXA1awYIVDwY9BCLQg3H9RLBa+aZVKHOFJ47tQTM4zRWX24HKoFpnb98ESsd2Aj52w2eRpqFBZpTkCyABF38XlRTMLVH2kEnLJv+20tgOn9ZZUOzDU9qplTO/JDtPv9Hr9KS6n8lbL3iA== 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:27 +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:27 +0000 From: Yangtao Li <frank.li@vivo.com> To: 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 15/62] mmc: sdhci-pxav3: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:04 +0800 Message-Id: <20230727070051.17778-15-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: 3b98ce56-cbc3-459b-cade-08db8e6f4c04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h02ss6hO0pivW5YabyHVw+4QxAONs1wDih0bDSDzHuBS8ii21daYyWOMMdBjpSF6v/jhgommdQ3l2xOGOp39uXX0scjhE1xfiYszEyNwr02dEPsxK3VQWf2laxTruZmYXaFbdcrjyJ1isBfrDjNsBJSF7K7JdefprVkPVm3gSpJBe0cOCxHTiFFTf32hAtF+EvKx6Tg812o0gP3dPvomH4gz/rglHByalwwFRTQ+2MleiyPiQPXgeSe65zCZLOJYlBKULd0u3q1HId1+45K1JqweaMmdVeB58J60ufU3BQXrZDeMfwyrQNQlsmXbB2ww0Pq2/TsiIidAxSU9tTHjXg1GOg87S8TRKhy5Mm1ZCj/TyAfls9FQUBs+k2Mwzafs4juz/9/4uT4Mzx2atGPuKw2tK9vsxCJJzE6Ka4S0WDtcNgajN+stAsIYyqcx7He8g4zVe3byhXm/OOG0sthI6LmcH1OwpRJz6GoBWBkdJknlp9Tt1wbO0LzAoSd2DQ1ThCC3MfuL4Z7cN9Q5EyIlAoqTe08rP8s1KCk/h5gD6PifnpcrLSeTbBpZhLhPS5/szDQlo31UQLzCgddmCzpSgPzHfyErTrGAxsa1YPqs4LHqHDstYXJZr3kTAmB6NsfN 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?q?aBNpAodJ3GgunmPnOttx5Lckodd1?= =?utf-8?q?FaZ/GGWKbyIwNnmCJNkach+7YP7qsD2oXsXKOdsa2MtJ/pZ4GpspZrT3JsMBPcXHl?= =?utf-8?q?i6Sz+QRl2AOqINlq2VPBvroZRiTN7ZbIvlnjOpzliAEbE1OT16pj5NP+lW0AEjYW0?= =?utf-8?q?J7Vmz2HWmdUxfl1jwcb/ioYiu+1kgWZWPW0Okn0Y4SCc3AFju9q62qXKwDBVIMaal?= =?utf-8?q?JRodESoYswT5hCgNW1AURSKJ0Iqt3al/U8W8+ScDKnvcYhwegLQ47Kre8xjMNhCWj?= =?ut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MkDO?= =?utf-8?q?CtP66SDvr2f9Xh9QA6Be9+7kpQSdPjo78OIrx3X/DVcwB446QWnEGZCJJnEftNW1k?= =?utf-8?q?PbdJOCLZTnu6+agLmyGsr0tnWAfTRL3zeg41jVfb5Bu5+GncPBLUrtUTeHk5cRXZc?= =?utf-8?q?QjV2lfqdJCg3bttN1T3RbG9TbTlceOOZWZD9k/0c56r7mGPz9JU3tkFXeeDTstVEN?= =?utf-8?q?xRuVdiUxo6QVH1sU9KKkOLFmjPbluKw7VxlQ3BgLKETNRZ2vFIrW9gGNu6tAY/sti?= =?utf-8?q?Azj0EN4g/jhMR/TmNROAGbOMj96LdlBtfrX85den/FUSbe64+4bboeYc10nT13cc/?= =?utf-8?q?LukWgGDXw9gO/yd6YcmOXF8hM3ZZAwg3Irtk0TBb+w+ME3oIcuK1XFmyk1uEdmftp?= =?utf-8?q?KDKh8GXh8ywq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b98ce56-cbc3-459b-cade-08db8e6f4c04 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:27.2335 (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: pEKD/f9k5v5LirrsBbH7hX8+JYBdJmIca8Fu5fquWf+VQ0tcPcx+szRRqetmumIaJRMgr+aXfu2h2gCCTapk3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772561165205236413 X-GMAIL-MSGID: 1772561165205236413 |
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-pxav3.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index e39dcc998772..3af43ac05825 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -470,7 +470,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) return ret; } -static int sdhci_pxav3_remove(struct platform_device *pdev) +static void sdhci_pxav3_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -486,8 +486,6 @@ static int sdhci_pxav3_remove(struct platform_device *pdev) clk_disable_unprepare(pxa->clk_core); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -570,7 +568,7 @@ static struct platform_driver sdhci_pxav3_driver = { .pm = &sdhci_pxav3_pmops, }, .probe = sdhci_pxav3_probe, - .remove = sdhci_pxav3_remove, + .remove_new = sdhci_pxav3_remove, }; module_platform_driver(sdhci_pxav3_driver);