Message ID | 20230713080807.69999-4-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 c18csp1667086vqm; Thu, 13 Jul 2023 01:11:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlHW/qpq+KyHBqzSh9wT/qvUPdgrEOy4waC/UEuPar1rDxiuXM7wvZb96DV+aKWuqJhkz+6a X-Received: by 2002:a05:6358:7e13:b0:134:cb1d:6737 with SMTP id o19-20020a0563587e1300b00134cb1d6737mr1475128rwm.7.1689235890187; Thu, 13 Jul 2023 01:11:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689235890; cv=pass; d=google.com; s=arc-20160816; b=mZbfTDL7Z2V8fDMp21IysrEGn5tHV3XS3mvpHqX35pPHKbgyirmvpHuMIwP1pvIcAf onw8Mma8rCGku66ZEl8F9RK7ZRbqTV0fhZ4q0Gier5/Gweg27VmRiHmzfLfHIfbyMf5e Y/0Vw9Voti4IcsT3xu8yXjIv7Yx7DGe+v3ZRMOb9j5s4Zd5dnJMziqZF6/7D0YXn2Sdi uIdf4muecPBjGTsS7LPxuZvhq0uLS0BYrVMfhpqxn8aN3w7fmQqIs1Wg9KO/rXo+DFgg MdbFpVYLU/9dXJGvT+kTWikpphJ0kMygvemwhLPQi1J9Vuu/EOc1dpr/kvlvuk3dXm9F wcQg== 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=g/FjFXOniG69N9nJR/0wcardmXaPuoPDf1/5LYlD30c=; fh=knVXWtuCx6XZGhgGSUU7JJPQq3c9JBqKNP/6OINxeGI=; b=g5uX73JAfMMXkYMkSok8enQdWbPt7GVYVYsaO6fbvO1fNkfHrYPMopIsLiA+AC4pR6 SjZiMsMdjFqH2qJnC1v2y9od7o0bWAl5/e+TdqM/gV/6jBXp2xextIG0xTJMhSstu8qF 9qmIQp2Vjl69OVz8O7Jcps/mz1lBBkE2gFfy+rLUUKDW7eRCF8XwbR1Cj3cqDBHc5jtR +m0OO25GvtOlv3B5J8hA9wqlX0OVfejtrRdaz/aaP9znNxUIl5TjWqHo2hK+Ap+nCTYL rq8qwHnU+UxWVrmBTXv1bFnjGECOOkbYRtjuyV224h9cbHYzC/siyjmDRk9RXocwGDZk FmOA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aBra61OG; 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 z11-20020a6552cb000000b005576fecf094si4778600pgp.2.2023.07.13.01.11.16; Thu, 13 Jul 2023 01:11:30 -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=aBra61OG; 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 S234069AbjGMIK2 (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 13 Jul 2023 04:10:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233856AbjGMIJq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:09:46 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D35A92737; Thu, 13 Jul 2023 01:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TejfADj43lBjstL3ildot/SwrZ6Gp/UDFXlcKf7xoyE0aYWK3WYDgoXIPjY2zmkLyyqyS7dVNe7NvijbPMh771WasgkpbOUDom7w8/ju2PDWigzHH6XCkwNmWtvWOcspIAPxC1TOzhEM4ZQrrfBhOnIHO1e8PlZlda23aPcCAO4TaCFO8zVYhozSVSVLY0cvzNBiz4L/7HyJ3xRBNDaw2oHdnQhgfR6PvHnxcQGRhSkOYR4zY577l/LjpT4/9wza5k9EXKTxOvZu6uc9/5hrOYD+Vv4BbdKI42eDEJqpioWHTejug26qJctNEfoNSvIjqwfSmG4k+aBJixfEgxp2Zg== 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=g/FjFXOniG69N9nJR/0wcardmXaPuoPDf1/5LYlD30c=; b=mFx1rDDRvLc8UABv53ijL5MtH+PKuqMPwslU5dD0D5uDYmWGKeiS1LnpWq5Y8fp05V65XymrjNPZq30XrF0iMvYwtwHSqMNmvuEpu8V8arZfh261iue5ouWr3dZWIdEDFBEev60mecQ2svWjeitx79sXylhKgrDc/h9pTKhWhor/gPqEb1pBWu7NINGv0MF3V3r1PWWW+NnfDlc9XQ8ycmfRT2oinmr1nxSN4DB/RynvdCaGMfXKY0D6s0tQH1QNHY3+WC+ghl7eqSG6YXll36S6liDnRWtpb1xao3qbMz/WQ0mOyLvk84WdvuGW8QqF9qVATOa0fWmObP4HrTMNtA== 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=g/FjFXOniG69N9nJR/0wcardmXaPuoPDf1/5LYlD30c=; b=aBra61OGSzPiF9yHweWn0AmosxD1wTDSV7SphE6cUzBwwlZ8c7KjERNj/+wV/cX3fVielDNOZeRkccphwsjoG9YKO9RGPbaun+tViWzInAb79SYAjyOM3khKWiICJOZZHY0659q+g4lMQfl0rSYc74gwN7vPfJrYB3aWt3txfsd8ZkTMi9pIZZ9GnUYEsgGbi5E7GuLmgQLSa/0NIJ9P16Z6tS5mZblrE2srg/J6CgTUTROmwDHJ6jklmmV7EBJXIlLxAUbram3oPQrOx0nQD8skq2PHVX+P7jRdj2Bd4B0BmpSfUCrVXeVPNfUcj5o+i8+Z99kFWlfpoocxGq7egg== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) 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:08:26 +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:08:26 +0000 From: Yangtao Li <frank.li@vivo.com> To: Ulf Hansson <ulf.hansson@linaro.org>, Karol Gugala <kgugala@antmicro.com>, Mateusz Holenko <mholenko@antmicro.com>, Gabriel Somlo <gsomlo@gmail.com>, Joel Stanley <joel@jms.id.au> 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 04/58] mmc: litex_mmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:13 +0800 Message-Id: <20230713080807.69999-4-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_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: b79dfb4c-3bc4-4661-ab21-08db83785602 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mWG/RqPx1LIcc1A8K7J7w75XRSX/1bmitD74YcfSUwhq/Y/omJFsdQB9AGs7Z2EmI0d4EXmZQnduecg/ExxLDvu0l5eUxvbNpq47UmtdOmwSgnIx3meweMF6/TT55JdWizXvdJ1m7lp/v3nu7ClwyNrTWKkrHgHnu/DaqTrG4daw20VmpvBtDtKhPXYJudZdoFy88ftJKRKMLImX9p0Z2/1pBl1qYEXbeofa2O4d/OmWiv3+ENpTXWTY1o92qBde8+Q04mEmkczyu0ZJq4UAUqQTeyiGrouuqXhATg3AFnKYJPABfSeM6wh4gViutNYbejThYxhusfjnDh9Tqz3tFocAdPf7fpDkBYoS66Iv+VHeN1rohb0KJki913cxUemx/6fxRQXw1Dsn7168/jmgLnD2KEWcgHSshkR/kKbuj3kgDSpUSV7q4pfujubaUsRRODOGzEeiS3kn9eP0DAwB3aX3Bzb3oWQFinM1fKcNvKXMGFhR8p/fhwKkUVj7QbpCwlBQ4QjY4d97YuIQG4/rbnB6wkkTml/mLovmBv/PB9Mc9tvHxXolk6KvF+qclMEOTKn3V17B1o+54UehCUyXQ7+9zH54+cNB8pFYSpRoo3KaKNCZr6+Y73olbTYbyCBN2kMyzUeKhFkFS6NMWamJoljPVnt13tiSlK9IOVJ21L0= 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)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(110136005)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?gRVWjW+uWR+LIqBxCKMLns5nD0QU?= =?utf-8?q?RrMLabO/I8e1ySnh3/6vVUhfMXxuqw8/XIqO25VYMQyTPfYpUchO0RDavIcTcwyvj?= =?utf-8?q?pFiL0kZjbnrmvt1Sa2IsvB2eVNXXa5oscFFEP7uuvt9kF6Mt5eQSpZfv61kKqljZ8?= =?utf-8?q?P/Knmm23Oe2UT5YYwqqjHGLo40T2ePZvERy2Fd2Lf1/fQvaujzpjUY0zq5rtQMZuX?=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0?= =?utf-8?q?CBgq7C0XZ//3uiFMP82AZCK6iw8wsPDhboglwhqzrbDM22tJjU5aMhGaVJqCRAk7G?= =?utf-8?q?Ers+mGdJ5p3fMliykVWwMgz4nOgY7VpZto5ib31L4I5CXxeLgamae1uAe9HZIDIWI?= =?utf-8?q?fAl4FYXmkkJ3hoRrgvE2hoCRaXO9tfc/ib3pMFSqOqp1DUUcxYYqtjchdt+hETftp?= =?utf-8?q?HtXvngAo19MOg4NLABFPysk722Scuhb/g6PBuA3/xpwvaSKOTf1x1sZ1gbQehHhOf?= =?utf-8?q?AyvN7OoVUP83PsnfVC245sk7wLBoKkl4iL9j++izv6A5ZgqMwXvp5LtZU19NZr4yN?= =?utf-8?q?qzoxuwvDj7w4r5LgN6XB3xyhBzgyMPh+MsUa76JSEb/u+Ysj3wm13eMyvk6o/FWal?= =?utf-8?q?EED3G4xRmRCzDge7h7M6efTwTvyxX5OuIacT03OX3JVVPlhcXbAYezutktnZqqjc/?= =?utf-8?q?AFf7PmVXKV98?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b79dfb4c-3bc4-4661-ab21-08db83785602 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:08:26.7051 (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: ezKt5X2WCy6dDk2YAuG4j1wTqAobE7qSLq6wbfTLYYxuEIYdV8wf2muiKKherBqFVPQfBGzwlzYDxooNk2Fwzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 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, 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: 1771292212633086035 X-GMAIL-MSGID: 1771292212633086035 |
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/litex_mmc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/litex_mmc.c b/drivers/mmc/host/litex_mmc.c index 9af6b0902efe..4ec8072dc60b 100644 --- a/drivers/mmc/host/litex_mmc.c +++ b/drivers/mmc/host/litex_mmc.c @@ -629,12 +629,11 @@ static int litex_mmc_probe(struct platform_device *pdev) return 0; } -static int litex_mmc_remove(struct platform_device *pdev) +static void litex_mmc_remove(struct platform_device *pdev) { struct litex_mmc_host *host = platform_get_drvdata(pdev); mmc_remove_host(host->mmc); - return 0; } static const struct of_device_id litex_match[] = { @@ -645,7 +644,7 @@ MODULE_DEVICE_TABLE(of, litex_match); static struct platform_driver litex_mmc_driver = { .probe = litex_mmc_probe, - .remove = litex_mmc_remove, + .remove_new = litex_mmc_remove, .driver = { .name = "litex-mmc", .of_match_table = litex_match,