Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2041816rwb; Thu, 27 Jul 2023 00:44:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlG6j31jbblCg2n3uhOWcBE0QrhpKbL+zjgfb3CiAG7v0cmKu/70ZrPFwaxVMA3bxSpbAhrD X-Received: by 2002:a17:906:10c:b0:994:b53:77fc with SMTP id 12-20020a170906010c00b009940b5377fcmr1498288eje.12.1690443890155; Thu, 27 Jul 2023 00:44:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443890; cv=pass; d=google.com; s=arc-20160816; b=VsisFKRaFN0NNxBmWmisDi1Muz98t/G7gaS3d8yjzywCR0/waH5Q43lHhDR7nsvmSZ n95SMJhtU8+teqkcBplL3UkzIgZDoxMQ8KeyJezexrTGojthzF202VUz3A9SQp4v2VX0 0wxHf8EASlscPNcgYDVNd0OPNoAXoxQRrMaA5Q+ZkxbH69i7eo/CcX5nuw/V9fgxUO0S W0EAfkRY856aHP+MydtzQgFgCpdjy4BcFXMs3wtv/6UfLyC+3LJXWvRQJtr0MaN9ovwd utqMJ+Q3jhng04Y8eiTs0ohHtS7ZuEPChwNkGNy05H8J7haMi97nuLTkJtFgwyCQyPsP Q51g== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; fh=wkz2ovt44M2hf1vcx/1C2T6B0OZQr2IK+YjLz7QXoPI=; b=kiWDsLaGHhv3TEXvg0ZvLvEtyjxg/ljspqHWAQ1XApG2zKWBdR7kZVAvEbeGBEAEaO xPGwjD8akOK/2Og8L8/7tHurfkzgw8JbhHz94g53/U0v5u4vGfMaa5xmt8LMDU9nKJsm dZpf0fwV4xoQNBx6xk0col2o/H294XX83FfP4li2LtdaLaX2sbqqcPvGq/DzmbR9V4/3 /pHNLFXLYlCNWDoYnRP6MFFvMEXJUH+Bcs3p0wwnMWeUxkV2wzDf59MyBoYi7gEbtOyS 3E5WHwzzm//ToslZwIeGyrNZugTJKYyOLdtak2M7CR0gto/WtjvnF+kveG3i7h8//jN/ shSA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UQ8EgVz7; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f2-20020a170906390200b0099bd2075268si613113eje.920.2023.07.27.00.44.25; Thu, 27 Jul 2023 00:44:50 -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=UQ8EgVz7; 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 S232982AbjG0HFb (ORCPT + 99 others); Thu, 27 Jul 2023 03:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232909AbjG0HEi (ORCPT ); Thu, 27 Jul 2023 03:04:38 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE2FD3A85; Thu, 27 Jul 2023 00:03:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gHBSGuWwsvKHN+7rJoOrILYLu5wcaxzXM40jxJpzCtWdS1wFgS0ODfwfehPrGipSCRKnXnoxxCJASyn0As2MWXNzYFBsNGB4YJV8LyqME0m/BMsfnBtJmjwR7lKuFwljM1CpF6n/4jGddkbila2x09qZNmGmiQCdZyiS23HX2JYqkHlyZNhEZhpVdyrZwc/tQ32q7u/KZOndbFP8jlkPw5vKmrH/gtM0FeIpMcA6HA8qpZdreQS8Y8wsas/OIOq566FONVQ3mvRDnyGdxhxCKGA6ebwBi6s1XT9Gevg+3c8pJlx5Fc9hFMR2L1/c2lvD7x5BJ7RDeTPt7mAq8jjvbA== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=Ik+DbOF05FHOv/qke+mj24r1ssqdQ8CmsFEBPhObqhDSjZghwBan8qOiSA4WrHCk7C/rzmKya8RL8z3yKOegrjxzfl+l6NKZYRsxDt6RtfW21yHwi8myMSqgce73IoSL64kfpPK5MVzhne8YBYuXHeXgqGYvSQjcMBZMTFpH3/f0KX6NRnDBMz52ipOoYDq88xsjQP9SIqyhhxbeHxSOsZ6CM3sUzvXY7xsaixdaxaA78vMsh/kp30QBqwoa+8HfO2YJNAasDQp0qaHB28tH2rI7U6HOHCn2JeTI1ssWruiSi9zLtlQ/MvBXnd97WKmD4SWOcyuO0F6N9IcyFQ8vMQ== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=UQ8EgVz7Wx+8m5qzwTJ43XDYw31X8/SklE95zD+eZJ1ICCxluoCUVhlSAHHNUZfRdY217TRKxAYfFbMsF0AloZQEb/dNubIWek0WSmoq3tdwwN4M8G/+nyg5biIi5WcGNE4+uVzlmfvdr8rxb9k9JNw5YuRKulHmHiRXhQQG2EAUlqhO7CgLW0apcWdoNKCYjq4zyeeuVIgdYFbHHjpJwSn4RXrp9pIsugkySFXlM/+LPP3gcc6Br0WKh2tp0D1LRLxBks2cl45JaLmjwr+XsTAAJEmYrOrMj4nteRk95ukc6Z9XWu0w8vDRg31+KBJlnrWuFjvMA56DY2XvyUQtxA== 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:01:42 +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:01:42 +0000 From: Yangtao Li To: Ulf Hansson , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 24/62] mmc: mxs-mmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:13 +0800 Message-Id: <20230727070051.17778-24-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: ddc2938e-9556-4c51-df1f-08db8e6f5505 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 45K9sinYp2fD/GfRcK/Gy3TNPXxwuBsTtWu+p970jYiqP+xQHQrg0juL5LQFsSMzyuAG82CsQyrs3LfArXhlkAlTRxEV40raC+jzgo9faPVMmLfVUa/mnTaVQP3pfFi3ThPw/3Es8bzwAInR+QgBs7fBDORnDVgsdhl0hP1nQaY8cedIobzDiMHbCagEusoihlOAmmyqMrj40VLYhikvjlZab20zkKUZax/ESP+95SzeRy6UhvzsXI2XLHPW3uRkz6amj+weScwLsTll2nyTWvg8DOiiwOgDajn6Xpn7jbwa1eJJxng+n/yLHAsNnZk3wG3lM34bHLHd1lKVPd2gQcr4iphwRFhUakd1rO7+GOc9R3hKmMdl0MlWo3EjpYCX+yhy0xyKgAeCmt3P2AYLp7EayKn6MSsQ941sEaHp4HZuPfsk+QtLU4fnUYpIf4N6J0u0qQj+MhfpooUVAhM1b4atTH/LOM+E9chVEtfy8Q6qlcGTKrGGuM5NAKgHP43F6b8GQK11Fsn4VK5XRJOmuAXLeJgbOyUKbVNq36KnrONdDLROy7eTPrKIfNVO23HukQ7KDt9MG22UABxXWTEgJ+v2IjozIQBgrIOjZPRO46k+00rso5I5nFSWwyjj6RNV 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)(7416002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WlVRenBIVEF6UVMyQisrblBNOHI5V29MdkZreSs1bHg0MjY5VGVNZm4yaGpa?= =?utf-8?B?UEl1WHYreGJoMXVUVnRrcEo1d2g5RW5DbkExN3ZUSkk2YStWamgrRDVyMkdv?= =?utf-8?B?RzBiYUZUL0VBWWdjRi9LV3JJM1pWSENXcllsTkVrVVNJS1M3RzB4eEg2VmUv?= =?utf-8?B?TG9kdEIrY0ZzWmpGZVlHMmNVM0tmTWJVY1FLSXlwTDlUS21mS0tXeVo1ZzNm?= =?utf-8?B?Qm5YSGROdDlEOGx5YzljTVVNenkrTGxXZUN0WXd5VWdIa3dZZFVMK29IUE1M?= =?utf-8?B?THE0VjlMb21OVUNibGdTdFM3Rmp5Z0l6N0pqd0l4YkRSdWpxV0JlNzVVMlpi?= =?utf-8?B?cHFtYTIwTHZMTnByTWlockFRYkFIRjJxV1p5NzRVUUZMQ3c2OElGSUZGVE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938e-9556-4c51-df1f-08db8e6f5505 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:01:42.3343 (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: Nk3IKa3ftWMV6/+2ZEuIOGE8VkgkW1IbZrLMSHkhsTJ75SUeGUJcuybJoSZNlPN3uaeS8IOy6IPGksr6Re9vJg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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_NONE, RCVD_IN_MSPIKE_H2,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: X-Mailing-List: linux-kernel@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/mxs-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 8c3655d3be96..9abfb169464b 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -674,7 +674,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) return ret; } -static int mxs_mmc_remove(struct platform_device *pdev) +static void mxs_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct mxs_mmc_host *host = mmc_priv(mmc); @@ -688,8 +688,6 @@ static int mxs_mmc_remove(struct platform_device *pdev) clk_disable_unprepare(ssp->clk); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -717,7 +715,7 @@ static SIMPLE_DEV_PM_OPS(mxs_mmc_pm_ops, mxs_mmc_suspend, mxs_mmc_resume); static struct platform_driver mxs_mmc_driver = { .probe = mxs_mmc_probe, - .remove = mxs_mmc_remove, + .remove_new = mxs_mmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, -- 2.39.0