From patchwork Wed Jul 26 03:59:49 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: 126068 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp167949vqo; Tue, 25 Jul 2023 21:24:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlGw8sndVh73SSWz5CClPpXe1lugQMlQgEy9wGJvfYyXfIRad19dZIBc2mwDdKmJ1R1J762a X-Received: by 2002:a17:906:2192:b0:975:942e:81e7 with SMTP id 18-20020a170906219200b00975942e81e7mr659377eju.37.1690345460048; Tue, 25 Jul 2023 21:24:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345460; cv=pass; d=google.com; s=arc-20160816; b=HE/kfUDm55eUUqVOYyLLf8PNsRai9DjeUT2tgGA0dEkGP2YTupPycD5enH1U8TGA62 2bOLaylJBQmDEcJY45RjAqPs0pttFhl9Ka4Iy4KaDlR1fqe05ER/Lqxfp0z7JV2TFxe8 6tWGl+sXLw8EhcdybgnnEU4/TfwHYjxQzvgNzcQCE6NUUK/FXUsKPfR9eMCZ1sWh62MN /yn/9bbHGJni3/dw+hrbmIlYFvLqHsDDchWSt77qD9xk1HPk+YJrXcDR4vDLQLnRYVM4 rarKgXGpTFka68Yg0KZ892P8MAweRygnMIGgbuSGDd3RAVSjO/kywKmtuUdYF/n5eEje QG9A== 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=df1DKbWeg+xqkSYPtOjL8RorXDmDCAUtgwB9kJK//H0=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=MQgG6My93NteVKgKr1rgrajri02NKNkVeaqyxrSNAWPYwye8k27R6/SIv0HfMDA4Wo /ELjyuu6JHIh4hrz4Pf58iiAQOxFA7B+VycmtGt/rwJOFTLD7Nh+dsg6h99rM/S90Tsb ogtA7t4d0Rx0obDsceHZagdNcYNNLM/Ek8XJOhjzg74egqsrWDyQEH67bQUyHcWfQP20 Ss3//MA8I/PGnnkaQRIiDIumKWEND08TGEipyC/Rj05Az0Rn3cG3+6LgoCo3kdKQoaTi 4KCGa33SRLHyBkwEB+wlQwuBGCRZbnUajI3emTd4UFZe5PZewOx3lytCLCsByg3/doB9 i3ug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=PupFyPMK; 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 gy22-20020a170906f25600b009892631e251si8858510ejb.770.2023.07.25.21.23.56; Tue, 25 Jul 2023 21:24:20 -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=PupFyPMK; 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 S231497AbjGZECO (ORCPT + 99 others); Wed, 26 Jul 2023 00:02:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbjGZEBT (ORCPT ); Wed, 26 Jul 2023 00:01:19 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC4741BF2; Tue, 25 Jul 2023 21:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mlPRj5kaBhVAXZhijrNOl9+WR1LUNPc9HMdyap3C/Tc5PMw8/or4o5RxVy/JhYIc3ysrsBbiRmxF+NWcpnDTgpBfpL9BeI/CUIEjlQkaJsp5wFyxzS7nzfZJhQwLJipjWALTFINLfJdCLIYdqv/lCnLFAC5YFmBYGhHR/uYG4cH13KWeh1RzkeWDLnkcCIvMqWiibt3i8Al5McXnO6US4lp0WopABh/LYMNV/ZTpSY+KqmmzUYpEBZ9URi6XhSC9dHCdaXWCz+hnWe5qeIV5CZHGECVObX2kFZq4Y+mScTvJhGmqBCHU0pfgj5nFlEFrjGgcia7UG6O1PhPime7gBg== 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=df1DKbWeg+xqkSYPtOjL8RorXDmDCAUtgwB9kJK//H0=; b=dOlRFHjbXSfRtfMrPLL0EZkmj+D6/Hse8xEMCAz7SuoRdlgc+Gs81FbF3wD9h48xdUW/spT0n3BBazSz+BoBAgpEUSuTGV04ZOi4BhC8tUYsPUjnWTHytLHhwvb+pona5BQ8JpwjP1GLUfkOLHqw8/HUUqk71BL9X+ecEya2t3wg/3VlP9LAbd1H6bhPVuyIPWk+HnXnPbtDnX930jGi1qGHJgCrVFo4sABeqrXXpfjGUnYruAplWohRzr8fwtVf/8RucElyQLz4wT5r1kgMEo6qu+N5mgIYHsbaflt9/G6QnUqb/geY+HLg8Iovpy8CI03yyhibTpN3OAok4sAT6Q== 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=df1DKbWeg+xqkSYPtOjL8RorXDmDCAUtgwB9kJK//H0=; b=PupFyPMKH+vsGTMU9kT2SpTvFBGVzJ5XELDhpU1FsiLRKV7gOa1B30wGGBXhJgg31aUxzMM+7SgSMZjz25gdTE59VjVygobpiw4b0MUCO9VvUshmo8dy8RAFwwJAyFvq4F8dYxFuU8UCH54pBmwdap9xa5dW2eMECu2h2zc8lvzXPtHeBPQlLZ/mo6ZwPKG71ITfCtv2hoazEJ9p1Wtprya0kIkR663oCbKAe12Hn84CqBsnSaqJKLbcj8XXEQShS7MHOve5EyiN0B7Lk8bQbc89ug3ViC02S6+VcRNfsP4xfvNMuOKrgLQiG5d1FXfMaLb22Hq7trJ28vk7O7CuGg== 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 KL1PR0601MB5463.apcprd06.prod.outlook.com (2603:1096:820:c3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25; Wed, 26 Jul 2023 04:01:13 +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; Wed, 26 Jul 2023 04:01:13 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 09/61] mmc: sdhci-pic32: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:49 +0800 Message-Id: <20230726040041.26267-9-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726040041.26267-1-frank.li@vivo.com> References: <20230726040041.26267-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB5463:EE_ X-MS-Office365-Filtering-Correlation-Id: e2090779-55c8-4c6d-c23a-08db8d8cf3e1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 94mWmF6BEXjC32Y+jBnbE770+FWGLS8/nU2LYaGfjJugNIbtufydom0L7mDAQGo/DsSjI768LXYlUyLwJBiFWZxDGVm1n7bDurJ0CF6wGJzZQdrt6r4mIsUKAiOUpQM1gXLcWOEohlFeOKw95P1HNNgxg0EOZEa447DnlxgyL4/dalnqOc3v2P08j7Y49dWnqnJOi12+ckfHrWy2aq4N6qZbw2foxaJjuLBjaP60/Llbn+WORQH3dVpIzCiGNb0CkTGfZSoloMkITuYlRguXXJJ6sh0icjXHtWo5QaUo+Rury2B5bIXtyb4Va2BhFxmtsUYRVW3rgs5oCFtVqLJx8ndpO0OFCqgaUmuON4Qq2PQrHdSSr3Hmn0f7A+3wyUg/VDWW+QIR2ULct19SDoKV+jy7/n+sLQc8E80X5A4WJV5ESWm/M2Klcjs5zFz7BzCqRJ+BjPnHl5HDFndHG0Sn0zC8N2Y4pAR4890RNNIlbiYMp2Cl8nR8fnmNC4+YQWg17C9Q0jENSxGVr37nmXIYWM+pdELq+eDjfTWtr7bTclmuZ8pnU3f50oYvr3PAn5GNTP8mkkIcb7VhOz481feHEQHzTsIykFb7NoZzJgo4f3JnuPGckfZfyuuwEoHv1YdB 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)(39860400002)(346002)(366004)(376002)(136003)(451199021)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?IlNstXskqZ6m9GVdp0gJYkYmU0ck?= =?utf-8?q?2x/BFZx1TLiTwlUmRmc2zKxvweEIMmDnkBQv9DqXWqqrkwiPT7MUj7WNB7MQeOq8i?= =?utf-8?q?NWgFyI35QUIcIJS4LwTs/p2/uZ9GilONhw4+OiGxTDsbenTbJvu8V08nPKVwVv7T+?= =?utf-8?q?+pUael8bMhJh1EbHOFi398p/Tu5/0ZxOtBdsYJF0Y81nPBM9aCGmPDHtLg2yJE4jQ?= =?utf-8?q?PM9OAj701oX+cjGQOgnY7rSX4x8k9+NWJqDEBibeqZsNlf/9yJCo9eE83RDoI49FW?= =?utf-8?q?VBFEZV47J9Kuxdks+xXkAhnsD2qe2IkucoLujBvTq5dwqw2c4WwlYnjCLJxEEQNEU?= =?utf-8?q?/ZaaA3gLhcCtuMHjhhLw22EZzdESP9G3dKc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Y1OMJAN2?= =?utf-8?q?su7qDg1nh1xoHxgujzoaOF/o/udSS+uUgIL0FklqAxHoyTdnRJm+hKsg5V5BpxLZ/?= =?utf-8?q?coahsuO4B+UdTYVgVL1Jv0Xny8+oMiBXlzHz7dji5wO28byANTdynRYKIl5Z0v41c?= =?utf-8?q?38iWZVtNLcCxnWbMmL00PX2Bn4keRAWshTctZUrTVJ/+LGGSCcZBsgUX3Igk58mWU?= =?utf-8?q?z7deF+YWt9v4gepYpQO7LVs6SUwbzdtMSsXfb+fUX5+59PU7CWb2Oz/XywoQPRMfT?= =?utf-8?q?QnQ+7snIIuRz?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2090779-55c8-4c6d-c23a-08db8d8cf3e1 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:01:13.0956 (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: XadAvm/ctYxHikaGSEO4I0VX2B5oy5TqIL2G3A6/LMNagKRRkZmwneFb/NgtEdhrGNJJaBP3bYQpSidvNjhqIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5463 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, URIBL_BLOCKED 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: 1772455681087924019 X-GMAIL-MSGID: 1772455681087924019 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-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);