From patchwork Thu Jul 27 07:00:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 708390 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE6FBEB64DD for ; Thu, 27 Jul 2023 07:03:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231504AbjG0HDX (ORCPT ); Thu, 27 Jul 2023 03:03:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232733AbjG0HCh (ORCPT ); Thu, 27 Jul 2023 03:02:37 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BABE635BE; Thu, 27 Jul 2023 00:01:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BwLZKQjR+6Nv8usu67LsgfOu/8p7Imfm2FODupOMSbQVWcGr7chfaLpjc56mImZcrArb7eTxEASfhoWAtsOyrW2tBkcF/38YbdpbqVZTLMowHeE99d9Q4jRtwbNislhnIs9shslee658qmS0Qd9+jgUH0aMHHA5X5LuRV5K5abeggl/NDRt+mxdB4EO5eOkyRGemGzL43RBYcODVQrun7y41jTSEnHwmRq9l9BsP0PT8nKK+T20A6lxL2aVwYTsLFNxJL/0ELPIvx4bo/+kmzLwAjeHuSp5g513GZWioua39gXeHVqvRTkmx7X3X2z24Fwv3BcRpeNbd/551kN8xZg== 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=gkUpr7l0pDttVGz3kqCsUAr3ho/CgWL/40WVT1faxUc=; b=kJyV/MPUN1oRj2J1aW8eWPtnjG6O2punnaEGaa9Ma4ndWaxS7sf79FUWdK4qcdBp78YXzAXmrk+haAUFR/qcdVKewwdFEhXSEFt2ncJ+b9e6URiaynyiegxnIQtfNViSd5JAs1NOXp2FNh/cB51C2U6T+udZK0w5BZmHAD8Ox0wox5MpOdejtG1mpl0ZZAea+/OPo8QZ+pOoJ0vwWJpsAgW0urh3NUlbR7CnWj8nC6cqAiCfltIXqKpqL6HAug/bgw2r4uQFvZG4k/ixR/OQTXJrh/itsSHbXIaLOnj9NQHDM19kcCGS+HkSVR3GDse3zj4fZXwGL6sxiYWIt109zg== 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=gkUpr7l0pDttVGz3kqCsUAr3ho/CgWL/40WVT1faxUc=; b=jhQ6khd9k++xU90d7Vk+JEu88fdUUbVUnZNtyVRYN2iylhy0NFpAdBLdrZswsmkRU0KnCPDWBJp/ZMGCIqqviMgnyGltYBTvbw+nk3Hjqs7IkwsE6yG59jxV7c6YeZXd3gLTVyAlJRhTM1C/HGWGfRtSWBFR7QS4TI2NgwS51xvuSueJ1zvyOdBZo/lw4mS4+Cljj+dtxSDtEJEr/L7CjEf2KeZA3zkLFobCdcAL4hYfaevXQ83F0G2BZCZZUlcUZo76uY8XIZEbHVj+AsSqcpcOMfcVDjLN4XDJi5yJALdZShyok0K4ZQrgjj4zIeoa6bqAb/Q42DIu9tikm32xiQ== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) 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:01:25 +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:01:25 +0000 From: Yangtao Li To: Jaehoon Chung , Ulf Hansson , Krzysztof Kozlowski , Alim Akhtar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 14/62] mmc: dw_mmc: exynos: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:03 +0800 Message-Id: <20230727070051.17778-14-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> 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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: e061deea-7ecb-4a3b-7d04-08db8e6f4b29 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q2v9sJvDmURFaue5Nsb6ti7tDfSOzAugC+0Yxbm17FvXukV2zvIKbHCJQ76LBhM06Jplw9Jc/lR/kG7SWF9CQRwdh9F2H/zW0b2BjiukJ7Y99g3bPVAFy5/vty6wbpH182NSJbdvOeLx9OfI6FYALTDQwL8wk+yaLYsHi4kVt9K4xRH29OkjvfxmBTCp8qo07c46dP/tFW/dhLLLOTUpdDYz9LD5WJlk/KblqnZGHk05USswFBjiMTacVKDhDPdTSlbDB5O6WdjhrOVhREFPIcThcY03Rc+yO/uD4wpZozq3RxBN85mTD9W95YF4N+UgPBeT/HkwY9nJWkUdj24Ueu/Gnk4zKFIDWTE5jaSdG4Zm7uXewh6+8/VRnGuxgRQ/oi9EVJAed7TZwUabHxSBEhAo/L8jOG3abdfHvvEk0t4eogAdYoHK1idLitiUydSs3oAPaQr+9Z7qq2oD6CwRrNAeY6wJl4D/7t09D+Fu06uNovAVqYTN+zxrdwH7IZ+S0I9upWS+mkLfN+nTolMpDU0CtGFNuCsb4jtUHXpO6VA5GCfMHUGJ4kenVmm1BJEkiuQ90b7W3DVu0kAPUQokRtkVfrqs6VMTTw7ovduvNDp85hHua/rkSCBrub6VFL0Y 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)(39860400002)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(66574015)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?rPCYp5XldUwPbwaUDxy52HOsAmN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aApaEn?= =?utf-8?q?+3qz7Uy1ajHmsyWxDCndSQMEK5igfYbE97pjzdirwlwjKDAJKwCay7rBuPQ4KYWx8?= =?utf-8?q?EbkEEWhnd/yUulWzXGihAtRSI82B0yLEJ3UBHGeAunH9bWsdDDNFdokqlgGuvEr0l?= =?utf-8?q?3qIZlnjJ4RVi0W8HyvZVhJazxFRq44IX5WQ35tahVUoEg2Cy6IGkAShWQfItPWjRk?= =?utf-8?q?WfZTaACFJ5ZwZybi3DMIgTaf8BgXFOYK2EmTYhyUrk4uogDdaPX1qBYlCr6ed1fek?= =?utf-8?q?sNtoXOjDhytm69Ew4RU1ej4bd1WPe2VbyG+kZt9RW0O/GrNG0JtflEVagxLN3pVdm?= =?utf-8?q?bI8yKsdyu7W4LW5rEzqD/EJOCPT5lIsfsT1HO8C4QazsD9N7l2KbcnQ0ATYqd7CML?= =?utf-8?q?yVjkr6aoq1woimCjAzneX6yh10nvf9Q55QE+8P38ebKsqPy0HzmEO0KbToljUnexr?= =?utf-8?q?AdCgFn12o/xBMkiIaNcea9ETLdtgtBxejpm0jnc+rrPGxe/RnZGeppkDHw8kqwk7b?= =?utf-8?q?a1Ec1/defDiHZMAcl+EZzL2zeGmNrRduQrFLdjsvgGGRPzMNCX/bvjp22R5BEsIJo?= =?utf-8?q?PZJrwytOsrqPdIqoAGRwy80WIVap1nlB5ym9d465FGOX0fGsS1ajKgodFKJx+4eBR?= =?utf-8?q?SXaf0NtZ5XtI?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e061deea-7ecb-4a3b-7d04-08db8e6f4b29 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:01:25.7920 (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: 7NePyVc5xAxRTJ+tcQF0leY1lWNvcCLZU9Ad3Ckk1gBLGQ6wwkgb9udYr4uZkRtEvo7p74vlTy7VBleDKx05RQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.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-exynos.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index 9f20ac524c8b..698408e8bad0 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -664,15 +664,13 @@ static int dw_mci_exynos_probe(struct platform_device *pdev) return 0; } -static int dw_mci_exynos_remove(struct platform_device *pdev) +static void dw_mci_exynos_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); pm_runtime_set_suspended(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct dev_pm_ops dw_mci_exynos_pmops = { @@ -685,7 +683,7 @@ static const struct dev_pm_ops dw_mci_exynos_pmops = { static struct platform_driver dw_mci_exynos_pltfm_driver = { .probe = dw_mci_exynos_probe, - .remove = dw_mci_exynos_remove, + .remove_new = dw_mci_exynos_remove, .driver = { .name = "dwmmc_exynos", .probe_type = PROBE_PREFER_ASYNCHRONOUS,