Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2036405rwb; Thu, 27 Jul 2023 00:38:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlHpPZsWNBmKPx7PdEqXyPV+U/P0mt5OwJ0cTMuF7LL1n16Fqr2F2bUzuXgwPcWFOyz/SB5L X-Received: by 2002:a17:907:75d5:b0:992:c5ad:18bc with SMTP id jl21-20020a17090775d500b00992c5ad18bcmr1164506ejc.70.1690443489748; Thu, 27 Jul 2023 00:38:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443489; cv=pass; d=google.com; s=arc-20160816; b=AZWWO3zVazfWjdANGFU06p1h9VZkp6+dfQWDLGSJhoMlPHXOBJ5k5YwaToGQOMnK1N T8O4Jzc7StW0AVXkMkSWH6SY159Ql4DekYTqVa4zxXXtN3nUhv4Zlz4Rut8iO+f1skXx lfiBBtYmdBwvxhEffeUDkTmF1lQQ5hV+UeIyVMW9W7K8Jn8MC1zCKetTXPbusLT9SLEz 4Kk2f3Jafz1l1mdoLGk52mcOuWEjHfWvYnMIMVi5qt1Lcwk1sOAoDujHZXfkWMGIlhCg 9agkzNOKXc2QvQsy/F3kxiW4/aaIwT9TT14KZDIdUVV1jkopSLWGNdhaDT/5RBhgYflV 8ULg== 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=YnEm4eeaXUww5eDuPQKSh3EIaMee7cr4msQcxUd2bqk=; fh=KaHw6wvoY0nORQNloGxgAdG9EQoKCtLTTxL7ZTkIt8Q=; b=smtesYu2ie4/zYlgs2qLT7IRvMnUhoeVbuXJFo4zmgD+Ok62pqxD+TXGiPBcmKXzzN yY0uInpZddLv1ksyFM9mbqwrFjfmv9f/pdRhX+aCkI3pAzwj54nn0gt9OB16q9MoLB2V z4VF0jYoj3ZVQiEncicjGtI3Hv+vlZMDDxU3+AMGej424mBGJuceVkSgW/LwSBSofEWs 2YTud5wZ7IfgeK9arCGVnjA55osae7kqy3uncCiXtACDo//Zsn1BCyn8j3S9p7/nVRyf F/5isLAijuyrTewNW8dCIPOCbPtBRf9qmFFpKbJk7C5toOCCcnLo6iFpHN2aL4Tl0O9I 0Edw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=WD5kf8K1; 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 qk29-20020a170906d9dd00b0098e422d6759si602667ejb.554.2023.07.27.00.37.44; Thu, 27 Jul 2023 00:38:09 -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=WD5kf8K1; 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 S232606AbjG0HD1 (ORCPT + 99 others); Thu, 27 Jul 2023 03:03:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232133AbjG0HCv (ORCPT ); Thu, 27 Jul 2023 03:02:51 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82CA426AE; Thu, 27 Jul 2023 00:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Maf8scFMRz58zsHamLKIVJ1UHN7aAfec4z7+lCdxfNAoYK5ceYF4c6W3//mP+eR6INrPK8WxnOpreC0eZXoSDFdLVJ8cE74cxiN+SBSJ+heIAGhplFezBlM07gHwFDYMOU14x6hbgE5il1590KzDUAf5ywo1KeDndOo392xTCPCk2ZKN9x34QLNuihaQ3B/Iu8V3ilz5znP99ThnXGPcnbJqZhWTOLcygmNX5Lhw304AH4XiV7TT8kK7gVvx+vYBIdlNrz9xajTNw+rn0Yvw1bVQltHkhl0lx6p0w+p/z91f23GDeIJf1ryuFeXcurz2CWiYtY5fBISeNmuxR1dv4Q== 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=YnEm4eeaXUww5eDuPQKSh3EIaMee7cr4msQcxUd2bqk=; b=mCBl3vwlixRtymJsJAGNcylwF66NTobmJEtffE4OQWnHBLr1tHmgf2aY1WkaTn9BhO+46AZfYEb2PDA1kw160N/azZtCoq3l5CRm+d47olVvtvbRAfMGYNGIsmDJkRufBwdIiWIvXclkO3F7IGzxzqARo1WylINNM/PcHrazoZvoT5BvihSs5Zw0hka6kxa1GNg8o60y3Me6ZsbZE/MY7WGdw7HxYG/+5aN61LTnt75z5lwG4YBigArNCnfK0RSjD7IoC8ALxNFTscRFMVTeWqbMorPBVNcCqL7Xdj0TqRHPj774VtFaklog/hAqNIXnWJpvOkz6mvRRkezb4aEvyw== 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=YnEm4eeaXUww5eDuPQKSh3EIaMee7cr4msQcxUd2bqk=; b=WD5kf8K13FJaMws5FU7HZ5YfNmRj658WPEtPVif/AyB74R8nk3+l5Rce92yhiepQ98fNib2lmwgKZIz1YOcuGCvTR6T/tlMrSXtkw2Q5K7sNaJ6BVRr1pZGuCDPzPoQzOxQ51VayIKGGmyvsDW1e761wgKEAP1Qs07HR5wGdmdgVPcu8NqH+L6fdc3VC+0vsG0ZzkSDoRrQCYbFg/0SL56jkr4wbEsksoVVvIP4BJQHuscSvApv3mpbmTg3ZCG0iDq3mYygXEDWamA4Dwi8v8VFiDwi8dtX9R+18cXks5RIUv1ctU36o2e0dFziQInc+WIXQx13tqqJhBXvLd6ANTg== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:47 +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; Thu, 27 Jul 2023 07:01:47 +0000 From: Yangtao Li To: Manuel Lauss , 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 v3 27/62] mmc: au1xmmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:16 +0800 Message-Id: <20230727070051.17778-27-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230727070051.17778-1-frank.li@vivo.com> References: <20230727070051.17778-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 5e47b5ab-dcd2-46ca-2537-08db8e6f57d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 23zHms9rPzA/krfBl5bpxKzIMgYbE6zRgrxK/WASAddevcYdp087pvdQo6B8EncpA1WmTU1DSE+sRfnOElAxiJ0bBOZtyW8/3SL7EN1TGqLKUCJP+iyMfeGjYBWAlX2MC7OhO+e/VdeFSwlILOZbV87fvXyPlqpZOxJ5j1nt5zBu2k45HHrUNh15yYxd1ZGcygJQjl2iXNJu6wX8GLK+ldQj60eCaC1J2nt6fyC8/14VpAus54EThZxtOByrrIniGTYaVFDlFpcFTqm9mbLBc/jUjTqaROI0m2HktaD+oz8qs4kosmLUatDfW6Te+qYEsYbJ2Fj+gdcrXl1HsOLLZ57OVbz3GNZgTMbHXBp1tDg43wCsJ6I4GubSm8jwKlWfc85HkXBPjaLdf82BQ/4GHCSGX3WPBwE1XbzuVdgQLiaSCT3UPX7U4pxMj8lHWCctzjhLuMf1VTS0hQU/iaIk5jdgyT1lH4oCbPn51Dl/KP0vLJlqLxrikqty+/o0QURMvtYmGviIrjvydSnhokYwV+qgBtomG4/8eIfgi32weGD3NiWDX9FF17bDV3EOAieWRuoGGMU5v7Jq195qXZZ9n/qheg0RQ+ffJzJiJ/AwuWWpLJ74usZifWnt7FgSmLf3g87hKynhtLu2x4RnXgRvCQ== 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(66574015)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TVhDZ2lQOHp1aWNybVU0VkNCV3hrZW4xOGtjRTQzL3JxZFJ3NDFnWWU3S0RE?= =?utf-8?B?dnZHMlIreDNNRXlpckQvZitvR0RXblF4a1U0MG9SbC9zMDFKdkZ4UUV3MUdi?= =?utf-8?B?L1IxbkFnSTZnV0dERGRRYm5hS3VqZ1QzaEE3OHRtQndSMCtCZVc1VFluWFEz?= =?utf-8?B?TkVpWXpSK1dsZEEza21ibjBvNEZsdHYxZi9TUkFvNTAzckwyMDg2YjlkM3Rz?= =?utf-8?B?Y3hGblZySVVIbmNZdXRhZzI0M0hZaXhZQ2cwMFVNZ0NkRDA2Z1ZmUks5Zmhp?= =?utf-8?B?UnhSOGF3Y0p5M1NpUGk2bXdxQWx5OSt5d3JYeDJ3VjdEZjhrclBKMzEwR0Rl?= =?utf-8?B?R0VDeVgzTE9MVDMzRTFEbWZLTkl4Vm43SHBuYk9tclczQ0h0SS85RU5EMGFu?= =?utf-8?B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Source: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:01:47.0576 (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: e3zkVkISmWyteOi2ZjdkfAqAL7oVwhEpHmFVv8GlBs9UEcKPCeeCEUwbDiAA1PH44JuinlS5VhsOi4LEw0C/zQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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 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/au1xmmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index 82dd0ae40305..b5a5c6a2fe8b 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -1114,7 +1114,7 @@ static int au1xmmc_probe(struct platform_device *pdev) return ret; } -static int au1xmmc_remove(struct platform_device *pdev) +static void au1xmmc_remove(struct platform_device *pdev) { struct au1xmmc_host *host = platform_get_drvdata(pdev); @@ -1153,7 +1153,6 @@ static int au1xmmc_remove(struct platform_device *pdev) mmc_free_host(host->mmc); } - return 0; } #ifdef CONFIG_PM @@ -1185,7 +1184,7 @@ static int au1xmmc_resume(struct platform_device *pdev) static struct platform_driver au1xmmc_driver = { .probe = au1xmmc_probe, - .remove = au1xmmc_remove, + .remove_new = au1xmmc_remove, .suspend = au1xmmc_suspend, .resume = au1xmmc_resume, .driver = { -- 2.39.0