Message ID | 20230727070051.17778-58-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 t5csp960019vqo; Thu, 27 Jul 2023 02:06:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlHR1/nWmg206EDLKAeWpX6UTxILLROkpvNMF+mzdbpC44Sk3oGYRQYuOQKwxn2QDtn70s07 X-Received: by 2002:a05:6a21:47c8:b0:122:8096:7012 with SMTP id as8-20020a056a2147c800b0012280967012mr3943233pzc.3.1690448778209; Thu, 27 Jul 2023 02:06:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690448778; cv=pass; d=google.com; s=arc-20160816; b=gdG+CH8vN2fGpO/LH48wPjlHwbz9GzMNFIGKBqyM6x9djaiNj/8IX9fBA/u30jFWkY gbm2QDAZ6rV+yLbvllB2MzvC0DL77LEQGVle7AaSl5iVgAx4Q4au1QTzX/XNMmJjo7pf pYvFxpgFdYB3v+PCFScTDuu6BIAGFrhqEz+QkKZfIJ71y1rVquwIIbh0zyr0zGOODBdH TDbnrrEj7Ab6AKCtwRSlVbB/Ff+VkA/xu4JaFbXYY2RTNprPwWboQeEufneXOH9yh6t/ +VF8SdN2wrXxxXSt3aykdtywBBYowBjZCMfsFKwjDbNnuoH0FEH9YDIr8++IR7pBAdsk S+Fw== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; fh=7b0Y5Cx3utyrzaG4S8aa3Mo2ByBxutW+yB8187lmbIY=; b=lvNtP1onBFS/pCVIx8P8NE+Py5Q57sh3qResioVKvoZ52/KzeNVJNhkirLmlP+mgJT RhPbVq2HLlyivjEJJ9dkVeGUw78WuSBdOjEHy/urwkM7SdbYZNGfHh9SLLPWp1dJc5Di ARWkrfxC+qnzIPt/dXbDp2IbAQQ9RxH/f2dtjz1httuaTZOdH2jqSZsMPlcZrxif8EuA kOgVxp7ZrkmGxXibmiHZtAczhs4QhXZ5uh2vHmoUOnzO1ZXxCYYh4UxZAibCv8hpVhtm Sj9Gm1Envj3rLht6+d6GWRx6t6/XGUp75r5uUgY/2EFbrrWo4FwE0BipSvWzlBUWRrta yHvw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=X4uEj3J0; 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 t14-20020a170902e84e00b001b521cf9578si1082392plg.443.2023.07.27.02.06.04; Thu, 27 Jul 2023 02:06:18 -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=X4uEj3J0; 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 S231735AbjG0HGh (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:06:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232909AbjG0HFg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:05:36 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2090.outbound.protection.outlook.com [40.107.215.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06888448E; Thu, 27 Jul 2023 00:03:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QrMGg0VoNOb5BL9E4PkFmGzJ6fs3b8malkIC9PyGqMJlsHrOKAfYcDBYr0XwLf2t8wUA0reCMqOy/WbMFHYAi1ptnNzYWsoQwS02380IX75xdy2GUdIregF3JiAWX9sXmWibFQFjMgDslxJbwQ3UPbDU7Kh7arzhapc71FxtioCYkqW0/kO03KFNgqGLKKjj9P/LGUKTF1nFMR8E72uBdfZQChIDouBGz6k8+WpQq61mjtM3ZZKhpg4xbH1tWyyre9E0Jre8jsXVxVtcrGtHILtt/rJGMV6EyI8RxlZ2hqObr1j/Ir/78qfwppAcGcdCt37wsdl+pYPeD+W+V8lgSg== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; b=MeeaEKrXaEshNhaf4YMer+1fIeDuPs1WJrBEl9w1Z4MIm9oL6GyiJPZPB9zfvm0pEzJtWCTviMeBjkjjolVIZ5meASObCqsVe2fa1LCalGump+qqrEyHJGWTCty5aAvigQf8uc6fAuxshMpHFEYNjegZcq5Aif5tcYTCRgORFftYqVG9Xwz7bcObDa+a3tyrDzmL+Bz17KpNLpPSl7kl6iE7rMCtjPi25GUkPGaxt/6ihy4XATGR/N+m0Fg5owfeUnTIFySpjkyTi5MvZmYxcTq+04eVxNoq9vhrQ/+QXCIiz86+pPC6H1l+02dJCXE3hVr89ggCX6crGRw/fvCHvQ== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; b=X4uEj3J0X9lAfGTbA5/KCkv9O6ofhqPNtdRH6syxfSj2Rfh07FiAg1Ubxj0GKIJ3WXEj1DO29pWpdMqcVFFbNJbDWlk2woN/J27+sZhjqoO6iShRyrEJ6fF/xSesCLML20KSilQnYPTDQy+58K6bUP3VqmCow2FBlIyV+LoDefrFVRI42UGVe9GN3tFKXjppt4PAGGoAED8ntAvfm+wkI01svaLra37vwZZ1PGPbltluO+6D+1ML3TfhPkXJ4enmMU6Dx9bPihhBbvZMWlms/6GmeM/5ofvO9gv3lNNgD1Pl3BvKBZj9ktpk03KEyX4F40X/wR1I43VQS7Z+5MP8vg== 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 PSAPR06MB4152.apcprd06.prod.outlook.com (2603:1096:301:34::9) 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:02:46 +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:02:46 +0000 From: Yangtao Li <frank.li@vivo.com> To: Ulf Hansson <ulf.hansson@linaro.org>, Kunihiko Hayashi <hayashi.kunihiko@socionext.com>, Masami Hiramatsu <mhiramat@kernel.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 58/62] mmc: uniphier-sd: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:47 +0800 Message-Id: <20230727070051.17778-58-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_|PSAPR06MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: f64abb1d-ee8b-46c9-c092-08db8e6f78b6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hzCw2saiXh5oij8OiezOTxeXiP66wLtzh2CijXgl3EuxhEXJAw6cUAgzahhs1pT3dlzPrgt0fvq+ExwVaNPPAeVIJAXvXrlqIF9gqXGATks1qAFuJ5G9NJeON6W3f0A4BrR/OdOBP6DWMF3L8zNmzU2kxy5KgfxI8MBsqjL5Pdw0Zry74P+BwRut70MgYDgBWvD1wuIcBT/84OzxCIA7N30ghOKlFmHX9FD2IkCku3taWqQ1hTPdTr4UsRNtdxSudO+6giexUZwguuSxVDGzIA+aVKXuG3DvUhfD4DD6SFMMLFjjEmXdlAdl55PNAPnGSbGJXmYIxp9YttMc9THY2j3PsiYYit6dq+7yMRlauw9PZ5VFebs//s77RhZqJxxj5GsxQ141vH855hq/vhvhXRTpkB1YEceVdjJiquvTleD2pi22mQK39v3btyIMMVK7QJt3tKGLS8WqGerhpHJWw1x8AMjTbE+6ZREmXR62BSvBtBAu3Nk2E9c/4Qs69cF0Sci+aVWvPY5YMyI+88QdkRWUbz3a7fOf4PsazMAaC4QzUiLL5Ob34DgPTaHEj1dXJsFSRFbM3xzOf4XHFmstxV/eZTrmBKxsW6KaxhZx0vdMiZ2bKwftU/efZEjC6vyS 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)(366004)(136003)(39850400004)(346002)(376002)(451199021)(6486002)(478600001)(52116002)(83380400001)(26005)(1076003)(6506007)(6512007)(38350700002)(38100700002)(66556008)(66946007)(4326008)(54906003)(66476007)(110136005)(186003)(2616005)(5660300002)(316002)(8936002)(8676002)(2906002)(41300700001)(86362001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?5gu0n/9CYi6dFrWw9e8kFXgQWCuk?= =?utf-8?q?85DubcPVnkoECNN6nJ2Pmz3R9+Bg6Za8G8zap6fPRDK/cZznqP9UGB6KR7Dby0oDg?= =?utf-8?q?xsEGHNdYsPpWkKkdgwY2K9ueF3CoHuY2vxw4PNJ7Ib9KB/JGwDSvYhR0nlR5f3mJL?= =?utf-8?q?JbKOG7+qApA+CxHlJqFZ0p2BR2oKqPJjGPed7b9iFCMXRCsRMjA1cgPKKTbk11KdU?= =?utf-8?q?j/6tznTUKC378tMovhLYrpXxZAuIY/tMHYShJcqozTrSP2j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WunKp/aJCkRy2Za0?= =?utf-8?q?KEsdGz1/BCsdKaz77NzkmMienKDT6nSKENAyOvPGBz6RpI3BV6+R6EoL8i5FOnuPz?= =?utf-8?q?Dk/RiiUM8Swq8YXH/K2vJn8g79KQQqW7RqQ97n7UUXO+l0/YYf2y24Z4RMw29Y03R?= =?utf-8?q?7R1pacy6O3m0x0mC9J4H6EhggVRG72s+g6XxX5DouoKQTJiMmxI07AcHC80G0zJMW?= =?utf-8?q?bGRHTUXZccK83zkknEYrtWw8HzHFWRzS8z7ExVt8utaY992L/2VxaX7t0uhZS0CKL?= =?utf-8?q?/ee2YuLs6H/J4GUOcgSZ8HQ82wqzQHJC/h39yvNMdebHhzjgwpHVdHcEkW9BG/gAl?= =?utf-8?q?iIQmIv2JlC+HyUkS1PIN2YggP0737f8phKq0TFCBcIoHyRq5T2ei7nES1d2cY+n6d?= =?utf-8?q?KUwIvljWi+Uk?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f64abb1d-ee8b-46c9-c092-08db8e6f78b6 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:02:42.2000 (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: /248dpgNnj3tYJb7auMysIoahVR1WPleQWcFUJpMOe4B2EdSbPJEhzYPlznDTuSD2QjVjefggUnPOV6nPWhSFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4152 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: 1772564017888746127 X-GMAIL-MSGID: 1772564017888746127 |
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>
---
drivers/mmc/host/uniphier-sd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index 61acd69fac0e..33a4d1c6ef04 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -727,15 +727,13 @@ static int uniphier_sd_probe(struct platform_device *pdev) return ret; } -static int uniphier_sd_remove(struct platform_device *pdev) +static void uniphier_sd_remove(struct platform_device *pdev) { struct tmio_mmc_host *host = platform_get_drvdata(pdev); tmio_mmc_host_remove(host); uniphier_sd_clk_disable(host); tmio_mmc_host_free(host); - - return 0; } static const struct of_device_id uniphier_sd_match[] = { @@ -757,7 +755,7 @@ MODULE_DEVICE_TABLE(of, uniphier_sd_match); static struct platform_driver uniphier_sd_driver = { .probe = uniphier_sd_probe, - .remove = uniphier_sd_remove, + .remove_new = uniphier_sd_remove, .driver = { .name = "uniphier-sd", .probe_type = PROBE_PREFER_ASYNCHRONOUS,