From patchwork Thu Jul 13 08:07:47 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: 119626 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1675143vqm; Thu, 13 Jul 2023 01:32:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlHcTnQBV/56VhkPwJKMqpSfIsYOJXWkGpezM2mFBaGnQppkw54YMHEHItco9KA7yHHHypOP X-Received: by 2002:aa7:d992:0:b0:51e:126a:403a with SMTP id u18-20020aa7d992000000b0051e126a403amr1039712eds.13.1689237141930; Thu, 13 Jul 2023 01:32:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237141; cv=pass; d=google.com; s=arc-20160816; b=eImRYJ3+UsmOZp1pLncUBrCoxpApPb9CKFRS8P0PX7PwyJdhI+X/NvYOgzE1fyqzjh fQiVdJ3TT3O82HyYGwGTEPTrLVmSCsGdXqIiY3SlNVio0QPFVGQjOeb5iQ2m5CVC2uCS 6soeSFdcpR/MBXkh9DS7LXqZabvQGe3quRJCLl2QD4im1mQGftIbyff9kBtD0wLdrugk vD/DV7N+HCx1d+sUE+kk3E5ALb3cv54cTJJNBMbBW/wLMtqZYozgyPZ5NaKyro2qQJDW E3z1ZYPwgotIVt48+7emedPyYJbh3RiZ0y5o1s9Jf3AMDSp2DZ6O9gRiO7T8sD+VWyJ3 SwOg== 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=/zfGaaJRqU+i/vJRxACVy8ivU2sos+SCFqN4m+wofmM=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=ILE7A7rr3DT/JHyJFUb7SfyIrny0RLEvDaGuHl0AmuHN9Y3HTPvDI053rc5xFHJ32E L5N+KOIOMzDJwFmEQuMzpCfxJAqKZY0l5lgfnl/NQogZTlJg8kUv48jdqYgSfSsHhRDw mx1b2/E16RwZxCU2sk8r01MlFwt+321miodSrJqQzxLVfIAaRaLoO6Fkx2F/+yCJ4oPn Rr2Kghm8DcsJk6/KHNMNpqMfQCVojvQJHmOk682RfmgSElQwOqEcy+XJm45aMzXRA4i9 sIXhDqt/fLhMRUKw4UT3/WWsI/oa/11GsWJx8ZAKFVGqdvdeeP7Dcfy0Hm9oPmG0MTEJ yUCA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="plhwjkh/"; 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 r19-20020aa7d593000000b0051e28ec9d30si6810751edq.665.2023.07.13.01.31.58; Thu, 13 Jul 2023 01:32:21 -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="plhwjkh/"; 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 S234360AbjGMINw (ORCPT + 99 others); Thu, 13 Jul 2023 04:13:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234405AbjGMIM4 (ORCPT ); Thu, 13 Jul 2023 04:12:56 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2104.outbound.protection.outlook.com [40.107.255.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33CBD30E5; Thu, 13 Jul 2023 01:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ULLE3FEEADYGmCyPdBA+tdycBsTPP+rAQ96rP4G6zLoovxNKCENF81ml1qXTVI/PGZK/rZ9dJMGB3qth8YJRXEuguNukTmuxptAx6rzBf6U36d1w6okwGzCB95jzIFl+4aPVTdv2/GlbVaxXs1Iw6SHOFHfnIYKrg0BdOWx62d5WeDbJmRzjqwSIxBiGIqaRuGZnkRGvLdh0JKn3dmqSvZAHee4yerFhZ9YeUCxc2+txIQHCS6+UkvqkGJB6P7NCNYm3THmRE85y+u6hNqezz7RfsG8J+SDyyVWZlQgdABXReQ24IPg5E3f73LGxpMTJ0zFJjhHRgVdnUfy0EP89og== 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=/zfGaaJRqU+i/vJRxACVy8ivU2sos+SCFqN4m+wofmM=; b=IotPw/V3NgZfKjgYyvpdEywNdfCOw4DaQe6Bom1LioZkMCHb8hx1HjVpe1/mPfvcU/55Tjy1s5WLkIPi019BROAf2xOQZRdJkqe4jWIF90KkEJf/9ChG0zkR6DARoLiRZ/z8O2OZlpWliQFvMgORmYRNE4+PlcUC0EUpmKz4HxDF7FPKJhF1O91Xh7j0NeYlDkc7pFCNK6xSmgd5oQLZD5d2oBWMwIDEKo9VD6lNl6PMPDQHaQ8lSSwUIT6LuMLPZm7jWEPWh5pk11Ftg5v+BpHO7kCYLjzr0iAdsCXoWc83FmT7hrVvncaE5ue4v6smI5RXHjYp1sEPEzq10ZZVaA== 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=/zfGaaJRqU+i/vJRxACVy8ivU2sos+SCFqN4m+wofmM=; b=plhwjkh/c3TfOgS1ndieLMqK3pjerdtjlcVdou+VjUONSjcny1fE1YhQmoKZ3Fv0mePqmkwgWNuepuVGs6+rXyrf49htoDUAa5B4pak4VLQbuT0GkqLQTQVayWLTNmsxQT+hGz36MNqXKPDECAnWyb23Xxgrb8Oyo2EBFMDALaFIpIMxk+vBTzbH/AZGnuhK7ff41kp8kG0+OB8+YJ0XHcY1MwTm7iAG+bSwHlR8DT67ziU5PDF2MmZQIZqm2fj/f/5NpYJZwTKFWdbdpos/2K880o/K4CJCifPZAOIvGSfepZKCFDHGACiFqG2KsZDbJ1bnZqGrZ6FQK4JaXS6VCg== 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:57 +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:57 +0000 From: Yangtao Li To: Adrian Hunter , 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 38/58] mmc: sdhci-acpi: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:47 +0800 Message-Id: <20230713080807.69999-38-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> 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: 25281a96-07a6-4f50-cfb9-08db83787a1e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +iocbeMeeI11r3SAzS/nTW0owlM7iNHD5S0s64k+PNcE86pO11oaUA/v48MTmWVuIlAfIAotH8SYc4J1rP4mljist9e+sODQBm7N172GdOU6U7AXqkwK39dzIMUi570PvF4DvgYBa7SZ3KsFZrbWA2YKZZUtLJTwMJGcVmfvmMLZPMLnfaPoXR8FmvKcqEVfQK4S0S/B49xcaOzoD50ncE9wmZrYGcGaosrU5aBCVwZclnZX+gfQPCHEjmJK92W4Gyq9OW4T2gHnGwHe2JqnIEWOYrZtYB7CRG12sr/AkWlWaD8Y0/FWkCx+pgVYIGhf5i+tSu4ywA/KHYwgCk+Au27elDgNdBYzxiAHzQ6BKn11gI0TGeTAgmI2AClJcj8ubuRE7dcgaWBUKjOp2LM1Y2uybGHNaSfBzK2vbIdz8wN/5EjsfeafrlBCPABP3jsvVhGkyK2zlr48MGULHvsguFD2sw80qCSYJUQOlu2v//iR71qgKq2T2IwxnoZkHZh3kipJMBfWKham0lr6fEi8S2CgX1v0UdStFnmWXuCwrNjZC0tLPIKnDPDlQegfH+fnZlvhEl2fZYKSw6l0xBK43/GHpchSFgZzjy6wDUALgsumobhud/5ED6hQJvF/WSC/ 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)(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?lxgg5SWLlC5nvHtSjp8C8ZBR4eDd?= =?utf-8?q?Vsvc5yHj9ID78EYzKSJ/S7nHzJX5p2Ge03swkRGx8Qoz0V6ZJB1dd16gJFTtsN5hT?= =?utf-8?q?2y9GQiKAOA6O8ibn0fI+I4E1IJWKmTxBceGtcW4/L5G/vKmv0e1rbZfn+mVOzd3cL?= =?utf-8?q?PqkrY+9+TxP8WsvRux10Ni2TrAsXTO3sCs//cl3SSn0ySEAlgD4Gt2lUl5Zh+xKHH?= =?utf-8?q?TatQKENywihnqCaQmT02GWkAiPopDJJ/mfDngzoWGvV1cu0jXFVSpSPhstb4L3QWS?= =?utf-8?q?9Aq6sdit3lcjzOkNQH8KjsLuDdkcsYVir1QGogcM30o4NYpkNzUdrpCEOLQuM5+fx?= =?utf-8?q?Lus+93JAsvtqlXd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go4ozKi27grk5wXdslf+cnhci3hRlW?= =?utf-8?q?Y8ldM8KdD7WkLzRV2jkWLM5wz6lTbK8hDmuxJq41/L38JBCchRqrRvvAfn2q8Ch73?= =?utf-8?q?iro/PRT4eEnL3+V8ieUQ1HaTG7I4peQRJR1SxdP0pX1j0FQ4a9SuemNujx4MYN3a5?= =?utf-8?q?84yu24m1+KY79NVXzCdzql925C5vvf6avV7VleDOMKEHptdgmcE8H//U2NSZYrFZZ?= =?utf-8?q?KNqyGnm+fCrQfX177LVp0r+3FiofN3rV6IdDDg/LrkXWvPDNuPIFV6jj6HxrIB2SJ?= =?utf-8?q?EhiXElWffceq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25281a96-07a6-4f50-cfb9-08db83787a1e 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:27.2595 (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: kXFS5bfr6kyxyMnuGy7IPLqBP0IpyF8TiDfycYfUHCpHLONZ+bebofkxcKmutp16R2pS11HF1kqXFYoiC0c6AQ== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771293525007350925 X-GMAIL-MSGID: 1771293525007350925 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 --- drivers/mmc/host/sdhci-acpi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index edf2e6c14dc6..acf5fc3ad7e4 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -917,7 +917,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev) return err; } -static int sdhci_acpi_remove(struct platform_device *pdev) +static void sdhci_acpi_remove(struct platform_device *pdev) { struct sdhci_acpi_host *c = platform_get_drvdata(pdev); struct device *dev = &pdev->dev; @@ -939,8 +939,6 @@ static int sdhci_acpi_remove(struct platform_device *pdev) c->slot->free_slot(pdev); sdhci_free_host(c->host); - - return 0; } static void __maybe_unused sdhci_acpi_reset_signal_voltage_if_needed( @@ -1033,7 +1031,7 @@ static struct platform_driver sdhci_acpi_driver = { .pm = &sdhci_acpi_pm_ops, }, .probe = sdhci_acpi_probe, - .remove = sdhci_acpi_remove, + .remove_new = sdhci_acpi_remove, }; module_platform_driver(sdhci_acpi_driver);