Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2035914rwb; Thu, 27 Jul 2023 00:37:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlEeiNhjw4GcuPiF88NDDb0UimwAc6TtiP73y85UZWPZSYulRFY8O43GWGC8DXWh2QfdxxIs X-Received: by 2002:a17:903:18e:b0:1bb:90d7:5e0c with SMTP id z14-20020a170903018e00b001bb90d75e0cmr4142589plg.22.1690443452587; Thu, 27 Jul 2023 00:37:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443452; cv=pass; d=google.com; s=arc-20160816; b=et+nVYqE8q0cU/bjrNGQzg81V+BY7SrjvMZL5EgVXZZMZLvaUNx1UZ6aNvNpr4H1gZ eHRENeL7LAMgVYTnVIkl8gYFqC6Qk8WJTtDPP6cGRnmB29KTK7Bs8AqsVjeaDvD32F/s 9Fm7Itxn7+tQrMcGsp7yJ045LK3gWHWr8fMBXVBNccWCbeZOY9b8utqxoYpA1Bq9I9p5 qO04rkC02C88HUebEnq7QjqvRProAFPQuHgChS34eSv7c+ZrXlK2IdKxN302jsgmUUDx aCx8BHqqkLIFWgulV3BlH5sYocNjZ2maSo0GtM49KHT9Bb9h/sarR52Hj9g7kqMN1dxK 7Blg== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; fh=VgrQwm1O7S562Nu0EHXj1yIoeXgypBRfDN0sIz9nJ0s=; b=HnVnv4ydQyspm4rmGWpjvG/R7d3jPUwkYVSj13XVMRHpoDHy8K6ycBO9y48JDrMSSo BMpdDE3vxIwk5c6dkOcpWGnpILwt39CJnmfxXlSg8bn7JD6NZ5Y+bzF5j1lPMMUG8TpC lkBd+AYY6MYs4IYOdbUL+TyeY3YNMxXl3YdSYkRdMUc5gulg71ObA0bMN86hqM2jBacU syf2gyNvx6qFX90pi4zO3m65cMfFHFERaDymyhyvjrcfhb8q6NWogzrSVespMK0hmhoD JJL82w7hIrb6csFaVV9fpW+vZc06SktuH5DtyfHnfUJ/G3GsIuNV30D1d3sbxkcl8cVW u0yw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="fMMh/8dW"; 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 c8-20020a170903234800b001bbbbb61c71si966498plh.399.2023.07.27.00.37.20; Thu, 27 Jul 2023 00:37:32 -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="fMMh/8dW"; 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 S232466AbjG0HHF (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232493AbjG0HGG (ORCPT ); Thu, 27 Jul 2023 03:06:06 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20725.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::725]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C33FE44B3; Thu, 27 Jul 2023 00:03:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SIv3VZgrOEvUZg6KYHvJOioL9zbIlCbryYXvRstH45R7ovpxqy/A1OVy4H6OXfXU11VKNTH1LlJYExaYaMUvWpvOtmf1EfqU5sS83zLJmNaewjlqIUsnJbMskfdYmSWdb1B47+DXB73sDZI7sDsGYoft1DkDD//MnGMip4A60BdKNTOKr2B21WeI94QGKd93bz0WBx3siCgoEM/XZPxcXricvP5+L8aQaUeokCtUQlS+XlM6nZ0HqnxVISxzA3OF1kLKSMf5fKch0jkm1P5jYnLadtpZCpZ3G9kb/cOCL2YDdpoWDlF7AfwHjGAjcCSKDF8FSf4AEGg8k2D7/brrzA== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; b=B0UV7JTyB8xaZOKhrMVWbYJCSAnVu3MWCmjQvPp6mGL0/ZFJphhAO09KzBSBh65JDXCYER9IXZXM5i5TaHTIef16MREr/dIobAa/mXEAGbHsZjN4nFor+FU0IaWUzv+JEfrMRPjgpiVirrxzKG5+rq44VH+11k5ebIrBFt13rB3lhw53WVQmB2qKfivONPpDAprIHokZ+xzN/ZzuMirT1rOE2v+jMIu6QIcFz+m+UPDJnp301cMmOXKLN5SC/b+ExZeZYo1srlm7JSilsCS8kqlDKoqBvZWr+Plb1xSVmsGki2KMJahwH8tMKTkjwJYN8zKVdeecqmr5v0lmkV7Ypg== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; b=fMMh/8dW1RSXQBPsjhYwA5legf64bx17XUQWKt+KqCbme/QIqY5/hmYf91fnK2ll13oczYJY0TBqzqiDIAmcMGoW7sEbFq160szHxNgUfsmBv5Qea0rg2HaeolzlI6WLfazWMEfWCvetHCJfEb+83Ipa9sdM/XjGKySkVcN4RPIr/JIW6RKmzPSh4RlTaqXpvgXXoenHJqXa4TNe2pSRc8MNcBiux0o6UDxHmwYIoPAyMGDI6bxpMO9JGN5xdOcZNDU3TlYjaj9k8rCDwDwF9Jtn4n+wHCPCz0yY4dokNOEoFKZbs1H3vbp/DdF3eN7JuCPDGhEEF2UkF0gJ+tEDnQ== 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 SEZPR06MB6644.apcprd06.prod.outlook.com (2603:1096:101:181::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Thu, 27 Jul 2023 07:02:43 +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:43 +0000 From: Yangtao Li To: Ulf Hansson Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 47/62] mmc: wmt-sdmmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:36 +0800 Message-Id: <20230727070051.17778-47-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_|SEZPR06MB6644:EE_ X-MS-Office365-Filtering-Correlation-Id: f71a7c0d-ba85-40c9-9066-08db8e6f6ccb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x1eWJu1UibBBRRZjg0Q9wiHipteNm64q09G01cufsxd0EUj4AHlHiQ35T0TWa8fc/xzMkUCyFxlmJ3ZwHwccoPxvx7R/z8Qvv9JaNu1s6bv9rosbLsLZVm0iVb0Xar5cb6tM7Dh/S67VCGrQ5hbI+Y2GsQT+93wcNl7QH+d8Y2r/c97lT2SuuThg/VRNhEFcBnG+wKZ9cVH2gJMzlOKDHKrRO9ZCb5gnUQu54cNZcuRtiuJu5UTdKGloxwwwcbRjvZhxGhuKM2VVqNwoPTx+VUHMdijX4J0h8/Ncr/WyycFpbZqLTlywRjMpNReu7zQAYcOV8JulHC4tzq32JQUQBPr4SyQB+JikSw1WZs+z+wKjmExgLg6V9aWCPfdbKtX9WUCGioDtxolzKjleBlCufsQe22dn7EXHyyYfk2fWrl5pl+9MZEgRVuTpUhyo3AYOmqfuggWyEoZJWRnqYdenpYvcAsnQVJIQk1hrF+EnI0TmNra9MqThX7VyyVvCNau1SG3nP8D6/VsyVeKHFki1auDdw3oXLKpepv4S0nSipexK1EVrcuAEuhllzmmReQjW5xPoCMWKEXa66QnX0Cr7NAYnPnbMQlygS1m08hCCAQ/4lAaV33eJj0To84st2m+e 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)(396003)(376002)(136003)(346002)(366004)(451199021)(6506007)(1076003)(26005)(186003)(54906003)(478600001)(6666004)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66946007)(8676002)(6916009)(2906002)(5660300002)(8936002)(38350700002)(66476007)(4326008)(86362001)(66556008)(316002)(38100700002)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RE9IbFJTUWF1NnlKWW9lVHJ3Y2NEMVpBczFMSUpVZW80OVFNcnhEN0p1b3o1?= =?utf-8?B?aDN4WUJoWHRXVFovVmp2dmhWTUxuN1BPTXpZbDM0Z25xMGxIUHE3NFQxOTh0?= =?utf-8?B?cC9wNnRqK1F4R1BtYnlxNkpkczZ0T0daOUloZmwvT1JwaFNCRlVidjYwTWlK?= =?utf-8?B?dS9FWTBCdkoxQ2s4WGcyTHVuak56bXJPWFlLQ0xJMnpwNk40NDZ2K2N4QXkz?= =?utf-8?B?cElpM25qVzlSWk13alMvYkRPU2VnQmxxbDZyVkFHMVlZNjIzTzJCNTBHbVJX?= =?utf-8?B?VjRWajFod3BkR0JEMEh2YUtVMjZEcHVwT1N0TVRHOWVHSFZHUDNNUzNZMzM1?= =?utf-8?B?Ym5vUXVuNWd0OWQySXVvTnlCNXRYOGJrS3UzVFNRZWdWUGkzM1BJTEJMM0ND?= =?utf-8?B?ZTlIeXZLSVpZMFAv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5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:02:22.2034 (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: lYt1kRh0/WdbLuYibW5FEi2QbE0BZSCIy1kP0bfiw+zV2gAf5lkC2edrf1xS2/fQQu427h5cJdmlk9/j9PTXtg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6644 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_BLOCKED, 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/wmt-sdmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index 68525d900046..74c475d071b7 100644 --- a/drivers/mmc/host/wmt-sdmmc.c +++ b/drivers/mmc/host/wmt-sdmmc.c @@ -880,7 +880,7 @@ static int wmt_mci_probe(struct platform_device *pdev) return ret; } -static int wmt_mci_remove(struct platform_device *pdev) +static void wmt_mci_remove(struct platform_device *pdev) { struct mmc_host *mmc; struct wmt_mci_priv *priv; @@ -918,8 +918,6 @@ static int wmt_mci_remove(struct platform_device *pdev) mmc_free_host(mmc); dev_info(&pdev->dev, "WMT MCI device removed\n"); - - return 0; } #ifdef CONFIG_PM @@ -989,7 +987,7 @@ static const struct dev_pm_ops wmt_mci_pm = { static struct platform_driver wmt_mci_driver = { .probe = wmt_mci_probe, - .remove = wmt_mci_remove, + .remove_new = wmt_mci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, -- 2.39.0