Message ID | 20230713080807.69999-5-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 c18csp1674719vqm; Thu, 13 Jul 2023 01:31:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlEk4Re2iNYXrY9zb/UrUSTUmLTmgSQDU4I0MR5EeEYZpYx0R8BEhi+8aGdJgwPF1avGTWiY X-Received: by 2002:a17:907:e92:b0:96a:2dd7:2ee0 with SMTP id ho18-20020a1709070e9200b0096a2dd72ee0mr5974219ejc.5.1689237088391; Thu, 13 Jul 2023 01:31:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237088; cv=pass; d=google.com; s=arc-20160816; b=c4hD4niVPkltydNtbt9FUaOReaX8QObYubMKT2b3v3oJ4QEffNhQW1+sybCtucXuvQ z1upOzUwwLLs5GX7cSZEM6skMRwYcW82XySrKuH7hqkiBtCm76R9IM9ZWn2BllpzOSMY v5U4YdQud09TxNGiSoxNoORvx6Q0Lu1KNaCc12jVqsXmDeKvLQ4GOfNIUUXOoTTQFHv1 4J76wqEH1CVdZawz30pO3e6Xa9TkHozwvVVdDhq8YzX6yG4lyihnrSuakdxlvbIu4NWC Z3dSfFGIABkQnvKlOwzTW1WazLLKigJw8iQvbVgFGScRsBVtGlvCPWqsTBW+76mvYEPN l9vQ== 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=0PMUwGYkEKhi1gyynW+rXvAujgXDga934Imb0yL8Frc=; fh=CYjPLkToiURQRXIzKWym/VgPpx/3DQOiB4nlUMd4//U=; b=jYyq7o2MLqyhjK7hKxyIHsVN/B5RWAPOZfaqwlpPkAROY8tXu2n8CivO0rvoPKRKZp Kz1VXBsboTRMKbQiL4txFe44/6OJ4ZJ2R73OrCs+fzGN3TsU6klewdpgakGT/3k8sojF 3gdFuGn8ODw9UrAdNz+AEtIE7DGpBpkfIm4F6ash05/BOhVDqzxBqzrYfbv1/0N16Oma 6f7ly4g/vb0ID0k25/yobc5eMcL9XkR2hSA6wocdGKV3RXpFBKnC7//K2ELVeozY4uEO 0TafKc82SHzhrEB46P1c4I6mxL0fu08Plwa5KKv66mWpiH5gWcAgDD7b5g18MFkysRUz 9vvQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mAbC8qtZ; 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 gl16-20020a170906e0d000b00982f26c4faasi7087153ejb.61.2023.07.13.01.31.02; Thu, 13 Jul 2023 01:31:28 -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=mAbC8qtZ; 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 S234075AbjGMIKa (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 13 Jul 2023 04:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233452AbjGMIJs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:09:48 -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 957DA273E; Thu, 13 Jul 2023 01:08:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XNtxQLew8Eepx+EpLw03kcQCEvXvMlslmTc1trlkFq8WTGAwGqd5aPg6Z50yg4NstUrzxYbxc3F7Avak3MAjLOkyPNrDzxNrWiNe2B3zxBhRd++U0dyMNLEfpDQ5D+wjQKfaRGt2z4JVxNM1ocWuILjW4zdJzfkNJyE8gnWQy77tWMMnABMFYycjOkNg08FHcHjRnzNPcTdSRDoRr4bYYIdsySXujfKvhKeUGT+xcEXufPYWkNmsm1DekbnTMNJFicEwIc1GbPSqm/5DVJCtAoz3N5WcQY4wU+/RzyaBRsiOz8QR+dRforyShtBdMthD07RlE2yuyRhSbrARmC9hzA== 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=0PMUwGYkEKhi1gyynW+rXvAujgXDga934Imb0yL8Frc=; b=oICaM5EoIQNYQOJV/+K70wffDVNcurlhqcLSN49r/WEZQvAgbsErLs5hjJHoyTsVJmmU0t1/HibmYkFuSTqyyUgVCAuGQ/ElwXhfDeUTMepczjfvBdsI0oa87K5f/AI9svVQeVA2Fw0fIFar8Fd73L8SUKFTOYMTPdBLsEK+ePK7b5W3CoZV3A/FPBoci42n5pcA9mXfj7WR3JjqkAuQ4yp2bAlzXy0AF/Xxbru6EKbQklRx35bG1+U+6IkcBZ7kapUBYX7aEAsrsm7mqD9iI5JH5X97ElMmc/vZEKLmz1labFSFTSYv5WuclmZIeCYHJWrmnCgsdd83STC7Zh4HoA== 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=0PMUwGYkEKhi1gyynW+rXvAujgXDga934Imb0yL8Frc=; b=mAbC8qtZHLm2XxvvRFPWTJ6HfxoNJ5+sjpfN0LoNLEtnS0/imdjKS9EETLshbenfyAMQoLxMJZDCWfuaw5VUJ34ap/e1GvFjXDzQ49xe7Gvc3Z3qnDJhKBsfAM0G/5HUKzTriKJAQHaPm0ZmHNFHWKjUzC+Bpp0kciRS7LF/FACmwXbjOmxoTHJU0IDtiBM55oHTDMqfimn59pTeKiA3isWGw8p1ym0rkakSydIDqhUCAnkL6IwGsKF6bj/sAeWXopXWOkf8zwOFaPNXz4wvg4cwA0uq+8+/bD/a919bZafph2cCEjATCktmXI39Pe3qKNZAWC0SZpfmgnElrzCfgQ== 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:28 +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:28 +0000 From: Yangtao Li <frank.li@vivo.com> To: Chaotian Jing <chaotian.jing@mediatek.com>, Ulf Hansson <ulf.hansson@linaro.org>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> 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, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 05/58] mmc: mtk-sd: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:14 +0800 Message-Id: <20230713080807.69999-5-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: 65243354-70f8-4313-0517-08db8378572f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +3K/rcR/1cvOzD8KEtQwp6jaRtH1evDn3LbC3nT6rsYbCh+kFldHtFvVG423kInQyJUpZ3iMVNfV+hS46a9j3x+oRBmtOHdyLNqvWCwvedZJLjVv+kUEK/G00P23iOMXKiRXqhhgW5wqnVcnx/KulRgo/VLMeU/0ubsYB9wKnqiIkDpgIh0IL/akNyrJvUqdCIue/3uOGCj3VJio+gGKOEc7bw9RJ42aaHpJEUhpVBj8bLC/cpkDgsUcS9vG9kC5Wtf6K9Zl/n/31f3vysRdFKALNzud+q2fP4jyVI8kndpBYDofNLsrzqmufy9v14Tm8wUFL7h3p0y5LMUgmn/Q5JUxqDr0iWZvC3n2+BVf9dlh689cXh9F3deSfe2GV3bam3btvSCYt4mGMGXat0IRZcvdZVJj+XMq7gP2NfM3unhdkVC6RxzJncuh5QyuHhKoGMh/WRSDcdTF9SvNwI3wI93nYJ+efwesErXlsS5X0+T7YX1V+q0o3YSFV9MgqvlhDuDUI4cKzTvRENI/aFCKaOlJbs2pnHVIZarKkTVk4lDkwDobW31kg/rCGjT+8b6WQiqoaF4DnmEVjdD735O45xU6/6J72donpfB4DEJHNTREa16h9n921p7u9b1omFXMv6v3SZISbp+mhLaWgWXfxCj4mBVhUnVmcCyxe6YC8W4= 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?PvD+OjOusBLy7ep3EfHOMZj0O3fK?= =?utf-8?q?oa2kOcNyJZlTl4OLrvVSYvcsM5VF2waxbXxPoDTH2T7NaILEX6r/OYdOrUtFXNHxo?= =?utf-8?q?wubJCbz1WYUKg6CmCQf9CkDDB104NZ/AfQmzdCzC4+VWYjSi6oHeMKfNbXKcNycIa?= =?utf-8?q?gaDwGBjD7C//0SjhlUErtYWhsiR/+nuJS7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kbrSSaWFBJU1b?= =?utf-8?q?FKj4JtrDH9eMgv/fpM4SMAoR+/xv8fBEHXddzPTXLWovVwP11zlNTwHUYQAIh+Vkb?= =?utf-8?q?zOB4I9P3gNrt221tddbPevkzBYSmz+HIOY6Iblr90BYE6LbGBvs/gaLayiwk3B3Ay?= =?utf-8?q?O9qJ2pDKjQp+4i5yvJpSL/ddTYQPynJvGf7wqwPKjia+xGP+dm0h+l2bsU5qkuSIV?= =?utf-8?q?6hQSA16V6GgLN4ckilFyeSQk+WMSw23C8/ykA3FQWzbbq9imBvnDIu1leLe1b7ttg?= =?utf-8?q?TcIpkAYkWHE0lwDTDqDRz4gqm+JgKxZNYGoOa/WHBW3LSvKOwHrwNeUyg6o270xHL?= =?utf-8?q?FIZuVnIGqTNXOk8zILDHsmqVrkyxpjTuTxrZ/vqClYqNpna6YLMbR31ncjkWE3GYP?= =?utf-8?q?VPMsXzsxYoxglBfEtgdlSkm9qdSMPrI3qsobcwKqxYU8MlsjDQ7Yrn8rIDGBP3QDr?= =?utf-8?q?qQxS4JlmxFsb?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65243354-70f8-4313-0517-08db8378572f 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:28.6594 (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: FmTm3zWwWCOyyQezqBomPK4+Kn0vzDyYzjhRdWNJvrvgs0XKREqBgidtgs91aZQ20GJ+k4DoMz8kV/p5ORcb8Q== 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: 1771293469104607078 X-GMAIL-MSGID: 1771293469104607078 |
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/mtk-sd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 02403ff99e0d..9e2debd1edbe 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -2887,7 +2887,7 @@ static int msdc_drv_probe(struct platform_device *pdev) return ret; } -static int msdc_drv_remove(struct platform_device *pdev) +static void msdc_drv_remove(struct platform_device *pdev) { struct mmc_host *mmc; struct msdc_host *host; @@ -2911,8 +2911,6 @@ static int msdc_drv_remove(struct platform_device *pdev) host->dma.bd, host->dma.bd_addr); mmc_free_host(mmc); - - return 0; } static void msdc_save_reg(struct msdc_host *host) @@ -3054,7 +3052,7 @@ static const struct dev_pm_ops msdc_dev_pm_ops = { static struct platform_driver mt_msdc_driver = { .probe = msdc_drv_probe, - .remove = msdc_drv_remove, + .remove_new = msdc_drv_remove, .driver = { .name = "mtk-msdc", .probe_type = PROBE_PREFER_ASYNCHRONOUS,