Message ID | 20230713080807.69999-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:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1676145vqm; Thu, 13 Jul 2023 01:34:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlFeo8G1eJ0FY5tklUyI4pGGjzQkBt61t/EBZgdAbR+o4PVpie1yqklbg6cNQ1n1OkuAZeRk X-Received: by 2002:aa7:d3cd:0:b0:51d:9130:3c54 with SMTP id o13-20020aa7d3cd000000b0051d91303c54mr1030447edr.26.1689237275185; Thu, 13 Jul 2023 01:34:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237275; cv=pass; d=google.com; s=arc-20160816; b=H4tGLpTzFEC8TWaC+jsw2FyUxywpw/LHieEXAJNvlDxMCtAi2kDcXxNfr9kpsKY6yV VRbb/KPsB2PtlWnbMBpwTfdkHNthTFN0/Oaklp6kKpGcRpTZo3uXMM6zzUoyJmP6Vzo5 MlXg9srRv2plaFHI7k6ovZ/p40vEa2jpg6j/weuOFAQp1Q98Va6ofjvehLuiuF7asiuQ O2GHoaZltt/ZEJJ7q7k+bnDMzKlYm1Z4HDHR17uz69lppOqbJCniuUCWCXBA2j04RuIQ Dc0u2Wg1oJ1p2PpbazrSH2iy9xXzVPy6pahqld4YzyJC8VrgzsmBQm43i94JZR8CxhtR p2rw== 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=rl1BZZEPZzuQatZ84F4cmITEFntR/NpBnpdbqdfDOS5ApF5LF0LX+A/jeGbLoCVuwL YsgKWpVyMVFugq2d9PiabnD7RN7nbdFI7WF38y3Bj6jaX2ynlQIZacAP0iby8P3NMEdI JCw3uTL650y6Rvm8VA5H+hpQyLgURx8nnwsW6WlwtwECATvbyasX2SY9vh09sfuvcHYF 1zjocPU2CrpgYDHZpDkQlNmYAAEvrr2LoO7D1tvTgucKJjm7wM9TwYYDRKrIlI0hFoXO lYSOWz2t5D0zLmrzk/g+S6VP1G2awJlqdrLwNMuGM4ULMRhErXgqtS829Mk1t2nRPk+r QpNg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=VudOY0In; 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 y24-20020aa7d518000000b0051df3a080besi22586edq.72.2023.07.13.01.34.11; Thu, 13 Jul 2023 01:34:35 -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=VudOY0In; 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 S234508AbjGMIPZ (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 13 Jul 2023 04:15:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233770AbjGMINh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:13:37 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2120.outbound.protection.outlook.com [40.107.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E0E430F9; Thu, 13 Jul 2023 01:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EkYuSPPKk6NQCwUMKpjwRbeAlV6bMCKKUSfGG09wl/9EumS/kKTpxVSfu1oUq+hHwhWTIqfAEXet0E/GiYMeWCgRvsqu65odDw/9Naq6xowJXyIdGktOh2I/aol6EXUllTUwmFH0+q8zaiBDeksnxkvomeJxN9O8mV8C2xuJHcDekrhHAsvaJRQvMSmMk/P78YAtwChEk71i+vTAguGRg86wJc9Zk+uB5KbkEnLQUBC/pIMJ1XmN+oFlanZxOVcb+wx9bHP6cCRW+7BsJwJojX+mzkq9P4S14OVEW5GKHGiwn4awHRKcrcUC6nzjyIB1XdHERSvRAQkPALDEE7teZw== 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=iIzrZUbx0JMdyvdJ0FTDI1QPkloNeIL6t62y8KzpZ43db8XnPbGWCX3MBZdbZhIFh+1tovoOa9DTpfGVioSNfw4Pfc8UlgwO9CnXct9arwoRLb59xqTQkzropg4BBmI1RSLygdAChNsZgCL6yPD4dCNiee9mnOVwS9QWn1vfxsHLnY8MEjmp0FbdbgbizsTmx6LaKOZrW4GFCrquYR35DA7YdcMCIKBYyCYTU1eZIs2OYQ6Wx6xscysFVoJrsqyKxp2tVjF7mevi5/MvrM1X1TVgOy9JaKmdXhDf2/jRinrky+p92H4xVwKG9Cz1AubWiUhXILroq+38OZkKjYjgow== 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=VudOY0InlJ/MO6FuZlBu75VEN0oguPr99Q1FQ8jW00FF6GpP5LTwreEdNE/MEPXlFE4eei1c/6/NU6v77rUYyHMJt7M67KPgxG8wphZ4H3E7NxvokHgVRbnD90ul0DVwFyHzRLl0UrK4S+jV+QNqvykYJvrWeyRLo7PZpzlo1zPwjdZ2aIZH0Q4girOY8LN1a/VKIqiGpobcuAx2tf03XRJ6B6Urxgc+RzAAS/g2TmcddXZp1bbXaq0ZPn2HpjVrzHnz0T8sKsR3ym/+mame4YDNzhTY640HEzzI9Nd8WEtZ9O1fgH/uOCS36txhgtgFNeIOm01E2QYL/LwY5tsZMQ== 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:03 +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:03 +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 53/58] mmc: mvsdio: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:08:02 +0800 Message-Id: <20230713080807.69999-53-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: c7127a01-a44b-4be0-60a9-08db83788a2c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9P7MaUa+lPX+bpbjfDWnZct7XEANSkkbYE5t+phWd3jhmWEiUSoPnaoENK4trM4r6uq2YyRgv+Y9/xEEP8mp9Fprt7Dh9rrJEK6VSS1kX6RE289yqUKViO2oOl8yQOvPZ7DsDnpexXa7fsD5yMqmbjD0O7Fx6bBmEogoVh61eX/egZkJxySDE8T+izBx7HAFdPgMWBwDnZsv6uAyDlo6tNvAD+AIA6ikVc458LWTI+uG0Qu2xoJFIfybmob9iHhHoQpVzqM8iAz/211T1KGaO3JZqFHnb1VG6PCUrJ2kKsWcywt5NBv0qyOiD7SktP1hG2VDujRM/1PWci8PYq/4TctSiy8B6OJ019RLoQ3c8ZGRuva98+zpXwnrAQgAU2dE2rSpflvIgI2/fBf15yD+Z90qvEzAm2R4lVWP6ywZODVZ1eesxSsFAR2mK7xMyj8h92RiAfoX1kFm57KbIRHKpWauKMJpeq6bXgGxpH/eFGU+2Z4tUYKvWSQD2ctcuG1MwuE0VeAF6uI2a/MNiwxkqxOLhen2TpGn6xmRaTUJ/U4D0n8p97MaMXmg81PrNYQ+JcLOxuF53Q1MLKGm8auMn2R3TAySWt6QUfwcX+he8E08y50TFitQpDccFtT0FYjz 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)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(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?2eKJw5N9NvnSxUuBTOh/4RqhBiAj?= =?utf-8?q?mgd5XpMk+/8+zGNlhmrSghQBvTS8WwR9YiQb2buywl1/0LFEkridzlPI8WxsOgP2s?= =?utf-8?q?lDqfyKltBZH7sK2uTU9F2o5wgOkWG2pDvqZGztFnUy+AdvI2lu1O1SnEIbL9VMB7J?= =?utf-8?q?+TEHEFVnzA5yEQ5upqZiMfkRClMG+Dzv0+o2n45oTf5MaXwq3bUfkPuZqPWlLZG5N?= =?utf-8?q?ez4ukBXw93Um7bN9C+61LDkJ124sTjukI86NttxyFvxtgxSqAN3AHlCFPfCBPvnqk?= =?utf-8?q?BWheRNgrDsylacyj2AP+n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AbAlhZQanKTVqZYqxoYQjZM6A0dk0ddykHC1Zj60FCyY?= =?utf-8?q?v4H3PhMDb6Dmd1PYUqyIpWR+wzJdY1f/wm1NVWuLC9qZ2gtOxHAcEGiTFsJx7IXD7?= =?utf-8?q?PeUoed+EAE4qt2DzpsFVbh27X9gpm+kBiblWjhpIKJDdEZZ9eikSGNpxiwehjxixr?= =?utf-8?q?SFPRyH0dq4Z7rmh7F2n+lv0YRWYvVyuaY6l+6SYZLL0r1/Q0PAE32T3aycP7xuifI?= =?utf-8?q?5cuJCpih8U9OOqDAR1eEiZUSqQ2m7xWJ4EMgjH1mEgYtUNdyDNeEBGDPBX5mufjtI?= =?utf-8?q?qVEjSmrgAE476Q6qLwrRAcrlNHpLtPv9WXHcyQU/atYFuvaf2qt4WB0SSVq/oscdH?= =?utf-8?q?eXVFOkIku4jE?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7127a01-a44b-4be0-60a9-08db83788a2c 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:54.1836 (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: EJ1DgpHISCAhqFs0moPXXrjAL6eRJyClNEtvKhB+kCj0gb2L7/DiH8r7bHMUDGeZqV+yRxtPP939Q/SoDezqtQ== 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: 1771293665411476535 X-GMAIL-MSGID: 1771293665411476535 |
Series |
[01/58] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 13, 2023, 8:08 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,