From patchwork Thu Jul 27 07:00:28 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: 707122 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA4F5C001E0 for ; Thu, 27 Jul 2023 07:06:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232010AbjG0HGu (ORCPT ); Thu, 27 Jul 2023 03:06:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233006AbjG0HF6 (ORCPT ); Thu, 27 Jul 2023 03:05:58 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20709.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::709]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7726844A0; Thu, 27 Jul 2023 00:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IrRkVKHEoxamx9QXYM5DjP7JvZYT6rylLnkwqbCe62vIUzy7qVxQ5p0pVeiQoCOsXDtSsfFmivbn/h8uGpZn7L2Kr8tFuwTYeZ1C1bgpjnMHLlTwXss7PjT7h1SiUQEZRgnbTWL1SvS0l6uNz85jMXuUtiFK7qkbFyzRw4LZVuB++ZItgAZp9BoNbf92cEQcVjQTVGudycJ/KkZFH3ZMF2xo9pHtWecZZ1iWvV6s3KXLj4xZ2ljFciHebPzzC11TdXqLrxQHYkq38oQglQHiKbqt8gbpJ+ulk+AH1NM6mgDFyNW9rbcE9jZ9lHD0TEC9TRQAiqQp6txefYFp06RhSQ== 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=Km5SLI9CwGIZCQi+0pIE2z3vwwmcgtBqTHQpN6fP90g=; b=ePTjRbphOzp1xBq4Ik4JgqYyTq/Zoos3pemFweUIr7gqKHmxECDqwdFILrLNmmVSO7Wmqpsn2ubosBoMvngE7bkdNs0w4SVxUSUi1RRRq/pwwETZKRFxxf8GfpzNZOWdm91A8NL7uWBsg/AEpI3mH8g6CxQpkp6knl5X+RGYcKp4ir6FOmdB9IoxMsH48BNjHBDuz48ZquZj6CmTtiLGxenAg4bu83J2J7Kx+Nw8GotArMD/zzhzO4j1jdZIAcSK/2JQVQZkN0sNTRwmX0HsmmK+6NTu13X8TFQJ16iBy3Blj3TFmb61r19+l0j6+p4uc3/JB4FhZVCGY3dwq2KW3w== 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=Km5SLI9CwGIZCQi+0pIE2z3vwwmcgtBqTHQpN6fP90g=; b=LG0fl5uWqI07gVDrSSsxev8xPeFsLo0BoI5OP8IrW7wMdTgRhKfzWYy5dSv9HTmoDTqI2QwwQ6r8EmdW24PV2Wlhcsu9yq2lBQW4vCzPsBkj9bKcE5TT/k1bq7vtdTSgPNFBjpE6+TJgpf10xfiUankEWdL/GcVGjQfx8Jhpxz5N7D45uE6YvspTVm6YhrGvMRMt6UHRShvown2EquvSekOWGIykKGaHwW+/azW8+hgjYWuU6wLA31RpdXYc+wliKCTsHS/1OWLShFYJ8wXSYybsx/FsjtMiJD2xgOqjAv8IWXpMIHzfFvuRsfxIfAZFz6+hyWP2W9XwEDyjVIHBSw== 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:02:37 +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:37 +0000 From: Yangtao Li To: Adrian Hunter , Andy Gross , Bjorn Andersson , Konrad Dybcio , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 39/62] mmc: sdhci-msm: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:28 +0800 Message-Id: <20230727070051.17778-39-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> 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: ebd6aef8-6ee5-4147-b2a0-08db8e6f64d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yKtsxXqBGSe7s8f9/ibhccb3492unw8jK/arkaEKvkJqfizEsMavQ2GWHCmtfYY9/ugTNTKE81k7hP5GY459OQwtyg3FU96hwSf0KPET4yG8zCDdZNAvGwrTpctuBFabDTw8n3e9QzmgK9Pb9loeLAqIHfqOW2fLahVNq9nHtS2BnjeSL4vyVVSviZ/+0HB0uHoK0GpRu3t+T2gMHrEGXS3//OUF/XSHyW48s0qPKrCoxQPp8HKJZ6y3kjgAIoRpsYySW+3snOhd36UM7187iLbgFZmTp0u1QnmT1+aGFNhvQUpgXv5rTGhIe/pF5mads7Lz9BrIBY3cOYJL/IJA/5ByvGmLqC/Qx5f4vm4mJA3NQ5QexBcA07vaUjhP2P5+o48EmrulMFsZ+xqUzBd1mDmrJdrr8oOhNqV0mpDoXu5b30T4LL3UcXMNpZmwvzMpLdT9bv9zbmeJjN0RRJTago0JLMddT8c2LxDQt9Kai5Muj1XalIiiBKfSILuu8jLLe4bCpFuBS0GHKL7x1h70Vh5zaEI+kPzLYL1Y/dmRFESKFPgTKAetvq6B+zKax39sMrCv4fosHZCQs5gdwoDuEtUSmnqXU2gjdVbJZl+uclPjLWHvBoAyBE8OsCGeROQP 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)(66574015)(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?AembRaAXx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HlZ5jsGsaUj?= =?utf-8?q?EqqHYL80np8GfVwq05lYgTSePUy6wgWXUs4Vy7XFh5fS/eYOC1y0UaJuttwOU2zVw?= =?utf-8?q?faTu2mzxMsWsadv8CO6Jm0c3wUuCsNruZYHsfy4+pZ17YJyK5ht5rTPxcwHJrgJlK?= =?utf-8?q?FUrNrG2YEhqe4el/L9g/R2sVAVlpg4zixQx0slAGL6siS22HkkGBsJ0FMo/LUVsqf?= =?utf-8?q?8DUlLYKJTcjss5CVhob1NkScfZIXqR416LzQpmNZEk+6OYNvc/68Jvz+RFW3CW+Kt?= =?utf-8?q?EQjwtehEnzvnxyWd7SaNDDJ1Td2PLzlG30Fu6weortqW5anOjXB1SenMTiVpCmybv?= =?utf-8?q?OhZq1yf5YWGtaYl/jgio/pq70/G12MSM842tcwgNrKfMuMV+A5dKMGJxuEFbHWhU9?= =?utf-8?q?PngPGpC0H/AGZppzLvsE0fT5on+5e4yDVGsYWzZeN4Qgt3Z5gSvu8lFlCMid56SQ8?= =?utf-8?q?qjns0PdVsx+JB46JBjilM0gSTagOZe2T58GcJZmnmmCAWuKCZb5j0AyMAkMmBCoeS?= =?utf-8?q?eOm/xE8DxBbU/pSXvQZdVUo6I7aBKV/p+D2MZ8V+AbqDbdObr45OHf5R203Y61JB2?= =?utf-8?q?8oRGykacqolJsTNxS4g6CNzA5UUm8wlxUEk8mSu07mYBis+7u98/qQaHgoCq/Xqjy?= =?utf-8?q?NCI5K77XxNG2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebd6aef8-6ee5-4147-b2a0-08db8e6f64d0 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:08.9240 (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: U/v5oBPRnWDVpQKHQi87fnp2GlnSk69uvAjuYbxSIcA1XZUTPFTsPcy7T3lJPgXubBccH6cTRvMTpPt6M8urjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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: Konrad Dybcio Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-msm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 1c935b5bafe1..80e376802ee0 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -2668,7 +2668,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) return ret; } -static int sdhci_msm_remove(struct platform_device *pdev) +static void sdhci_msm_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -2687,7 +2687,6 @@ static int sdhci_msm_remove(struct platform_device *pdev) if (!IS_ERR(msm_host->bus_clk)) clk_disable_unprepare(msm_host->bus_clk); sdhci_pltfm_free(pdev); - return 0; } static __maybe_unused int sdhci_msm_runtime_suspend(struct device *dev) @@ -2740,7 +2739,7 @@ static const struct dev_pm_ops sdhci_msm_pm_ops = { static struct platform_driver sdhci_msm_driver = { .probe = sdhci_msm_probe, - .remove = sdhci_msm_remove, + .remove_new = sdhci_msm_remove, .driver = { .name = "sdhci_msm", .of_match_table = sdhci_msm_dt_match,