[v3,10/62] mmc: sdhci: milbeaut: Convert to platform remove callback returning void
Message ID | 20230727070051.17778-10-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 t5csp908792vqo; Thu, 27 Jul 2023 00:09:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlEWD9n17lwaOA7/KXoSrbBgDUbF/MhzuBFcLO7eEhYI4VrMKqRrexDie8hmxMWO+xiKBXi3 X-Received: by 2002:a17:907:784a:b0:99b:cf0c:2cb1 with SMTP id lb10-20020a170907784a00b0099bcf0c2cb1mr1267851ejc.66.1690441769542; Thu, 27 Jul 2023 00:09:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441769; cv=pass; d=google.com; s=arc-20160816; b=reYfjZLIzQyH4pZYC6vBFdqq7JAAiJUJ7HyiZj1lfqZWnh9XEAynOODYsW5cLccXrF Ay6m8efuXXIW/3ZApixHgSaPoVGJbWE/uT0Lmq+SHFpMnUiXikxi5Ts3p80JVhBjkyF6 r9fRJDc3q5BlTZtQGfZ4+zU1NCTeG/bkfuKKugHMCUT0sx7u+APlqLSnZBvPBNAKor9g KVzdQmVRk/h0prnEWNuiCYTiBjpmhj4HYBfmRIQszVxfQApzqIM5s9wj+4LX4+iL6M4a 5hkeH1P9p2oMqIlGMa2Bzk1xImARK+g6YjoukoxMrOt9/wqyJkIKHqyiKvevBroxyzWc 6Nfg== 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=P4JU8APsrhrkPun4Q9xIy3FDPUIcIdpxAJYFh5ztE9Y=; fh=rg7X/cuDWju/AN76WSpS0NvnN8m+keu91fVjBG7W/iw=; b=F9bGayLuR//WTWHHapIEMgsmckgLfDFtRlvKI9RdLurVJYx6jU5BENsTeoAUskK3pj noGFKHLC2WdCyy+t8gzNf5K3xu9WNTROc3Pkx56K1bwJ2pXCYJV2tCmzi2Y6TyiUzyGs /Ncp0/OxDo/2vOsMqERjLKxtrDTJ80v+GXHc6y/S+nQ53A62Lmvh0qrAgAfhvddzZcSz C4NDbtXTti8isFxyuKNOAzcMA3411ZpNxNoWYIqxzRp8CwnnwZqGSickrG1TU6Le/wJt 9jDE59In7609IXx5sB9WKZNwJhrGlfFJClitPigrNSVTe2UIUALKLWDm3dNbasuDI+or Yzxg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YZ4EHclv; 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 lv14-20020a170906bc8e00b00992f309c359si592475ejb.430.2023.07.27.00.09.06; Thu, 27 Jul 2023 00:09:29 -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=YZ4EHclv; 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 S232892AbjG0HCD (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232797AbjG0HBZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:01:25 -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 B8E3F26A8; Thu, 27 Jul 2023 00:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JlA0BtWEaoC+EeE2oNqRU4v2wiXOWXmFXllqb+fWEA4qRy89jY4LNc1RUmzYQB9G6f3bf/bY8LcKEVAABW1q1U7BUJVXTx5iXtYdLScjwa14q/vuwy+62h97N6e4f52EC2mNMjUdKyOuYr6eMF8iWYUSQHKuZRnIPStAZdglmNlF1nla9ZDWLW/ne5OYjTF26/7TCM9Qz1O+CemslWiZy8cuXeaUC3fSadSDCfCpyLKjfQshPlbXkVCiNtn+QzRgGFdlOgpMZQo0I7K6wi5svLQyuZkdDhM007jJxQMGZH/xuM1byOenulOVI9owXz8BpLmFJ8ATo1RLf0DZV90pgw== 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=P4JU8APsrhrkPun4Q9xIy3FDPUIcIdpxAJYFh5ztE9Y=; b=Q4Z/RCVQKdjsOURHO6bDGMQxuw0ThwH7qbmbu97fXERTemcqcJDddL/lWCwytQXaSMNJJ39E0W1wHz8HfwJhMHUqDJAHh4xi7X+CXXMBUTH8VWREhqN/pge3KHc2cv/FJNCQblQkTPP6R/oIAe26q/pyBitr4dkYMv+v3twrDYFv34mMB1SUIRNqWNYwWyx5r37MjsD4TDct+IT8HF/KtBHYgU4R6KXE3ltn9n42TSLhNnASNFkMVLgojjiDtLvKIs7HMZeN4DyRuTbAoXtKtfilAK/tc4+J34SuBHt2w7polS8v5/N1Q5NXmj/0ClDGBG9MnhFVK9SpwYN3TfaR5A== 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=P4JU8APsrhrkPun4Q9xIy3FDPUIcIdpxAJYFh5ztE9Y=; b=YZ4EHclvN33bMd4dSDUvs13CAjhk+vLm2BG44nnWsURUbIcLZWum5CoSqpviFRKm+wiMMS5XcDEZogPW3R6GEuzeasf+q0dqZuc6r1rV7jRVYuI5z/e7DiZ2gUJiVCtEk+EFlqRM2g9BAcoEz00MesH3Pqd7omGtZs7GNs9RyFlaY8wZ6BbmZwhXO725rc/cQ04dRNPhUzNuT9RunpcVL0zKy8s4RIscIeqWaiybRmouqU9N8DIrdmYfbPto5TcmXmM2gaflCD5UNDTjn7DzQtdDEOal3nbG27BUCx8t+9RB6gcIfosc/Bjjpk/JqNRP+e7YrBvE1tdicU+3/CYedA== 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:18 +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:18 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org>, Taichi Sugaya <sugaya.taichi@socionext.com>, Takao Orito <orito.takao@socionext.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 10/62] mmc: sdhci: milbeaut: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:59 +0800 Message-Id: <20230727070051.17778-10-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: 10ae0dac-0a7e-4a0e-47b5-08db8e6f46d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cX1sb+/h95KeivzdjfXnoFKL7WK2sLrp+Edg9vSTHuEcL6scTQfeerkC/ryyFDBfqfAs+242UBu2wPoLvCs7tbRUgEU+xPWAY3VoNOU9aKN5jpu6yx/z2lepUPBZ1cpyg3kv8UJLzkrnx+Rmb9+mzfhER3zTn+nelEM5wRa69pbv8UUInhrB97MBCsa+HlyPRnkFmJfMbAfeTD6P7uFipLdC9eUWWB3Y3ASmDg+i4+jQUFj0MPIGYVl6QhyVu04hGTdbnYn+yClVsM90Kv4Abx0ADr6XqelRd855C92ZmSRVNhj6hqWWgWSEHUfNQNBkS999Ir3+tL6siHzvEUKL+iqizvDmNOgd/JsKiH8E3ggZcFJz9ipJ6KObi67gIhrBe0tBl3WvhbI1+piNu+3yyKIAs7bkCw0sPfU0e3GhfGSn49FGf7lQ93KPzB7veHADp9V19UnStpm2io7DOvdv5FXMKoU3VJWe7fTUhor2i2GQ6BaFnX49JFAYnnrkhrd0kHFu4dmtk2/ln0EGBYd1poPZhZ/jDVHZBvh7eF/GCqUO5sDjPxgGhpsBdP705tNqvQE8XRNcgFRkGbTNkzV9GkCL4iJuvxlKLWngPFHy7LV8reeY7Df0m+oFXE51NLv8 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?T3x9XsRzL8vvwALvAffW74wlVacx?= =?utf-8?q?32t9vuCFmt3Sm/U8XSC/ovuho50u5IYkRD0HETxhUreR0nzpgxZrFAUNooDPm+r3O?= =?utf-8?q?UKWuoraxWT8FqDR+BCp2aLvesvtw7D5GlTC5pWtNhh4CxcJFoCF5VfihxeDTiZJK5?= =?utf-8?q?Nxx77PrlUjmg7miO1XBtPZSMOZkYuSJk8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alOtcpwy1H7GTwS48AYSwMt53CeRDm36lUPZux?= =?utf-8?q?Cb5huyL7OXhEqTVfpjzolNtsgNw2xww00XONk9uNXzJI5vGiC6zhwYbwxz0TLgoWp?= =?utf-8?q?p3yo8r8q2PKOMAKzlAge89nhTKBMCM/uR+VkYq+OBLPMSlrrVyLcqJwM8LFb1exEg?= =?utf-8?q?rSRDOEXNby4lPk1Zx/GkpZ9niD83aa9+9cRVng+mdbpUWU9AVTMYN46JOTT4QZ9gu?= =?utf-8?q?xaIEvk2U+KIAV68POik9rXazn3yVhGnXtDqPmzkZE/e8JjJXCii6M45Xgdz/IvTLV?= =?utf-8?q?HEbbvRco8HjcgSnYAQknRD/Me+C77EBNkzIcyevoMXd/cbh3lxO5mU2Q74YTeCISG?= =?utf-8?q?JhINJgN0epdSvxrgJqhSMoFeCRSWdqyjloJV22Jfbkd9DgwrwgMnyOYcNPqtDu2dh?= =?utf-8?q?0iqze4WkTNzaW3Kfnpn+SdRH9U0d568Ojlz6ufesGN9brd3g1xg2ICrvz0/uYrz8I?= =?utf-8?q?B0pN6KbEXZ76?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10ae0dac-0a7e-4a0e-47b5-08db8e6f46d0 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:18.5142 (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: ePt8gonIoXTx+GxTnma+72AoJJ7BLeqwy57obaW67kjGTHX+feo/SC2mgOQKiCbmmpHlXxG9R9pf4AtJ88qhkg== 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: 1772556669154817493 X-GMAIL-MSGID: 1772556669154817493 |
Series |
[v3,01/62] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 27, 2023, 6:59 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-milbeaut.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-milbeaut.c b/drivers/mmc/host/sdhci-milbeaut.c index 148b37ac6564..ee4514c90eea 100644 --- a/drivers/mmc/host/sdhci-milbeaut.c +++ b/drivers/mmc/host/sdhci-milbeaut.c @@ -313,7 +313,7 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev) return ret; } -static int sdhci_milbeaut_remove(struct platform_device *pdev) +static void sdhci_milbeaut_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_priv(host); @@ -326,8 +326,6 @@ static int sdhci_milbeaut_remove(struct platform_device *pdev) sdhci_free_host(host); platform_set_drvdata(pdev, NULL); - - return 0; } static struct platform_driver sdhci_milbeaut_driver = { @@ -337,7 +335,7 @@ static struct platform_driver sdhci_milbeaut_driver = { .of_match_table = of_match_ptr(mlb_dt_ids), }, .probe = sdhci_milbeaut_probe, - .remove = sdhci_milbeaut_remove, + .remove_new = sdhci_milbeaut_remove, }; module_platform_driver(sdhci_milbeaut_driver);