Message ID | 20230713080807.69999-50-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 c18csp1690937vqm; Thu, 13 Jul 2023 02:08:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlEwFibbheqX1ipynTHrRPK259oe1reBRG1iZBo40Ys6ujd+k1GAEtGO6HbUJwfHix8UeSsk X-Received: by 2002:a05:651c:d1:b0:2b6:fe75:b8f3 with SMTP id 17-20020a05651c00d100b002b6fe75b8f3mr861306ljr.29.1689239335390; Thu, 13 Jul 2023 02:08:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689239335; cv=pass; d=google.com; s=arc-20160816; b=kDJErd/hmL1Mp/T23rj5X0fLnTns5/1DlfysQB5IITuDURIty14zRXShyv+CUSLorq E3hJ2A9ZR9x22bfj0+rpvx/B2zaNgNPk7nsoFRdAmOpf6fg9VYtv3U0nmt0eV63SBMxQ p7VNPKHzqAWcbi7DLgbLX4uGaCcFmyUnxW3xPUhSGxNA42FR8KkjkOI9UKOBf3N9UP/y +FYNrpwTAVX5Vyf++ZHrU8nnlzisD0CU2lY6Hb/rHqCh2iR/IbXoTK5NyLJnoOs4fFgv NtPiY4W8zwtnWh65TzJTRkT9D7BQ0fFa0JHDuJrRTZyNpoSqg0xHqJ8Qxv6qb9eo7lb4 fDVQ== 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=NkSQcIRpO9SN+/pqpfb45OlxvpHWWTo36AUup9m79dw=; fh=DltQIqE9+pGXrPR5WLFAdWiPosppoWjSKQ/zZl2z5K8=; b=RufBKgn2XjxbGCzULJLylBCvyBExPuyELuXp1szED3R4vmUry3/YwTOuu/gPhEivdk LD69ol6fzFSrfcyOLYI49vd/ubOTuC2JNWncJkU/1Q8kJoH6U2Gah6o6BZPO/7K7YOVV x+EP2aiXISS67eiiWfPHGE/EPT/Go5g+tvfQ1Z9YK95NCnbq28ktw/p8qnJByZ00SXgu dRB73MjClPRWleL0EYDefPDrk7rXjl8UYvuHgH1o40GnrSE+wlrfEf5y0W2o6TnQ7vI1 SxRO2PIRREJEWtZ0sU2afRM9xBGy7stNR41zEFUkRBU+xlaBXi9yl2a631WIve0gWiim BTMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=JByY01VZ; 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 gw23-20020a170906f15700b00988699d64cdsi7372856ejb.959.2023.07.13.02.08.31; Thu, 13 Jul 2023 02:08:55 -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=JByY01VZ; 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 S234172AbjGMIPH (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 13 Jul 2023 04:15:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234225AbjGMINe (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-psaapc01on2120.outbound.protection.outlook.com [40.107.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D33F62724; Thu, 13 Jul 2023 01:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D6p4PAqt0K4KnEtXbavfQPtiiHb9AqaD/8zFt3Zo3aaOoz1eOudqma9Wjd5M1VI6IuoiOzCoAqXu5MrYDBZeVTkappP7ds71bvbxDqLwMhyGCRfy9TErVV55t1boLsEYIW0QBmkFfMHCUvM5vi6ig7ZK3YNwYoJEZPfLUiN5fMFgvuGFuyMG68vqi7JZcjHI/8iQD+ohBH7Rfxj7/wEJIFtWgBk0NNQm5hCqQsp3JdQEzzC3ixh4+/BMS6j1kl/JlGOPLqYhiCtlR3xpVyqGbAP3KZ8vSBUPatEpiKEWmo0CTlOmghEN7g1uQQ39yZUQ6YPwE12fNpBR1YYP7IWN4g== 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=NkSQcIRpO9SN+/pqpfb45OlxvpHWWTo36AUup9m79dw=; b=LhZC8qe6r8bpEUU/4pPeN5nt6NIwtskip+oGrfrU24CL6eCaHqPfjeYnHES9tDZxKirxgr3b0elhlJv23h29XVMiIKz3GCxdETTtLY0U40N1ZxYLgVUFimNiYXzydA6EewJnGuVFnOsUM5D+GkEhIJ0PMe3GWiK4A+G4J9a78IOKexf85djUjc2N1W4YP4VnqzSazR2LQaMO5p4Qh7lwQBymZweA2+JXHmNJD3FKQBNHCefcWzW3IiqLWFXr5B4cplZ6adY5ocWY88o6ZQTJJ42ZWvCVVFWj3soREXJQviw3LaTsoHh5Lq/Klv85+5rqBCYOB34LtvQj7OKz2Yx7eA== 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=NkSQcIRpO9SN+/pqpfb45OlxvpHWWTo36AUup9m79dw=; b=JByY01VZDKyYHT8U1apfQXT7ZVWAxmeurB402TUVYy8vhoCaR+ZzmQHykOMlqiyWc58bO11Dh51RXiiYRYumE/nZAg0Vobd7UivHKWKVFA+1HB4TNyvLj5FxtjJ2HNYZHl4LxqQ+URFEjY+VfTEkE+DiSX3o95qG9tx8qMDQnMYprjKoRtAJUu/jF27QafTwDpARcP2NNWS+SxoPVXlbeZdsVuZT/S4s5u8qiC+rk01xut3bolRBGszOX0MIxq5vFoHVuoQQiNKMcUpN5ec/g9gKfNveuwJn+lU6V/W0cOSokB8jzhAoGFfw4YqEalvhaF0Wm4O4Dov4CTrrUNVpCQ== 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: Tony Huang <tonyhuang.sunplus@gmail.com>, Li-hao Kuo <lhjeff911@gmail.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 50/58] mmc: sunplus-mmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:59 +0800 Message-Id: <20230713080807.69999-50-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: fbfe7e13-0bea-4aff-6b38-08db83788749 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8qYXY39w9weRl1RvJOYKrRxKg+xwRctkUQDYejvi6jXPJlQWwf9MT4xIZR/gl4WEoXiaPFN23jHP6cFGhZipYHcVbIk+LueoXwG+go+lTxkqguQa30fn/3lOzTFbNvTp6lq+quLONEmIaRVbpevGJlWbx24LBpEk+T1Lj4AlM/7gO/OHMJOTPM2mkYMo4vLoB2Y+WJGvXQr4ouYas9ddDa/9ctO30+u5pSoJ7yHerFKXAVT4d9VH2//TVsKFbW/vvmtMkco+nbPXS4jyinAv3USe3KYM6extL22Xcq4A93bCa6m9SgK99/tgRwTv9JqYGBZeeGmEyfUZo9fyZgX5How8pLpOvuAqt/QwpLA/Mv+0/0FVqv/He0mxmq1iOHwU2i73btyxn1GWfB7Y5A7EnRcWUA0LOWRVo20q0cO7aAca2BpnpigXeRHFOuedQd3Ufj4MZ9nnwVMMdkG8RUXCN6AvurGK6izmjTXd14mOLnyHi2ODK9GNDc8G4cW2pZpIqVzZSCZWLt/6lOKPEJY2wO+4ZvUkNfal7sy/vqI8WYIoBpCHaQgmHHTEv1rNg0CWE9aLFVJod5emSnAkZYRV9e6KKGUyhTscBHGe9IwYcf4mLn6GBebQ+r0d2hAaCfXw 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)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(66574015)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?IeFUertbdU4zOsbkDQgbl6lPZR1n?= =?utf-8?q?uVwXTYCQ+nEuWD6W8BTAUyzLOZS4W2pHVwy/IS1NkHNT0pDJJ/usWjsX6n+RLotnX?= =?utf-8?q?CK2NEg52ULNftG7+iv/3m5qNHm0MR8vIr1VxvqCCDDTCj/QZGJPyzYv6/RC+2DXuy?= =?utf-8?q?bvKQu1i7riSSV2GILmUClfbESlPZlY+K03Kb+RljJEIJNoLWEf4R55Qir11dnxug3?= =?utf-8?q?bRsuPdp03ahjUE/xsRLRTmk/mbvm/hSOiMWaezZD8pWRQG9g59En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Rr3DvYM7P+iHYPpweWi?= =?utf-8?q?8LtB5lwo5bvg7CnfiRJTjSYL8Z8GQWSpNbzU0Jhjt5vLpBqLGHloZWxS+e0YByF5z?= =?utf-8?q?MVLAtbKW10mELescvtA/lBnzTV8KFkylVInN8I5M7bTscYd2qfHHu/j3f1wRIeyZ/?= =?utf-8?q?uHRxD0QElp8V4lcMeamm9T5RExyPHBybHeqLCeq+ipBi1GudV5njzP25Nqs8HEkCM?= =?utf-8?q?jxtD9TyjOsThl1RbtyM8anNjMg8YTpMkKggdxvvVI4LHnlGqiJOKUZijWNQpq88pw?= =?utf-8?q?tOd/bri20hc2rolxsnPN3Y3RXl8YKRXwMu1LiW4/vuQIElKbCnsaEAZPD9QX7BN4r?= =?utf-8?q?dKTzPSPLfasCzEmlrNlgsx2pgZe1CF1tttWSHhy7bOAun0svjq5PnTaws7zsqup09?= =?utf-8?q?2DkmJNAhxKQU?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fbfe7e13-0bea-4aff-6b38-08db83788749 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:49.3469 (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: KTb/VrSVdNgVNnccGu6pmVW1i4W/gEhihU2OmYE7yN8F+HYQAgjMlKNzKTvWaLy1j0Xej3ZQJ3uvuAdyYhiSzA== 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: 1771295825126506610 X-GMAIL-MSGID: 1771295825126506610 |
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/sunplus-mmc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sunplus-mmc.c b/drivers/mmc/host/sunplus-mmc.c index db5e0dcdfa7f..a15371e98fd9 100644 --- a/drivers/mmc/host/sunplus-mmc.c +++ b/drivers/mmc/host/sunplus-mmc.c @@ -938,7 +938,7 @@ static int spmmc_drv_probe(struct platform_device *pdev) return ret; } -static int spmmc_drv_remove(struct platform_device *dev) +static void spmmc_drv_remove(struct platform_device *dev) { struct spmmc_host *host = platform_get_drvdata(dev); @@ -949,8 +949,6 @@ static int spmmc_drv_remove(struct platform_device *dev) pm_runtime_disable(&dev->dev); platform_set_drvdata(dev, NULL); mmc_free_host(host->mmc); - - return 0; } static int spmmc_pm_runtime_suspend(struct device *dev) @@ -985,7 +983,7 @@ MODULE_DEVICE_TABLE(of, spmmc_of_table); static struct platform_driver spmmc_driver = { .probe = spmmc_drv_probe, - .remove = spmmc_drv_remove, + .remove_new = spmmc_drv_remove, .driver = { .name = "spmmc", .pm = pm_ptr(&spmmc_pm_ops),