Message ID | 20230713080807.69999-48-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680344vqm; Thu, 13 Jul 2023 01:44:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlGbCPHbm6+22nQsQjE/gaxqVDTcEbOHenhytU94wV2g2aa9JKTrORhS2UiRI93hBtSvllDv X-Received: by 2002:a05:6a00:1399:b0:681:ee3c:c5fe with SMTP id t25-20020a056a00139900b00681ee3cc5femr667950pfg.33.1689237885648; Thu, 13 Jul 2023 01:44:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237885; cv=pass; d=google.com; s=arc-20160816; b=SMTNmgBT8FuQR7YnCkTStxWfHNOu8eVDgbmTMsYYqpg4QAgkZJGzHmhZDx+hje9ynB F3uN7efl4NP8iPlJlov1/E+1qcOlaFf2qrvFit8aV4rijAW7ucd5VgLMFoBnkIabkeC3 9PzUr2a2ZiFapZEBgNXC2CPyByuFsaDfD25LiMcQGpnqA/KQ0JOOtOVemtTiZJCTqb/n PHwJalFW6uEoDaeE0vXux5KmMOOWNd6fwMhx8BX/xS0wbaWG7skXJr9WmPU+SY31D/mH 3sK8xC0yYpaU+lJRTl5bQaw4MUypdWojdeUn3wlnFCV26Cjru50+1rYHLiPeprkCO1fF MFRw== 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=zUGVnzZZh2WO+Xq6LUWT6Y2s71XZyYcy0J1bYovPHEtMyEiVPg7/o11zs/6tyZR5Hh +PZJ54bMv6aGuHB3ZWOpPx6ScgHLFKEfHvtI9FSzsDYN5MrVlU/p6QDVQ5jRj27SgdL8 XVfObuNKxiUwKqBHupQdVl22jUaZxGXwjXDCx/6h65qS39QU7wyuJxgbGVeg9Sl18zqW LF57A8/svELR618oyc69VAditBCj6023pzUz4v6E0v1qA2qgM0a5YbFt6JIDYUHjPTyb yPCPXV9hYcQ5YGYUjWzH8qIQLjxuBHTcN/hjNJ/OQxqWTgd6HFk5fKYD/O5XKEi846Jh 7WSA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=WKdIcpNf; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020a631206000000b0054392750edfsi4554631pgl.744.2023.07.13.01.44.33; Thu, 13 Jul 2023 01:44:45 -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=WKdIcpNf; 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 S234297AbjGMIOw (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 13 Jul 2023 04:14:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233999AbjGMINd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:13:33 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2107.outbound.protection.outlook.com [40.107.255.107]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8F9E2713; Thu, 13 Jul 2023 01:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WiJzUt/r1HqE+HIGcnxkbGtA0ftUcGcWrRsYMgsnGl8Pfc9Pa/+IqXAK3/xJzJtFu6HIs+ILUibxHyuc50ESeZyY8XsK8xUvY9jiKx7OYslJyoaWWjR0vzoKsM2cj9xoq05WnfKSWFavZrzzlKIwKr26us57T3VKjI229RiKl2MgApO3Rl6bv3aBU9vhARmZOciFSpe20IyHLgqO689DCAZJe8YGQH00w36LjK+kJwOIHlvZ8dU8PCh+6+5bUbz+vm7FruFIySIknwSjsJ+OcVpFHjON2xU7YFo2wPlruwLuriAKE2w89NCLW92CP2x0TPbnoeiAQfu8SFGqyltpwQ== 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=cgNRixQ3hqrr142mWck/6YcqfFjCxOJDHJZOczV3uOdnFd43jQXnfLlD1JVeOW49oLj3DUgIYIQT2YAk4ohSelnkDMF8bDVVDh9ILIfzHAUpMiXAdaUpVzwL6g2MXHAjbwBeDmKyhCVgi4BXg9yIxMUQLXH0wXVcL+EOg+hZCV06WDot5oo+DVoo48j5yjg6oqknn9WFx11THxdXuNxVcC0Z/DDlLqe4FeXgOUZkXUHeVS7yHHljcRS2n8Np+YI6qKU74E52ydua0/6KHjiJUcqCcvjqaV8kho4b0Cy0kRsi2xtNtmB2stbMKhVXVSD1+WTuuc5Kc6pQwwZw/UQbPA== 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=WKdIcpNfGhjdxj3Tnqw5dwYVLqlMq/SQJ0YJ21F0TmejP1OOPD2g+tJC+KmRLVqM6V/j5HdDOjdFy/1d0g+IvWr3/k1BhKL0g/5YUyvaWRO80+qY0rz/TD37QqN+XPftJeEI/rEwc/R7lQXuHI8kETD8Zgupr5Cea/H0LNGnfUhsYeUG59hY0GNxwTrsO9WmSYyFmsLFTaZCyS84z8TOLQ9/k1q2Ye3XZMRuuNbcRbVoZXgnTI2tZGfX/8AV47rdch86H0iIy7Ov3i03+KV9GWZJj4XCk74ro7hhpPtRPmouFh8qHOjvRkgYOE7S64X3RBkKOCSFEUFLeCYCT9bCGA== 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 PUZPR06MB5984.apcprd06.prod.outlook.com (2603:1096:301:118::6) 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:10:01 +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:10:01 +0000 From: Yangtao Li <frank.li@vivo.com> To: Ulf Hansson <ulf.hansson@linaro.org> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 48/58] mmc: wmt-sdmmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:57 +0800 Message-Id: <20230713080807.69999-48-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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_|PUZPR06MB5984:EE_ X-MS-Office365-Filtering-Correlation-Id: a6190350-d205-4c88-c375-08db83788541 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: k9Nu7LrpaNN1Wxq5GYKW2hAYSIjgTxmSeJQCXMVu1KYrjE8/1BldY2Mrw2vwKV7ne6xQx8OyqaYg/EgSDf6JWk86okYhHnPsddO/RxYVTYaVrh1E3orJy4i7c4YgABPgPVL7An+AvRJaiXbKbSkcnpMB4g5umK43VDoPF/EdPXlvwW9x68uNPcWwvgV+Uejy/7N+jSXbeIVx2feSQ4PuxNBWr2+uVdiyVB0jiATxvZBWYu2rL5MdkGGbKQvW5oCR5XhEdTTO9WyE8d+Kb133NiNHL4Zyj74JZ3ziEX7vYVqfsMNnMpSb15rIHHFNnEQ6HJfbgkuhjld/KQs0EAJpf+RWng1YTxjSMER42qsO5EAaemYQM1IGlDHOk2EfpfnzFgk7tj2A59FZB/S5tT8Z7pRYrrTBeng+pIOo5slQA7EOrhib92YUP+dhOX+ExPeQtOnF+RUxqrh/92+V2nHkFQzteFdqvTfsz94zKW6MuwqCILx4UzoT3t74bFL/vEp6h4pHemetu+6eFy+tSz/8nmMk0Twj2SUfkx+psnvjok22tyfGb6h6oJgsevGKDGXWk0oa07cdpnGMFs5RC+q9tx2XQuRebZQRKQoPb/87jaMVtIqMNOiCTFyRSdBFMLGr 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)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(478600001)(6666004)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(6916009)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6Kf8Hx67PKHDRZw1zoQ/HYaQDqHu?= =?utf-8?q?zbZMJ1t0ociY5AdkTVs4kHDOFxvkDDynyZk15rUnFABinSelKDk+FNOaQKurlEwhS?= =?utf-8?q?M7BaV5Y+XiJOYUT1yPRkG2tgfZaTuTd0qUMW/vb6RnUHukB96SdlzTOyxRvK0s7s4?= =?utf-8?q?FD8VsWLagBYsWlkgVdmEp91FfRlsMpjUw65KSzAfP6BO5js/O/eyMLSSdhZbpVV3c?= =?utf-8?q?IYXeIiek9SkmnOCZC5chFsUYjQK9caFcSYsPP74ODAW4Stp83mN+C1XVCyP8bCbL2?= =?utf-8?q?p312ABS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CA5PT9w4oCo2vQPdsoQqPO1UNuSnM5roYTNpyZ+hgYk6LTxD75k+wc/?= =?utf-8?q?RBQv2MTbWik9yqV9BKRDsXyJ2QGzTtJEo0oofGwEOnNgCWC3wFcAR79QtO8ZEu3Kx?= =?utf-8?q?vWZBao6JyGqeNYUnIb+/nMQstdLfoxvRIf2RCxUT4kzf8+drU0u8GTHBel80Tr/ON?= =?utf-8?q?1QKtB3x5y2OTrrLsCiYr0Z2SSTad2I9EIrOuG6dbv/Jmj5MH00gF7kBxIOcnnxkSc?= =?utf-8?q?g4I/aPZppqmErATtpbxSUWmrGmxE5axZ6AcUQBiUVMAsPCNt6leNQtmD5iZz8E11J?= =?utf-8?q?Thbi1OMesLreAmEku92oECBQZcwQpgjswaHiyJBeLJBYmwWteNKQ7ZLlOzioa34e4?= =?utf-8?q?X2khu8p15Lf2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6190350-d205-4c88-c375-08db83788541 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:45.9649 (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: t8c2JydYd8+5owYGLYvLtWJG7yYyjfN3UVenSEXpgzLDHKENNHJL8kBxFydd8w3x/WDRI4igOU+srwaqGFMW7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB5984 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771294304999431496 X-GMAIL-MSGID: 1771294304999431496 |
Series |
[01/58] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 13, 2023, 8:07 a.m. UTC
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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
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,