Message ID | 20230713080807.69999-45-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 c18csp1680604vqm; Thu, 13 Jul 2023 01:45:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlFrvufbU5ImsmJVeOHX3CbMUNDXb6zlyGbpXs0jMkFJ7mT2oNINO3z4ZxAH5r87ePLcqExW X-Received: by 2002:a05:620a:484:b0:765:d53e:3352 with SMTP id 4-20020a05620a048400b00765d53e3352mr1107798qkr.30.1689237917278; Thu, 13 Jul 2023 01:45:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237917; cv=pass; d=google.com; s=arc-20160816; b=UvZ/DeiJfN1bPBHJkUUfJT/7rNz0nHHkh5s3WXN3N5QNGKYAaYz2I9cS2/H85T192E f7AB4i28Q3flzuUlPwo5kDu7ib39iUf1tBg1iaIjgvn482AoOD/AXc1XqWjM4RXcsPnb K/8dCJubqy+rmrLYzjpV+PV17gB1Fj9TQ+n+r/ibz0vHuBiWPDabUQX0GMRSrmBde99N 2vuH9kk1o7G4WGctvn+1VjVuCMmtD6d3TSmzKArnO5MzCv7NyQeAceX4f0Yv+m1ILafY yZzEX6S8HwRJTtIXqWHdOqr20Vp045WtgjdwvjAozTld+/IxORmj6lckYMAyqVt5fkq6 dSbg== 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=1xBenoS6cHFlJZ4Fb3iZ6ctod7pdPtWLiCXA+h9S9tE=; fh=S1ctsIWWA+NJBIV7CTL5lMZDVPIetpuI0q+HVSpGaEg=; b=r2+BF8VJk3p6nQ/PGIf9gN45VgqUFemlEMHhpPdvYwfN3ZFlCEz9cMYLNyBT2K9RrH 86EBXoalsOPSy8lzA5z78CmKw5qP0HHLVoA34z1IYRZAvlBs2zt4tjqnvzo5gtipwtbF tfHhX/k71wD2Wo00x0AQTqRZHX9DvPK4VYSC6c2hP7tY2lkUlAn4mbyKIe6ZUT39PhH8 GSu18MO2peKd8q7xhoUjEmNeXOXf2aXky5KjV51aHWnzuAw4xCB/Olw3Ivu4VDW1UzhT SIrHWH61n13N0GDtISkPc4RlnXpfd4yqw+IPkx4yDSULO9MZhTK9PxgYDuUbOvvuXfoB MVnA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=NYNnr1ie; 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 h6-20020a631206000000b0054392750edfsi4554631pgl.744.2023.07.13.01.45.04; Thu, 13 Jul 2023 01:45:17 -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=NYNnr1ie; 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 S232359AbjGMIO1 (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 13 Jul 2023 04:14:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234063AbjGMINN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:13:13 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2123.outbound.protection.outlook.com [40.107.255.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79A022712; Thu, 13 Jul 2023 01:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UmX0U0CvQUm+jGcUiAEPuI/nPvtRtygC7Iek4ki8pQPDlh94vorOKBtL3Dhhx0C5ruGMK+TgU40g+Ecx+Dl3LPrLMlSt11MxhcPZyqmK3JRX1pltm/AIQcFKPWM68qwzTWcQm4b1W9uYB4FPkV477oVnNduI9nhSBT3criKplic8/ntB1cklwvi+CXHuFYP0zcDqjWciMyvgZsp0msZT9RQPXluZT6/FnOOPfr6jOoaw0rWIexP0zSE4EqllgiplPsoIO5SBjOhmId21wI0TiJ/bIVfRrJ01GrLrNHeslKMPLaVZyTHoJo931MdGC0HnN9K13d1CW4KJgqakTs4PtA== 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=1xBenoS6cHFlJZ4Fb3iZ6ctod7pdPtWLiCXA+h9S9tE=; b=C44O2vWuKgsOjhvJSQrglhUZOuqseDWCM2j2PC4fnaudW7AIA9mn734Wecv7umxYeWN/VXfBL1X9/OYwWPsvb6g8pnACLB1+ePfNgXGeNVJaJiu94pNiW5lHyGGA6M6+CjrFR61Gjg8kFqO25wykB68qCs2wpVngh7s4bKV03Wp3OlgvsHELPn6hHrhAO6qEI2hnfRs1oV5UK6w9QM+nCVKMEV+wEA3TJrwYY1Z5B3BPBz08JV5Z0us0v1VQaefLdPQ3ac5hIpxTRGsKCqj6ceQgQaP9YQbdGydTMeIssXPx6BRw2IlhwPHEyKGL+uPqA7Tr+/xZRUKWCMmFg7PIFg== 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=1xBenoS6cHFlJZ4Fb3iZ6ctod7pdPtWLiCXA+h9S9tE=; b=NYNnr1ieV/CWRL9t9l3VunDRihKgKZQB3oYr87SMfqQAwMGKjJlaQRVAZ7SYGcymCcEcrR7Mf1zHANOnLZJm7oE2QBMO1vkxWQRzJdnuTLx7fau9cV19i6zbVixDbb+7mQET0T9c3IR4JPAW5xtrB6+F4tYpzP1Zrhq+La6dMwFs6suEU5aAo1Bk+IaUMdqsJLCGXebzNN4NC24YGJnsDYGgDKT95ePrAOA/Wi7QgLRazaLBa1uqhBtJHupoGmStQZzDOtfTvpc+RIIlWlO01lEOLb7/3MzaEMdSb63eZ8MtMCOPff/uGzFWIegQAdhkC95CXOEjIOsmg7sTnjGNdA== 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 PUZPR06MB5984.apcprd06.prod.outlook.com (2603:1096:301:118::6) 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:10:00 +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:10:00 +0000 From: Yangtao Li <frank.li@vivo.com> To: Jesper Nilsson <jesper.nilsson@axis.com>, Lars Persson <lars.persson@axis.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-arm-kernel@axis.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 45/58] mmc: usdhi60rol0: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:54 +0800 Message-Id: <20230713080807.69999-45-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_|PUZPR06MB5984:EE_ X-MS-Office365-Filtering-Correlation-Id: dde8bf72-e21b-42cc-eb7b-08db837881f5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c/4XVGt/kAI8A9rwIzZk01Dg3qv+q9k/a4s30fX7uJ/NDqsMNu65jpGwwzswoJkv2mRWYDME8RqcgdZJXbWT5TSU4bug3hb1BPeMZURS/RggTsH8uuDpmb2vxpt0kE8S5a2FpBcnFIdgE3YHhxphdrHDLS67bP1QsXFbqgqwpNnYacPIZGZKGMtciQ4/zmBHlc8SBF9UddYqVo0M5BclEEIK/WMxqrK4u8LSGYdhgpev2C+yzXjFIqzxoypuNgQTVhas2dYDi8A/b+y7Nejfw+WZ/Gy1u+rcT2iarxsK6ZxZKnqjzHdZDpfDN+Aj8e9ooRkZfsQSQyn7ioSUAlG74LmLwclRpD/nZZWg2T1WG2YRrwij2uELdLZTa5hBB8A4oiVcV+EXEgasw/htU2YY6VwV++QbjKYiRP59sd/H1N2lVgVohy/bBIm1hSbDGmfGdZ5s2Leg6zdkBxVB17S8g/+nXnuWvKoKEDxpboLddYGyYwpkFdoB3Hc94+Gac3GnyLT1KD1VbeLb3gCukzC0eGHhcoDgKPUSbUlFnxD+WYqrwfoR9NFKk8zvwnQxBECyeLjmwOhqlV0KzNWyo+cDbJ/jKN8/13+4b1hiDbdGai2tXLApOOZ2oNAt/Kba5Wfb 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)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(478600001)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?DBOhyMDC15gWg1Pm4zvW1P3EOh/S?= =?utf-8?q?6rdDGxNR7jueVm/Vmdf9snmssOtcyyfJbEG4tZE489Rw+YaCdgKIIViCgQtqwuTbq?= =?utf-8?q?WuLYA6+NfNKciOAY3pkfE6DBqp/9QpZkN2/8q18AyK6wAodM8ietdXZBhFmdTp7pJ?= =?utf-8?q?cz9EbMNyGKf+mIcWJz36CnITzrRrR3SH4ETt943n9Vw8UyhsllPxrf8bM2BXbK4WF?= =?utf-8?q?0a5MALN6o/Gks21LILz2FfPtVhIGf0Y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1eEHp7ZurZ9N/9ma2Bq6ImRvtrfGHIZdLzMb73z?= =?utf-8?q?Gcv+HvxPhWb8Brwgwj+WQWVViE2HbTNQwkfu79Fs8PxrPpSJADfUMa5cGgS22KDk8?= =?utf-8?q?DqoJ/46UD9uxZhikOrDcDsNKyoAvzP281oYEXT3kg4IFchbImhNQwWMmxrvsgx4/S?= =?utf-8?q?SiaXdpFtHT/xvBlwZs/S38O/M+t1nPUkPBIC5c0JVkjYF1PL9mGN8gd2x6mvVAJVT?= =?utf-8?q?ZEnAWqQ/TGeheJR4vZVkWn5dI4xUIF6I/E9tyyx5np/yUjfV8GPjSJngaIyMKYWBy?= =?utf-8?q?h8Rs1sfqLlA3YpuTPeTYJ95h18QpIrcOoobJ24YQOTXKMpHye0zZJH8fAdwYiXUG0?= =?utf-8?q?dsL+fDD8e4TD64y7wsHU6zdQHtI2arssJHUSkptdbBeGWqrZ2t95BA7kmZLfvaMoC?= =?utf-8?q?e9+l7GYUhMNT?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dde8bf72-e21b-42cc-eb7b-08db837881f5 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:09:40.4184 (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: nULjHEMRtraFf4TnfdJndH3Pl9FiPUrtVrQoQ+aRmWWSAzlV3Zpj08mI7B/GMYSXALtNYx7RoONSZL0S2qFI7A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB5984 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: 1771294338708480695 X-GMAIL-MSGID: 1771294338708480695 |
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/usdhi6rol0.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Comments
On Thu, Jul 13, 2023 at 04:07:54PM +0800, Yangtao Li wrote: > 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: Jesper Nilsson <jesper.nilsson@axis.com> /^JN - Jesper Nilsson
diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c index 2e17903658fc..6e421445d56c 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/drivers/mmc/host/usdhi6rol0.c @@ -1884,7 +1884,7 @@ static int usdhi6_probe(struct platform_device *pdev) return ret; } -static int usdhi6_remove(struct platform_device *pdev) +static void usdhi6_remove(struct platform_device *pdev) { struct usdhi6_host *host = platform_get_drvdata(pdev); @@ -1895,13 +1895,11 @@ static int usdhi6_remove(struct platform_device *pdev) usdhi6_dma_release(host); clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); - - return 0; } static struct platform_driver usdhi6_driver = { .probe = usdhi6_probe, - .remove = usdhi6_remove, + .remove_new = usdhi6_remove, .driver = { .name = "usdhi6rol0", .probe_type = PROBE_PREFER_ASYNCHRONOUS,