Message ID | 20230727070051.17778-35-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 t5csp921335vqo; Thu, 27 Jul 2023 00:37:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlFsH6H3X6c0Z4cibDnvsY6UGlXbqgcwUI3Shmzsv7HqbOplXi26iZ0m/iHXiCpAHwbxiGWb X-Received: by 2002:a05:6a20:551:b0:135:9b84:cf43 with SMTP id 17-20020a056a20055100b001359b84cf43mr3797703pzq.28.1690443448545; Thu, 27 Jul 2023 00:37:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443448; cv=pass; d=google.com; s=arc-20160816; b=lI+c0twJb/7PECAbR1daLcuh/WQDRQs4mDsaFqNUp7I9hS3g6f191qgN7dGr47nHic gJ3J0Wc7EqM8d5RxpobWIOD1067OAhb157Gf7DpOm1LMh9JCqbirECZyQ4QRYCOM/JK1 Ey+ar6KQl+lsQ49pBrSNtnH9JziENJgIBYNbTmfRBEgj+eJaghj1cQpgGQyuB5rg99Kf GHKPWlONIA2TqoyidrNc0LnFQTI6tm/O8LLPD2o7N2bZRRN3Qcd9rsqncLDbfZ0LfJsG bNOlXxvXKKXHubmjLKfA1wvRHnnKjKZR1rsBIRR8VLcbpf84HtZsxhvHNusqSyd4mwMx iqqA== 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=Ds1a60oaC5v+9oM6ou+xAQphrPqkP3uRTm0nyn/ukQE=; fh=0b1WHgzFaKa3wEZ+TH0lsKqGVNqDKrTFnhkKsch2fbM=; b=ReYckfNqypI5djpdCuYJIstDr+O4xNXtASsBxloTCCTCLB+Ht8B9oJAWaZaa5zOBd9 51u1iPwu5kZ9KFslpjSSXwm9O4M0E4mZH8Lf4T9E0o6fCjALev1Q6tBe4r/24ZQ0sGPr 5arlpz6mGs//OAcIpGHE3CqLiGaeePeOnH02IS/shqVDADXB2a+GCCBwVPZF2ltb/Ubu XUSW5iYvAeNyM7Cu3loycMfj7FGtK6R4R+zAKJBLkdCOuVruM3JrSjusT7b4fkNJNhOi 3bMi8HdlBTX2kKBaNthG5JXMJpNMZznK35qmgvouK6oOicmJNH+iLPeXZj5z82IRup87 Krig== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aRXeThsR; 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 bv188-20020a632ec5000000b00563ddd55c6csi864543pgb.115.2023.07.27.00.37.09; Thu, 27 Jul 2023 00:37: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=aRXeThsR; 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 S231755AbjG0HHQ (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:07:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232306AbjG0HGM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:06:12 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2116.outbound.protection.outlook.com [40.107.117.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C859944B8; Thu, 27 Jul 2023 00:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BG8HdyImjNNEhkLXVK/kPMQVxcGFgh2OqAkvRTHd5tAAiVNDfdnmGnu5zAlRVvKbx8e/hszbK03pUXRH5agi8O7JPychybFEdKndLAhwjt7wNnTMVGNX0vA9k2JvxX26R2+EwUEeYaZUX+ng4ZwX7b8yfNnUNhHm14xVWSbb2cO2DF37tTqiP3+PQDmb5MKZKKyf0mhO3+5R1wMyDCKySWj8v0w5fmIomoE9N0yNwrKNVal/UH9gJ64mbpN/qlkM10KJ86KIX6rGo2tDKtTJkc3Ko+84fboInTvDk5RbZKlecx0Dxsjo12RecHJmbiSJQK9Z+9DS79daFrEO8+eiIw== 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=Ds1a60oaC5v+9oM6ou+xAQphrPqkP3uRTm0nyn/ukQE=; b=FqAbsVjezv969l7BRLtEAaElOhSwFT75HJGpZ2mwlY+6SDRug64d8N+7zolTujx5GEcQvZOdJj1hiiCuq3+OuVTJFApHVJX08+pYCZfLPA2I77LC5JvQ7amqiYYk+PGVVAwuYpJG81Av3GcumoAf7Lxz5dwKhzRmscRU4c5mrdXWI41mitkouAVU+cPp8Y008Pb7yy99EOFFAoGPPOgzcsJAhLJfwtJK2RSrwdqyYkZ782UWVOtSGSWkpY21Ff7ny6DMqa0ZxIIdEw+ajp/mZ+zzOY2r7l/0vCs7hd+d7INL2bQtSf8rFmboWyIL2Y3QchyMjXaZ0Vj1j6YadwPiUA== 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=Ds1a60oaC5v+9oM6ou+xAQphrPqkP3uRTm0nyn/ukQE=; b=aRXeThsRgFEwXG+4G69yKWRrTEfdqz6MaLpRO5urKzEXm2/zFgJhIvNtKWQCbxBbvFzLUV0iB+qElOZgEahmhEstpShFOF+ijxslsDbDb7Zy8AELcGn1Je77RgsXtqMD9T0nH1wk+YOMMks8IUAUgcGAKSYOt04HmoDvPUQ5jRWtEBQynYFT9TpQfIlTBy4S5aVgclHIfEMNXFD2gG6WYRBDws2Lskw4+IcH+w59glZ0LUXKIiNgEyNVZPPLCzfyHqyF8Y9GYhGM1CWJkxaA7ytq3smFffOgvI9GGR+ZHQcMc0PbUxsgEckSmuUs2B+2g97fWhRUyFK0q2kMXGy+7Q== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:01 +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; Thu, 27 Jul 2023 07:02:01 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org>, Orson Zhai <orsonzhai@gmail.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, Chunyan Zhang <zhang.lyra@gmail.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 Subject: [PATCH v3 35/62] mmc: sdhci-sprd: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:24 +0800 Message-Id: <20230727070051.17778-35-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230727070051.17778-1-frank.li@vivo.com> References: <20230727070051.17778-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 871047a0-c260-4daf-211a-08db8e6f6037 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t7hR1tpvQWjPqc1xJ+qhIwu9YW0/5KI1Xia/6B5HIExbM0Pc5Y4P4suhGNV1Mz7nHVx382Z90/s4qdY/lhpPx08F2Uwa57Z/3PWdlw2tfKPPMCSYumw6uB0LG7mgU0VdO+bBxQs6gt5uBrlTMFbP5gdZGX7J+8LQTB8pztUs3b1Lj2ANf9uh097k/J2PxEY8F95s3JeQaES3AS4OaQpzVxQN9yzQyJv1G7W4XqHc7XtWxn2AaaWaVurl7IXM9nhhVbuEY265tl3adqDphvIHvQiIpecp2hhQyQaz/kxOs75M0q1MfaCnioFkb3b+Hud+hN6GGzyKPLxB7AYgSpwBRTQsMYOkPrJRKp4yNWC+Fnfdwe2X79VD6eYO/YAQewg8uaNfHSmRh+xJomAHgCzfKzg2zFSyP1Zj+9PO5imhoini+bY2Y59S/XtpcpJdx6rmkZwHciIphV45cgqWWCqQqCPEtXS6ig4WTtvncNjy5oOpQW5mx+hnrSBAfxPwT9WN7SrefWYC/Cpy81O4om7mfQKmb+NopJI1TScut9vyCvjJo04XRUSp9gEKyF0KD06+gUcVqO2CMXZex6vdf2B2iNiG+ntE04EoS/zjdHdHA/aChB8q/kVFZit982OLv/jt 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?qbUEstK3g0M03u3VZME+0R/mYLx5?= =?utf-8?q?mwh9bxVeAcrbnAHzicWfcB3JY/ODPUk5kUpC0VBUt7CtFgFMNo/l8wI1yv87m879D?= =?utf-8?q?A6SX//0A7kZA9TnHVyP+If9LPaTayxvGD1+VcpAohcQ08zukuxoYxfFZm+lGsNCO2?= =?utf-8?q?ghaZsS8psEVZxZLLhXdMYn8DyL41FNVUHaVnd5hLFETfwtQ6phwIQa2r04Z/E2bZA?= =?utf-8?q?AN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aXN8H2Xg3fb7NXm02zgWBHY7ePLRpkS9isK0bBKNgoh2y4A6EW50?= =?utf-8?q?/JIX7UH3RP3XG3PrJSGcbJHUuXvoVktKp6p1SK3KSvNgdMRoeKeCDkYKlYm8NKVy3?= =?utf-8?q?TLzBqxRZHK5y6pNS6ZOd88wbi/BDJR9LSwoMKUopQ3Si7bTUZuhsecAdP9kRONDHh?= =?utf-8?q?k84cd5Cs6iVaTgOmnxpqvL7I+fpHIsbw+v7W7pEM/hb9fA9VKe/m5b/xuwArSM81y?= =?utf-8?q?VOx4br3rrVSSo1SMJA7OGZKXXQqxpZL363dAye6dAC+UQspwX/Yrf5E+77ZMYEb3y?= =?utf-8?q?iamOKSAa8/+YZn+gmNUh9r0+wXAVKRA7us1wESVxsknPVSqJYARhZVKOQJ54/MCXY?= =?utf-8?q?VqJgLfxPeb+fHM9jy5403q3AGhmDljM1x91zZJeAJs1L0g+3swmTyBH57JlyHwabV?= =?utf-8?q?FruRcGAXKxk8?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 871047a0-c260-4daf-211a-08db8e6f6037 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:02:01.1150 (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: OBEGAPt8I4uNL20YaK2TfZNDPiFCmCC0yASEpV5MxDsQL1q5nU+01XTZpNk9lxIQ9Ppkm0Qzzwh5ipJr8DQpYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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: 1772558429405776758 X-GMAIL-MSGID: 1772558429405776758 |
Series |
[v3,01/62] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 27, 2023, 7 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> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Chunyan Zhang <zhang.lyra@gmail.com> --- drivers/mmc/host/sdhci-sprd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 7f4ee2e12735..379cb3892757 100644 --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -720,7 +720,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev) return ret; } -static int sdhci_sprd_remove(struct platform_device *pdev) +static void sdhci_sprd_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); @@ -732,8 +732,6 @@ static int sdhci_sprd_remove(struct platform_device *pdev) clk_disable_unprepare(sprd_host->clk_2x_enable); sdhci_pltfm_free(pdev); - - return 0; } static const struct of_device_id sdhci_sprd_of_match[] = { @@ -800,7 +798,7 @@ static const struct dev_pm_ops sdhci_sprd_pm_ops = { static struct platform_driver sdhci_sprd_driver = { .probe = sdhci_sprd_probe, - .remove = sdhci_sprd_remove, + .remove_new = sdhci_sprd_remove, .driver = { .name = "sdhci_sprd_r11", .probe_type = PROBE_PREFER_ASYNCHRONOUS,