Message ID | 20230726040041.26267-43-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 t5csp184109vqo; Tue, 25 Jul 2023 22:15:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlFdB1FkkUBUK2ByQbSbf50tbrhM1HWhu1lo/a2CkV6VR5Gc18VIdzw/HYekK6N0fR4gs8HL X-Received: by 2002:a05:6a20:a109:b0:133:e3e3:dc07 with SMTP id q9-20020a056a20a10900b00133e3e3dc07mr951685pzk.49.1690348519837; Tue, 25 Jul 2023 22:15:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690348519; cv=pass; d=google.com; s=arc-20160816; b=AkcUxsRI1RYHX5T5+U643+tZncroEQksrHdddGlOLXledC5agPJN2gWOUOt+sSmHzJ CkX5/az8DH0467fGOrW+SpIXUuuK0z32JI4T65InbBoMBewArfF8eoeTPTi4PUuOUe/s gEmnrzP3dTCJ3F9Bj33z6m6CXufDPFfLJGGe8DVkzboDjUEF331Ox1S6p9xP+PNmSkY2 C4WUmcR2m6nnktiLXY1eWQ5dx5zQkSgjs8/NAnxMx22hHfSI8EntX+azs+IcgL+hHK9C aqSn/0dJK1llLfmIUqry0yLkyIZlzBgSD34YAy6NpIUvT7X07l4dlX7i1CCQyr/bMwXE fDGA== 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=nsecs0FraqEkVI69yYtZuIhcDu7CE/3dvX42vrGL9bQ=; fh=5tlb3WzwAtkLE5eDOyUXCz3z4PbNopcGbo7qPwjRx68=; b=v5F3eAom54EqmQeIWHQZGaMo4VvIgIlVhGycW33wlGd5FiRTcCQ7HoI3KUXCCTCLFS aHnCXymdYth+UP78/l4ffq5Fm4C2nnoM9z5m8t5dNoBt/0y3ZZWfu/KDZ3BswqouOE2N bCZyf78czFFvMWa11mBq8rRfdtXpCxyr9jCHWrGrn8TRLGEDoE/wt9Il0SdPLzQQ47Bt J+AZgH/P4uL4tlVqVQjY06DV72mJEdWLF0c+cZ5i0tqTtcOB9Q/RGrX9uOmjULuTnsc3 wJmPAHcUmpSFpakjuWgrp2afRwbmBbjW7gIP/mxCHkj8u76rseHtKRImJR1JNEzrvQUW ETNg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Frovvrou; 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 x5-20020a654145000000b0055c7d9edbc5si12389401pgp.174.2023.07.25.22.15.04; Tue, 25 Jul 2023 22:15:19 -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=Frovvrou; 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 S230258AbjGZEId (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Wed, 26 Jul 2023 00:08:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231176AbjGZEHl (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:07:41 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2070b.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::70b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AAA24C23; Tue, 25 Jul 2023 21:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ddVRsjz0BTfKBE2Ot4aIDiqZLO2JnG9AfSaSGoqhSGwieRAXlptPpLdV9z1UAcvJ+BGkYChbQgI7usJdVLqOvuYa/+dM15qUV9sxbEKpbQtZD6P7siGtkZIhpyEi65RD6hy+wGnboEaIjY0MuCjipH38ck44Iq6BzwI0MEqaYcGEEUCwsj+4MPw1viUyhdcQdTMgxVrdsw2HB3fKx17LAMyW9t7+vAakgKyg1KdKw/EX4A14AsWUvaM2n9MtyxegEs6fmc6um2KPbVFDtd3cvAqHwEHYKdaNHQmf+LfiaqkgVvk4d1MB458TQ0WflAsA32bfpWlavQixvcf8F3x4Iw== 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=nsecs0FraqEkVI69yYtZuIhcDu7CE/3dvX42vrGL9bQ=; b=lcGInNIn1daum7aPzhd0S+sCrJbLEWlA2pxieQ6gJQLLWQoINnoj3C6sdFoN1lEhBzNQswNT9WOixG34yg7vQG36dq46SOefsr7/76Wdhzs7o4tKdGEB4alI9SbZTauFEdQqhh2jsBpgsX1cseqWYpRbLBf8RxSf7VsXWAVT5UYdqiw2UR4DmotznhkgN4gQUNQWVUyNzBPAkibrsE3ejGDNLIT708EKO01oOuw108Y9njBWZ9HAl9DVk0Y056WsvkTj1aSVkArF6T/Haw1ZRK7PKjFDLi+mtI95z5g52TzObWZl1NrnXYwRfm87UdLb9YBzZVP+AeDodtWBiWuxVA== 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=nsecs0FraqEkVI69yYtZuIhcDu7CE/3dvX42vrGL9bQ=; b=FrovvrouhvcIgVgCtDFuShO7t35t/7dQj2XO7E57ToUMDBYENC/UHlp79lhJF30JW4mR2GapIJxFZC4+z8WNTgQh/KzIk903bNI87yN9icGNzBEu2Y/k7WQRZRcRzwXItN5ht5pCLfPFhELGECS+b5taYdXs1W5DczNgzU8LQMX9blHGVUJIMAzbZEoFCBLLqC6Cyn/FXhmmnY+4YpxCSgc35cqJwga2UoHDF5FBw5TniCmITdjf96CE9gCN7zV2Nz/hVvfeRhZPGt9eCUVW5y/7ngkC3KflBk7Pi4nXr1ILediyDM6ASohn7G2a6oTYSAt5e8dsadnbNiVRBBtBZg== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:28 +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; Wed, 26 Jul 2023 04:02:28 +0000 From: Yangtao Li <frank.li@vivo.com> To: Ulf Hansson <ulf.hansson@linaro.org>, =?utf-8?q?Andreas_F=C3=A4rber?= <afaerber@suse.de>, Manivannan Sadhasivam <mani@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-actions@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 43/61] mmc: owl: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:23 +0800 Message-Id: <20230726040041.26267-43-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726040041.26267-1-frank.li@vivo.com> References: <20230726040041.26267-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 6190c62f-deb8-4770-a388-08db8d8d180e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EOb1sAtihy6ZYroe+Le6swXes4AO8x7s0EG73WlKiiqLCqYQL5+XXapIYL6+vm2XCoc4HrQUMpi7W0iuYM8kSo/x1SbwUu0nus9l8vbaOudzaPGYxEODh2Bgnp5UcnY/yNVNwmA3MvdBcfawwq0O7Adh5N+hoHgQj+rq9QVnezpeH/mMY0lF6T/+QVoMj2i0lTq2XThTktHhmoDjHodak0hxMjvY4LxrnIpEgb6bD5vAc6q+OxgN5vut0XnAz2DrjxOWVszKD7aNDPRA4ofp58BqPKITRyL1Yl4/OxlPQRo2xySFIUiuIiBNoSBZvwILm0dl35FQF0AJ5LAiN4o/3cTRHaLktS0itQNiUgaNssOSudOmXkJ66Cs/p2vDU5ZSh+skn/L0nnJfPrHpOk5OQBAmBrRCUmhlcR7nKa1nR2fzZPoblwOkpxazjaT01pqVCCsjpwjKKDIXi8m00PrceCazN1mpgz5MjFbG/vsK6gHlEPR9JWhxd8nmeDriLbg+OBNSqEjnKx9V2IdQNHkKTb4ZTpJdJmZ9rgLs3r7OdTDQJLcOmB+NsnTTut8TMaORnixeioszWH1YV3SmnTh0tjvuqiKkzru0NYdkFKbdaTRLW5+70RW85SeP95HIKFcm 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)(39860400002)(346002)(366004)(376002)(136003)(451199021)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?udahdcCFjH+moVrD7zeBZCB1M9qW?= =?utf-8?q?ajBepisIWtBF+xEh7WPeMYFEkXHeCamwL1TtI5cw3agz7JZoTG9kRjRxi1u1kSRjn?= =?utf-8?q?dk9m5BCB2QW7UpaHNz1aOu7us/o7//b8pnsDpMlSE68QEwgZadDBer59kANHDvXfv?= =?utf-8?q?2hW9T85DqtyJavIqX3OeR/2cMSIZy1gt3Sjxs8HFd7l9kiapmGEcbFh39h9AS55ES?= =?utf-8?q?bB3XQGhiJoFffO9YGQVHEhPLeHUNK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GTbEywkLphQ2O/MpfQ0zPX+?= =?utf-8?q?Fn2LUKMdV7xavQ4xCZiaDZb00Y/wXm+zg0g7uCjDMPV1j6qIrnFpbNLDXJJsrm7fg?= =?utf-8?q?W4mm7HQ2sIkPgOuQ2s/JZ/l4qPlIFNTq1VhY4T/1sLxol/cg+V+5eu8g2k92PxehC?= =?utf-8?q?nBla6wtkYHxVUQw2lT/R+CicBaO1UAXMG91FYSjVrgwIOuUw/C6O3y2ci3s5uCmR5?= =?utf-8?q?tT6zrREMnvCtIJo7iXhO/nk6k08AnWJQhc2HvsCIT99neIgk6id5PdqxO7D8iSnRu?= =?utf-8?q?LNlwmz1BP3IZ34YArAWm9dTuw53dsQFuSrEFSyi/oR4T8Vv3FSWkmclj2K8lHvpiM?= =?utf-8?q?yDY0v7LW49oRfuA/DNSc+xclQR9erDd/EFTVHoR8Q5s9mKNC8BkkipxhTlwoBE4Q0?= =?utf-8?q?4CPlGkvmVCI5?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6190c62f-deb8-4770-a388-08db8d8d180e X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:02:13.7839 (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: cOjIQOqcszs0to6zw6eKaVi5/M4JmjfDLlN7g2ajIUtSnRpM1wVSEJFT/SSWQXi875szgsruIb2OFfaB+gufzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: 1772458889393723450 X-GMAIL-MSGID: 1772458889393723450 |
Series |
[v2,01/61] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 26, 2023, 4 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/owl-mmc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c index 1bf22b08b373..a13bec42554a 100644 --- a/drivers/mmc/host/owl-mmc.c +++ b/drivers/mmc/host/owl-mmc.c @@ -667,7 +667,7 @@ static int owl_mmc_probe(struct platform_device *pdev) return ret; } -static int owl_mmc_remove(struct platform_device *pdev) +static void owl_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct owl_mmc_host *owl_host = mmc_priv(mmc); @@ -676,8 +676,6 @@ static int owl_mmc_remove(struct platform_device *pdev) disable_irq(owl_host->irq); dma_release_channel(owl_host->dma); mmc_free_host(mmc); - - return 0; } static const struct of_device_id owl_mmc_of_match[] = { @@ -693,7 +691,7 @@ static struct platform_driver owl_mmc_driver = { .of_match_table = owl_mmc_of_match, }, .probe = owl_mmc_probe, - .remove = owl_mmc_remove, + .remove_new = owl_mmc_remove, }; module_platform_driver(owl_mmc_driver);