Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2033411rwb; Thu, 27 Jul 2023 00:34:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlFswmj4mKogvkSNSWiNN40pK66OAOkojVRlMSIfw24L3j3pVLRt4GUiMunc9pGN0yZm4n6s X-Received: by 2002:a05:6a21:9993:b0:135:26ad:143 with SMTP id ve19-20020a056a21999300b0013526ad0143mr4422787pzb.26.1690443282302; Thu, 27 Jul 2023 00:34:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443282; cv=pass; d=google.com; s=arc-20160816; b=IZcSyNQDUWruLyOIshXJj5WfE5L88e37vni+Cwed5JfI6w9cBE+lwCDFdR9ABzjGkT LyCt7NM1bxxafpTpLIKuH3az4uS8bohG88QGqGGocPgb40vjs+nOk+scvHzbOxCjKKAM Jpxp+w+w7L5WuAGetTDnMA+W4Dovbmn9qHakLnZZJY/qlj8zuhCA9OJ3UI+m39JXpzFm dD7URF051QVIjJ9BuxXqIbQlDCd+JBF8Wg+mnSu9uBZ8dHmeZNTRZiZVWQKb5uoTwOZW XOtN12qldP5w2mY8+abA4RXGx429IhLoeeClpKB30fJ8mzGEYa41lCeL+Q6c8sp/qVOA KtIQ== 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=nEbCcoNdzo8jW2C3o99v+KZXBqHVRnLu+pxztFMKspQ=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=I1IGyw3Ujz854d2StPjgcJphGDCICdbPlr5FuzPq/p+LVVwMVRJrFQcPe+0NNwcQ43 epX8fX4PYuG8rEvfDkGb9F9md0rZ1RNMrCaCNJ0aMyhluDIyw5KU//+Iq/c6A5Jd46A3 EZB2OQiLD2lqqie5qXzrbZ8F6Ked9EJRU+sRUV6pSq63njTjZyNEqB6/OIzGMBWcjmgg 6Ozm8JZeXiA9xWV+EhZHXBzEdy2Q25dYCW+JbzcNXiFVaN8WsrB3nisZ6BgPhkz3Ivpu xFZwLsWqmaKSrUQFDdttRCAL64ZsyQW8EuJKcM+Q0GMoCKtZtTXTh7OePsWJlqHIgshL D2sw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=GPnQh9Kj; 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 s11-20020a056a00194b00b006683174a49csi986705pfk.198.2023.07.27.00.34.30; Thu, 27 Jul 2023 00:34:42 -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=GPnQh9Kj; 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 S232924AbjG0HB7 (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232479AbjG0HBX (ORCPT ); Thu, 27 Jul 2023 03:01:23 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 292EC26A0; Thu, 27 Jul 2023 00:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iVfW2sr3IwycqqKat5ZV5NY0b+4QqsFvrySu/LDu9Vi5eHBWM53vjyR0t2uqwWOeB3c+FeMqgC7vkATjsinHPui0p0uqTS4Z30Fpj/kIKJcZW85io1O6+Db2o/bE4TduAjwmRjRyHXQ1GuLhXytCWLmAg6fonPRycsh/cKxfzrlwDvQukYI6YIo6UhkWa4u+qCVzw6bd6kUJAseanPLj2lNIkJ9R0fahwcLEWTILqcqSGNgfplCczq5WfgG2TbYLc1ybPSBPkcpfD51Hd/HLNKQq2A4E9OuBUXQIDA3Eu2LcodOSxkgnxiezqpUMXjWlQI7+nVvPRQx7Kh+NwGnPZA== 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=nEbCcoNdzo8jW2C3o99v+KZXBqHVRnLu+pxztFMKspQ=; b=l0aEWHfkjsmIDp3mnT82JX2fcsxoriOqkVG6QY+lhp1NRlG7ROfIOQYXFeH71Z8dXJ3QdIffj+XViY2yv8VKtLpZmNWu+KOUYteC2lMcJzZPXnXlBKjlLFi5r2MR6SDxNCS3ig0tQ0i6W8R3OrwOSL/ut80ZyPZGmEexjgorN0dNcLJCu5UdjqOPrfqYMKfZTeduYjUJMx/gPtd7w3r0hJ3XBRRD18oqXSfUnsuWgOsd9ZM1C1ysCC9Abc/AGpSV8mPr9v0paEux2k6X6sSRGrcreC05ix95JJEr2qBYf4DZVqmaM6ttcQfnvyoQmkSLNoPCgMBmrHoZVDjz4OgOMA== 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=nEbCcoNdzo8jW2C3o99v+KZXBqHVRnLu+pxztFMKspQ=; b=GPnQh9Kj/aJI8+EnY0UJGk0tGM0ewglZsdnmJix4XfwrScOBIDNukynsVw7OEHFKOxH3c8Mja4cPKAN4LQQHNQH2AfOKcZNPfwyq3f2FDmveJIrz1AxiIoyzLPSUFh8Qz+r5AbwSnN6ayBIE+HtGtDPid/nEd7x+rYK3cl9VgoywqolfqIdZlV/0WSV/zFY/NGjZxbOTZVfgJ2qn/gpsMM+v6DRLVCPP5pz+TWpYXVnAJmZI2yEUW1kI4en/HyPFUrskqYz4aYYyBDL19rqyr5YkehUrx0bUoy1jereLZT1BP/rnwe8zsD5U2kxeRu9YPIgcHRunpRYFlhSSrXYDgg== 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:16 +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:16 +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 09/62] mmc: sdhci-pic32: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:58 +0800 Message-Id: <20230727070051.17778-9-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: c6bef073-633f-4054-eaf8-08db8e6f45c2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XeaDDFbW71kzryDpyvJKg//LPhFcSgFzmIuPUUWXvCiE038qOiqDOZ7oA6q2kTclGI7sWpjyfUT2gp2BIEdJUxYCSSQ1RIjpGvgexCT0WyZnZeJipzedANzWpeQyDp0UNeBWU7gcqM04UEeKH6p8F3cDhy0nHmQP2U3ccDsRNsF8glgSYoWd/YeZH4d85CzsbOc72klvLENGqLD2gSMtN27KY3YF2FuGKytSIBW8ngsfr4IywNBdfT5V1kbjYEKd82ODFknO14tvG37bKEQGCZmdCDzf6GAYpYfJWLS6Kzom0Uq1k4qA/wvQ5d33GItF4NaACBpuVWFjp0l9hDcweSz69gTxsPLr1BV6zs3svQUqdXe4+Jr18hEpnMM6lXSin1Zw0iAhyd53hIjuxHs2y6BWjZzTN1kA+fAIgUymhIC/vWLZv7YyzVAfxewJ6HRW9qHU/EDpLC0VQkaQR9FcOLOXMcNX8Zglst8WLrB4+wudBC34/YdDliJj90L+A0GqbZuO+RFaW9nGzR1EDvz1ShCkGDzt8b6yXCEd4a4qHCj2lOCJOHrHj0PRtV9BQwY5RBUtThgxtjR6Lw0lZTNZw4Zd2gzzvylkHzaodAuPFCHEG/5y9ZaAd6YLOb0JcJbP 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);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YkNXK3c4VGN2NGllWTkwMGdVL0g1bENNYTBGUUxyUVdaUWhpOHpacFp6Y1RS?= =?utf-8?B?a0ROMXhhT0dSa2srclVYeG5TZFk2eFRDZkhKL0UvNWQrUHc3RDZaemFXSEVE?= =?utf-8?B?NFNObmxwWlJkcnpZOFUyRkgxaFA3TlowcHpPVEttN3ljeXQyYWQwZyt0Q1lV?= =?utf-8?B?NStnOXlJVEk1M0dtdXUxYjlMVkwzaUFlOGFpekMrV3FXRE9Oa2p3M2NCeHln?= =?utf-8?B?Tyt5UmFCVkpPMWk5UTRLWUR3aFVxTWh4ZU51blMzdzNYWnV6T1JkbVd3ZER2?= =?utf-8?B?NkdpaE9tVkUvN21pWDdXRXFwK1oxanJBazFQaGQzT1N0YTJ4M09kR2tHZWFC?= =?utf-8?B?VnNxcjdtNEluT1JVY09ZU3JYQnozeEx6KysrdkFFVUdydEVNN243aVFXaExX?= =?utf-8?B?dmU0ckt3dGgwN2ZIZk5G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PR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:01:16.7287 (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: m4ij6G1mFklyrK0VQtykPsstzP5Sg7AwpxysH9jn30xzBrPxxEb/Uq05mOSYYmxLrL9CmhkzgNBqNtFBHUyNKQ== 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-pic32.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-pic32.c b/drivers/mmc/host/sdhci-pic32.c index 6696b6bdd88e..7a0351a9c74e 100644 --- a/drivers/mmc/host/sdhci-pic32.c +++ b/drivers/mmc/host/sdhci-pic32.c @@ -210,7 +210,7 @@ static int pic32_sdhci_probe(struct platform_device *pdev) return ret; } -static int pic32_sdhci_remove(struct platform_device *pdev) +static void pic32_sdhci_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct pic32_sdhci_priv *sdhci_pdata = sdhci_priv(host); @@ -221,8 +221,6 @@ static int pic32_sdhci_remove(struct platform_device *pdev) clk_disable_unprepare(sdhci_pdata->base_clk); clk_disable_unprepare(sdhci_pdata->sys_clk); sdhci_pltfm_free(pdev); - - return 0; } static const struct of_device_id pic32_sdhci_id_table[] = { @@ -238,7 +236,7 @@ static struct platform_driver pic32_sdhci_driver = { .of_match_table = of_match_ptr(pic32_sdhci_id_table), }, .probe = pic32_sdhci_probe, - .remove = pic32_sdhci_remove, + .remove_new = pic32_sdhci_remove, }; module_platform_driver(pic32_sdhci_driver); -- 2.39.0