Message ID | 20230726040041.26267-15-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 t5csp173847vqo; Tue, 25 Jul 2023 21:43:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlH6+cLmn3JUfGrZncKjCiqZh5iiUuN5Ck6s0zB0fT9AV/orB61VyxwN29z3iCYXrbTl8iEQ X-Received: by 2002:a05:6402:3491:b0:522:5592:8f9f with SMTP id v17-20020a056402349100b0052255928f9fmr3885834edc.3.1690346610404; Tue, 25 Jul 2023 21:43:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690346610; cv=pass; d=google.com; s=arc-20160816; b=fCuDPWcX1PlDCX0j0/BFovlv1DbTr42RINn8zovxH42MpNp90qDLCtLYC1g/ivEc17 zEiCpOryhf8MlS9qQrvOUr48S7d22nWiL+w4csPWEF3GqUKZeQggt0OndGUGFOjTRLPw VECs1uGLlETau0gN4l9RJvalqEskabHgyiteVfQFBz1CwWMmHqpUGeXkpWZ6jAgyV3ky IBNjDpvXOVtpJavOhTNa9bsv2Adol+bfHflAuzNfSk2x0GTE4xeTLf3la1H03ewz6dqH 9PfgzIWNojvcpqx7SHmZgyLaqxLCccszfiJsYfa0ZW+kJd/xHsFjnktOVLUNid2jihmt lX6A== 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=fGKTRYq08V0JvxsGHP5msYQNQ4gzgDy3xPfXbsZZVBw=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=T6Ovq0ZPoQ3+fJXgaddP2naWPoMmWS6mZM9Za8Q7XnI42oKVj4bqMSp1a0lS9DhuNA /JrOiP7vyDVfHhoracaD7w403GEiirN2XJOvyxf4i1sibw6v83Rcw1jpvoIkMz9PzKXu d/appc+fjD+yAQ1X+zKlX463TyetkP8uDpFxGRxisP/78RKkqit1Q7UrvLNY/aEblyxz e+YtfLxa0Xb0msqTaQpFZ3bKJBjhYuJ3FCb2YOMMdawX5OKaCF/quLQaTQLi7vFGDizG FvnP8hOE07MBz9PNK/tqbEKiDKswXPq0hZ1wzpb2TE+Pdw+dXT9ctRgP2pNy+9T2zwvm oGzA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=bgBDVDlc; 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 b4-20020aa7c904000000b0051e0bcda174si9221897edt.308.2023.07.25.21.43.03; Tue, 25 Jul 2023 21:43:30 -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=bgBDVDlc; 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 S231290AbjGZEDR (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Wed, 26 Jul 2023 00:03:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231516AbjGZECn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:02:43 -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 9FA182719; Tue, 25 Jul 2023 21:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CR3q1J7BoVdICTxRTKDaEIRhIVwVo/J/5cdYx5iDmH4evnxqoVzMscQUMC7fXZRcxUWpKACF69uJH3USqoCbhsB1zWEyjtW2u8Tia2TxexxtuR3rtzlsCRvpwjFAZDR9cv1PKODxmqSVSjyVS6c4m+kwVWKf1QKNgCzDjvgdPcrwCbQqz9KYCXm8OhttKsMhoYTvmcXmF74q63P03DbxCUxYgPvkDh1sqvEx6wTuZONA21FLjn23ktPDt7xOESrMwJNlalrXiQuw067iDynE47ibqWBi2/UUqpYcZhIFjJIGY4xdQsHweKWzHWXmAvQ1V3ttirjC8EvdbES6BLViUw== 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=fGKTRYq08V0JvxsGHP5msYQNQ4gzgDy3xPfXbsZZVBw=; b=oQrFTfTk+LAsp9wtCF4pCELw09SN665BeVjrW6w0WF0flptt8EKl+vHVqFlwJLlRyRXcvH5R9DmMtGdPQ9QFQPto1Hw3uZ5ZDbAwR5bwzB8D1DGXebE2/8WfsOAOcD3h+eN2K2oMjhB0o4mC91vy4pNaoSOEzxR8EOKMCkOiCJqWbKIJVaf/IpQNcdYjBjoXKXHO242UrUbRFW1mNBZAAb+4b5olBj5voINV3TVVTi+s2t6kL/X5SzDf3j2b2XMyEgHsHcpDz6pd9OeaNaBxBXjufmSG58dwbjl6UnNFlEWxhdPpaku1HY1PKZOx7nFXjazTMosinrXgsj9gOGI0nQ== 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=fGKTRYq08V0JvxsGHP5msYQNQ4gzgDy3xPfXbsZZVBw=; b=bgBDVDlcbjUPFcfeoFWiCp9OJ2FF74mnalr78lGf0aHOAVJaFJYAAMnAyNhb+uqyzPKOYTgdj8zX6C9TLfA6IGE0U3jYKcksQHhuvUu9hHEecJbd8IphPjBDv/lX/K9l9Py7bcf5hEf+bYumvB1YbqN1iB0Wb2b15N3mGA4a1Vu+d5W29VyNGZaoTcY5TvRmXNaZGlJKVYjHh1Mj9jsNyOdjlfHPywonHzEkCeyIFq6/Uw36857D6Blf2uFNmTXX/cSFXEfK8K5FxS+yMxDQajMOzX8QKrYHRD4omM/1c+slwVpS+9+N/XaNGlJBEWR+0ztt/yz96fhopH7nVDS+Sg== 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:24 +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:24 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.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 15/61] mmc: sdhci-pxav3: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:55 +0800 Message-Id: <20230726040041.26267-15-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: a52f104f-1c10-4f4b-39b2-08db8d8cfa7e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UgOTw8bJHF5jZL+K+DfohbK2LsDR2ptEun/lt4i+QOm2aEJJz5qkAhiCp/mEkkI/apQ6lnk805+3B9C9BzyIFlWJpf108c6flSmhhUriMUSq2Oiw1vO5DCMELEcGpSNVPbt3dOno6SWGzo+CSbrwsyKKNZtwP2Rhr8Pa7+H2PrWTICDkCC58LpFSfbM2c9suXrLk62sJiW0IxoAgRx4x0zWQxvjJs8gKuz41/lZJzxpSa/PQfDwg+ORTWT1hm/VcNjzuZDZwrUzvzxdKOu7785wA7H04EPCSo7h5pl2F0zeKLhw4FEnu5BR8TRTvN7h4VppesIftYzqWynDga5hlm/PF3b4IBzzn8dVs5HaH7uRHbtbAR8pei3z3L/21L/U4Tlw0clKh/nBkTW8b/xewF8q2tPRR/2D3OKMmqMZ6sKBktdzwA4d4eSueyr2XLIXEf7hvjQoLFMuyumL6Dp/fT5tu1CGkQilUCkI+VhwqH/qjSQCgDET4y+/M7jXV8xm1MdE2+WEX0vE1EiITmnJCiCU8OHEcUUiVu/evlJZbaP2mIteW7XJAahpAAO0K6agLtU3c+UwXMvMqPsK38tTU7nvwoKVdd2blXxqbqR1O4kRVAdNJIaxoosX/mjOUarqq 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?VUJTyKKHOWz9jlkbOgbV6Q0hDbvZ?= =?utf-8?q?z8SQDXUEqcqq6vpJOmdsxqTx/7YgDMQg5U+Q2mcglcTsRRaxleDymqLCM67Vpmno8?= =?utf-8?q?L8F3coSDSAymkTFr0WW3JUM/uopsTT+uTSpO/4GVZuh4iVp1exvchq9+ctYhWaLYY?= =?utf-8?q?1s81YZYO8MHD6U+qkaOq84hEwdbCkMruxop5W35vBv8zWfDGaWHRtv9ltAnpXjWf8?= =?utf-8?q?gbruKhVSafGGC0QyOJMe1ingtk752xEdmRFTbwhFpewg/fH5ZwmVVKJzZOpcNMHxv?= =?utf-8?q?N1fMC/vKY/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IfsGjzMz7hHLVY9EoZSTokx/YD4O6kQ9yjuH/rbPepVNb1d?= =?utf-8?q?0PRQwnfJctEzuSe9Wy9wuvPdEKTjteO1OHXyWkApOr5tu1wZJR2laibcT5jwhagqB?= =?utf-8?q?J1sFqEEkNGg8S4WCguOg3n2Mou7EpAIOjDvbqzSikxg6A9DNByzt5mwggvSJAh+sy?= =?utf-8?q?ajIez0Trj+boOKvC8UZmV+bjJYDtB2Mm0uT4DV7/Xzzb0ODO2nHycioc8zlAlydhm?= =?utf-8?q?fkOZkH3skrauqbecfQphipDPVG0K9LGnCCNm8Kj5oJKorLkAxpM9iNAUN7+lqhzE3?= =?utf-8?q?xU604d9jCpVI7Y7K2tb2zTvsDAER8qj6SrLf9eRUsZMUHI8cttwgacJEH3vtPFPvO?= =?utf-8?q?DJxH9wVT0fIn?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a52f104f-1c10-4f4b-39b2-08db8d8cfa7e 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:24.1947 (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: a1rG/6MweAQylJnsvFvM4cES7Z7UgqpYRe232Z+5q6vYlvvRQ1/dc1fWUAWZ6jpMXWSYFbFsKG6LEoifhd7jDw== 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: 1772456887423145501 X-GMAIL-MSGID: 1772456887423145501 |
Series |
[v2,01/61] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 26, 2023, 3:59 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-pxav3.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index e39dcc998772..3af43ac05825 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -470,7 +470,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) return ret; } -static int sdhci_pxav3_remove(struct platform_device *pdev) +static void sdhci_pxav3_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -486,8 +486,6 @@ static int sdhci_pxav3_remove(struct platform_device *pdev) clk_disable_unprepare(pxa->clk_core); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -570,7 +568,7 @@ static struct platform_driver sdhci_pxav3_driver = { .pm = &sdhci_pxav3_pmops, }, .probe = sdhci_pxav3_probe, - .remove = sdhci_pxav3_remove, + .remove_new = sdhci_pxav3_remove, }; module_platform_driver(sdhci_pxav3_driver);