Message ID | 20230713080807.69999-51-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 c18csp1700644vqm; Thu, 13 Jul 2023 02:32:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlE77nof9YIOBZldJzKuloUWhSA6ASWxR2+sn81mmNxXYAioL2SyAJukHqjrzOh5hK/hFwRf X-Received: by 2002:a05:6102:4af:b0:444:c2cb:d525 with SMTP id r15-20020a05610204af00b00444c2cbd525mr535867vsa.31.1689240756493; Thu, 13 Jul 2023 02:32:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689240756; cv=pass; d=google.com; s=arc-20160816; b=BfkfDLqUXg/xncs99XfpPS4khYXTW8+PAGHhiqz2RzU1mZGCX+fojrgpZbbIlF/D7y A1SbyTedS6phIXJylW4QTx9iNmLc702M8CI8QCXkNS2/TWdM53RPma2p2WS+PxPjRYx/ HZTf+HBf46oc5gFupN4frO2alowbR+R7ija9HfHwwOvNpiu4zxNry2D84f/+jlkZcVI9 jaRngKVdovcLMUk6gJYPyp14uNTHOQ9FemVrXkU+Vjs5uEhRbu1eGmj6zxo33svPtFS6 dzoZnCZilj2/NFJkpI2KIbYm3SbbJF/ST58J3pw4ODZrfpWFH2zoes/dOhr0/rmPe746 8xkA== 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=Lzc76DvqbeLdANjdlgr7IRp51JS5qEoM+mpDP8TQFvI=; fh=tTSVtf6q8OfbM0hXkAxHjhSfLD/31yPe1j3YBl4aaF8=; b=uRM+a7bX5uhmRT1ZuJQ+foF9QQCvpLYwYgyNJDGMR5guAKG4+FOvdh/sLeYTD+rN3E jTGpGLxHxQmgM7gmukbeiBZYKygfOsgbgTYt7B9pcFPP5CC56eO3F/d5sWxjtRa0VsaS 0X8FAiKrIfW8QAqKKJmnUTiW/UvmdqzUMajxJ2tBsTty30pi5n7D73ICscl7TRuo0x1o HwbzV8FX4mD27f8rf8Sk/MIlQCvduutJmPpOaB3GRkp6iRUjUDKRmv8sfURaomK7TOqj ecqdlg16idz/5oW/6/fF+tUd3mZ51EG//fJsHqDuQD02GnQe87840+uRR51heUXwnlcF KDjA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=lv7EkZQj; 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 h6-20020a631206000000b0054392750edfsi4604639pgl.744.2023.07.13.02.32.23; Thu, 13 Jul 2023 02:32:36 -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=lv7EkZQj; 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 S232627AbjGMIPM (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 13 Jul 2023 04:15:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234231AbjGMINe (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:13:34 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2107.outbound.protection.outlook.com [40.107.255.107]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E63AE30F8; Thu, 13 Jul 2023 01:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RncbgkD3jLy8Z5mDADFUDPT66yOMLh/ObfKVgfWCXhfSFdDhyr+v7csM3n2/I1IeH150MR2JTyske38oQUweEB5l4UwTCayYnVxV2ZLbrb2EeMx+YkBuD5DMUnX48KistLe+xC+9Oi0oUtsh5+ZD7gxZRi8zeNI4Isffxn8o5V7HWsJebEjLPMIh7J9Y0ZWiUqO5On5xwRaR5LYctgkiOU/3PDX4QeytMd4YqwAM90XhRAzwPqSkITmjOs0f+l80dNqID3Ma0kSn0Yevpu+GhI7hmlwR0LqUJVv7/pS0KuyIbLqQt2fYGx9LsQK38rKLDdmzDB70S/UO4/AR2i0qFg== 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=Lzc76DvqbeLdANjdlgr7IRp51JS5qEoM+mpDP8TQFvI=; b=bfb6ai7jvmUYgiXL5LrtGdYWriTEEBHYXycqQlQYml6TSpESV9iIYANzdfChhHbrD3jDtUr6vCXw50ei8pIOj9b5ORZ0xRLRPs8tw9MWbwwQoPxecsa4eLPYyin9LSPJSZuT9hBoJcsN7A1/3wuODuRCsgQlnknlML/1BEUA9CBv43mmTZJQkFEcFzmFWgFCtG25bNh8N+QmTRt3E6fLUDenOqi76pf85mTJRJebruEjh9Held39k+NmXdLYetD97IhunuVmSfX84PdofSSYbQuwphp27PgeNJ8J/05Y7IjV0pEYUPyvHH3aevNJhHGEk3XZQQ3778eI+97WHRNV2A== 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=Lzc76DvqbeLdANjdlgr7IRp51JS5qEoM+mpDP8TQFvI=; b=lv7EkZQjFkhmeR0kOrUTpTz3E0U+EO90ZpKoSP4wOfhfbjKYSJj9scDlIizLKb7EFDlz3W7AH4al3/8JytbBtYLlyx56yyXC8fO466nr86SY7erJ6fuEeycSo0mWFoR8THtJsQkT5oPeu52znljShnd2hZLL7p4EKehP8wK2FTH53QWmVlgQWDttkHjlGdcXG4yLQey/AVmgZ+izVDmYA08gLf0YKVzk6obprrpDV9H60TqczBuQXwRKqXzUETTlC8Ln2jehAd3lwQV68KZPPG/5K90IdwqiNCZFEikTsSRw0Iet1Hgxhv/WRWhMLRuQ+P4u/qld2UBSPf14DRbO3A== 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 PUZPR06MB5984.apcprd06.prod.outlook.com (2603:1096:301:118::6) 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:10:02 +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:10:02 +0000 From: Yangtao Li <frank.li@vivo.com> To: Viresh Kumar <vireshk@kernel.org>, 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 51/58] mmc: sdhci-spear: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:08:00 +0800 Message-Id: <20230713080807.69999-51-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_|PUZPR06MB5984:EE_ X-MS-Office365-Filtering-Correlation-Id: dbe3bf47-bed3-4793-50fa-08db83788860 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Rdlw5NozevH2kuUcFqSbfdDzQfcgYAmJcuY2fo3C38dt3tXIYEFpS7G4Bi8KEXpNWUkePO+QHbEbk4AOODKTaJ8/5PfWPmIBoS43Pz9PZ/bx0E2LgTIEymOqIEku5O5OuVrmGt7GePQA7DweLcDFNYPoXACbxLTUBoCavg6uo79CeHV/dX93+MBWYBbiNfHkGnnfg97GncNObXMciJ5/6Cq2pBN9Q+EAFnS5HsVDVR/LCfYqltnel9oPeaanz3iCsCQi1nxr4YbmPMWkb93jfWJN8c5bM3ThegotTQlvpH5tQwdspr7mKGpPuQFp05F+ebRhN4GmTVtyPHptqr/oUIV165NHlDcjjeG4ittalYYbBFvOJ5RH0Zb6c431/NC9aUMdqaQUYpkgGSxMQxAGcFmGZsItsNSmIpst7+BicNyx9wYVJth3XqsHy5DORAxN447d1BlwnGqFzUY/zpG50KYXZ7NVe3Yq0SGzOdpGWT1Gst7akf62jCa7gxn+xnH9xc4XTLh66THi6tIxJ4fq1wwnYTbm3ysuN6Xx6ngEAeZozeTv/p3TYZx9pG1UzCw+YXnwJ9NahCtvgbuXsHn1BycIoobnfEJ4ffovLkTZBnWqCMJ8YBapHKcDSCOb266Z 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)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(478600001)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?P7OMAcEXEypcKVb3DzoKMmIVkaPU?= =?utf-8?q?jdN/ySF6Pen7yVpKGAhhfjEf+MECnBgRFR9i4m6VR0m7qSDltPX+xUOwXY1LJowND?= =?utf-8?q?rkkWIEBuUzRDxDS24UMs5ZVHdOQer6+kEhui+tTvx46jqBYAIho12uze/vK5+sOij?= =?utf-8?q?FD+csD4vFiZL26kfXpJGbz+DQgylyi7KbV+nUhAwlgAA6x8ZNLnjK9BXVSQVh032N?= =?utf-8?q?vALO638SKl7+Y7nxgsybzq2bhrF9K/u5GIZTq4xKDVVJYJSht2UMZVe2e8Aa1WyFa?= =?utf-8?q?vriwx0Mcz53S+4mqxN529UeG+7g0Pdz+ZhgypqVO2mufu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YKKj3nN7NZ1KpRO8wwVgkzXo8YxShJ7H?= =?utf-8?q?Cl6vO+HDA1GcbPkiTBgwIQiQnCQcVBJqNrJpJjln/dnCIkELtDUlSEaxTGeNXpS1X?= =?utf-8?q?VeZLQQFOxCgttI8e/38DI6X4mYaoNH6HGtuPDbfookKANhe9oEdbH1SLORMuLeylL?= =?utf-8?q?rwbuNpxXFPjEHFnPDbH7OL/qmgncSC7/rrwQSWfUmCWTeumwtUaIBtVCUQDSB/Rrq?= =?utf-8?q?4WTrze82Ks9DKyh0SN6QuWR9FJNQ8OQ7lErpE2S/C37SnK2N+xMpPVnJpiJ4fjfyt?= =?utf-8?q?a8qCxuJqVJ9kT4GGWm6JNO4ZWNeIFx+cIBUtJwXlqQAJV6/KDbp0nszIpay4dVvel?= =?utf-8?q?tDC02OWlDyFL?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbe3bf47-bed3-4793-50fa-08db83788860 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:09:51.1673 (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: 4ogRaHnDfHoIW1pUY7RoplPDUS14SuzOQdwPiQEbyYzg62tL25xFR4DfGk2n/Es+inmxts8ll9jb8Bmo0nA5vQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB5984 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: 1771295481270908148 X-GMAIL-MSGID: 1771297315284057518 |
Series |
[01/58] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 13, 2023, 8:08 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-spear.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index c79035727b20..ec6c7d8e3736 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c @@ -117,7 +117,7 @@ static int sdhci_probe(struct platform_device *pdev) return ret; } -static int sdhci_remove(struct platform_device *pdev) +static void sdhci_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct spear_sdhci *sdhci = sdhci_priv(host); @@ -131,8 +131,6 @@ static int sdhci_remove(struct platform_device *pdev) sdhci_remove_host(host, dead); clk_disable_unprepare(sdhci->clk); sdhci_free_host(host); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -186,7 +184,7 @@ static struct platform_driver sdhci_driver = { .of_match_table = of_match_ptr(sdhci_spear_id_table), }, .probe = sdhci_probe, - .remove = sdhci_remove, + .remove_new = sdhci_remove, }; module_platform_driver(sdhci_driver);