Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2038465rwb; Thu, 27 Jul 2023 00:40:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlF7BQx9aKc7NIwW8np8Kgu6wNym4Ful6r+qCMJ/VrNsqyUqGyJPowoIrMK3KnxYg02R3cgq X-Received: by 2002:a05:6402:344f:b0:51b:eb5f:baf with SMTP id l15-20020a056402344f00b0051beb5f0bafmr1152430edc.18.1690443630879; Thu, 27 Jul 2023 00:40:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443630; cv=pass; d=google.com; s=arc-20160816; b=l2RtHyEDxWh26S7qWngoc2HVbFZS1FENb+ByysBgy4IWwoNz58jBghv/bKhnNasRgu VKlFCfWMAEzcu7o7Two6hjrp7qL4z7a9DLwAtOZcNrdXak+SjaEbo6LoilN/UVE73K4P n9vPjxewqDXrzpb4CFi/hcpTsXqnofnqSKKCxGMG/dEk1bmyesSMBfyOQEwuDrbPh1uB PL5QQV2gfNWHnta6ptsDIFea63/6fhUtNXOaGHCc2XJqZ7pOMWyTJ1UW0UPjeIvKd5ug bjXrp1Vof0DqrwRBCkhdyv9PguZvEML1sZ73DCB31MzSAimaF/1w1gQ7I8kPGlFRBO5j iutA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n14-20020a056402060e00b0051e3c92a20bsi558584edv.318.2023.07.27.00.40.06; Thu, 27 Jul 2023 00:40:30 -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 S232717AbjG0HCD (ORCPT + 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 ); 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 To: Adrian Hunter , Ulf Hansson , Taichi Sugaya , Takao Orito Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , 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?B?VDN4OVhzUnpMOHZ2d0FMdkFmZlc3NHdsVmFjeDMydDl2dUNGbXQzU20vVThY?= =?utf-8?B?U0Mvb3Z1aG81MHU1SVlrUkQwSEVUeGhVcmVSMG56cGd4WnJGQVVOb29EUG0r?= =?utf-8?B?cjNPVUtXdW9yYXhXVDhGcURSK0JDcDJhTHZlc3Z0dzdENUdsVEM1cFd0Tmho?= =?utf-8?B?NEN4Y0pGb0NGNVZmaWh4ZURUaVpKSzVOeHg3N1BybFVqbWc3bWlPMVhCdFBa?= =?utf-8?B?U01PWmtZdVNKazhINmxNK3U2UklEdHRwdzJvNUlVRmtBbm9BSTVlMmw5SUNn?= =?utf-8?B?NXZsWm5ZNzRDMFdqdW9pMVFZWFp4dG5ia3Y1TGptRjZPMk1oYnNUYU5jQThp?= =?utf-8?B?ZXBzV2NuYVlSUklEMW4yZmQ3Q3ZNTFlYQ1dVdWtWbjRqVldtTEVkMzc1V1da?= =?ut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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: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Adrian Hunter --- 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); -- 2.39.0