From patchwork Thu Jul 13 08:07:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 119618 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668765vqm; Thu, 13 Jul 2023 01:15:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEtkmLON5QfVNktE9parzSJQ4U5LT0Ndq7yel1uTbq10BLVMygzmZ48XdpbADAybCreqHoL X-Received: by 2002:a17:907:98d8:b0:993:d6e8:2386 with SMTP id kd24-20020a17090798d800b00993d6e82386mr679741ejc.16.1689236148236; Thu, 13 Jul 2023 01:15:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236148; cv=pass; d=google.com; s=arc-20160816; b=C2a3QCPqECkl8YQBr9nr/Uy1yYLVU5oErC6tUlqedv7yO+flPiXGE7DndoOQa9XuHU DPpmOQMHeA9looHfFipL0+I/o+bV9ylUZMnyV2a6WA4Zhh9JYnrVOc+g0Vho4ZKXc1BT 1/evNuB8dijGSFeBHGktv6Jwt/tev5Wea7hVipZilEAeDn+OSaM4s0WuFLTeBvFYxPku YM9mvyii8menMPTGxDmC/8MhFLw1OdEyLU2Dg05gOIw57G3/Po+YHB422Eb8korSnvSQ ++8xuF/t5LD9iRvwLLCIT1k8Q1Wq+ZxrurW6BqM/xrYgpHN0gLjL/KjuKQDaIwQXOJuf pp6Q== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; fh=wkz2ovt44M2hf1vcx/1C2T6B0OZQr2IK+YjLz7QXoPI=; b=IALS+pHHFo3KggKBiAb7eDifUKXGwpuL9Wv2FIZ/pGSf22McHu2W89FNitp6H1j0eZ hhlcjm2KfxnANsdvnNMvPNvADkttEuDzCqw0YngCdxcPv4u2pTwRZxh8O7eEGknNg9+U URbp+nTbvLySTWELeBmMnWPaYGxZrZazM46o0kfQLuLHLHofP9uKyEi4Xs1jPtr3yoUI pEClaDepqBDVXNAfxc/tfs/PlJv5zOg9JQ3wQ63yVQYf/D/5pog1sA2n6PbzRUiT+oGI ieSzxAcM1XiQnRiGII1zm0DcaXbkJC/gwHW8NDpxty5XjaKw0JtC2OjX8KBNa90EfLNY mmgA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ef9NQ+oP; 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 g24-20020a1709064e5800b009827e07cca6si6729880ejw.17.2023.07.13.01.15.23; Thu, 13 Jul 2023 01:15:48 -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=ef9NQ+oP; 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 S234290AbjGMIMU (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233493AbjGMILR (ORCPT ); Thu, 13 Jul 2023 04:11:17 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 983A52D54; Thu, 13 Jul 2023 01:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HRxSQ2sXQJrNMTmDOK1cM0lEqR18W1eEwqc51AsJdvjo1puZfUhb+3c+ExFx6X1L9KTLrr0TRin4WYKxACl0V84wBdIpB0a+d0kbfyNjmrC3klpcQfi1OyTm/M/yCtLD0Nkl9Pg9wsC0VflKMkJh4ETrW/E83zk+/Dq0zO4104pxLMAx4bNspJ+rp/5++V44GBKLh8VnvpIGxKn9JQMPE5XjF8IuqaXtmVjetoJ+bvjmFjX5fxVuqjCy685b1Rjh6kUhcEHTPh35cYsMmALV/+LjW8bAVI20vXyzTMb2MOHAfVE7GmfLg6eZ0Xqm+R6hPvRyQyWOQsYT2ejpZFJemA== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=VaR9BbJsQpXKf/dE33l8INQ8gH7TtHVPdxMx0jhc/SzSLH90yRQJ0zDA71lNddCbJMVr9iNMUTtqMQX0dQBwcy/qOoPzDIeh4Fm8ysvWKU63U8WGYDH1DklCo2oQwPz/fKlknm/lc/zt3Sk8IP6vQdX/IlBUdLu8MU3HZu7BJIR2tBWli/g7/qjGJAMQYAoytDDrwOEscx4zj4rsPQywzljmw84Ps+X125sn0mM5gwXNxdN7HmH9N5n8fFXjjxmh7JdsMe4X5HyZb7WmqWb4QJ2em+UzP7VA+xIXhwf1Qs/oSXRpqpfRBRrTnY2gyjW4YEdHi7dDjq1ouoQA6KwJ+Q== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=ef9NQ+oPfGfp88rK7ahUTpN7b4QYPP+GS9CWCj4D3CJ5d920WD80cXbluhuZMBhSeAZARf/TyqOHCBWbvkNayOMolfnFD/2HCKw+RTGaTyLQv1vkYIER2aVm83PNdgYuiCDvyULAUzPCLPssik75mbB42oaX9+6ybcySG1n/ilYIDP3eYMidF6z4vB+LcyYwokM6xqMX9HLaeLhIxrmLPBXBYyiwqbwx68CHN1NglkXE7ceE+OUP3/ql9LdwfqE06LdkHGLBQZ0fPF7GsLiEyDJkbQ3E4vTTOTuKjQv52LNV5Ro8CWgS7mtP07gIoGQYERVkg+EYNBagJm3ZJzRWCA== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:01 +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:09:01 +0000 From: Yangtao Li To: Ulf Hansson , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 23/58] mmc: mxs-mmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:32 +0800 Message-Id: <20230713080807.69999-23-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> 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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: c1215bbb-89da-4384-59a8-08db83786a94 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rQ58BziEzNZDDq4Y18OgrvqOB+yvci2h91au2gufegL20AnCAKcNodvHex8HhN75hiOr8URgT7fNI9F8dtFpBYpTLcf7fIbNuPfie+80qxeg2F2RJGs2P4aCimWtoM2mvqLZ5SX+xK1eFNVIxl4xjUsU8xGKdyRm+gOKfaIqfmH1JPjzsOA46LDdsNs3aWlyCz3BSJi5kTsPjnAvCV0/y/U+FADMOnmN+fvbltzb97avULtk7v2GwXDwmIDwRISa48cTKvfmVYe8tRT8k3mw2ovWfObcA8xKVPprCi6novO7HDzqDqZab2ecmjbA6jVzHdm8BAb1YVXs0HWFyREsMa6JVMEO8+NVdpU916Jw9he/lHVvh67O1/JWvzTeAy3G3nwmr67Px2Q9BiQTbYT+YsGdvW7emTin0ndK8glo5BcMGYPn0XU3+BWnZzra+Yr73eq51h2nHvcq51XXMiu9l+gPSsiOX9l3r/Y+BRlLJA+qidH258zmom7m0/RN8htL2SyM1dNaYocECTOEESi3ygA6HmwvdQ5r1ibkRZ9jhYC/5ul2+K2kVglG7GKvrzrktoYFtpE55nggabeikvKWvNAXD62yGigGlaH7/nEDIr11fHdsHh1LBVgRK2AUsU6G 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(66574015)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(7416002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?k5xBRPtCsGXaneOvNu5zmu8pHqGk?= =?utf-8?q?b+A/NM8uYE5g6aXjCCitIVmRtAEVa808C/ZrYuNiaHLNZrYW18PmhKj93Ul2GzTjR?= =?utf-8?q?LdUjrZkr+zoV+Mth+oqBJaAYMHNCo0aC1TS3Pd+jzQAPojt2pdM0QFLi8Px36lzG0?= =?utf-8?q?fFnridC3Pt1OHNngAZtM3zc2Uw/SHxGLwFXSc7SLMccQv98lQMpDaeSAvx9/MvFuJ?= =?utf-8?q?mMXUWzMPu/qm6CehvBIm95F9QaCtsUM+/tCN0fTd69Fq0JDmFaq990NkVAO5KY62P?= =?utf-8?q?aPy3t3AZ/AVvo1wN66hlhG0SbLSXafmFBVvqRKnlSNYadx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AyDsHdJOwuBSuOpuQk?= =?utf-8?q?SCX9Dt/ZEuH1sqoBv/Rk2zFVGQFpu9C7zZ9lYR8ftFfZ0XUQLbIEuF7RnGsc/SwL6?= =?utf-8?q?2oJOR4pdtL5gTZpBTnCmmy6//OQtbpmNo3gUWvVxtF/jxgelDhYWYz6NZrpGNMjwK?= =?utf-8?q?p+FtJrcXIpi+r8Ch5s54855gnTTRWWZPzjooGZPKT6iGDBQbEqKYCKy9o+6h1i5k7?= =?utf-8?q?I5b+owvpvSBzskDbf4IFJgqzD9Xfy1kdCVkhL/s8UXVZ+QS3TeyQ1UUAk2/G3cxcL?= =?utf-8?q?WK0KNlHnu9qUhpeNfC5f9b5nq4WPs0+amAqZi4ZCkSrfZNC1gbi4gw1+kqTzlsiAo?= =?utf-8?q?fC/ynz8fu6Hz?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1215bbb-89da-4384-59a8-08db83786a94 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:01.1802 (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: j3NzEQxLTLgWWDGGFegUpNfMXGa2qGnPAC6qjy50q2B/Z1lPKpT1/jCzbSLIFzlWBvDf0nXvf2nujgIeSHkClA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771292483196039385 X-GMAIL-MSGID: 1771292483196039385 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 Signed-off-by: Yangtao Li --- drivers/mmc/host/mxs-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 8c3655d3be96..9abfb169464b 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -674,7 +674,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) return ret; } -static int mxs_mmc_remove(struct platform_device *pdev) +static void mxs_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct mxs_mmc_host *host = mmc_priv(mmc); @@ -688,8 +688,6 @@ static int mxs_mmc_remove(struct platform_device *pdev) clk_disable_unprepare(ssp->clk); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -717,7 +715,7 @@ static SIMPLE_DEV_PM_OPS(mxs_mmc_pm_ops, mxs_mmc_suspend, mxs_mmc_resume); static struct platform_driver mxs_mmc_driver = { .probe = mxs_mmc_probe, - .remove = mxs_mmc_remove, + .remove_new = mxs_mmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,