Message ID | 20230713080807.69999-10-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 c18csp1668886vqm; Thu, 13 Jul 2023 01:16:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlEmGQyq4z/o0tPcrrc4posGSVCT0EMV2S9C2fypnbOAys1W6PlK9awU1X447Bbi2wiE7zA5 X-Received: by 2002:a17:907:8a11:b0:993:e691:6dd5 with SMTP id sc17-20020a1709078a1100b00993e6916dd5mr1050095ejc.7.1689236166133; Thu, 13 Jul 2023 01:16:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236166; cv=pass; d=google.com; s=arc-20160816; b=H9LdHM1VYmFHXFf9tbJXQQqpSArNHYXao8jvkBAeOvM+DEBvMmkfhB+4JOG+bkVoVt NYKKz9Deb/UYLUjCSaS2MnYharqTegtlnaAYsjTvdWxDaE5rXhx6x57UjdcuHC+b1cnr CPlw++/1io/fXJd5LiPlnKG+cSSGB6rDxC9L+ZwGHTU+JKd8dIesTEdNa29Y/KirEqWt PxIuYHjVBRW13kxRW7DFcuYd2QrsLAkgKB50Br9mdrUXWvhnSAL9nTZvnQhIVn2e3r7P CG4RMiLk8qQe1Aig+tJ7hkt7x/EmDWzYu9UXO0U7M9/RxztHe28866Das/mcGBrYDJ0e l60Q== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; fh=rg7X/cuDWju/AN76WSpS0NvnN8m+keu91fVjBG7W/iw=; b=qeQ8awKifsYF7WqQHc4n4NkmQvIFqPedfiG3G4EyjTvUe7fMXH1dG5vMWwW5lDhxt3 /EAZ5ElId2fFw+X3BFNvdYOgC9s0KEYXS4UxcV4lRcEvEzbWhPcLlm10QIMM+RRZL/u7 HCldIh53fwmMQpAEWF/8Kjzds2GNua1FoqW5OKWlR2DGjeuCNrNceyfE4sDIF5lyuRSr dXoy2JU6ncQNw6SlqkFdpQKxXyx44KokX333R1tlkjPgKPj5CnguT5bi6qasWoORey6C 2MiyCXCouGWykJFlpi0bEV0eg3HwlMdl/pjzZiLwt9C+SUGUZOBsurd9gp93QmqO+ice Mw2A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZCaz+22R; 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 jo2-20020a170906f6c200b00992b32e3e3esi6400507ejb.468.2023.07.13.01.15.42; Thu, 13 Jul 2023 01:16:06 -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=ZCaz+22R; 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 S234133AbjGMIKu (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Thu, 13 Jul 2023 04:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233916AbjGMIJv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:09:51 -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 B66B83582; Thu, 13 Jul 2023 01:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B+7LzO2ESswEnHho59wiFdaQUo9TWJcrJdrYkYh0WTqIKCmdzhTzDx22yZ9dM/TA2TT/nhv8s6VFw6uSUuohXZbJKI9IZyPQNxNRtwGA/zX1HTXU+Ucl8q0WC46Qw2KvfjutlqX4KhRpIXhPeAuo5+zqgvXKsAJj+PIGa44+mwAL8LI5UA6NZ9bTu4nHimugctWG8uJzAwk9oelVf5/seP8q/nlyXt6FmQK7oBIvIv5NkIDmwgZ/FiZ+rJCzg5dY16pDwN/zkvrQ133NecEe3x1SHJvFW0KZT6kFncLHT7Ya6dtjrok/IA//jP+AMTteAIyxtm82NcrMeocuY1ZmCQ== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; b=m1cWayIbTldEt5v9nrkODjePljP7Qy2nuGdjz/SGIBspLhWwfztlBzuonwAO3yDTUGyNupzkpIMxkr1xSlDDCGiPMWZbIecqsCq7v+m6YdGSiI0ZqHHrFOl+fJyv6l/9TY1P+O7Ghus0FSCPygea5GmTI7FBzj7Z/zRDz7VnVq5NcHE1dMuTswKhcqdlE19sxnt9JkPhe69XOOuczvwcI5rPSgEkre04TLxmmNRPh2ZoCKkI2Txml9+mosNQ0W5TSP3MUzej8uZ8hZEXIutta2WvzwuDRu77m9y0OFyjHDSAWg0MDorDEXULQS4x7frMwVLXpQ2hrV/4VX7hOYXgSQ== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; b=ZCaz+22RWlwS3FKoHtLZTCCOJ7Y+gO1FFztXd78kX6G+a95T10Haqf7SLUoabvArU8bHb+3h9VeB3++yXUu+hPjSq9sQHY5BxajBZVfHRdWT55wcTeAf1STASwaxTc6RBNDDwofi4+4dqjLZEBtI6FPY3SrtXcyLIUE/6ZX6KDJedDk604VYqBO/I43E1iU64XtjLrzSf7iAJIRvmh9gU22/0S6/WSNqD2sUDrSmdFPtdaT/hjwC2U3RcBMqvTZWMd4eLMZcZ3Otxpii3ZXR8eML4dQNXd7EFZsjcui6Iw6iLxSV9AbMiucgoQF4/cWgd+BBiNEepj7zaba/cU4QfA== 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:36 +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:36 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org>, Taichi Sugaya <sugaya.taichi@socionext.com>, Takao Orito <orito.takao@socionext.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-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/58] mmc: sdhci: milbeaut: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:19 +0800 Message-Id: <20230713080807.69999-10-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: 3944338e-25a6-4ec8-a567-08db83785bfa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JU5xiBp+9JigU0MgYTTjylbgYboReiMXfzOugT7FkHCibxFFqLoyw9oi/JMGkx0RNgwDyLzbe3Iy3qaMnYqxR8l5CRYwIByMQXu23XBvR51ZkScDks9jaNLnA/XiELUfg4hzPobW++EofqEmRAQH8ubl8NkId6ZX4RzKsheLMIH6+9pu8I5hFhfW1h3p38k+aW7DSEcXUZFHseJXbrOnlizkLjQUs8nANXNzmaD4g3s//Nv9ghgRJOU3M4x+/J/fqpxAuXGrDngIB3AtdNnacJELS2q5Yv5uLN6/w/DnkgtG9D2tbY4aPhHblYp4ahWmLY1eq1KrwrtW6BUduqbFp6GfNPKOxPmTqWSdJ5oHzenbmml0RnblmHJzdHbfo9r+IwuMMFOi9BO7ivGEr3t0WYXrqjZS14iApjusZUUNK3QIN7MZssWdpuxlr7LGifFyukKwMnjp1TMxIcDDveEOG+vt1TkAY/EOXbxV+jLpCbYyPz0gEi6wHKfaLrvE1ebfvtiyx/Bsika2lYYzAHHvGqYH/rRM4bmHb7UmJSMNOjqwH/kr8GLgqwssxepkNcyiMcbSYjt0fwmoho7huFPmD2p6ZvfgjrPPgGdT9+Mi0vOg/bEPHR6NhBY56KCUwuGxMwtDC6Adhxw3ZIEf8bSPyACiLmpPwZnPmZPQJ1kWuCg= 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?fu0HKqK3qOGDDkuC5sjFKNxsiPbS?= =?utf-8?q?RZYHezm4qIEkViGvxxbgX14HQ+qRY5rt/jx1EssZr7j3Ackf0VvqECVXI94x6IsLM?= =?utf-8?q?UNm3saJ7UgcDdTrtDzSL+yg0momeOb0PDco3/gcZ2uLW2cOX2YWQWwdwtdtTL8mXW?= =?utf-8?q?2FV2cxHjUN9c7Halfiqn3z7kjZJw4vYWxyp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qPi6v29JeFqqXgMzcKvUavD//8i7D4TSCYd?= =?utf-8?q?0awHefSrMkt6LC54042jYjx5Y6uzyDh73dNQkWWgt2C+uQzt5J+90iH5pesu5fy5G?= =?utf-8?q?1MWDGwk0qAoxwDRXK6rJLB+W78NJXi4OBq4rJvG99W0uI7rLycguESPT+24wSTklv?= =?utf-8?q?sT3u7DwKVGYAh8Q4egg+gce55rAmUDccanWBqYfwirE9E9LCb7u4dO99QuoN6b1mp?= =?utf-8?q?uwzY6n7puWtJrjvc/TxAPaPRItDBgiqYE3SANQxJdo/SjrsWKFGXgfmZapyn/0Nop?= =?utf-8?q?6JdR7KGiPexPrRAWOOuTXyqKA43Tk5oW90tgrOQrRVQfxxSjEm0FqNaP7RjwVxzaG?= =?utf-8?q?F/fZ0o3fI+2zHEhUhkgX7wMA5z0eB98dpW7kM3Lb2KTXPDVoVDxawAKnQ7kJDx/hX?= =?utf-8?q?DLUDLbtCvwgkgwTUyMQjne2H5tXSAK71spwpGSr5zEwEid0R+69r5wCkargQjjcaY?= =?utf-8?q?l+SxJ3g9rr/d?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3944338e-25a6-4ec8-a567-08db83785bfa 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:36.6880 (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: AIlYVeMllta3UBADv+Ro8GLhAAdTge4YRG3Xyt1V1iPBKv1z9Jz5o1UMew+NpiEK/V5Vr0N8LS+VMqScjyz3GA== 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: 1771292501716437129 X-GMAIL-MSGID: 1771292501716437129 |
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/sdhci-milbeaut.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-milbeaut.c b/drivers/mmc/host/sdhci-milbeaut.c index 148b37ac6564..ee4514c90eea 100644 --- a/drivers/mmc/host/sdhci-milbeaut.c +++ b/drivers/mmc/host/sdhci-milbeaut.c @@ -313,7 +313,7 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev) return ret; } -static int sdhci_milbeaut_remove(struct platform_device *pdev) +static void sdhci_milbeaut_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_priv(host); @@ -326,8 +326,6 @@ static int sdhci_milbeaut_remove(struct platform_device *pdev) sdhci_free_host(host); platform_set_drvdata(pdev, NULL); - - return 0; } static struct platform_driver sdhci_milbeaut_driver = { @@ -337,7 +335,7 @@ static struct platform_driver sdhci_milbeaut_driver = { .of_match_table = of_match_ptr(mlb_dt_ids), }, .probe = sdhci_milbeaut_probe, - .remove = sdhci_milbeaut_remove, + .remove_new = sdhci_milbeaut_remove, }; module_platform_driver(sdhci_milbeaut_driver);