Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2073539rwb; Thu, 27 Jul 2023 01:20:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlEMqVKMcV9qzFyrxdudBvnNPtq+2o7e/T9qmv1RXYZ9G+Vy40Ih3VFRFQSX+1wb8aeAT/g/ X-Received: by 2002:aa7:d7d0:0:b0:522:200f:cc50 with SMTP id e16-20020aa7d7d0000000b00522200fcc50mr1347502eds.19.1690446044137; Thu, 27 Jul 2023 01:20:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690446044; cv=pass; d=google.com; s=arc-20160816; b=e7NQo+sRtzKoa7QrDwdlNL95GOHv3eMt6DjB08V4vAzFqyJcaAvP9SQoZwjeUzS1Qv zQgVwXkTKAlWarNIN2iqcnKV2mKLfdBVPjN4aAwC8/t4zYFN81pIJ+OHU3R8u46HCnuW 6AM+pypAJnxN46IX29NcX+mqPtGsU8gEbSfv0eM7AgbqaiaXmuabwId9CoEQMp/4HliO 17WDv4I03poNa5AgamNqlyUpcbwbngFA5Ps2TpPrcaBtZUQx7EDML18ELE3Ec77ZMoeE 6pjNwKg91VIXt0E3EMHFtRrgNd4h8VkUF2f7XYXvSxAe6aDuVN22jGcfGcwlkG0gbbAC xjJw== 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=mTZCoxTOibIiO72DCM0N13jMV2Q6b9NpBszadCYFgzM=; fh=wZYlUM3eR9DzHU7b0SBT2HXVkVx6ajD54pczVSribH0=; b=YpdgDyfN8wTT7Sir00fPNMKVbxH5A5i4+Unmk30TOa5lPIhE/yWywbu7ZUf4JqgAF7 E4UAtd6Rs5YJiOjGjDekHJDm1Nu2ann9LtIoxVKS2vwEOfYpjTig9wX5shc668PxkpA0 EkH7DvjXA+isDoWQOTyAz//P9WqT35dvVqDRfG9AGSIp/cgnCvclvCS5TkV3jp2W1pBM qUEcpN8TltY02NGPkxW3ZGBXBZOZQwt7/DTvOVIUf2WUwWHyDQ7MZGRVn2GJRgoqUpn5 HIKkmkdnTqbUg/tNapgiiwFS0U91PF2v9PH5GQSEjdRDh1wvlrxF2zrZhJ1yojwetKmD sF2g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZpDL65tl; 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 l9-20020aa7c3c9000000b005222be3fd7bsi598504edr.81.2023.07.27.01.20.18; Thu, 27 Jul 2023 01:20:44 -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=ZpDL65tl; 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 S232418AbjG0HHT (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231818AbjG0HGX (ORCPT ); Thu, 27 Jul 2023 03:06:23 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20700.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::700]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 574AB44BC; Thu, 27 Jul 2023 00:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E/sxdv6EOk19F9Hf/8AWI9Aiz3hYNydAcR8VdwvslG+mIxlhs0mVNDrP1eGjAL9aQljfTr0oZoPlLSVKxEdUMN5XwjnIB3y2ySoaTk7LLrzWcFBhtKHr6s5afEJAZ42BgfhKnKsCVJ7fibQBcuYPJ+zmRSMxptn3B9AjQLolcCJcg40dYUyV9bimwuKU8Vhes6DFBZQVhc3djqfTLbm6+5H+ABhQCeuFeVjTe1QLLddITzoaFEbK83GiYYnDmcfuTyDAwMfmtz2rYpsxyJhl+HOOxiiEN1crEwec5tpfK2TKzdrhxxAj83iDQv/3Uvpq87+bXUb68WfU2y/ssqcrWA== 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=mTZCoxTOibIiO72DCM0N13jMV2Q6b9NpBszadCYFgzM=; b=LHeGOOTVNGoUGCtMb4hoeGWF20M0ZPn/LwuuhOKBmGkIBElDEqX0SstwoztUunvF6IDXn3aZXCdefBX7tX2s8xLUzDlNVdmv7q80w/cHpJ9/6e9xDgRsfLRK0DpSz2JYinp8rmZarYBPvj1Kkvmx00GOSQfC7/4v6Z4/iZVVzRlPOTwrI0BmFIS4c1Kk3KU7L3nc8f1oS6cqIf89AqZO4RZn2ndW87Og1c7U6/iQAdBrQXLiHVFPP8KKL6B/cBEBjtteEAweDGnemz213i+odqWq3cPBB3I0+BAN8MjnUbn0UqCIQ6kLRIAPNizK2KP6IYg9SGAlk71ayJGeqqYliQ== 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=mTZCoxTOibIiO72DCM0N13jMV2Q6b9NpBszadCYFgzM=; b=ZpDL65tl22II+WkehmGiONo1cMm0RQWLGn75fKKAzzN67cjIm7lB6RFaS/o/PrmLLuSbg3DS7rrtcKetaHEYiunHC8I12dPZ5xzcKxIGgUVVmso+L8qB289IF9XZlddVktGfjguu4EW5FriYuW570mluSpsyAy2Au85S0oo7zNfklodl04PISNt4dzxwo7kznQReMwqiojVTpV98fZlWg0o8Nw8UH/zrwz+cp5AQPcLUcpkbCddHnooXiKpeJRaddbylxF3QezchAK9tkTpIE3ccR1lJRbCKH5AzgOn9lgHGk5y/u3ShZpybNJAgZfzITi6wUB3LIzpiyTdOGy2ZMw== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) 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:02:03 +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:02:02 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 36/62] mmc: sdhci-tegra: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:25 +0800 Message-Id: <20230727070051.17778-36-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: de7f1df7-c05b-4224-7dfb-08db8e6f6144 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AqWoVqebPJQB7wCuBPETBB5aeqaQEPcEnB5MBepM0eTrdqSMBxreuZ29VQy0xZjV6/H7v7OxiZKL7XDYE6cUmsHOQt7M0V/iHBRTXQgkxOv+Nnn3lLDFmV8dueLwmRflZuc9tUR+qC+jX0AO/vvB/0Y3vqt/0KUxJEzu+UecO9O9XrvaEUBnPJ/g7Cqz+eW35TDiywxzvrW2XNYrDxo01EL+a8oY3f7agtqq47tmR2mxnfcz/8a2U9ma6T1LV8IKafyfRYd0tkE17hhTDaQTyIk0o//w5nhwinw4/iouBBKo5+GCGeCTwdJudF8uOkGiMFYYe1Kymn9VW91CzouDtV2kxk0bNe8sJ/gvYSOOTsVPJUCDA+et7cPywmppVmU6unUUbKlwMcdw6yNwinnB8kYcT73l6WuysvwYSLDnNmCgGP4VfJJ/yM86MMAtDdk281l7dKszl2HHRplLJhPeXThZZ1l32q2cqHptAu6bo0ymDhiMX1UGIXgmZX4CVNym9RLjHItLacdaElSkYj27VY0IwuMyFvHxsAUv6+0RYyrbEyIhhBAjTX+soySH49wvyx7Sa4kRZGP7H5+OmSpJohusk1+F51nZgOhuL8e8w5lLAaR/KttfNp0osxknozpx 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(66574015)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VVU2azYxcUN2OUxsbUI5cmdOY1U3a1c5Z2JUQmVXSUtBYURvK0ZOR1p3Q1Rx?= =?utf-8?B?R2QrL1dIcmRkZCtocUltdi9oVHBmUlB2M09CNENRZ3k3Uk92Y1pmUnUzVWlH?= =?utf-8?B?Nnl2T2pBQmJVdkNFTjJnSDlkbDE4bVloVnFMU0ZKVXYzMFB3Z3VHb1BxNTgw?= =?utf-8?B?Z3NXT1JQK1VrNmo2RmREVis3c0Y4SlgzV3Z5c2VjRnlzWWZSejVMNzY4Nnk1?= =?utf-8?B?SGpna1E0SnVGYkJDVFp5a0lQb09CUVVlWXJPcktDdE9zQXZqdEg0RERNemVo?= =?utf-8?B?RmlFMWR5RHVtRFpQUm8zTS93MXJPYUJhMW83eVhPY242bEdOL28wZTd1VVF6?= =?utf-8?B?NEZoMzB6TFBIbk9mSkxaYngxbnpsZFlaa3ZUK3JDYzVETmtQY28zN3pVelZ1?=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thSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:02:02.8863 (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: s79wE6s/KGV622dy+b5JffZVZeyXRv+179F5TND3m8+ZBKy42nlkCUCHnldr+HOsAbafUJdkPF82BW3Gln0Gkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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_BLOCKED, 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-tegra.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index bff084f178c9..6a50413afc8d 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -1818,7 +1818,7 @@ static int sdhci_tegra_probe(struct platform_device *pdev) return rc; } -static int sdhci_tegra_remove(struct platform_device *pdev) +static void sdhci_tegra_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -1834,8 +1834,6 @@ static int sdhci_tegra_remove(struct platform_device *pdev) clk_disable_unprepare(tegra_host->tmclk); sdhci_pltfm_free(pdev); - - return 0; } static int __maybe_unused sdhci_tegra_runtime_suspend(struct device *dev) @@ -1933,7 +1931,7 @@ static struct platform_driver sdhci_tegra_driver = { .pm = &sdhci_tegra_dev_pm_ops, }, .probe = sdhci_tegra_probe, - .remove = sdhci_tegra_remove, + .remove_new = sdhci_tegra_remove, }; module_platform_driver(sdhci_tegra_driver); -- 2.39.0