From patchwork Wed Jul 26 04:00:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13327435 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4B05FC001DC for ; Wed, 26 Jul 2023 04:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QJZzTEEda2FZe0hWRouZyKMvHw+Sl+vJAIAGTieRWys=; b=DWMOziLlH89AFl cI3AHcF+ionpk0R2ws8B8FQM4ZbKjYpYqbPK/uuGmSTG4KZe6iTXRmwoCLl4ZMIWZSJrLgxIavyR1 QGB6Gl5y+TWlOC+rYDGnzthOf1UpRgx6HJpCsjlnMfGb3k5n/zdQx0DXEJIEEq7CDNwKVHpE0xn6s ZLx/GXekQKfncsDC4j/i5Jg5imQru5FNL8ZbeufKokdev/iNxOQ/Fr01DXavtiwIHi/GCWmGQTBY3 Z5FOUoo7TZvMDMyY6cerPbrK+i2jfJJC/ungdPPbSkliF5R8rZK+1aD7RAYvP44JXSpO6AS6Y6OIU OaDOXYyqot8fSqOpHdWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qOVk2-0094mw-0H; Wed, 26 Jul 2023 04:03:14 +0000 Received: from mail-sgaapc01on2070a.outbound.protection.outlook.com ([2a01:111:f400:feab::70a] helo=APC01-SG2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qOVjU-0094Tm-2M; Wed, 26 Jul 2023 04:02:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eTBet43sGs4UslfTD9yGSHwVGbVEBqP5zOQSUw9Q2UHPIsG2TKt0LVIH05ycSYUKBdybLqBIcqLTQU7EAgVYBHYjPESQnBI6R15mbQph9MozOXeif9h9g/82CprtlulpWdAKfiv/F/a85yRtRMuUgkJ9KEMY45EOhlGpYsoK9Q92TB7o6fYr5y2b5AUmyaoAEdCHmVIMVVl6S7QHLeAyo8muQjFmYgfHNeiiOz+4YrLzLCA9uigsAmy57i5OI3W+KWH4Vw3xrOTu47tdwE6lh4G7O1rEyyHYhu6JZLs1dAQb96XEOs6v/oSg84oskY+tZyVlezMCjEb18dU3KU5Nyg== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; b=JfcwhU3rGz5syUzfnIVdY1Qfx/CkIz5GCjuLzfwDVapFS1TZ8sItuLF1NWDXsPBWe+WrkxiuVHbE2342bH3/f1C+dNLrdC7UVe9DJBtuVfFAFd1UbQjSNid3KnX8jhphwbSWMJKXAQzUWuPpsybwUNvJWtHt5zrbGA/mEFKWlUgJOUjU60R5cqWrzJikuajO3TOnFulmHYmnzOda8qw/4WjjzAP0KD35mMfsnthTSlECy7tjvYmLNBOvIocaURPAAdvfxC4aIXVpqB8EuD/bsSbcSOjE7DjISRkYKRrJc86KAPOpn+I7QT6Y7VAc90/JRnBvftWHdrO//+iZqFUs7w== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; b=jsu2PTDJnzhnmNnQcYjypHsA2sSS7++l5g/xucfs3HzR1+oxrexxPJNE7jeK2/gqC/C0TZY+nKS1lGijYrj2N2DevBrYY7Rnv4KgdgsFKDVNbqLhYLAK4JuLXyWeYxiWChNE6rtO9YxxHiY0Y8tqjquKy2sJQpVbE8BR7D+sP1L1hDGGltE4e1QwTp6HLOfLwC8OvX8rcrqczif4SFisV+wq/O3JHEjrGl1/eSOYOdSbQVebz+L3NH/pfkFejZOEMu/Kd9GoM72yOlKDAerHfer168oMi8e8Vd2ty9gVI6lPtjOYXlf+mgkQulb7AuNGgjSR9OBls1L37V+U0Jn0aA== 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 To: Jaehoon Chung , Ulf Hansson , Heiko Stuebner Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 42/61] mmc: dw_mmc: rockchip: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:22 +0800 Message-Id: <20230726040041.26267-42-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> 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: f2b143fe-1a52-45d9-84e0-08db8d8d16dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iZsqgPvWHHA7TbxIb75YKDzCfyYBsWZkfPLcq0Oo/m5vV9kdW0yOhofFT4PM4krxKjvb4034H5kv6MSwICzjMTUo/crSHLMOZgJ7mfU9nlHaYQQdSIIvbXJu/ZSZeZfdQar61aAOsK6WGdB7fbFS/ACJgMZ4e9tRtPx3Lwc96PdDkCVM2yQFwvj3xbqSR17vNJNjeSLIoP0Lj6Z1OgX/bRs7bbYo85TLhIBmCkMwYrkcmUNRsjRZX1CrYx99DYC1ehpbBwb8PjQ1ygn1zuCEacimaK3kQ9KhkUEgxmsCONoXpd1+ZekuiHaN2iuW9t+0hBjfV83XLBmabgy4nBwv1pUbXMSXYgl0Zq1F37F6hH1FtAcMFXh3RUBq5E02oi5RMhwXAiMljPSlgT17edsp+eEAUHieMR+awPtQqtPc7PjJNyPxofhyoK2+t1lUEA/icoCwm0AhoVGzbkx+ETNrcoTe8qEhMcYTpvor4mUmh3eLTxahTJsy6Dw+SsHbof4bjYcQ6+oPXkrQ4dRhb0sJOVJ1nnyqqxicxnWZsw8wUO/Un5eVS4nevq3LHVKZhjTat6EmvqLLat54oUBaV2A9eWxjFu5yJZwvkKLSB0GIM4yOv5Uend9CT1JBORA0p8Pe 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?0cIvSMzdq5/q60es0oDip73ZtlKk?= =?utf-8?q?Z5/+JLUWCDwYGngM+ilwMD7bgPLveHczJi8R0re/5rPiSoaNsytXO6F3Nr4P4Xymk?= =?utf-8?q?zjM5kaBPCcZ1pSgoyYZ2tkgVkBT3l5dAmqY1c6kYi1GHa9lmXCNMokptrjiOkZ5OF?= =?utf-8?q?Mhz5t5ccpbekhVaBnLl9Y1RlYE4O4EanVLQINitEVisxzJNItD+ifcQFTIWwsYTuv?= =?utf-8?q?QQ7m6lX/Exiw56HgrmUJOPFTOuEnx1Zi3GNez0fNLDCR1ywfONlts1rhfgU8DsTBE?= =?utf-8?q?LTnwmLjaSc+4Rfc0Kdr2yd3dA9bL2+gg++cr0tBUfY/4d9Mwd+m+OK+oxBsNCw2hK?= =?utf-8?q?DXMv/rvq/sXzMj4bq1dIV26fdR1DItlmC2XxfQE7wVFvRpDNJpJG21O2R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doxIXMN?= =?utf-8?q?L4qZzBjoKozQEiIB3aHH+V9sZ1EDCCCWVKwUQvG3UakZMdY5P+BiOukV2smzfBtOB?= =?utf-8?q?6Sx1lE2Lt4g6W1NnITydZv7sjW9K/0SYCKLEGrMsCn7F9X0AaHC6w6+oaE9vvGC4Q?= =?utf-8?q?viStGI7ieCG/r8LPzMzqIvmFsSe+G4tDFUepiHhQ/bYiJqiu7Yrui86UIDGSLikMl?= =?utf-8?q?iz6/dE1Mbi37Cl7ECLYXwqyhBAJp2228UuD74kTh/T7EnJMAazSm9G0MGTia2APSD?= =?utf-8?q?p6CIUtdjYtOb?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2b143fe-1a52-45d9-84e0-08db8d8d16dd 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:11.7833 (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: tSgCGb4HmaZ4XgsTvTg3NFgNfbSazPb6G9Q1Nw7ZcKUxm+DfoTUL8yKaTwcTthBSUahP9ryGtkMo1yv9KUOVrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230725_210240_781661_CDA8CE0B X-CRM114-Status: GOOD ( 16.85 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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 Signed-off-by: Yangtao Li --- drivers/mmc/host/dw_mmc-rockchip.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c index 2a99f15f527f..b07190ba4b7a 100644 --- a/drivers/mmc/host/dw_mmc-rockchip.c +++ b/drivers/mmc/host/dw_mmc-rockchip.c @@ -371,15 +371,13 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev) return 0; } -static int dw_mci_rockchip_remove(struct platform_device *pdev) +static void dw_mci_rockchip_remove(struct platform_device *pdev) { pm_runtime_get_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = { @@ -392,7 +390,7 @@ static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = { static struct platform_driver dw_mci_rockchip_pltfm_driver = { .probe = dw_mci_rockchip_probe, - .remove = dw_mci_rockchip_remove, + .remove_new = dw_mci_rockchip_remove, .driver = { .name = "dwmmc_rockchip", .probe_type = PROBE_PREFER_ASYNCHRONOUS,