From patchwork Wed Jul 26 04:00:15 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: 706822 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 ACFB2C001DC for ; Wed, 26 Jul 2023 04:13:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229573AbjGZENa (ORCPT ); Wed, 26 Jul 2023 00:13:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229969AbjGZEMf (ORCPT ); Wed, 26 Jul 2023 00:12:35 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20715.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::715]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E979049DF; Tue, 25 Jul 2023 21:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G4V/6frPZcW4FMjoVNkOcaspGo+swmq2yx0C1PyQsr1vJecn+L1Bqt+GK8DADH2GnopsNO0d6OkKjDRqW+nqIQahoPl9Rr8A0cYQmnhK7BumCG9QMj29g1/65hdeaU9VTlXge0QfnBq8fV79OawtHnLCgBAmuCLtblboYv9T+SJ89jGCGcxDDD3W4uEu/V1kYh909ZsCH1/3wiTYknXm4/vfynfmAApzqo2P3w/crFk80mfCc1d5I4YDYqJYLKUHG1PL9pEyVBAQFbnK0Yitba7emlGdU+Ltc6uVnu6a2wij4lxBwb4Cr1eo/qUjIUQv3r/bZ3aviXMBoW6HsT50PA== 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=AnKPJhoVozAzcWi8YwnS6XpJOWXaUUGiesAZtgULDHQhmjM1S7KSWrDr0R93oX3AQpJG8s4cDwvPcUKALxV870v061aus2RPFy46eTHwInpCHQVDwn9AymyzpXsPoR55ss/6qr6kJ9ysrLNn9hKl4frp5aWm0uHTJ17NLGMXlKL3DO5sMgBAdiK+2Ymk1P0ATCz5VBEoyt+Z/EE26yiym43gqMhhhRBzTr1M9jbPlUhl3xdT38c8NZ6x3LFbReLej5KBvzY842/LJrUnxN+y3fmMbzR7lIYAAaOH6A8yEIGkYW2OVEqsLG+RYPY338yWkLJXMzZgL0nMWOb+DlD8sQ== 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=ojocoCYpCeQjEArK5y0HDcpzsvhgA5hjZkQN2/9NDbl7IUVbgsoZxI7kItuaOlIv0ZyAn7/ZkM+9jTxQAKKL4JNTDLuQj4b7pEmc57cJjaf2BjMIGuGwxDZ4mIwqgjohXKY/QyH3urFLpssNUdwVvx927ExZtWmKnbQ0QNc8GDk65AQqGjO27EmugHuD5kxeGtjN4gpVi/Rj36Cp1Z09dwBFggSmDtXlLL6DqzC+FPLZc4Qk+4vc78W1pxQXheqongN7uOBIG1DfNiZnz7TK919VLyeKvn/r9ttxwKqYWFycxoK8ViYfKZMIu18j5aqkSqQyPfd89xn5EfFHisdc2A== 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 KL1PR0601MB5463.apcprd06.prod.outlook.com (2603:1096:820:c3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25; Wed, 26 Jul 2023 04:02:24 +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; Wed, 26 Jul 2023 04:02:23 +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 v2 35/61] mmc: meson-mx-sdio: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:15 +0800 Message-Id: <20230726040041.26267-35-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726040041.26267-1-frank.li@vivo.com> References: <20230726040041.26267-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB5463:EE_ X-MS-Office365-Filtering-Correlation-Id: 37aa22ff-92ae-443f-fe98-08db8d8d0f41 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hbam9d6l7XOUl6ysMZwFRiRuBIQrhp5a3KR48jAH9K3EmiJxMoJbgYw6NPErsVz/HNBRztQXh7LYY4WlcfTB3BBJxL+JRIh+eIw1zdOI+ZgHECtDIGqNHnwMlRr+xYkTYag67zaUcxDPeftyJfp22B1rai1AwEYnZU2w0EK7GtBgxKMoXhimyMegTRQFoqa4zG+oLMvsgcltasoLf0XoLu1r51JKt/PFX3bngBNbDQ7q9CXGHrMahh8MRMoxy1VRQBI4Qwmdn3j7Qc0rYzGN2UhuYxblhyVTVCP7bU+ak7OQdmGLUpPckFP0pMHzS13/v018ODWAFjiXWD3MAtypeasHitKXEhoyFwv+QcViuSsTHXeqZ+2ZMe8roGBDBYygcPlBAZoMfnXVlqu737M8QfNwxn8kpSTVWF32iFAcRtvfNbRa4VLtneETTLcVbdB2VV2nJLNpR44DEBEEz9mahZbjBJhblCiIOTznH0Mmyje9TVdcJV0VeIkFFi7Vh4IIC1ZRzY/EfxIjPjP1TSifLqYxWuabxV/+IqPxTVHBNdym8TOtQSt1oqfdDJNNMbossmUoyhVXNU7aer/eGSqIohd/FtwSpBU6ZY23EMhSZ1Y+0Qv9cPlFHyaiP008w0LM 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)(39860400002)(346002)(366004)(376002)(136003)(451199021)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(7416002)(2906002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?TmtXT/OpHK1C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nrRaNv?= =?utf-8?q?8pEdnYP10hPoJvrKYtuEp7ovTmBakMtPvT+Cxjwu20fdeHotqiFrdAHI4L3PisXhr?= =?utf-8?q?7r8/rE+sC3bh4Zb7Q9nc7r7OlkzB0ckt+IzUgw7ZWIJ/TEmU/q9pW2EBZqJgNBv8d?= =?utf-8?q?8Qs2D2nHNWDS81pgbyJwOM+mYf96yuCHx34zP7x4odiI8+hYIMljb6Sq4rU5nDeNa?= =?utf-8?q?QAxu++5J2S+8t33HQQYOEmXuC28x6zlIhOOfJgFp+Pv/ZEioq8rxMeFh8wlbEARTZ?= =?utf-8?q?E2I1OVhcnaNmZEL4TkGoNLO2tmI3jXGdTMWyQGsWfYgrTQv7coCHTzOwIApAIztq1?= =?utf-8?q?NxwEmuemqbk7J+gLxUE+0R6vffnfU9I8pftD5iFzTuvpsJC3ZhP1iczTAnXbw+/w4?= =?utf-8?q?TYAEKgPaoB+mn7ICV1zcPsr2u01xyZVUrjsZJeNMRwYVR9f7RZpqUeOepkW+vG9BD?= =?utf-8?q?SZIo8y+Cz4IZT5w0+u7VsD/7HyTYLwEOL18pz1noKt/OfLWOGck2b6zm0QnSyB3Bn?= =?utf-8?q?qrqxbX13fV9RJ0j1LNDhXtr7lGuq5bdVs2B88DIA65Jzdi0d0zchtsW9vMcWu2hkf?= =?utf-8?q?nh1QukGAI06EtWCnyvPGH8enHGwBVS0GeAEZZzJj/2MPrDfEIt4DrmcXoAVyf0NTh?= =?utf-8?q?hGdVWfMQ+9GE?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37aa22ff-92ae-443f-fe98-08db8d8d0f41 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:01:59.0234 (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: gFemOGYolw1aPGhILnq6p4rZNgOP0Z6aEg4Nq0ti/T4ZjmBobImDKiWslG1s24MVNHROCJriwy04TNRn7mp+ow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5463 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@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 --- 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,