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, From patchwork Thu Jul 13 08:07:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13311462 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 615CFC001DC for ; Thu, 13 Jul 2023 08:09:30 +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=P+JFEKEYGnr0v0OitaiZ0CrQNtcwHLwALQ+9bl8mC10=; b=GfZtMrpIBWx9s+ BnSCzYPDoT/PuZqcXwjvZ0n9ZDAq9/4LgGsOaP8id0A8Api4oSAye1MeVHbhKHxq9ZXKfd67S1hQr 9Er7WI1REMuiPh77zarDdkxy9WZp/o0uJbZYfHyZO7jEMl8fXKzJhpxIDC9AVT09CNBhyt8OYck3T 70H9jjcMYZOCsacLsBPl8IVawcxI9pEC5x1U4NR15ewppv7mB+n+0Z8fVHQTvCTt2f7X02h4MVzuU mlDdwV7bj05S73d2+glNv5JbJ5HTdhEsbCabAy/CUt/8HwzV5z/xypdZkWdKL5trzF89DP2AEYLA1 tUB1ML3Owj6TZaVLQiww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJrNu-002NN9-0K; Thu, 13 Jul 2023 08:09:10 +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 1qJrNn-002NIQ-0P; Thu, 13 Jul 2023 08:09:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gtbjwi3bMJ4PT157X+c31FpdqBN4rR2m/DZ3uPjim/3Dw9LH3zOn9/Qsreaw8QTmtZOs1/CNtSLcSp9HWmcJIQRiF6cooU4aKfmw9KXgYjB5FWJaiEh1NY+lKjgZG3qtR9oipfqjlVMOxV8XVoVuqpk5U7523EkpZRs+pWijh6JpqtFhNSlwiY4jjMZCsBD+gTbBzd7wDE4mwEncP1F5VI12kDBMOlhMdlXj3E6o5VZXwpdlSd0VgOOCGJDPcp3zcRhpXJNJ60davHID1bqAG+Kfh4l4XQQKFu6Y6mTVk2u8cCUVhy5ECPaMnTJ63gDLt85ZYrjO5vhvGSxSCwLSmQ== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; b=TOssskRK/ma4nVIGmiYZG/oj7cyb10LBspc79lqClUS8cg4j2aO8T2fP2vM5Ns10j6cACCQ/mhtAFg6FoxpNbrznkR7HaRdU2fxErMtX/NRqWqGYd0AMvaTtyqo8Ib3wrGMYQNcrSL/wnlPQQuOY6e0j/X1DZarJrvOFtUkyFHYWZQpC6jRtIdABfWMsV3EjGQR2lAPjMAa2PWQEN0el3roTq0EGqWm1ZrmjI+CeRtsu7FiVEsRFPp/BDHCxoBJ0u8NeWNUIKDq01Y3u2/qKQZE9awbOppqrtIVbwiYTtVH8Rz+oEeH9IaOXYUlrcDKQv7DrhuQCvuNaLH/sFDAhhg== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; b=anh1d1P40Ys2f2eK+reDjVm8aviLTejyDj/1BGkUz8jU51qTdSCEnuqgNCgSn9IZx5uqJm8MYlBpnYvaqaj3gq0/SaV8zS+1RgPYIBPO8C9KQ4vZemZ0FPANehYr9x07ZrlRzKyIqhRYvydZ0fi1iy16Moi93R7p2SkuZxtFobrU97n7BfXuIkUrHSSX3o8SDiIp1w06naZzSomFB5Vdh0v50bJYjNtPh+gWl56xAK95z7ZTXkkWTAO1rqXo5uaIQf/ka2Mf0UjO6cpquQhoijKY0/ltA+6MMNO9p2XJK8yRP7Ms5T+j2Isy1v34VmVB9S3HED/Pd3R2ATpuI2XA5Q== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:08:57 +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:57 +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 21/58] mmc: meson-mx-sdhc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:30 +0800 Message-Id: <20230713080807.69999-21-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 26ac4f88-73a2-4056-8e1f-08db83786866 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eYXkFKu6vfoxGuLAAbTHGhRVYtaUH2pyuqXtBWPLqy1bTD3jB4saY1QLmPa4r/e+H8BZxNtvOULaMT7+zlF3cof5cGwf2LwDRI2c1RFyeuSEfB9KQ+1QIwYo3BrmiazasE0cB6WiEtV02Jzjrb/XgKviyyHYMIvz/oN9qNODhBZa+B4kzyVzN+iNIIpolY+7tOaAwnV/+Ux+dmYB27cMcph/nshKbe3MrLktDqLBxPfMFmfPDhtLvAMymSJq49AOOJc+aYdBvU/Yvit+O0+tf1ryvtyTdjZ6WC6VVlp/zs1Nf31miBrMbMQ5ikwY2ZYuMaWwdTUhd++vvdym38sGmiQTfi5oS2qZVV1RIGVlgKV3SvEu5pY/vWZ6zeYiGzz6LOl/d/0F7xAk0+XB01pFClTB+grBEwbBPxnhfWB+0emEvVxxww9hTg/pyS0u7awj0s+0cOeRNnL7jGA4+187ze0RLP4qspg78MC1Vyq9eIvVqIrjvR1ZfuZWzRRhZy6vRZJjndAPM0n5pBdZWjagbVi7XSlThz897GkGtYToMu/vw4p4naFXeb4DjDmwdPAEXQbIpLrm9f2X5sOcAJU3uVkpAreZhXVZCp+NYs6gBhPIMpYDFdA0x6dAanpt2u2f 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(7416002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?8OPa6vUlONNlE945LtdDcMRE84X7?= =?utf-8?q?4rL7J2yjoaYxtKtuwwSDMLUfgd/X/GbJRYyBKLGNAgkqIkZe9hQRX+F0NHTwLcLyk?= =?utf-8?q?SvFvbNxcXpZas3tQeBRlqJkcftjWB9nNWWv73eiPtdZzG5erpWHYLVjNAf4Qsv673?= =?utf-8?q?b90FvDGeXFJI5CD7tgwKgVY/2BWRKPCAPnN8Ei/sgBS5xV+rmdfFvCRj0GvaZBrgv?= =?utf-8?q?N9TOstRWwvuxxQP9R4rFWRUqvi6finUIWOu2Kawz2i1WK+VkJ1RlW0uznrb0sjz7R?= =?utf-8?q?zQ1CO2IgoBJ2Ju0jx9AJx8V1weHqVdZYgGd/zx4xQSaTlDPaYuOR3bLln4PlOC7Zv?= =?utf-8?q?ifwiP2+0BQ9YlGRfNJO8sJVsSui9Habk9Hctl0jwZ11irlB8ylckU7X1w8/Shx7H+?= =?utf-8?q?gMBEYmWWCWqXzY4isvfaSsJnhEgnkBLrAtmhIWo1S5m9eePnK+8pyE4wgfH55HUlj?= =?utf-8?q?KTSCdMzkDCWMwgiAvzInFBhR769POFDCp/yCXr6lXoFRoDrbzzt4HlywCzBtmX8JH?= =?utf-8?q?i9XIwYG3Gau9oxoSojNE0U345rpKFIKP1n9hCPxBVkFyF3fG8EOwOa2tozt4BSbct?= =?utf-8?q?ypkFQ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+ulGoMr1JQVcO0q6mNaYktU5GyNFq97GNGncEPKcqsxctS9?= =?utf-8?q?MFgy27bvatRj?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 26ac4f88-73a2-4056-8e1f-08db83786866 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:57.5249 (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: oADOEEbwers0GpVImxfn3JrdK9DSumw8CGWp153sXMLqZfzsJIw3Xmm24bRd01Nev1vZr8kLhDQWB4h+6IwEaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230713_010903_175309_35FCA204 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-mx-sdhc-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-mx-sdhc-mmc.c b/drivers/mmc/host/meson-mx-sdhc-mmc.c index 97168cdfa8e9..528ec8166e7c 100644 --- a/drivers/mmc/host/meson-mx-sdhc-mmc.c +++ b/drivers/mmc/host/meson-mx-sdhc-mmc.c @@ -880,7 +880,7 @@ static int meson_mx_sdhc_probe(struct platform_device *pdev) return ret; } -static int meson_mx_sdhc_remove(struct platform_device *pdev) +static void meson_mx_sdhc_remove(struct platform_device *pdev) { struct meson_mx_sdhc_host *host = platform_get_drvdata(pdev); @@ -889,8 +889,6 @@ static int meson_mx_sdhc_remove(struct platform_device *pdev) meson_mx_sdhc_disable_clks(host->mmc); clk_disable_unprepare(host->pclk); - - return 0; } static const struct meson_mx_sdhc_data meson_mx_sdhc_data_meson8 = { @@ -925,7 +923,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_sdhc_of_match); static struct platform_driver meson_mx_sdhc_driver = { .probe = meson_mx_sdhc_probe, - .remove = meson_mx_sdhc_remove, + .remove_new = meson_mx_sdhc_remove, .driver = { .name = "meson-mx-sdhc", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13311463 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 177C2EB64DD for ; Thu, 13 Jul 2023 08:09:58 +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=KjYa1VerbRKGruMrBiXPKyIvJYVBxnffF7702MV2HBU=; b=t5K3fVLJtzZFEl pbsoQ6h1gyzxNqqsWv6djkACgpylOWIHNI2M08Kj6wNSRhOakm+1+okzpAxvFMCll6vwnnhnGgATD jxBah7Ofriyz4qVqAPWqS5WZr4NH1k7/0wgrhW0ClyE8nZU7cecss8+pRJdnnK4rsL5K2PPU049gq Lw4ZcOqFnxpNm7p5ENi3bmk6fzLyvgoRlLV28PW0t4rhceUxQIMQ1WWdOXMkW6p1BM3UivEi+w6zF Bda5cQTebUwynjIbFuqSLe45MJ51YzdioQ8Uj5QhZzyrjz79fSeykEyKk8lBT0C69atTwQux3+YVI 3r8ok5jqofMe5TI9ONMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJrOL-002Nha-1E; Thu, 13 Jul 2023 08:09:37 +0000 Received: from mail-psaapc01on20721.outbound.protection.outlook.com ([2a01:111:f400:feae::721] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJrOC-002NY2-14; Thu, 13 Jul 2023 08:09:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oepT/ZoJyvDVwxR4VR7zY+fG4EuW9UVnViY9J6S7zk1Bnfwuy0SKC9mXZphEXwqjLXryhI0XGwQfrj4x6QNIiN+Wu6jOn3E26H+0AheIvMAiQW1pG12CSI3VM2I+xGZStE0DQPpkvJYnJtivV49bp15CdGjLJEP0QhYhJjdFAEB33vVCSkBUkAlnrBizY+Gy+LqFTcsvrEywlGs1fkv6Np7mA+Hv/cYVskjazzadLo2VRsXr0JqKhgx7kL5F3SRqHU2lC10U6SNnXaDwRrAvQh1HzjYWwgI2rHLW0kdh6o6DyTTZBiClIIr0y5doudKQqhuzSzDNoo6BB0J+m7hCkQ== 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=uMtEtYh4yggL3P4Ktr/c7Zr9RRKQR6LhGA6gTsORCp0=; b=AeuuckOgKEMLg6D8nyyu/sQNCsY7pMVrQx7YuOwIrtq8sZCCOZ7Ss49IZMF9pXs20IXgtYwypANjzsccpwuRe2C0AXv/QRe5Xx6iarYDu/hFoYaGNkmYTtJYwUmVWsdOMlCWf9pcIRLU1YfeTY/DHX3Ahj460c2tgJ8ICs2rWAB5kuSrP/ZoQHv/H+bentY+E6aN96It7We8tk/CNW8Mw6GSNHj++BLLZGgXbV4tpjJNG2FoLM82thX31nYRiaVybk7G/l5G3ejS41C1743kZ+thzn5FvrLFdiQ1wBAeb5unGpsAgb5aYZTpeLB30eX0DKcfMOPD2y3d/0AeXThjog== 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=uMtEtYh4yggL3P4Ktr/c7Zr9RRKQR6LhGA6gTsORCp0=; b=get4PgZLKhRYMqQxX5xtrZBI4EueLM/enpmA6YrBHnN0tVo4RaC/rU2gfUgD5BGHIyBHuE/3kun6p1IPCYnj7cSAAV4CamNey0pfG4lzzcdQAdjqXvNXAFgczmYkR7bIA3/NZYHl66ZlJWPdTNbhVQHF9kQTA6RK4CbGXtDDxpcYkdN5JEB9xzZyRTqc1D0gaT9jJB5a3CogxY6JYzGmQNGs/5j0Xeq/l0kc1zovQ3SVBTtAwuCqZIFBef5QmeeUnNHyjxKlkLPHSyWQj5i7mVxeCSRoBlVOke/ULCRq6rttVVq7srquEboIX1IFeEp51aeTuwG0zP3A8XObijmvUw== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:22 +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:09:21 +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 35/58] mmc: meson-mx-sdio: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:44 +0800 Message-Id: <20230713080807.69999-35-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: ec7bf0a4-a3ac-4054-a764-08db837876e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 16MSeHMUey2zVk3KeGERPfX8XV6QLbsK4hPHIMot37+9Sz7Qahqwq7+UvyUwmAZeK+0C9wIpRCRiU4eTyFxry4dF/NsRJwxJ6nMvJiB8RP8X7hBmboEUqPzEEPIqjhDJBlXStNyK/SybASANvjVEHv0YZyO6zpuNaJT2wZqhgxxuVb8fGNxyauMBtPrmmeUJtiueU7EgXT7X8m3OVGeKD8X6vLPRmF0H6DjU1s5qa5A0kWVbMCTACgSFWGOhIdekM41Vk2WgJSRjYA0OJiiZVAcsXeHdO1MzRdYet2/VPps3rEpVvwB3kSzGkFVoAs8QNf4FSe9Ge6JQHCW2YJ9Pxi6M6/oPjvSK8ZpjEyR+EWmA0MxBdiHuG+j6+SqayjFFaGEehkLZApJEQC6pcpvh1cCY7dYjrcA9ilaUlIXMlEZKvMVPLqY6KhVP9UndiEPJwOQGUzb0huZVsO330lvWWiHDvnlhISTkZMwLylLYnnNoJERZCysgOQ8q8gRCSTtqELlEAJI+neAUHl19aCDo7umLUOPPj33RteHKOk9p2wy3Fja+D9OvATSSmTBmVDENHEag4q1K1bSncOgQf73kMo+5qXXwQuFWdlKFl074oC23RMvM+msI49SA9lNtW7lq 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(7416002)(66556008)(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HNiI0r76n+KCuS+bGOY4sz+K4iNbgzYPf7T+Wi9zZ?= =?utf-8?q?8Dwy6X5i4YkBaudnmkJjYFFHa3mYI3HO6R0FSjRM7Cf3klE4TZhXkKDNkNszmSXpX?= =?utf-8?q?gTqc1JQMpC6qX2FvGd3JY/wIWh3yWzih9aX3HH1QQ8/L69uK+Dzjmj2qjlRoMuVjV?= =?utf-8?q?IdE1S2lS3t4JbwdCBCVA8eek7FYebtVI2VLck+TtHqeoUdgIQ7l09O0fYiJi37MvL?= =?utf-8?q?jVv3M+B/KGuC2rq/20NuJMRTyLWY/JlsAS4qw6ZtRVxym4Kk6uH5txLyrLQTBCBuZ?= =?utf-8?q?SW72bk/M5T1oS7rb0PvYbTaFUaTFrs11AWUND2cD2DeRUWNHwjdDdwbPq+52jJn0Q?= =?utf-8?q?n1iQQJrb2Z9GxPiwFtDUrezkpexOY3V/nnR6oyZjErbNe7usKWAjZdPT/vCromdFi?= =?utf-8?q?f0Z/S2jEBZlawymTNe8ncil73rHAlaRJwcZP8Q0dM7JdOC9C4Y+Y2ypHW07m91K2i?= =?utf-8?q?UP5zqiZxSH0xkxy6lSdXM3pQmwUylXwMDTBbpBWFdy7RleqIlY0QPFHqUrq7oT+TX?= =?utf-8?q?G5UhXUBDr+5Xq11DGAj6ktJlcYqMFhXVqdCaf78OJh4qNqrWtS/TbT6Jix5XVtuHS?= =?utf-8?q?iltlrGRL+0HRdgT98rvrIuV/HMQX0w3ANB25oFOrkyELmeg/+5dosf3HHaiu2wGjY?= =?utf-8?q?rjibH+IBH2lfhsihZEAe80J9dFO5+vsDOCSpJQVBjlbM6ZN/bKl2fC+YcwYQfRpYU?= =?utf-8?q?Cgrm5HS+rdRC?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ec7bf0a4-a3ac-4054-a764-08db837876e3 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:09:21.8488 (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: vUDynbJ95iJrmAuHYp84wtGmS2lPp3GnPWZQtu30c5ff/3E7x+0lxwNM2rc4wq5kJTd6SWVrYg7eSmQrkLvhbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230713_010928_375067_1C4794E2 X-CRM114-Status: GOOD ( 14.47 ) 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-mx-sdio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c index 3a19a05ef55a..a11577f2ee69 100644 --- a/drivers/mmc/host/meson-mx-sdio.c +++ b/drivers/mmc/host/meson-mx-sdio.c @@ -728,7 +728,7 @@ static int meson_mx_mmc_probe(struct platform_device *pdev) return ret; } -static int meson_mx_mmc_remove(struct platform_device *pdev) +static void meson_mx_mmc_remove(struct platform_device *pdev) { struct meson_mx_mmc_host *host = platform_get_drvdata(pdev); struct device *slot_dev = mmc_dev(host->mmc); @@ -743,8 +743,6 @@ static int meson_mx_mmc_remove(struct platform_device *pdev) clk_disable_unprepare(host->core_clk); mmc_free_host(host->mmc); - - return 0; } static const struct of_device_id meson_mx_mmc_of_match[] = { @@ -756,7 +754,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_mmc_of_match); static struct platform_driver meson_mx_mmc_driver = { .probe = meson_mx_mmc_probe, - .remove = meson_mx_mmc_remove, + .remove_new = meson_mx_mmc_remove, .driver = { .name = "meson-mx-sdio", .probe_type = PROBE_PREFER_ASYNCHRONOUS,