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: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 126108 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp189023vqo; Tue, 25 Jul 2023 22:31:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlE73nvG5WF9BbQxstEkUem++wfxeimc5WIGSWjR+bto8kJj0p57nYE7aJyJzEn1t/umDiVT X-Received: by 2002:a05:6e02:c70:b0:346:66f6:4da2 with SMTP id f16-20020a056e020c7000b0034666f64da2mr1017863ilj.10.1690349482555; Tue, 25 Jul 2023 22:31:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690349482; cv=pass; d=google.com; s=arc-20160816; b=Qnswf4QGx2J4F+39yDOJS6TYjadZeF9Un26xldX1HRWAvglVckLBt0cSkIJWP09b8U BKXpFKO98jkzqiayHfGfm90ozGmSobuRfKs82PKbn9UCRZaKX4WdjfwmKqkvzlNd3dt8 9zXQ8v3gUhuCMYB+x/kDZzp6M+q6wUq80PBoquXrQVm3XRMPsQCVOddG0/7QFUfHXZLA 2tqYD7bDFvFRBgGGa0xc7bvpRWp7pGlyS9MiUqZ8rb99S53oPml7RsmviinrwBFRh4T4 dti1HxH+ymXPA65eGbN+OJcYSqYz9V70jxCLcquPFcXRPWqabhLRgBYUKfv/RmVDU8dI z6HQ== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; fh=zja0ga6cdYzjxoJoO6ODJpxhr+hlxRWJt2ziNAHhkao=; b=Q0DTmpGWoee8F9YMdaufK2duG0QPbdtOrqhIwGpeJRIkPfMylx6p9Az2zH0SEw4fjC 6aQ45MMAw7zHdsnpmn8Z3zA3dC55vSmTYwlI1oO8mB4YkltzISktS1KFNjkoouzGZVWl c1qBIa1Y+t3ox58mktaYCbfLdufPozB1nw93St9iVafGims37Ih8g8EviqK1QsQe5PVh EzVeJvrA3IQx9AG9PHg/7FccqYCyGEYdeqiQfoLtU9yet6tSIslhI3pMVByj2+X3rE3Q +PGGv47OBTvASA7BLOMYen9uoOQ6Z9sleYwZKriQ4lE1puVyWura+sZ+F8RGlHIlVYWg Vjdg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=jsu2PTDJ; 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 i6-20020a63e446000000b0053fb354c194si12486791pgk.659.2023.07.25.22.31.09; Tue, 25 Jul 2023 22:31:22 -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=jsu2PTDJ; 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 S229790AbjGZEIa (ORCPT + 99 others); Wed, 26 Jul 2023 00:08:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231730AbjGZEH0 (ORCPT ); Wed, 26 Jul 2023 00:07:26 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20718.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::718]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D31E23C32; Tue, 25 Jul 2023 21:04:11 -0700 (PDT) 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+4Rfc0Kdr2yd3dA9bL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e880WTScTP8RiNYuvJTwjiJB6P48gbbyNqb2Eg?= =?utf-8?q?Q4rUF2m+mOc1HAhF9//0G2y5yb5HGCxkCAfbl9fkRiuxESh4U4X+guiOFvdoxIXMN?= =?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-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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772459899248669460 X-GMAIL-MSGID: 1772459899248669460 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,