Message ID | 20230726040041.26267-53-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp169230vqo; Tue, 25 Jul 2023 21:28:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlHFQeX+7sewzTJJKmcvN89+RY5H/0uLFaLItUzU8Bx+etOZx1NHOTtfN+FZFEJgC7iKtZw4 X-Received: by 2002:a17:907:2672:b0:993:e9b8:90ec with SMTP id ci18-20020a170907267200b00993e9b890ecmr578352ejc.22.1690345726579; Tue, 25 Jul 2023 21:28:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345726; cv=pass; d=google.com; s=arc-20160816; b=GRH2E2m70JLi5DVdHI03FKlVs0Cz7faSZRBP54zq044avhfqAyp19Z8YJCvHBfl6E5 IYY4EsPG58AQu3fuL0mVfqdE/mJJOda2Z2bUqEZ3LOkKZ60C0sXND6CcOE0hcGCW4cFN NnNzntRRQf83DYabp/kEaWnGthAVfVMn02tw0xHDXhlNy9zVlyZSGewHQ/OK3dpL4+dx nD0SPUVoD/gSGkW661pGTU54WfDcLrCPvspRA+OpoMyFHJY/yw6vHIxbrqJ0f3hePwnZ Sf5FVNr9CWNXMYQ7Rx/pCLs7e8D8G3ynwll1Xy4btNYYldw1j1m1pLRZLgFizMjlJlKa ziEA== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; fh=WUayfhwsFyI2R0meOGTXjXcOW9Lju/3B5D3r7aLramk=; b=1HtAZfZHmjWkFqFXOCgvwdwNTcEPajy1j0bMeMYOxcfiAyTNUH48reoDOBvI7RAM+G AloJlNWKdNDsRmOWXlmqNMwNIrCmDwQTJpoNTPApS+5vb/hhbCtRFNDc9tSPM0f92W1N a6Vvb92IQf8inwa07b2zrtMh4hT0Kq8zC7lMVYt1HsduJvWt3yBUhToU3vm1GWSJZlZe 608lJcYVuq6ba3jF+V9jFDDMtf5wb0oUHoRW7A1sEJJFa6k7+jB4xJqsL207r8J/a4IY HqYDPqCudeWcnYlGI0JJd5kxSoCSq6zsMcQJOglZJux3jwFxQD1WKohgbZ1TPkYAJhSx eNKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=htPkndb4; 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 pv13-20020a170907208d00b00997eac101casi8484631ejb.509.2023.07.25.21.28.23; Tue, 25 Jul 2023 21:28:46 -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=htPkndb4; 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 S231866AbjGZEKj (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Wed, 26 Jul 2023 00:10:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231535AbjGZEJu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:09:50 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20705.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::705]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4DCB10FD; Tue, 25 Jul 2023 21:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XtEYlxloX5axZx4BeX3VCE5WQeJC5Ipybp16FlmIw/MbiL2c1Oo5VzTgZ8j+tjTNzawxBF7CM6xhlF9eIZVvK17cgma70H11M1kAC/swl2HtFnjZO88tThQJ61Eq9H0cfaVCnS1Jg04mIscNxfAF2YMAhpSrl/gv5+rezZEL5V332xz/P2KZB/7XEXKHoJFfx8ulqU6dB/ym1M9jdVDW6tkK8ruj3ZiBnd8GwdnH47RFAdlPFIA48GyotAtT5OnW5hqdpnVqFfpF7H3fQJ1o/NmHnxQ3A/j5isUtOzLBCbkLhsfeUlUAGr/s3wltnrRIuLaCohmvLoJMbFXZudWX7g== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; b=Nr64vaYahLzjogNYX5NJOebtpnoP/kQjoeuZ3cP5XpCM5hao7rXF8RxyewqHwvWPl+oW3CUfiItUNgRwdF9iB3aUi+E/1byo2jCJRPoyFto8zcskY+W7g4VKyGIBr9vaOEO9jCFb1806+ZoukHEJqH0eYAfmdqcFF0CP3rHPMl1FGpTXyy4YKHcrUVzrwLqQbKyPIpRt0PIPbJ5rWfAC8XiuAQeg5an781W71N4jQTr23Nnu0gEsziTxPmjw2onArqU9V+Y+Qp1e4LtU+0pYnO4SnQqm+/hdWNVC7gwTdTbUW97dAwCj/KwdDbgrHIxnSJcj7nGIj//RKg7EgtL0BQ== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; b=htPkndb4I7o2fT/YTB77qbP6kGRXk6m33JaTBiA6itx7BD//IW5kuxRISiNArkZibAhkgq+FJhMc3h7UqBZby1g6oIfgq9PpuPT+TBFKQBh7Gr9ho8L7RP9H705TJRadN/3jrKliQPLQS7ZNx+Ee9nVosnQKTuYDrFmKaXMTxH3A57QvkTjXZxaNuNqHM9k47G4xhLpCadg9NxHHwjS7sA8eb7PEMBg9KE1P7ga6RC26IEFF8diAxNQd6qDusvyWtSEu8IUrkE+M0+e8DMoT9Krpjp+alD0BjN423qNvvZYZhWKFTShTLy++MBWEko0jbaY36xvpmAbpezGQqDJa+w== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:34 +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:34 +0000 From: Yangtao Li <frank.li@vivo.com> To: Nicolas Pitre <nico@fluxnic.net>, 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-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 53/61] mmc: mvsdio: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:33 +0800 Message-Id: <20230726040041.26267-53-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 9048407d-38c0-4672-b455-08db8d8d221a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w3RgvNhkKnTKokoDxonbEs1L4gsw6ZU/kmyEaXlGCROKEqOOQ/7YI19OBgRKkLpYh9SOv3Ylnq6cOQ0Bli9uJt12dsLMiSx0eomNcJhVW/V7TerHrNrzAROGUzdYH6RnyWkoFjgATd06yy2LPwKn+hNgkwl4hHEnrzaJ89ajdii7Cz/xc1ihoT0wz0xrr5QC3d+3KrW3L1LPjRZhVqw/mSV/2AzgDcgpi+XWngVCIJLJwi6aPH3Pee46MlI+7NPl0luYmv40TNbxpkZbgQ0iLVeXjbrf+kmExByxdF2djuzHYFTDnCvyIZdwM4lEf1IzFsEc93OE3ThCnfevIiPSrJHjMNj1gPvOIsX/bdT8x18hj4b5t+CUhghYYUStXwqkLB8HosvaF6Ldi3K0i1lC3m1Bu6KYB7l66U48xveX4gdK5Xn/6+tJHfhB0zk+jcviRK8GR8DkAs4FZxdIfGNY6436sbBArg1NdxstTNmR22u6CjBv0c11om84UgYrx/VHBBMoDZuDZDsnAgg04bK9pXQ/X3nIohDJ5PzKM7Da+zd9JrfZJ6Xft0kpP5jx+4/nxk351o4S+kGS4FrPLcN+emAki3vhBL+MDITD3ykjLEsiuICZxfBeVL+AnfwtoWwJ 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)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?3QuqZSzt+o1CQeF5hUVSZCe4QC7d?= =?utf-8?q?bUsQcI8zN58KS+bOFR054sY+JEz+mJIFxZ7jJh9VzOpDNlejt4Ilyc4gig7bPOLta?= =?utf-8?q?Zk4+HuRXU6aJIjAB3POeN/e5RhitWib/y9MzD+xvMYwadQwr5pp5uWwEBuzlZpTJ5?= =?utf-8?q?EEebgmITQxHxl9+MYf0auCLmJuwAbWoEtiy4nb5c18XPEKlRPKDhXyTOKgQvKKJef?= =?utf-8?q?+66v9qv/fZRyOAV4xFtA4yqko4amDw/Ne2Xf1EnSk0mQO2JH70qNnySNaY9KMHTcb?= =?utf-8?q?po/2X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S?= =?utf-8?q?IBodILM8bCssM80fv0wv1UYMNDQhNuwNzugtr23qN44s4jydLHzFvOVpIgzNrIMbR?= =?utf-8?q?dVzdLzE0zkAYpGipqPqyUf8HC475n2oT0zFhzcw2JVBgHLasiXaCn5o/6IGc/115W?= =?utf-8?q?2y0YirccoxFndf+pcZWr3IBhwD9T7IAtd7EWRkFxsFQyyWjuKm9Nuyia8sWkmJwPL?= =?utf-8?q?7+CJPGG2DZx0D6tfcVH+UQW7jGbvGnDMhlke4LRrOkezUCShB2vFmEBKH6fnWQL9i?= =?utf-8?q?pa8p4tSBGW9G+REQrV8/5Klqufdy1AjBV9KlDJWSCwuRzwIKrhusvfRmqXJNIitp2?= =?utf-8?q?1ooUEONrdXDRCaXm3xlyvGndxmRaptz/UM2ILlj5XABIKk9d29CgdWg+PsiieYnZX?= =?utf-8?q?16rhHRYK1+Hs?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9048407d-38c0-4672-b455-08db8d8d221a 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:02:30.6317 (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: 15KPZ/xfyuXs1zJFJ1sTNqY02xX5JwDpN12Wf4Ji0njwk62BHHZK6FtO4yN3cF0gXYLPfc/OP3s+axp8L9BDcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: 1772455960696807423 X-GMAIL-MSGID: 1772455960696807423 |
Series |
[v2,01/61] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 26, 2023, 4 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/mvsdio.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index b4f6a0a2fcb5..ca01b7d204ba 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -796,7 +796,7 @@ static int mvsd_probe(struct platform_device *pdev) return ret; } -static int mvsd_remove(struct platform_device *pdev) +static void mvsd_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); @@ -809,8 +809,6 @@ static int mvsd_remove(struct platform_device *pdev) if (!IS_ERR(host->clk)) clk_disable_unprepare(host->clk); mmc_free_host(mmc); - - return 0; } static const struct of_device_id mvsdio_dt_ids[] = { @@ -821,7 +819,7 @@ MODULE_DEVICE_TABLE(of, mvsdio_dt_ids); static struct platform_driver mvsd_driver = { .probe = mvsd_probe, - .remove = mvsd_remove, + .remove_new = mvsd_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,