Message ID | 20230726040041.26267-20-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 t5csp171002vqo; Tue, 25 Jul 2023 21:34:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlFgLjx2EB80dRUyw694QfvbgepHedsUNRdLRyDgXtskVnDdfasgmE6qpmmhCPkigZzMyfqO X-Received: by 2002:a17:907:2721:b0:993:d7fe:7f1d with SMTP id d1-20020a170907272100b00993d7fe7f1dmr623325ejl.28.1690346042765; Tue, 25 Jul 2023 21:34:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690346042; cv=pass; d=google.com; s=arc-20160816; b=vW9LVOwcN+yQI4f6oW/B1kxHF6oD/Kmiu7pTCiC/3Hh4cEJrcXCjdYV6jH34nTVP1l cEU2GNblSYgI9IaEMAzA/J0zSrDWNW6xLwQnrelIiS2hs6F2Jb06hlU/iL6ZFNqpohK3 wLeQlkFZUP2bHnIgqp6rl6QOyNrPQSEOStEQoeP589YmJQFyreGmXgxjsWc25kSzImx+ Ga1wut38zBpIgH3fWRtNAbeZOzaY0IWVNNQQYBD6p4/fj9fBH7y+6YEY8J1VfjYjmjNr 2Nb5GTKq6+9KKAnQeayXQ6vSNQdqsp5HRysoGoWqoClPrG1jTsgmuJFYW+gNrqkM0/YQ CVwg== 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=+nPOwPKYNeq/2Tv4iqOeh7ZkKMvKEp8wvhNPamOgGPQ=; fh=wNELzKjtDW/UkCeI0vRNNM7WIjF/XKmykMZmmqUnxC4=; b=uuZPNzzzjIH5uNCEiGn59BWpeRTrA15Fi9kh53671wbenrvyNeo1rB1/B59wymYCZB I8+h1oDww/XMGzV/3B0Vg2ANnF3RhJ8kSaRea4K6Prdl4WrPZKiO5mFSz5lHrSXvwxc2 HSByf9oihW1AeR1/aILsZZOzn1eXu1Q6qYYwzS3yDdXfRAPQC2XnIC9e5Aj01fzjRZQf jlGtWkn36/dcRTIv0PPcrBSZteg2Q2SmkF4svZS1DuEWnvctB1JkoIqwfCOWZZla8m5u s8U0tjN1gV/urWjPdfEa08no4WPBS2zY//tcRamRnb5NQbf8lqvWVNyNJUv++w94pToy yixw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="EtHqE/pc"; 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 pj27-20020a170906d79b00b00992acfe04b8si9054301ejb.150.2023.07.25.21.33.38; Tue, 25 Jul 2023 21:34:02 -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="EtHqE/pc"; 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 S231642AbjGZEEa (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Wed, 26 Jul 2023 00:04:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231656AbjGZEDx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:03:53 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B744E421A; Tue, 25 Jul 2023 21:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DTXJD69KgUZTj2u6GKGwFlL79BlJ05p+Gv5e8ng0W4TNTxMspEVKjaSkb7o0nAHpwlkr01UhKxjhq4OXx+Lorrm0Q4WGfyNwBdAAZorg9pjH/AV3X0dy99K3GJoQ4Lfd5IUtAKrICLv3jd8wZnEVk6cx7d7Y31xAzEeTJ615NtrANuPO+LbNzxogb02N8S4dXP/aQ1YGZpeqD7AnBmSfCa4XLbEsik+qUsfuMm421UEVdDDHCT13Vg7a4QwdF2wPqrw6UqNrmaCRYHhny4gamtGNrx3vvZj44kARQrgcr1EFSZJSXPQVW695iV0dWhrcX/VMm7Sj9fLHziizCppY1A== 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=+nPOwPKYNeq/2Tv4iqOeh7ZkKMvKEp8wvhNPamOgGPQ=; b=UZUokC+k8+odT7uAU1cqE0wG42trolnTN66wiKHPsU3aP6rLwrg6S6kQ4NANoZxbpSCt/6JLbYbC8LWM/dyYDU9aYC/5OFod+kyjKputqr++aL8grzCKC2iGu7PyhofoDJZjRCGaEmAI1oeRHuSU2c/fFF92eijvVPdjYvIriHDU801ae1LwpUJ0XMiWXzQxlUxcfLOjLvdOPL+W1z/9xolE597Nrb1bGp6QgkbbqvDEEXu6OiG2NNj4imDG6j9I4TJJNyOnjUxnoB2t9MSZPoiPM0jnHzVj3Ogv8C3fmYMwVmbsUZcsjBgJ+xCBRJ1Si2xYa42ESmLLue+NX7aQpw== 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=+nPOwPKYNeq/2Tv4iqOeh7ZkKMvKEp8wvhNPamOgGPQ=; b=EtHqE/pcLApsjrI1sGAcpsDHBbDnRAlsQ1DsYZPSHkIYOQVqYfAbA+qnmqDzN/0VDjYZXxAmgxHetsoW3dhppzkR/RhaG3Fh4+sfM7IGBkLJ71YW2x2sYCOHVfc8isKa5UTLePA6c7tuM7eysUJAO3E337nfkbe4/5fgf2Wk8PfDjpgmkk51Im/qoc7y0j1RFJEguVfXqAPORzrY+tNpML5Q9YeAew0ORSl3hpXLI53KhPD5Y7a6y07DCAT8DyGFz7sfZgihEVu/eNmifFYWIwRbi1wr4qk9ieQ+Z41TG1UWxf7aoXURJ0wf+95yET+z48QALatT9BKyg561BUPyuw== 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 TYZPR06MB3934.apcprd06.prod.outlook.com (2603:1096:400:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Wed, 26 Jul 2023 04:01:33 +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:01:33 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Hu Ziji <huziji@marvell.com>, 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 20/61] mmc: xenon: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:00 +0800 Message-Id: <20230726040041.26267-20-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_|TYZPR06MB3934:EE_ X-MS-Office365-Filtering-Correlation-Id: 9195fc04-7526-4576-f174-08db8d8d000a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EOLPvLgUmj/KlX4kWOaC1X1eFDvFeAph+ZBKZzDfUESQ+c7ua940Ec403ODv0SsAc37LVONQi8topJRQGJCHLS5hA1y6uRBa3wzaQ0eUZMKVRbuVhxxDSkp0o/nPkTL4GPfV1qz5K5rL7fOqCpFGXY9zGx14npc99QBMxRp6On6+ArsIMXXDO+ZlF9hAdwk6AUKZN/rXQH3BEn46PEoqnQ+7cKy6Hs3zpxyj8T5wW+xsBnLpyGWk97vcpIWACNqOWzovCathyhK3MsR+Np1rqp4/qAX8JvgqucYb9/S7pxHzAcwMcLQvM/CNEAzA6G35xOn9ZU0xHNss+EcOe+4ehoxKESAlQRA+iVfHXhM5IxvnWUud6X3G3wmQwlak4qlDkDgXJ2Rro0Kjy3CqIQfvRNnVo5RMGFy033eRLlti60Cgih1QLjfoKXkvHGDociUia0DfK7p9gqFzypt4NClz0jZNFJZIordDpUP8Xt46ej7WRQmX88ZIowBwBMaJVQ5ZyGLQ5kwlk8k0hPoVfFSrH1ApMa+BnmG/Nv+yjTs2V+mk5JzNArnqkwvwKtcuWyJ62pk2J6fcJ4BioftyEd+K3/80g+lwoIuqcmytnrN9wjtkVPu5WFcLJ1cfl5/Y3gpo 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)(376002)(396003)(346002)(39860400002)(366004)(136003)(451199021)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(110136005)(6486002)(52116002)(54906003)(66476007)(316002)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?7pK3tX23mkDul6AwFHEgo1ysEP8O?= =?utf-8?q?kuNUATT4Rw26KgvRSJCn1c+zvCq0RLNgpVLCoeIWVNVY+JXI2ON34XYzAR24wo8qq?= =?utf-8?q?LFNjrrPyZJiUcSXKPuER3qDDhH7RJct+jMR2wd4G+AReVL7kXNw4Xbq3xzCYStPpE?= =?utf-8?q?5fHe5eDNBDvbXtjSIJg2WHvCHK2VfMUH6PIkT/Tw9A1yX95j99C//+g95rR6jvjA/?= =?utf-8?q?NqxYzlU2bOhPjmuqI/3olpGqPv0Em14PvcxBRQMysCbP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L/IoW9uWGPhSI/QFUtQ?= =?utf-8?q?SFKJzSv5EMk0wYOrPaq6zpcdxO7WlM4RQSo5zYuY5xdLw81/V8rTIqucuus0ebYRe?= =?utf-8?q?wmGSNOquFjD81qAw/8eXMgaxWyh2brEPrNT+rKkIHMksZ9LXZsVA1tpmYkelxfd1G?= =?utf-8?q?n29ELBvfIvZL8a4jAadVM9v5D0syi/YZkNm+ZtlMYOMebcG2P/qs6Lq8YRTuUBmmV?= =?utf-8?q?MCkbx+KMesS5ZZMeJsjQ1i1gxbxc0OZKcI/t3IcwBGp0+mUvFD3vpjJvPfXYqUeGc?= =?utf-8?q?+u6tVwmoa0C2hZtYr9K2Tg1nEAfG2Ku8FLqAP5M1vE5IzsNtpvlvQ24KIZfQ7sAcb?= =?utf-8?q?3+IB1/LlQZY70/9969Pok+3xKaXf5pQijRD8DvnpcusC+a7MCIh60qobfuQIB1AV0?= =?utf-8?q?6A0Wj0M8VJEH?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9195fc04-7526-4576-f174-08db8d8d000a 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:01:33.4898 (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: R508bRrtVvNwVFdspoPTKOLOPDFnwShiuxJqMPiped+jd2sV2Z36uZo7RQ1aCaDHJnwlcEKT1O2xoKGoRLRXkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 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, 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: 1772456292016759652 X-GMAIL-MSGID: 1772456292016759652 |
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/sdhci-xenon.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c index 08e838400b52..25ba7aecc3be 100644 --- a/drivers/mmc/host/sdhci-xenon.c +++ b/drivers/mmc/host/sdhci-xenon.c @@ -578,7 +578,7 @@ static int xenon_probe(struct platform_device *pdev) return err; } -static int xenon_remove(struct platform_device *pdev) +static void xenon_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -595,8 +595,6 @@ static int xenon_remove(struct platform_device *pdev) clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -705,7 +703,7 @@ static struct platform_driver sdhci_xenon_driver = { .pm = &sdhci_xenon_dev_pm_ops, }, .probe = xenon_probe, - .remove = xenon_remove, + .remove_new = xenon_remove, }; module_platform_driver(sdhci_xenon_driver);