[v3,25/62] mmc: sdhci-of-arasan: Convert to platform remove callback returning void
Message ID | 20230727070051.17778-25-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 t5csp922038vqo; Thu, 27 Jul 2023 00:39:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlHQn7XOvUWqkenDbeSrltNQvBnst8zTMoKIYrEcM9rU+FFPNXls590/uE4KITHLKPOzzsNG X-Received: by 2002:a17:902:d4cc:b0:1b8:656f:76e7 with SMTP id o12-20020a170902d4cc00b001b8656f76e7mr2445062plg.23.1690443549502; Thu, 27 Jul 2023 00:39:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443549; cv=pass; d=google.com; s=arc-20160816; b=V88NJHulmnAodivU+CMe+ri0K9D/VoZyvEuahrmcn2e4nl7JanlmATnSfNxfVADWkG PPEIOSOVhdvFt/D08Jupr8FDGBVBXRn952LbD/2T/XSqYN7Hy7ZqtgKoIEwlvIxE9Tag HdFd9Si/70w91xKuVTHEdZ8z8W6KTzxeEnqD1LE2mSyY7ya9+IcUYYAHprWVUs9VQ7Tq VyDsJ/xldQbw8T5Gsfl7C0uTY2CoxelVZbA6E/3dP9c4I725/njoWDTE58swOFp7p1IB jMlHq920669fLQqtcYC9oVtlOkWk9YU2Z8qDJTHo7ne+oMiC1NDSPSas8ci4Pe5gL820 i7lw== 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=FMRuHPjs0o6JxnjzMmw3FowzCDPmxFhkE7AH+JRAepU=; fh=41DTsVqCa+DzVSgRDHYYCCHP/wDCwqtmKUUIYGSBh5U=; b=tSo6S4KeJCkolgKeIAq2FyQIITBf/8u6hwdYYDImAgY/Ah+xO0n3UDoWCHI6CJjJD5 u7q9aD+bBX1L1MqYOVPa8SNC66nul1FehYcqyXH9RX39raGQdQGknZMDX0ZmFezGxjS4 fl8TeX1Ci22A8x8Ob7OrwWBrk4H9+KGHBAlcjVHyqHRBzaOrB+tzRzzAI5/hKSN7MMnz iPspdjuGaSod4NonNH8uwS7d7HeET5lmdBCPKnAVcPNA1fMWQo22bgk/8Mm2lgDkXlym 18UpOmdkPR7cldw+GMqMLdJ8wq9a3e6Alc4K6fbNv/hxciJNp0R8lkbqq/sVm7jKPl8o P4NA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Ss0llbHE; 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 cp9-20020a170902e78900b001ab089f7329si909002plb.73.2023.07.27.00.38.56; Thu, 27 Jul 2023 00:39: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=Ss0llbHE; 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 S232745AbjG0HGQ (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:06:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232934AbjG0HFI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:05:08 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2094.outbound.protection.outlook.com [40.107.215.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B883B3C0A; Thu, 27 Jul 2023 00:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cJJ9/NGixKu1zeaBE7TbTZqzJ5HzjdMxhgtinVeKo9NkXIBqUTCSjbwUglvbrE9GWjvdI804yMdenz/luOLoGJw/gR/6lDeloqYdafPWutEGrdk6qbktA2lGxbtLTrsAM6FgRSjaxtr3hUjxWJNxNbJauzs/KA6M2bxtyH4ZpHETUq4deH9V1mm1WfneX5+yE446Qxi0Z71sEE6DO1irCTOziLM74e7MnnXgGYxrX0s4x8sc5T8vxq2zHz1kEbgFpKbPYrF9+nF5lyXd+QOg/Hh3G98rmIZdIIaTVM2sUUZoUdAGHt0VfQE7O++WaPRLy8aATP0upR84qdol+JKL3w== 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=FMRuHPjs0o6JxnjzMmw3FowzCDPmxFhkE7AH+JRAepU=; b=fFsmTXS7HbqAEyF72Wgvba4e/xbwG5ZHqps5KkvtjxmjaBTzXJqNQMI6GgcPRnPN+bMZsizc8jPYn6Gf8YL9mNweoV9ZXFI2T5S5i6euAvy68BqhcbeUkyMdKPRbd5sXx3gPehY4K6T3fSuHag0HJGD0CNqCjqwFXYk7IXIQcLUpLX4WihQS2D3Z6efARVbSMhmNPDtjdeXMcAIUOP3qpQSkj9kuD7MjIzrbrimshwbLXc/o8lrd9BWcJEjkGFHBtQzGlj0MiST0k696vVButJWjKBZL5foPuzVyVm7RKxn1/QGJJQKA++qN5sWORwYceLnwPhe5ZUXX4cQ0e2AzZA== 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=FMRuHPjs0o6JxnjzMmw3FowzCDPmxFhkE7AH+JRAepU=; b=Ss0llbHEWZnFJzJ93ECoZPVCyBb3yqoHlu2ZMQehKPmABM1lnVE+vdmHubXw4mVnmSzFT6RhmG0Rx/kUIn8/bvXkMLn2Ya0iheh7hJqf4BzZUM/c1v7CjLZLIHmKW0hZ8TZXsE437Z2aNKiR9iflQnCRO2wjz2QX2yMcOzmS7ouzoEmYYw7mRlLyNlIdEKqKM6o4r08Dbh6zGYTwmDmhpM4RuYW20CZT2uUhBU0Ydfb3YhZXBnV2wMVloH+6OwKk53/pgJ5aFVvE7VXdLNIFHsi+VFnPnGGfLOYor3Ny7rrukqNka5blRgP5nLD2vJUyBy8QOIN/hYPkxXoBGBU2Gg== 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:44 +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:44 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Michal Simek <michal.simek@amd.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-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 25/62] mmc: sdhci-of-arasan: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:14 +0800 Message-Id: <20230727070051.17778-25-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: 504479c5-62bd-4fad-ee8f-08db8e6f5604 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +Gr+shy+NKnUVYIGb4eitby7zNb7MyoAFTLpQ+IjztEQZXYMlDBRbsp40XGFR8lY/sNHoNnnuD3w84bsuRIZdnGEZ/CwtCJEl5MZWEnvp0BK2K5TQx4leRGfkVlApcm7qMtIdYYnEM4jqrxW/GME4591j7KuHGmiVJRk4VNl+tVe6WYtZOHM+Hzp3J/RBRnpurrDPItuY2wsT8XcwIQ8tzVHubQECB+NiyRp1MY29KoOq7WWIqiS7d0ihQ6JqY4HKTjnYvQLeyp1qabS2uNGU7jAKb7UuEjGPxVd8Knb41MkQkWx5wNo8kP8IMdKy3lEyyfBcst9gQmJ4xmbsCAQ1kaWNgOyU7dnLhOmYKmLW1l+O82+3j3Ur1MtAtQrDfR/FJsvbqoeLu25WbcrtWbH2X8XUGmFRkJHLbS2qb245OJuHRyqgLQHn5wPzdfITRIdFLplwxGSB003XvipJsPGPEvs1Utj3XHtrnvLEx57/vmSmvqzkapOTVK7Q0LLHTfCKhVr4AxfM0/9M1wRox1WDGoCxXOlcFUcPr7hKp9AlCAiL9FE+JgYBXKlnBk1U5Ihf+kxp2/EwhatRp3B2i9QPo2gT/fOLadb3EOckWQxD0rhpdC4R9yptdok5LYTpWIj 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?7nO0esCHFdTfEJzr4ggrnZanP+UD?= =?utf-8?q?nHkkOrEZ/4enXRzrjh3aYQu3jMoRNMj/BKHnZFWiQUi4wkGZGYS61zuMGBhXOKdTY?= =?utf-8?q?/261orn+WgUKEmf+eBW9C2kt/5BG31z47uKLWq62LHdDNgbuslW4jzSI+cNjqKa4+?= =?utf-8?q?Nyrm4/Hze1pe8rEvBbnKQL4eD/7nWh5sR5zvT2eWSGNQWv0f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yEUvT+4jchiaTi+apuJT?= =?utf-8?q?7rPdM9xfziLRyVyotJRpU4WLF2tNuMg8QcvPl0Jyp6xbzk2Qx63s5kHAXSYMnF1bb?= =?utf-8?q?LHiJKpvRn4Psz/vub9ckENlQu76dNwvnEnsd5XYMsyjLeM7inil5MW593gYg6gFBx?= =?utf-8?q?luioJk//BGRDwuZLI3+wU9IjQT8cYqBr8vPqWT9sXUJOdpvedydVIVNsTTIzfzPBi?= =?utf-8?q?j/t5qht/E8aRUx1JCgXf/Yx8nf2xAc6soxPlUAY38f5iAT1xIwO+2R4OuDEC7fePp?= =?utf-8?q?xmhp8TmPqE30laX12hzK5zXyOb0ALf8YAPUwj6caW8lHK4Xwmcl8sGi/wLZi/xsuv?= =?utf-8?q?BmF17eXBIJ7FLKJdVUH7fMpDvtU9cGgMOXCAeBYGwqoTbhriGrcXcuPRvn8nzL+Ks?= =?utf-8?q?8hayRXTr1JIdehY0A0GLX2MPDO9khox1c4/HDn7Ui6rQVlfHVyxSr4cmLs3bVJKXS?= =?utf-8?q?X7J748GWIVfl?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 504479c5-62bd-4fad-ee8f-08db8e6f5604 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:43.9712 (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: sP0v8KgV8pKs9FuGCjSp2uXlfa/oStMREQ0JsWegP2Gi1g4nVHf0mnWE6HNpsjU9SsnzqmHjAclSe7RfaUD63Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772558535345195818 X-GMAIL-MSGID: 1772558535345195818 |
Series |
[v3,01/62] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 27, 2023, 7 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> Acked-by: Michal Simek <michal.simek@amd.com> --- drivers/mmc/host/sdhci-of-arasan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index 294dd605fd2b..160bab0c437c 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -2016,7 +2016,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev) return ret; } -static int sdhci_arasan_remove(struct platform_device *pdev) +static void sdhci_arasan_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -2034,8 +2034,6 @@ static int sdhci_arasan_remove(struct platform_device *pdev) sdhci_pltfm_unregister(pdev); clk_disable_unprepare(clk_ahb); - - return 0; } static struct platform_driver sdhci_arasan_driver = { @@ -2046,7 +2044,7 @@ static struct platform_driver sdhci_arasan_driver = { .pm = &sdhci_arasan_dev_pm_ops, }, .probe = sdhci_arasan_probe, - .remove = sdhci_arasan_remove, + .remove_new = sdhci_arasan_remove, }; module_platform_driver(sdhci_arasan_driver);