Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2037147rwb; Thu, 27 Jul 2023 00:39:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlEI9JS8h9AJGKnDDwjzTbHs8py0+sg6V8OS+FEXWJdSimkrJKT99D8EBar4CnklHqTzliPb X-Received: by 2002:a17:906:3158:b0:96f:e5af:ac5f with SMTP id e24-20020a170906315800b0096fe5afac5fmr1256390eje.47.1690443540461; Thu, 27 Jul 2023 00:39:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443540; cv=pass; d=google.com; s=arc-20160816; b=SdMdA3l9mESRV6ms+qkoGnu6VOcu8tv3DkIMRhIGz39xY4LbuYOwvMltja1e8D0hy7 McPjk52ZIMkA5ojEwsb6Iv9rtHbJ6Bm27ccxQVkh13jc8+iFcQlg9NZRaxOMz6iamGXn uTB+/XSqa/wjxMcUqmn6XecJv30w2xU8pU9xgsLuBUhaX0/fydKbmKm7JAQgj5SkHo4+ OIm0six3uWH83FeOp+tQOpQXoCtShpvYIiXto1nOIbt6v9rlvkA6toDC37ydY/IYNcPb Ku0GQdziNmB3258qJGZncV4+OWMUPIbM3bXgbtS6pXrBBDBGpWUOgz6I3Glmu1Nl1xI9 Vs+g== 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=gVMhDTzlw8do8am9acRTwjuR6yvB0w4OzOuapIYozcA=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=DbQq1X1hzixfkCZCj6JId5IMh1iH5X1AAkR/vYzDb8yCG7E88nnoLIsO1nhh4TowpY 85B0ns3X7A3PSm2tfW6J8nDM05z7A5sPRnR5Jo13Ih4eoFOdyTmyLGTUcccWjCVYMyfc kFtVOr+8mwGY/ms3GpDWRm1olxJGnUN4uq5XqUk3kKt8OitHvotXHc/KZEJRt2TeryKb hkOOnGQGrskNKAk4I5hl7iRWiRpUQp+/FXKBIDjN/j7lqMU/avRqEcIbiIFTmoAkVMyD BIEeFNzmAXsbzHHfu2aiPBZNT4qRaapm7SMsbVGKdFsSRJo03JxWDaahokz81VEDI3op 2s7Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=B8yI5ylb; 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 r12-20020a170906c28c00b00992bd9701f9si624858ejz.798.2023.07.27.00.38.36; Thu, 27 Jul 2023 00:39:00 -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=B8yI5ylb; 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 S233080AbjG0HGb (ORCPT + 99 others); Thu, 27 Jul 2023 03:06:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232376AbjG0HFY (ORCPT ); Thu, 27 Jul 2023 03:05:24 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B391D3C2F; Thu, 27 Jul 2023 00:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YdDHWSG6YRO43uTks7FZH5nHueubXgXxOqSXkximsa/9QWywiWgRh4z6NfyckEHMBcZWl4nJsl6uNsik5z9SJsZIt8edE83LfqKQM3+29IyUfRj40hU23BjsWWZixBE6EciUq1iIH2Mc9dTH7ivNRVnCGtlIE9ikuK5/M0p/G+nl3DNubJ60E2athKB1Q8oyXqRv94xhVPGJ1rLAWPGrPMmtJt9VNVKCWZV+1gZQuS8wjMN5hwyZVONjJkwE6dIctNAOAJ7/3CZczuINvzYxEq1i2VyCIoN2K82heAPU/4o9G0+90Vyiw4VaCWSLymYlsvOhO0DNZt0uxt1pCPuLZA== 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=gVMhDTzlw8do8am9acRTwjuR6yvB0w4OzOuapIYozcA=; b=Z8omnq+2FnQKcvEbZXJgXocjSNmyGdsg+Y4GiU+YajsWJehsxftqebvfLnw7Y2/C94o+mNAhnGP1sQxFWt8ff1AgSIyrMneDZXN+e/HtUHXXcmFR1Uox2v6XWPlOusjCAyyP19+5uWcSLxJX5sorUnWYJ78RqoZIWfRM8A15/w5kAtCqpUDFmPw0CLJ+I2RHw/pFF+TnMV0AjWRzuwsMhomCnCgcHVUvB1bY/98hcog6RxpbPrWrX2L4ZZoQsmP9Fp3btNYIPSwqV2lvjJsDaDyE41tWbfdMPH2/IIcDbtWZGqjWo2YqS33UatdS0mcjxrfrwtfc+8Po8FxsyrkTOQ== 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=gVMhDTzlw8do8am9acRTwjuR6yvB0w4OzOuapIYozcA=; b=B8yI5ylbwSDF3/4lXV1sM3DRWrYCA1EP7K2S514WPE1MG3F1kNiVSyGmcZ8MlkwfJXtZnChiLPzb8wC3TbcKY2kCj3vKM2sFfNhJHr+qjJZe3es3aRTMkIb4etMetiu1U4nSqQFwKMJogYMVqmQvuvWa26arnbxjSgLlCFlGvqfQIUM90tZxcU5dlFqc9oW/noSMtPMQoV2a04g4oAZjmCceb2W/Z2nVsjDMv3LVBnLFrAq609Lw09WWZjhSEeAKGA69QqQLXgxgEjhd/WApkBKUGFh0mA4RiH/xJqP8HRmLpoR+kyjC+xqrTm/EuVeJ8SZ/Sme6OPrOoiXEDOBEwg== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) 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:45 +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:45 +0000 From: Yangtao Li To: Adrian Hunter , 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 26/62] mmc: sdhci-of-dwcmshc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:15 +0800 Message-Id: <20230727070051.17778-26-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: b7eb1858-cfc0-41fb-15cd-08db8e6f56d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: teUdjnIdMCCJlnugWyPb6g2scXO76FPhiH5VlLtZmN96J7D92Ed4hznBjJCMMoFTpNXJ+sdtph33oHl4qkoSLx7vPaOafDq0tMsn+M8HNCLUcHOOV0m3aP4FJX9D8UMStiNBquvG7iE4hA1kjDHEC8TtzT29hx/P8W6ft+c6n8xp8BIMLYx7fVZ9o/okuZ0SmoslBr1hHwVE7iu59HlCiJokDkDyH9c8t4jZH22Sto0xZmRaVyGgz5CatdejjuYY6GfMXMn3XwtGrUo+j6fbGsImmvUYPBAPA1gieedLnl6EHHU9RN/Oj7QaO01juVbW0uDpTCJl/cwfyx2soKuXKS8SSFii3jYEs2leg/BXDzYXN/tNrG4iSL9/Ip5aWOw1UXOBCFRzo8dGjfpfjeSpNwQXOmthC/uMgGgl+e9kbwmymRKqlBWHRUashyItzdPa8sDxzves87JcurzMAaVmoivIZ4fTw85ZEncfIwstGupvDfcemxspEEKn7zURrgz2wKno1+9ej4ObZPK5afJxJpUAPK7DAEw1ctJo5+5ZO7O1gETTLBtwbcMY8hxNp+veSQWCfy5K/hJwShojsSNdiZ32s8Bqc8e/9eh1tGrPttRvYaIHa8TN13yhst7HH5BPY+LZraAn8LfJIbHOWBmaiQ== 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)(39860400002)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001)(133343001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TUV1S1pjMTlUVmlqVmFraS8vK1Zyd3c3cFc5THd5VXBvUmV2THZvN3JacDND?= =?utf-8?B?NFFSa1JrR2hWZWt2Y3ozRGNIYUw1WktnRWY1WFBFOFZaS0JzZ3Z5bUYvNEQ4?= =?utf-8?B?T1VROFBSblRsdExsdVgyL05rT0ZtbG1uamRwZHlNV1FhYWtpNXhsbEc0QnAv?= =?utf-8?B?WHQ4TlllSGRuSDFYV2FhMERmNSs0SmxFRDVDa1QzaUJTYjEwbUZBVlN4VEdS?= =?utf-8?B?MkRySktYUmRQSkluYkJiRUxUaTZPK1Vsc0R2QlFEbVNoS1dnSHU5UHA0c1JX?= =?utf-8?B?TWZGSHZNdm01NS9GVlVoR0p0TTNKYzZnQTdZSTIrTVlhanpQMjNsc2c1SmdP?= =?utf-8?B?SmNMeTZLN014VGxEbnFBVTYzcHdCcVZRRTdrU1RNTllhZG5pYnpBTUhQV1VO?= =?utf-8?B?ZFJkVTNLVWFjczN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-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:01:45.6226 (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: oMZkv9z/rHskG2kwKoij5rZu7xNLykAKZK6H2KykM3AMTDIfRQizi9vN00af4wSENnaa7zYlyAuBqM1oaui5lA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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 Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-dwcmshc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index e68cd87998c8..5cfd24cd33fc 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -574,7 +574,7 @@ static int dwcmshc_probe(struct platform_device *pdev) return err; } -static int dwcmshc_remove(struct platform_device *pdev) +static void dwcmshc_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -589,8 +589,6 @@ static int dwcmshc_remove(struct platform_device *pdev) clk_bulk_disable_unprepare(RK35xx_MAX_CLKS, rk_priv->rockchip_clks); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -657,7 +655,7 @@ static struct platform_driver sdhci_dwcmshc_driver = { .pm = &dwcmshc_pmops, }, .probe = dwcmshc_probe, - .remove = dwcmshc_remove, + .remove_new = dwcmshc_remove, }; module_platform_driver(sdhci_dwcmshc_driver); -- 2.39.0