From patchwork Thu Jul 13 08:07:33 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: 119665 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680739vqm; Thu, 13 Jul 2023 01:45:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlHOM/o+f7O7Dks9BEhtXW19WUg42uC/1KN+DH9mt6m23wganF9J0b4UA0wUuNTH1Be+FHC+ X-Received: by 2002:a05:620a:430e:b0:766:fa53:35b3 with SMTP id u14-20020a05620a430e00b00766fa5335b3mr1378389qko.33.1689237935964; Thu, 13 Jul 2023 01:45:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237935; cv=pass; d=google.com; s=arc-20160816; b=olpqCYEAFsaF/LvRno/aRFpRYvE0ghBKl5wkWJNa6FHrs4Z0mWS5EJDSUVh/PUKQGa BeucMAsEvoIjBbwRwkbWnMvmjqsoGZHTso8AJAIXS2v6h9tIO5jTj6tUMGOUEY69M2AK IQacuBNV7yf73T1aa9YDkBqen6W+Wlm853AOONM01GEUvsgyQaReA0CUI5snsAwWnxuC HuUwtwB0rkPtZcsQE+Hy3dfQeMLuelX5JbrNK+MKE+mFTkGXRvred0qBvutyI7Uk3bxX xsBHx9n76xb6DGuoiNC2+jG+Ow0RjIH9iUSsSk1V+gxO+H9Ax8RxCflw+Uk7s/VUVAqZ yt9g== 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=xHDYAo2K8eeOzGD2DOisszn6JuNtVDOiyeNXZmoz4Tw=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=WxRuosZ+/52FXHiYlSn+UsZsrPIs+LK+jCcUEpWRLMxADgV8ulVNJXWSUyz+2vDL76 3qPO0Qp5h48p8OmLztwIQox1ihu04uS2b8XKZto91Fq8EHiKvlKjAwo4dhxB0pkdNwCi Rh2cuXJw1nAkl/Ak/fqpQXfwZClpn09Xeo+520OWdCyY4Hq66+QY7gyiq7hFxeJSyYn+ UcBK/N25TpSFZjjqkXpqPF06lSNEkGs83sjL8X9lafu27Y8I6AHmIaw8YLLj6okDMsgg wM1GzIZfG/kpe8LkmNUvVvCxVTZnrTQv6J86Jf+dFRr3dFjUEAAwnFP06tJCeXHhLH94 855g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YhitGbkC; 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 s28-20020a63525c000000b005577eec6c6csi4822116pgl.160.2023.07.13.01.45.23; Thu, 13 Jul 2023 01:45:35 -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=YhitGbkC; 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 S234303AbjGMIMW (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233502AbjGMILS (ORCPT ); Thu, 13 Jul 2023 04:11:18 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDD992D65; Thu, 13 Jul 2023 01:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zd4xOfunHO++9t3hLl614lWcVo5fMi51jyPpCU6qVnkAvsvR5q+ZEwOfTCAat1yqJQ3IuKAGec+RfXEh2r5MHHvBr6Kn3M91JRjRdH58UTw77w09eACKnKnqyz/UvFnAwCVTFEDbnespLYnsgw55SBCypPXT3Tm/M+xKGmjtA0bIAc1UMfOh6TV1eNVyyYtwoKgcyr1dYJfpFqzUDZO3FoEvDOBDkCZLH8Ti1FmaW1IVfPihsYN3/QQd1f89sFFc3W56wectviQSACzoyRkLdSZnIlQh1MDhOXEKc2mTQhigtua3MfbTfAOfoRRtsTWycUiQJGf7XvI2aYhwcLPC7A== 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=xHDYAo2K8eeOzGD2DOisszn6JuNtVDOiyeNXZmoz4Tw=; b=mvFGkg0rm1+yz9QJe2D+EhZisnrHexc7NrHIREKAg7RGipohb7Yf6yTYoaSynqQdF6tN4RfmJd2WNdqNBw2NyFD4+osaoBE51+gG/nI9ttXwC/53FF3KdGcC60f3yLfYqIdK9cmQXGi2m0jjIzYnxzFrd9NYIKKCxeguSbof+LXnwl2qAbTDU7NWMPoL2VnwbYaW0CX/f/TyTJhYDWLWvTjgb1NsyMAT9rV2LaCb9Zw1yFK9vFmCqxjFP3vU2Zg+bYXpT/jMBZTfoOCL0vlEHPhoLgRnnGxhR3dOGKY6da4/aPFOHqMQU1IMuzARN4LF2GXdEbpor88Kr7o0N3moSg== 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=xHDYAo2K8eeOzGD2DOisszn6JuNtVDOiyeNXZmoz4Tw=; b=YhitGbkCA+/jQNUXdpWB9LbKPd8snPBTnwvKG0/y426yO+F3nDdNV9IQz8TkhRwpFWLLZiAKQQUk3bUXqJkBYiNuM1ESqw4altTjFrZfDW2TjlA9oJPBSzleRcywuLzI4/xW0cnQ/p3Pr3vCIYZsvLw7QTrKfslfTGVrWl6dHWwJm9sqtyB2YDW7wL2efoc9Ik1ZptGKFWRYGdk14O7dgbBcxDDtdVZ2B20PEZ6xj4Ld+xWaWLUWFKrVDXIGuOp5uJgBG4lgzsEOk96eihOUuLS7gyzXGAxWoWgEScGKW2rnLQvtQh9qpwtkpzzP4T78C4zT6uSbReKTdTResenQ+w== 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:03 +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:03 +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 24/58] mmc: sdhci_am654: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:33 +0800 Message-Id: <20230713080807.69999-24-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: 277b7b33-df12-4cfa-5435-08db83786b9f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +x+S437nTwxX02ZwkVSRhFsg3Wao0XejI2PypPGy0t8IdqqhpP0dG0wJ3nJpFobYHitWT0zKPZnH0q28aTjcvQYRMMtKJsXucE3wboLFKFWRKXA0EtG+WiI07X0wGheEvG4NA46Sp/ay9fRQejwnFhjK7GUv7HUb1UcCI6a9y4aabS2HHZITpBFfstLLMCuyhoQjxrCtBwV4Bv9M581Jnjj7HaUSkxf9wmYU4sop49jGTIRPXohg4twy49bm+uMYzD21df/sl/UtzfEqY9AyUaO/yalBSb86LOiZyqxaTFBZiSMxPSlqWb8L374CgH6MZj6y95QBQ3lKvMK2VLEXso8mi5ckKIhl8nu1YuG3Nbg8yI6EpECsvvk14ilvZYfRu7GCtpkqDuKU4Wk9JD/yL2CCGLHqlAiKyvY+dzAk7yvCSEAt6wRj9IbNlz3wiD1J4++ps+3VIlybTz/4j6+x1nQwmYZJ08R5GHBfDd0lG8oG8zYTSW+vv/Oo0cREJs5YQwquOee7Mx5HRKtCwvaDBrjTQKhv8p3c3YhPAEM/LvXWgP9DyCZDpUdmdpo5vg2psvOhJaUcBF11ls2pHjbGpjFNfKqHU3VZc5F+aVV7ynSpz/dKK/td52zLnz6yNV3f 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?ZkjGml4vS8aZcPsMaDEADYCaDp72?= =?utf-8?q?L7or7Odk90XGabaB8La+bgW8C6zHmXsldDG+6Ia+yOhzX40Ez1FrOmnqYwEZcqNSf?= =?utf-8?q?SzyYXE/069iBqsA1fUmBLMn3SctBBERl0UYm2F6xTamECNKmVcAyO8K/kFtSdK/M0?= =?utf-8?q?7MXR/t7zXJHbtWrT/P6ds/1SqdzW4slolcrf2OiWJ28aQh7dPmsgzipF6lRDZyKdL?= =?utf-8?q?uIp8qdwQxb094E2RMnQyWo4/welcqz+GJygdsX5H9/jtO8/UZklealdtagBEdaP2v?= =?utf-8?q?pf7vfzpbnP4AhYNp6dB7w4U9B3DeqXahACsThAsU6IyhjudTz7EoHuhZANH6g8c1c?= =?utf-8?q?Y7sRZHOEREykSLFYOXX1axMI93WrssEdS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b1Y4rPUQRJ/0+/Al7oK1VTjUkJyDtxmBvRveeGNHhRaT?= =?utf-8?q?33PmZDpaDCdfTaxd4YP7kOxKEPJkk77+qPjSxFKwi5xmUQKkgLEO0xPeFYlSWZgOY?= =?utf-8?q?CoLqi1rWd+dXtuBmOED6hWJFlbrt9JPLbcVbzLkI/IM8Muz4k4D2Ha0Cq3oa/QYAK?= =?utf-8?q?SZjjBacZP6yPgDP4HJSNTHnc5L3z3iILSVJB1lf4viuDHpOY5vKOCujMwlFrp/Y1X?= =?utf-8?q?0H0YVERujHNyeQQaWNzNlzdRrIyPwbzlgH0JX+ojQPOZGJT7v6Xcg76eYyoZAQvBz?= =?utf-8?q?7NRGWP7qm1RW?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 277b7b33-df12-4cfa-5435-08db83786b9f 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:02.9603 (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: /K5Vnb3ZxFsRNv0nJ5pzMWUaTovl0D8E0oMnuCHT7eGHiStehfMnZ4nMfMOz5bSj2jTTS2NjBxysOkxeJDtJsA== 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: 1771294357625641088 X-GMAIL-MSGID: 1771294357625641088 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_am654.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index 7cdf0f54e3a5..3cfaf7dca274 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -866,7 +866,7 @@ static int sdhci_am654_probe(struct platform_device *pdev) return ret; } -static int sdhci_am654_remove(struct platform_device *pdev) +static void sdhci_am654_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -874,14 +874,13 @@ static int sdhci_am654_remove(struct platform_device *pdev) ret = pm_runtime_resume_and_get(&pdev->dev); if (ret < 0) - return ret; + return; sdhci_remove_host(host, true); clk_disable_unprepare(pltfm_host->clk); pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); sdhci_pltfm_free(pdev); - return 0; } #ifdef CONFIG_PM @@ -993,7 +992,7 @@ static struct platform_driver sdhci_am654_driver = { .of_match_table = sdhci_am654_of_match, }, .probe = sdhci_am654_probe, - .remove = sdhci_am654_remove, + .remove_new = sdhci_am654_remove, }; module_platform_driver(sdhci_am654_driver);