Message ID | 20230727070051.17778-36-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 t5csp936836vqo; Thu, 27 Jul 2023 01:12:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlGzShbg+JrmbeQBuwxEGxcrjz+8n0pUwFGdx9cy7kS6onU0RzSGepJarUJRv2/waOphM17g X-Received: by 2002:a05:6a00:1794:b0:666:ae6b:c484 with SMTP id s20-20020a056a00179400b00666ae6bc484mr6299803pfg.13.1690445557152; Thu, 27 Jul 2023 01:12:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690445557; cv=pass; d=google.com; s=arc-20160816; b=EIsXcXYd4E1tkkJ6gCmSXvhbHpRj8+W8rcUNteWnZbJraOxoF8N+SuWJHagn0rdwXj AK/UtnugvnH+qDsKomDuuBK2RGFLlJi7rW90aAHS0CJGnqbsclv2yzxq2fk/uVPSYjFB 9IbZq1OGJirJ3FmtWfrN6XA0XbjA0SIv3zxVCuz44Cm4cPISECtQiIB3PnmcQ2AwEDvT 8Fpwe5Y6QrM1XwgLiWZeOjYLaOEOvBT6M9gXJsWKnxJLLEVsCTUUUUKqg81c1OZb/+gW skQJNW6Hoxys0Oh5TU1mEO4SWssggtofWAsN5RSdm3EuSOx5EHpCvD1iVcQdgW4xq91t Uz4g== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca11-20020a056a00418b00b0064d5e926241si1037631pfb.149.2023.07.27.01.12.24; Thu, 27 Jul 2023 01:12:37 -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 S231167AbjG0HHT (ORCPT <rfc822;hanasaki@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.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-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?q?UU6k61qCv9LlmB9rgNcU7kW9gbTB?= =?utf-8?q?eWIKAaDo+FNGZwCTqGd+/WHrddd+hqImv/hTpfRPv3OB4CQgy7ROvcZfRu3UiG6yv?= =?utf-8?q?OjABbUvCEN2gH9dl18mYhVqLSFJUv30PwguGoPq580gsWORP+Uk6j6FdDV+7sF8JX?= =?utf-8?q?3WvysecFysYfRz5L7686y5HjgkQ4JuFbBCTZykIPoOBQUeYrOrKCtOsAvjtH4DDMz?= =?utf-8?q?ehFiE1dyDumD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EyetUmL27KZ1/HV0MnZVnbRzkdgJVY9KAioXT5vGdkm5Ha9g1uDYmxomIaT?= =?utf-8?q?fVMX3kVObX0mObMi9Za2GW7f5E1lK6ZPnepYj5aAjYVe5QGvYeeUMmf6YXm103Ua8?= =?utf-8?q?7IMqzUN/kzLunhJ0PKoSK0W1ycLbZMVKYDoAKr7arFNC8jAsDZxPVAsaQ8Xku1Npi?= =?utf-8?q?M+t0+Anrz1nK2GHF99gIJ6/YJFbRE6QA2S1sNGa3OOChNNIXyq6A4cHh/dz6J0Aib?= =?utf-8?q?CPjsRngrM03FnllS+oQCcTxkd5XzMlqj7lTAQYerDdxCqE/t5Cz1Ei96ZdlM553+b?= =?utf-8?q?JxA92pfimLCAhhP3eRhNFm7TYsD+eRwMzpPtaqYhT/fyfVMF0La+sxkDWItrbRgnx?= =?utf-8?q?WLcc7vqOKXmgUuHYC7xbdcujRR0uPExA/JL85FnS3ZsWxZ2MiJIGtHIejcZ+kGh57?= =?utf-8?q?EVeJCwFHWaLP?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: de7f1df7-c05b-4224-7dfb-08db8e6f6144 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: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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772560640420631098 X-GMAIL-MSGID: 1772560640420631098 |
Series |
[v3,01/62] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 27, 2023, 7 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-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);