Message ID | 20230713080807.69999-22-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 c18csp1679006vqm; Thu, 13 Jul 2023 01:41:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlG5oUi20zA8uu7xUHdSwWNHgUcYMmRW+wbZRZYSzsHFw/Dc4V19t1utSnrjGNyKugqWrmMy X-Received: by 2002:a17:907:cca2:b0:994:1844:caec with SMTP id up34-20020a170907cca200b009941844caecmr608267ejc.77.1689237687043; Thu, 13 Jul 2023 01:41:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237687; cv=pass; d=google.com; s=arc-20160816; b=HZ5U2lH/jkvNH/vAqmXvzYUWUHbxyBXLuHc41I5VDuRbTtVKwfuf0uKpcu73r3nCb9 7xiRm+aYOimNFFEbwo8xAcL3Q+MUK3SYyMtPjBYJ4lWNfVUraAZ8Yp+MrFgOIQZblOPH /G29vvgsaFHixy4HsdzbjeUmmaeL8zQZoFC+tgwe4IvUgm+R5F34tEq9o0EOOHPDV9Ux SAKRf+5n7J3GFvg2oOu2gcfXRETHnyNMKZIMvgEnh0VvjQMDwewVobkuht+ywa/FKv2b mmNiP8mw0LHI5+89Lh/+BJIz5jQBaKNY+p8i1DcZ0g4G+5M577uF40uydMkUoO21aIH8 Ij1w== 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=9QwyjiAPoUwvuuL+fTQzivWNofmwHauOj0YWTiKbAgA=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=c6hF9aDU/m7QFuh3XSyUtrLd5d1SlfwZkBPsvOrvgAFvuB1fdngDH7pfTLaJO5lreA WOSIRNEar2oOSViqecSr8iBKRIJpO7FXtvj3uzp+zPtCzTM2qnRK0JzIeYzfVTWyJJ4Q niVNgmy3c/yBPosq3C3QWcFvm94hqLR4Tghk9ZVaod0j3xOTXH9TubfoX7pz2NH0tp6b KE1Z9Qk8IwUZ4logiTz6su2vtf6qwxq3xL27kj/21SIvOSutDsS1KFgOuAv3GEMWack7 +qE8LtRIxK/XBUduJdqRbZ2QYgwhNE72UfDhg2D4jfAfGT8xfcOePj2GfkqmDiPxP/My ealg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=NIxWFnEd; 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 b9-20020a170906038900b009926007b7dasi6569148eja.126.2023.07.13.01.41.03; Thu, 13 Jul 2023 01:41:27 -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=NIxWFnEd; 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 S234270AbjGMIMJ (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Thu, 13 Jul 2023 04:12:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234156AbjGMILG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:11:06 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D7E0211C; Thu, 13 Jul 2023 01:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F4GvZhGlLlY0sk6xcr7aJ3+PMTXXqswuXI8MK+1oh3kh+YcC+ENfL7S97vzkGkettt5AFWLehr3GpwXn0oUUIemiwGeg7u1+uTcWFp4ox/EomcRNlOFOBOatmTSVOir/ar76adZ9GdbvofUu/34IFKqI5AwaECujig3r41qBxZ4VLER+NhElRpnzCzzPpfSL68+qWlf+T6ppuq30IGTLQlq+k9rCjk179tgydphgwHTmakbY8X38fqorKIcL9QM9Kl/HJUtlt3aqblbGhDWtevuxRkzd4WhMHxNCrEsF/GuFg8x8PAaDcAJUtpePcUVU0o1FldVHVAbEG0anFtjSMQ== 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=9QwyjiAPoUwvuuL+fTQzivWNofmwHauOj0YWTiKbAgA=; b=P/BX/mQzPNGCMgXyrxnJVUTAvqYz6mNT9PTnU7eb/3OzBROtwBH/AbrZT1UP8m+nZUQK5zcc+hYFBIR3cqB9YRCruAjew11fNtIrxfHkh7VG0NWC+wjKUxcnazMfOi4wC8qTNkWsh+NOAIrDS6K5tLyQJ5L/sfn4sQG41Nhed190TRbG99ade9A+AsKBv2R+FZIDa0aoAltSw751tPkQLelRmXDypmTPGO6vpTV1LwJWPyUwWd2LDFxx86VT54lpB7jgqVN6B73z2SozKW3aafcgsR1BUKZO7OXsvuojyy3+hq+LsoJZIzHZ9PJE8FqWQNHT6TkNDLEPMw97p1BD9g== 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=9QwyjiAPoUwvuuL+fTQzivWNofmwHauOj0YWTiKbAgA=; b=NIxWFnEdsi7ImEMNgnyRS/6b4iowD/3n0lAksEMajf702/m1dya4RQvUl741Cn6WUdokikcmOVzorAcex6U6gYwAj3FI++2yc+20quaON9AjhFTPr6TzWeweMgdqRo3F9/Aw+nqurV6Z06AW4avJ/vPotbN7WTTRkzrxlFks1t8E61KvyvLA3sJVXeinMS9onKlv3mOr2zVggBzbma0sBmPp6xJt9S02QBWB0oEJ1fHgyW1GH4Jw4nsoROLEm4ufweDPPy1fbSB4PpTWHuLVNcR1sSQPlsSMuEBRDYwBx0YiEgkdu7wsOBixWs+mkJ3p1aiN9Sw2UjYkChrvmd3qCA== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:08:59 +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:59 +0000 From: Yangtao Li <frank.li@vivo.com> To: 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 22/58] mmc: rtsx_usb_sdmmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:31 +0800 Message-Id: <20230713080807.69999-22-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: ce3dda80-e9e8-47a2-d90a-08db83786960 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s8ZpqNgGZWsAvpj5zv0DZW4g0RIy88w7iUfttGpusz70lRXAKiIjcqbaR3d45yMg85WWMgMy5rg7Ub9FVrLKnXLwLLbcPBfoMe2xA4wP0X8tC1uVg9P1A6eYczB3S+jiHRqzZw6O7aQKLxWvpFqkyxI1Q/nvMwno+bo21vd44aolWjlOhA0pJD9y/LbJ91s0T4Q0SfMFfMLv1JEEDlwMDY3h7//V1BXY66lGKyU17Phm+MOso34twYA2QSXB1QtHK7vxVhHqhmSMvXTZfeIgNucuNAp71E4d88idX1K1uqynEyrFuqyynvHh9Qc0wa3p9UkV0r4LhUzQqQacqwv3BGEoeVcBOYUWOGheFMu8VTQ+7a5CYXZVeU4sAcVEy8Xqf8kWHgT0sX34FxCM0ti7T8zk2TItZgLFjU7If1ReC9cQJU0GIb/UbpCaGa1jLmAWI82V/URakqRSZY1B6xqr01/77QERcbCxa8ETOxVQdVcjp2PXvZmYfiW67nxv8vxANysr6nk+qJBMGv6uwCVefzvXcZuiu1bR6HaVYqgmxSNwz1KRxq1YlinzTBTu5D8Q6nZVTlX6PDfC8CPgHaaNvExa7PVPcqZgXRUuAlFHKHv4BskOlRypGaZjwRaYLLlg 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)(376002)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(6916009)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4xP9OWFLeCREoTjZ/jAPhkmEpJ4T?= =?utf-8?q?v0HptNmOvKQeIKbxDV0AD9OJTOAKYkbSP6PzUO0G+DmFpt6IGNjshmSaZ1NIpYSpV?= =?utf-8?q?8tNSqSyVnt98hLSjeubCRCOfsOd0WSdD52MlPbSYy86F9tyzlhT1wmb/US6ud1ARU?= =?utf-8?q?r6nWndWnHAkQdPXtOKVgqhVa89M6UCQK+iI9H8up783SS85wrB1OPPQb+GWuR0930?= =?utf-8?q?7BnMgrblcMh8EOLsS+sMgU5+SFMsKEdLsUKIAOfp+qvRHeqwhEAOuvmXuJGcSLL9d?= =?utf-8?q?iIKvbq1xDELXx01HBXaCtereunJDlY0LlrwWloHzBHSzm2CydZIsR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CdV4tvlkLrmPfq?= =?utf-8?q?rJ1CZb4qDFm3SlEbxY/ETbpqfvfcxCU+2s5R9+SAFJ1qCXSS31hf0D04bYoa5zAdz?= =?utf-8?q?7R3VZlWl91QiNBYWnHXN6NvV7zbmvlrEEBpUrmQXdCS8GZGMy/CUhtliBFrVJLlBm?= =?utf-8?q?O5bT8vonjYqZDw4gGSWiGpAjXPEEfILSHFAVEjuZ8TQ4JH5WCEwV9fEOZAZTXbgBb?= =?utf-8?q?6nzYX64Qw7jomKYNu2xhFxPV0k3LqQc443XUoZxMe/ybMfOrQsEEv2Agz0dmU0yb2?= =?utf-8?q?QBDsd4fc7RovksOOeWMB6+oROoGgCAqcxYAIRvxDE0S9/2bz2q0FMg1UQpxZw5HAG?= =?utf-8?q?1A46HFL9ODnV?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce3dda80-e9e8-47a2-d90a-08db83786960 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:59.1733 (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: C3MrQNg8nT8KLaMwCkoCV9cWpAkHGjlEWJsbjQPXSn7/zhW0vo7snEDDISjT6jrlY4OvXbhtnZ9huyskbORvtA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771294096674508442 X-GMAIL-MSGID: 1771294096674508442 |
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/rtsx_usb_sdmmc.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c index 2c650cd58693..ded9b6849e35 100644 --- a/drivers/mmc/host/rtsx_usb_sdmmc.c +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c @@ -1379,13 +1379,13 @@ static int rtsx_usb_sdmmc_drv_probe(struct platform_device *pdev) return 0; } -static int rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) +static void rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) { struct rtsx_usb_sdmmc *host = platform_get_drvdata(pdev); struct mmc_host *mmc; if (!host) - return 0; + return; mmc = host->mmc; host->host_removal = true; @@ -1415,8 +1415,6 @@ static int rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) dev_dbg(&(pdev->dev), ": Realtek USB SD/MMC module has been removed\n"); - - return 0; } #ifdef CONFIG_PM @@ -1455,7 +1453,7 @@ MODULE_DEVICE_TABLE(platform, rtsx_usb_sdmmc_ids); static struct platform_driver rtsx_usb_sdmmc_driver = { .probe = rtsx_usb_sdmmc_drv_probe, - .remove = rtsx_usb_sdmmc_drv_remove, + .remove_new = rtsx_usb_sdmmc_drv_remove, .id_table = rtsx_usb_sdmmc_ids, .driver = { .name = "rtsx_usb_sdmmc",