Message ID | 20230727070051.17778-9-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp908755vqo; Thu, 27 Jul 2023 00:09:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlFTIupKR2kl5LZv7//qpvAL7DWtXRYy3JP6kU5m4on7+wdwOe0X9pWwpmWBru1O1Kpw9fGd X-Received: by 2002:a17:907:75d5:b0:992:c5ad:18bc with SMTP id jl21-20020a17090775d500b00992c5ad18bcmr1115581ejc.70.1690441766075; Thu, 27 Jul 2023 00:09:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441766; cv=pass; d=google.com; s=arc-20160816; b=yLw03mY7uSd/3Ht9u2ppX8KXxoiJvyvch1Xw35u+Nm2m2r3w41Bp7gxu+jU/7XZqsk 3L2b0sfb/UZd4FTJdEt+7mOHQ3OSoC/toZCDMgqM1ff5n1k2Aw+pfzzga8Cc7xyy0V8w lgkZua6wmfbDK3+Rl0hk0CaSQrztXbNZjXgxT86JSmt/rv7BuzSLOJ8cIdYDU+FdvMlz yxSFeeGE83izSYCQ91U82LIws+9RcNv/cm2KJO3+PYE2UPi1NB5MbV1Y0/903FPlq+Wo YDST8kICfpGpGAg+7otR/Un/A6fEvrmkyeayPp2BQ9zwZ6vvhfkvnBZnf3PtiaTK4oE5 GVrA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h15-20020a1709063c0f00b00987b20b66bbsi612722ejg.711.2023.07.27.00.09.02; Thu, 27 Jul 2023 00:09:26 -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 S232890AbjG0HB7 (ORCPT <rfc822;hanasaki@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, 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?q?bCW+w8Tcv4ieY900gU/H5lCMa0FQ?= =?utf-8?q?LrQWZQhi8zZpZzcTRkDN1xaOGRkk+rUXxnSdY6xTCfHJ/E/5d+Pw7D6ZzaWHED4SN?= =?utf-8?q?nlpZRdrzY8U2FH1hP7NZ0pzOTKm7ycyt2ad0g+tCYU5+g9yITI53Gmuu1b9LVL3iA?= =?utf-8?q?e8aizC+WqWDONkjw3cBxygO+yRaBVJO1i9Q4KYDwhUqMhxeNunS3w3XZuzORdmWwd?= =?utf-8?q?Dv6GihOmVE/7miX7WE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VZus2Q99StmFxAiSherwPm4ehiXSy8RpH0?= =?utf-8?q?fuX+ygmYHR0ORFY/y2gqae4CAsCe+vKA9WWyq1npg4wmReyGV+Mb1+fXBkdyhz5xL?= =?utf-8?q?p4CfXcDS1sVBz52TSY4MZy382vMJJm2sZCbC7ZyV+wqYLqAVvl2+DlDTpaaDQjU4x?= =?utf-8?q?C/FAdLDvDvMlL6sDOWkcKdnrv7Ec6l4X8n6dCji+YrKLo8e965HAgu9Lc0RgaJ1HL?= =?utf-8?q?npmA2q3XU5XpLqBoeiHJZ+IXB97Sg9vE3hI0G3akvfjVgUUcsQx5saXDc7y4HqKkR?= =?utf-8?q?5Wpwj5fDjh5I3JIStxUpNEC6QgalD+S77vab/KX/tq2ysMHqMdqWdqJlaAR1zK2NL?= =?utf-8?q?VR00FEJcekv1md3QiBRH0kwc8kYyyOcaf6nmqeTXsvcGF29E/8QBkZHu9hL0rLfaN?= =?utf-8?q?X+PcEsF2rt3m?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6bef073-633f-4054-eaf8-08db8e6f45c2 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772556665281986485 X-GMAIL-MSGID: 1772556665281986485 |
Series |
[v3,01/62] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 27, 2023, 6:59 a.m. UTC
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 <u.kleine-koenig@pengutronix.de> Signed-off-by: Yangtao Li <frank.li@vivo.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> --- 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);