[08/58] mmc: dw_mmc: hi3798cv200: Convert to platform remove callback returning void
Message ID | 20230713080807.69999-8-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1677483vqm; Thu, 13 Jul 2023 01:37:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlH+zHeuT7qv6vkrY4NwSko9n1nsAurrHvDFVmF5cwzhnffRB1haP5t3yMSX7VU79b45DZAw X-Received: by 2002:aa7:da4d:0:b0:518:7cf5:7ff8 with SMTP id w13-20020aa7da4d000000b005187cf57ff8mr1203323eds.12.1689237459808; Thu, 13 Jul 2023 01:37:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237459; cv=pass; d=google.com; s=arc-20160816; b=ZO45mG5Aek90XAWc4BFmPsdCyFK5+DEosdp8DdN4SQJ3ZgMM1w/ZZHLY7GUaN/USbj RXrcOztQf32X1nRzTY/wPGpphQ9GeajkvcaFaVNOX86sqkN7+WCf8Y9a5o6cXdfwsFL1 fGHlGwP1I3L5rgkWgljVaIaEV3hY5ZyENOsu0gVKqL2H121hyDIN/+AKOUlLTZW7vB2J 2YbtNzyjHyAfPoHOTuKxc7dl0Kz4VZxV1oaL2AGUkXea2NO6Qq0K2zdy+HB013fiyAs5 RHtm/7980yUYcGIwKg3BQgQfy/9yRT8ABU7Zhpk6lurAl5b37OxnSRf/8M+TPID66ZFD Z+kw== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; fh=vEpmipvtuUUFFWbFJZgk6ER9IoVi7xyBonilERpGTtE=; b=jxlmql5MKuAiMkfuND7qogvqrX6S4i3PcFiG7tkKWcJJlfuB1NHbe6BcXCU9dDv4cY XQyomr7Up715fiR8lMzukG8pzb7NvhCUSFgj+E42axjxYwNFl2YGFsdUIWtkn58dfNpQ cTt99asCc/hMqDn0iU/VekybMmb4Qv+YJY+kJapbHbhjyPPI2ycBBDuluzAcJZ3I1b6Q /WEMy+Xhh1gv3uVWvd5f1gDiJdhO2qf/GIqojimolZZCt2YgHNtcl2qXY7BH7JNJUwsD 1v8TCnIL0ubMWJHZtlrIcypY6/btf2Q/XRntqMu1suqHIbvMq1IGzn5Vs+WULccpkDk2 isjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=pl+acn1c; 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 d4-20020a056402078400b0051fea43cedfsi1789671edy.384.2023.07.13.01.37.16; Thu, 13 Jul 2023 01:37:39 -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=pl+acn1c; 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 S234098AbjGMIKm (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 13 Jul 2023 04:10:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233881AbjGMIJs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:09:48 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C99D12D41; Thu, 13 Jul 2023 01:08:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TYI7UOqfntP3lAzRhHBWEC8NvP0y7VqIEmP38m5h0qzVTGp8fgFtjAu+UP/tf/pSx+WyVJKPA9QsAG3CKijMjmZ2QLZEUQOuzZXMTYC+eWthcaxu/HZS/MxVcbRTD1xsVSixU+ZBHvIQdzhzjZNegHWR5u4d1SM+hj8WlnNjN5+gaYaX2DtncZmXqcj0eTF8MRdoYTNo3kfsYtruplDMa2LkXKBMYmM5yvMa43S2qY2kJKNsAnPFfyU0mdHQs0dbvsRiAehHccnfMBeF/z+HnfxjFINFnlHmfGMyJfkO4ZQPgyHh27kWKwS4G1DDN3ExKfFbMjToJJSt5NcYsfYL7Q== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; b=LvktVay3YTVhdTqxYwhVJBuKkSCu50aNT9UMYHPlVRrZ7P8hShM0Mtca4TcMFRJqVRMx+HuaoUXqGJ6fP46+htwNc4ID2SwqmWKPVgEoEoVwPFw+Qtucs+NgdlZsbyAcTKsHKTAzsQaeDgcl+N+Ggtq7P+mSNYmjaBB/dLbzrxwJUbaFyQypkgzae6TkGPDQhJG/yOMxlaSMR8KXmhYrE3/6NWbWvqNUmJxN2GA8BLEJGwtVZ9U+cj6TbuyaNG0YspR03+ITw6NQlYYgAaxf6IMNdI0BcbZAARuyo+rwffVDRqPqd8FRdPsrm+UyCiPDkdY2FUEVz9JIQG0RNlcWug== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; b=pl+acn1cSrbxjBqOq3SwzoPXf0G2eXIdB0v5lO1bMtNWpNDUXKutIN87T3S40kfQWSF+FXPw5gmwgi7lLUGT6MYXgUL5py/n9KH17nUKdFOuYyXDTSSBaufx1X+x4cGzq8b2GIyObyDgSyoc9IyD8ruJQyX0QqT6uC/8417fJ7qyi2N8TkQZQnfwTFzGjtv88aCUQPHK2kIJI8xHz/Qem/2suHqfC/rHpp6UYT36gEPUs14IgymQuupQ/wui1k4phL1H9m8ynSA3LMRhIcdhMWuEY9NHVvoikGAUZTsGkT7o97yxqvwLMYXCJmaCjdkHIGnPgwx2YAZt1J0IX7D/LQ== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 08:08:33 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Thu, 13 Jul 2023 08:08:33 +0000 From: Yangtao Li <frank.li@vivo.com> To: Jaehoon Chung <jh80.chung@samsung.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 08/58] mmc: dw_mmc: hi3798cv200: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:17 +0800 Message-Id: <20230713080807.69999-8-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230713080807.69999-1-frank.li@vivo.com> References: <20230713080807.69999-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0091.apcprd02.prod.outlook.com (2603:1096:4:90::31) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: 1195ab68-5db0-4687-d3f8-08db83785a0a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fK6oeS92wjovEoWqY5W3bDstCdV/+St2nk68mW00A+oOsvabjR/UnKcpBWsTLvGCeGS5aTSkDUeopleuKiO/3dBO7M9SKWqnaEXbJSrBvY0qMz8oBF+Zc91gSRLn2V0cN5XYXcRv8q6TqgF6QYRhiCxjk0paj6LdsOHelFzVmy7DmerumZ/kGef2HZU9AU0i+C71AQzCTPt7rB2V6LtSkmGOuLLrWQ0cY0lh0wIlO+hlsXz3TTkJDTH1J6lM4lwqej/HMH4WgBRQS5eWXJvVhP+TgdchtUX6J96Ln/WM9dlptS1Co9aIbOAI/sHac8cjpGYiG21PTgzTk1R8oUjEQskt1SWANyWH8K6yD6kJt/CacSgS4GdWvbpF/+45PDaseC5j4PoEmN1tD81htf4nUfuskxqXb5/doGVI88wLNwsP/CAkNnn7ekIG+nj75KF6JiVlYjxP0DgvCmFm6M3NazgsOEz3utpq5YHVGyfEimDyLCfdQb9n8mb75zjTVbU6+HHb8i+TcMxuj2YEeZO3wRKprqGiN46J8uctW4OjKLo78IKi+9C718zz5hyusVgbMXaCyMev3aO5NDP4tOU5wboB2btJeFqeVbB/42a0R1NKAj7QFtiW9xGJqSWwQDlyQq4BRo8UvrJCEoSslOvL9+vD/ZJHNvNoWMnJ8QwMuFI= 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)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(110136005)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/cM2/N+5j5UejlRRs7k1nC8wDh40?= =?utf-8?q?R72XrPV307McyUKQWUEoJAcXi6tfp50Invh/w5HA67yWQynvo7kA8J20QIIbbsZZl?= =?utf-8?q?X3EgFj5ofqWVQ7nwisXwDoc3f8Z0kMF31E+0C4kXMgbksgY7nWWPCgw/svF9GXECf?= =?utf-8?q?pVtsuAPxpV5LAYcBX6sjcyOJJdgFwwygLMBAQevBMjy+LZJzjmIcNlH27ixYfuI/W?= =?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VIOWehp1IvTU?= =?utf-8?q?ec+VoA3ynU5bsWwwuAOfucp6aJgHL3ZBnR9HkNTFPdW+PcPCdkgxfvIvwYR0Cpilq?= =?utf-8?q?MND+p+y++LMuNPIAMbeNCJopn1h+I5S13pwDFQb850cihs+jKHc1lJuAwBvAXeBAk?= =?utf-8?q?DnDKTQEchZrSDJ2+LDN5zyim+fQAZ8Hfiu3HeqUzvx6SzYW8bE56zKnq84sgzaAIb?= =?utf-8?q?bRdAJb5HwkEoYz52H7k85PsFVYKQ3hT+iJ/DpmPxoHP4SAiUvxRJHmgqXf9j9mlVX?= =?utf-8?q?FnoXYCsr/FCZwBf9KroufvIg55eLMI3oiBFdZQdTAsWaHpXNFC/qWnWroZ2YGLj/a?= =?utf-8?q?hUzxNyyMrhftGhz8m4xNUEzWKoRVP+LOcPvWatqe25DHHN5fssOxKcU9yr0f0SXcw?= =?utf-8?q?g0jnlAaFRt9CaIdwLFV23s3nj3grk0sWyiO5Z6scWOKc8gJyt8E0SKqfo4TMYWapz?= =?utf-8?q?QQoNpDuh1zbW?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1195ab68-5db0-4687-d3f8-08db83785a0a X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 08:08:33.4432 (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: vsi6rngAUDWYJnYUC87jBv0E41knxjSeE6sVhxu7X3QF4hPv8mWy9I8Qj8YNzX9GUq3xYC+3+OA+yBCscKyLVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 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_BLOCKED, 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: 1771293858378000150 X-GMAIL-MSGID: 1771293858378000150 |
Series |
[01/58] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 13, 2023, 8:07 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>
---
drivers/mmc/host/dw_mmc-hi3798cv200.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc-hi3798cv200.c b/drivers/mmc/host/dw_mmc-hi3798cv200.c index 6f22fe054087..e9470c50a348 100644 --- a/drivers/mmc/host/dw_mmc-hi3798cv200.c +++ b/drivers/mmc/host/dw_mmc-hi3798cv200.c @@ -171,7 +171,7 @@ static int dw_mci_hi3798cv200_probe(struct platform_device *pdev) return dw_mci_pltfm_register(pdev, &hi3798cv200_data); } -static int dw_mci_hi3798cv200_remove(struct platform_device *pdev) +static void dw_mci_hi3798cv200_remove(struct platform_device *pdev) { struct dw_mci *host = platform_get_drvdata(pdev); struct hi3798cv200_priv *priv = host->priv; @@ -180,8 +180,6 @@ static int dw_mci_hi3798cv200_remove(struct platform_device *pdev) clk_disable_unprepare(priv->sample_clk); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct of_device_id dw_mci_hi3798cv200_match[] = { @@ -192,7 +190,7 @@ static const struct of_device_id dw_mci_hi3798cv200_match[] = { MODULE_DEVICE_TABLE(of, dw_mci_hi3798cv200_match); static struct platform_driver dw_mci_hi3798cv200_driver = { .probe = dw_mci_hi3798cv200_probe, - .remove = dw_mci_hi3798cv200_remove, + .remove_new = dw_mci_hi3798cv200_remove, .driver = { .name = "dwmmc_hi3798cv200", .probe_type = PROBE_PREFER_ASYNCHRONOUS,