Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp837195rwp; Thu, 13 Jul 2023 01:39:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlHvFHbF2mdmcGeIH7EcJkIXsJaun1b0wdTGqzbIeeFbPZdmiFsMOFcgkmc+qdmg/r9w58uG X-Received: by 2002:aa7:c696:0:b0:51e:587c:9a2b with SMTP id n22-20020aa7c696000000b0051e587c9a2bmr1094062edq.25.1689237575321; Thu, 13 Jul 2023 01:39:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237575; cv=pass; d=google.com; s=arc-20160816; b=jzveJwBa47vDf4u5DmZrWuwgJrg+yk6ETh/xGwoxRn+Nqu2nPZvZCeb/BY4lBlJa9+ zxJixJQZFkXJ1y6BzNa2xBJlftEq8wm2r2gVcQppfXZCozQOmAQy9YdBFx12uFwuefPw sA/H7cJaZdSvOliTCMwbzrjAI/uSGIBjjqgchAlVZeXl67KvEaTWlZZz4omBYd/NzodP LkADb8JVuyMtX/5JLrwRJUc1WwDYo0JLD3U02Fmo3CfHc8uFPbZPrMAhE9mFgD8oBmp9 QLqbVrjAuszY3mklDgA1LhrrQ69bou3azAcZ3IifutaYFpq3XRJimN838Pdiijlojqnh bOpA== 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=+nPOwPKYNeq/2Tv4iqOeh7ZkKMvKEp8wvhNPamOgGPQ=; fh=wNELzKjtDW/UkCeI0vRNNM7WIjF/XKmykMZmmqUnxC4=; b=pOQGR6oUy5uwcZGKlerthvTLH0T8jgCPe3HGM7hv/64rEldzrlHUB6bxqoUlPPXqOZ MXGvYfH793JIxJfOGOcn3xC/2y5AGZ13cg1RoDlWerd4TdHar7/NrFDNzv0tdQOiwp49 A6WNNyxxhaejZvBQiVUXQf6z0nHKLGCy/QOvZnBm2YeO2ljd4Kr+4O75qIQUxXUzsWIf 81hjg3l968NdtKIoG0/4tmpLWEcT1Px9YkYVI0pu5jq/RhMQEtV9fwNSOnJOnbT8tgOU SJFdjLYP7NATIPG3r9msFZ8mZp5ijAyeOpafhCKDrDsB1QNeUwcoNtgdu4efgPUlMhkN GbrA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=JPI+7T8r; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q3-20020aa7d443000000b0051df1fef473si6816498edr.549.2023.07.13.01.39.11; Thu, 13 Jul 2023 01:39:35 -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=JPI+7T8r; 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 S234277AbjGMIML (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234158AbjGMILG (ORCPT ); Thu, 13 Jul 2023 04:11:06 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9447E3AA4; Thu, 13 Jul 2023 01:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EywDNqgdnw2nrkH9QAjMOwx0bGAVohk1QRDAEEGpvWoID6vrYr0uGaAMayCKRC7jnUQNLnBd9Bv//wc259BjtjRNGdx1A2lSu95Nt6ydFMpQhoULANi4VuhHIE/Zbg7wxIrx0D/6vmSxiAWKjESo0HKlHtQ5zT1DEH43Z1LAu+ie9oHJocrAYIG1vMgEm68/Y+3ReUGDiqnybTeXr9oQB9g2o05OeVcVKFsGau6xBdopMVcQ/ZKBO85S+FiwHNdmwEnGf3Zzh5btJhj9josVaEarkz2+aPnE3WQ4o+mSfffEFa9jS+DNdQrssNiuinULGblhSoctQB9HwhKI4YFmIw== 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=+nPOwPKYNeq/2Tv4iqOeh7ZkKMvKEp8wvhNPamOgGPQ=; b=I3TJgN1a8bFE2ZptqIWShtIWyZfFEzXLil1Y2SPFhQg2VIuAHenuZJJ/9pbyg6FuQmh/M7nH5jDGCgndYCQvUb8TNWx4Iog7e0smDwNLxZvHGmb2jm91VdejD93RFsXAPO8iMTXHCuKQ5BUXmOi5fWNr3ZmOKUE1jvz7QefDpltc0zdeKl6TgbsRVt7HDVVGHcSG6p7mPrH5Kdu2fMakHv7NgkOi82QL4GHCB84xf7uuC2qDht/3JNPpTbi+qqR3fk83Akt5kmipiOGHHkvPloeBehHZ9a8CySZazeTejDK0oHQyZmPpMXL5W4TtoH/c7615IoLoGUrzyC/Sa+MUlg== 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=+nPOwPKYNeq/2Tv4iqOeh7ZkKMvKEp8wvhNPamOgGPQ=; b=JPI+7T8r2UV+uF8XiR7KtxjpoQEdq4Q8MhCh/QH/+eQn13uNtfNWqrRZwCTg7mM4Gsj1S6rk9+Wimq27MKtQhfn29XzRWKlfy49ZInVfOxrP/IdpDGukDKt7cciUnFTr2QGEfUZEWmbe6lEQpLezeGyE1Ejmy8C3Jute/Wss/KRo1NWmiS+OeaUMn9dl59dx9eZTuPy/5xWj47BmoGKdZe9gLg+/RMTfRVSqCN0cUcksGhr4ro2B8V7R/L0fxEqMa6HBLbysR8xSFFOBt0cLyqrVUYQRuZ9wRFmKhiPSjXBWwxn+JVY/+YCw81QH2h3NBaoD5GV1VWtqVjgH+i8IvQ== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) 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:08:53 +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:08:53 +0000 From: Yangtao Li To: Adrian Hunter , Hu Ziji , Ulf Hansson Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 19/58] mmc: xenon: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:28 +0800 Message-Id: <20230713080807.69999-19-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_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: c1511211-cccd-4a6d-46f9-08db837865b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6f2K60YY3n8MkM8nW6E/VWJTwF6reYO0KrTiKeZqaubntkbuTexAP5HzihpE1A7XdbU7fIkNC2nV83Sk/5eJpJF2B/4FKlDhOpfqSCRRiI1fUgtX2/Wl5i10LV2CSL8u5s3OzweECN3uTAWkrlK5hnJzRm+AkPGj5E8KPEHfw9IYotZuQrWMD1/xvZZtqztbhVaOXnK68jG+u+pM/Bh0VQnV6Bq3cCWiMKj0PLmUHOrx5hGJR7ldcwbH5EP9CPTJkBtMmrOR1DVkY80JZspxy3SrwfvPDsWvzN5ATeIrAhI9q8zI6Eeamt1DHOPJ/XFYxh9HmuOsw0k5XWJA2Fjp8ievhLwDw9AqweVc3RkkHFWMm7n9KBpUALHlr0ZYY5zbS+U8lcy/MhbVk0nNYrwyoZYjYXaQXfq8UcMLgclAwKz8F56QW3VYwOx9fWIuwnTFJ9XHVys4c5qJHJh8T7/vv7SVUcxAxKDUYh0iHOg7DNAhOMkJr9VNzTJdMyOmMCPAWq0bU7yTz13rHJzt1hvn2vH5rl0bxOYgJiOYIotc9HWyl8tLRU6ogu8llozHKrWXxKQdDSeBI6Si/dhTTcg8kgaJDZtbQXSbfoAeU3eb4RlGH27ldzJ9lpKcKMN4URG6jgJs8izE6XomlKxF/OC//ah2unsYac7fS1MwOSWjc4U= 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)(396003)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(110136005)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YzZERTYyYXI2QmljWXpTckozOG05STBlbWp4TDRoK3V6bWlQeFU1ZjdmSGx3?= =?utf-8?B?bFpiZUNwb0tEN05RUXB5eUZ3RmtQQWpLdjh6L3l3eW5FN1dGajlTSkhxYXcx?= =?utf-8?B?TVpjU1VXa3RtdGxvbTRsWjRsbm14SjhyVzZHSGdCcHk1RmY0RGNZTEZKY1di?= =?utf-8?B?MnlkWTlGZ21nSmFpdGNicHJySjlJVGdvajBBdGpZWUNOY0hkWVRHa3ZQOUpi?= =?utf-8?B?dDFaQ2trWFlwZmluOG5wY1BodEJIbEtWYVZmUzQwaWs5M2w0TmdNSXRieHVx?= =?utf-8?B?Y0FOTmdwdFRDeWYwNTB5L2pSQXNocERpNGRKSlREZnp2Vm94TUUzb0Jrbjh2?= =?utf-8?B?SExVVCszTmFoUGlwNHpJNkVHTGtJRmtjQldCN3dPcENDNU5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4a6d-46f9-08db837865b3 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:08:53.0216 (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: YwmnY6vdx/jGnXIMar4a/x4xuGESPA1YDgzLVdsedXrd92CZhB/yV1jUyLei2XU/F60MEG+FIy2UO0VaD9kaLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 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_BLOCKED, 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 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/sdhci-xenon.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c index 08e838400b52..25ba7aecc3be 100644 --- a/drivers/mmc/host/sdhci-xenon.c +++ b/drivers/mmc/host/sdhci-xenon.c @@ -578,7 +578,7 @@ static int xenon_probe(struct platform_device *pdev) return err; } -static int xenon_remove(struct platform_device *pdev) +static void xenon_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -595,8 +595,6 @@ static int xenon_remove(struct platform_device *pdev) clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -705,7 +703,7 @@ static struct platform_driver sdhci_xenon_driver = { .pm = &sdhci_xenon_dev_pm_ops, }, .probe = xenon_probe, - .remove = xenon_remove, + .remove_new = xenon_remove, }; module_platform_driver(sdhci_xenon_driver); -- 2.39.0