From patchwork Thu Jul 13 08:07:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13311461 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9ADE6C001B0 for ; Thu, 13 Jul 2023 08:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HCtA8SxAow0Q74RNUjV69nS0UESLS/a9pA5RAJh/xFo=; b=gLdZYq64QUTq9F 21/tWEDS/jI1BLm3mUZlCiOtHRY6/JayCYIBaS1FwNvbNJoYFJzFQ2ogsmikBSfD5gxKlyE+ekrhM pZ5IBP7Trmrfbv6gwa0ugVLuvinS2Y5k5PMQdrZliPjhNygOSE5NZH+HXFfRnSSHnw33JLj8YMEpT PAM9q5Tt36VoBCcaqPYtQG6IimFek9joTZaWhAwfqgZ2cOaHixq3G4mfd+csxNbQvUnAx/7GKOH44 j6H/Ur7Fy8jLh5+v/Ml/qdf4aht74SmqyqhgqgRnc/rgictt/UKVX9fI564dPHz7+o0OsfGTUPZHE KGOXh3ODOQw/yJbGoQ6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJrNk-002NHk-0A; Thu, 13 Jul 2023 08:09:00 +0000 Received: from mail-sgaapc01on2072c.outbound.protection.outlook.com ([2a01:111:f400:feab::72c] helo=APC01-SG2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJrNg-002NDy-0a; Thu, 13 Jul 2023 08:08:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JOgCy39PpsGvv6V5D/LyVp2oAQ0IcjqlbjHfCLtP+XeFex2BBP0G8NwsF6PCRG00Dsft4wmFVagjGRawxsxEBhZcmcmbgivBxnm820iQSORdDDpqagE7AgCEJH/u7Z2bYlP7ZCUQElDuO6HtTG6rWRePkAENfIfECcx7UL2L/yYPsjSkWpsz/Dy+1jB7mzmj2bqXeGVe6K52TxeRgu4pOGwzDCDlq8n9uj6AjShlR6JHQQNcU4UgK63B0flRI3LXa1zuKXb9pUD2Z1zCL+fx4eGkbO13GU+9THx16Wo9kKvP8Hvo9qD7rDy+vOg3A347OMNgCfpNlklk0hjpf4bYzQ== 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=sJmqNg0QneXTVaXei41tdTyNv8PCANAb8lCgdK9ikdg=; b=ZdvyroEy+lP6VsZhku70d1UtWeJKO0yXX038wXOQ9tuBBk5hBEwqUVwndHMOqCgL3mv9MoR2YVhrazOWPe7Gb8uii+wU7ZBTS80snxTkElyLPhTvBSzJIYsyse/TeNjjF6DkhULcSsk4UW3OFrPV6px+VjLmPhwz5OsxzZWicNCyx277huPUPZ5hgVlTxgC4kUClnhYhTDemSAgQG9BDxwGde+w8ROsMw6bv1ZSdfwe1SEZutIgZsZaDD0a+VDQHiLKigV72VqmFUPOksQfz62Y48WrldHtpsP9YCwB7tbW5Y2tSzhyLF6od9fWt4+xwqBsQtDS0LSoH5XIcLdKXsg== 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=sJmqNg0QneXTVaXei41tdTyNv8PCANAb8lCgdK9ikdg=; b=YcnfxP9K0d/WKHpzKVllSw2/5rOS53+3k9w+Sy3qjAJ7totNKQtQzk8+q+2PiFXxoIeRk7zjVFuWgt7SwsEgf7tvIzU+UYrVIKbsImaJmfnqpcdNPYCzUKULhvlulGSafVbtugvXhX9fwGZddk6i29FjvUW7BJR9FFG09CsmcDX8mJwVUtIntTsQKg7IECgcz56hzAy8WWazKWGE/DxdGpOblTPOVBoeNsM2xMbPCq99R8n1nkuysLvaffpRhX4sU28baDog4gZWRhUXUO4DUJcO3qq2gFYu7LWwHRgkO0qP+SzngRs1iWZEirz/xApk+N2p1G7IpUZd5anS2TPzUw== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 08:08:51 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Thu, 13 Jul 2023 08:08:51 +0000 From: Yangtao Li To: Ulf Hansson , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 18/58] mmc: meson-gx: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:27 +0800 Message-Id: <20230713080807.69999-18-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230713080807.69999-1-frank.li@vivo.com> References: <20230713080807.69999-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR02CA0091.apcprd02.prod.outlook.com (2603:1096:4:90::31) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: e4bcc5f0-125e-41a1-fd33-08db83786499 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gaXHu4hn4rtQ1qTn2+bI5YjoNz9+/QPpQAZVBWHoZsBjHBqIJM35PqNonsPlL/zbtj2FpEmOCBTbdgXIg36uR2D6Pe1lZdOU9wDSGMLP6cBq88lLeN6o76B7+4mpPjsQvYrAqrn7XwlKMu1hGIm6cVIzJQI84ei9nWiyR7e1vuM6qO+y06pSuGulA5i1Dz8G0H7SEiGrX8GFIA8mUnvWbjezbqOnjXDzyTgiESHC3wJbhM/WF3xAktYkUo1XMAhwiFRAxEvDBvJwMurBLLPXHXyUdIEtMx51g47a6hnLaaGnTaHlmV9+ySXKIZ2o53yipWJpae5R3o6FpyF8Y+Ik4jDPxbxWhvEyHu1zuIyRDuIGUYiGpVwIYzgD+uVy48rLzOvUFxFWttXgIDg88iAL1gmb2Gtzju4cfQNfM72UK1GK2Vfj7l95QxfdoFOraKHKF8XUE0n1Ay9FMcZlM6bNT0yQ8jdqcV05ZNfTGNOtfBL1/sqakkhGcySAKFTckVeVueHpWQBZ5c/LmGxCw/xbAfD96Q3AdMTbnUwgNanGJqFHb/3Dfh1IGHMCXhK/HhAbihnVt7wRox01iNDA/7A5G8J3GXo5AnGX9Lawo7amUnNOq2nezd/TX1UCNUCZ0OFCOPQEbEMmXfpJwjIL/oRvO1KSg/DebAdGnR7KKz5Z4PA= 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)(396003)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(110136005)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(7416002)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?VNOGT2x5KCa9kphtbG12urV7Li/N?= =?utf-8?q?jMTq5n3ER1k6Yvmkns3Iq9PnIvlm4/lOk6m5MnJijzHSb5PXxo4/7Ogy9+Ia1N3Sk?= =?utf-8?q?DbKg/loknSfECTK8nxDzhgIg22r9/q3Zl8oRhb5v6uIwQcuicMJvoeAaFAAkfQxPq?= =?utf-8?q?uqvjU1iBDnKOW0fY2FlMFBi1sOeco4CupFMp5wo7bGfnECRIlC3VqEVeKjmNa60A0?= =?utf-8?q?cRC15ixWJVeAPpvKnMMh7PZiMuh6ievvJpGREvHED6oqecVG2sGM8rqW9Xz0QjpR+?= =?utf-8?q?iPaJhNWlp4+UI1GGW3QTGh2zdDlWiDfrD6OyF7BKhkc/D4jMLchCjRF8OS+q8TEZs?= =?utf-8?q?dij2VenDdXUS3I2zYkF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XXTSlQsPs7U1SDa+2PhZrfouZC2OmmhMB?= =?utf-8?q?39qAWveRo/96uh18Nu7uaH1DDSxxGSQKbAuGCVJYzPPWQpt3imwj2RF5BweUDx1QJ?= =?utf-8?q?d+nAQWc55tZnmP8kWXkkZYv1m+lnFMK2B2SjeSSrlOfB7lt0NtJnnETugwJhgMqx9?= =?utf-8?q?RfNQvF1t7Txcht+rygmdp0MU+JeHkDW0ykAWtziiEhYQnzTXjoxghAKNUDxokJaop?= =?utf-8?q?43rd/37xGBjqt/Regp0DzIZiyAbLXdcTYhqafZwa+Cv68ZzU+y6++n+J4QSfKUI33?= =?utf-8?q?WsY9fH/vbpRE?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4bcc5f0-125e-41a1-fd33-08db83786499 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 08:08:51.1516 (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: wgytmeNpYFPSQeD7l0zJpWHAUh0s6rn6Dt3ddBa/IFXfZ3o7PFM93QWp68Wn2hBg/5AuaXui9dxtVEvvGNDTbg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230713_010856_231204_C9BD1B39 X-CRM114-Status: GOOD ( 14.07 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.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 --- drivers/mmc/host/meson-gx-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index ee9a25b900ae..106ebc1fd36f 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -1297,7 +1297,7 @@ static int meson_mmc_probe(struct platform_device *pdev) return ret; } -static int meson_mmc_remove(struct platform_device *pdev) +static void meson_mmc_remove(struct platform_device *pdev) { struct meson_host *host = dev_get_drvdata(&pdev->dev); @@ -1308,8 +1308,6 @@ static int meson_mmc_remove(struct platform_device *pdev) free_irq(host->irq, host); clk_disable_unprepare(host->mmc_clk); - - return 0; } static const struct meson_mmc_data meson_gx_data = { @@ -1340,7 +1338,7 @@ MODULE_DEVICE_TABLE(of, meson_mmc_of_match); static struct platform_driver meson_mmc_driver = { .probe = meson_mmc_probe, - .remove = meson_mmc_remove, + .remove_new = meson_mmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,