From patchwork Thu Jul 27 06:59:57 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: 126740 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp921194vqo; Thu, 27 Jul 2023 00:37:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlG3jnjOI/JM97d+gWkpXXhoEV2Duh9h8gVZcEGOHqY19VovTwACUVIptHaLufYGmYIdE/ek X-Received: by 2002:a05:6a20:728e:b0:134:1854:c136 with SMTP id o14-20020a056a20728e00b001341854c136mr4566964pzk.0.1690443429911; Thu, 27 Jul 2023 00:37:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443429; cv=pass; d=google.com; s=arc-20160816; b=krMJKDTwVIIdn/gKr6aWZjaYpwIZ1IGy06hn658BF3xUeiqHYmWcN1RP8XXjUpN0fw jMCUmBkx79SKqqZrYaJVPn8wluVo575DDvvacfsLb8SdU+2qNx/0NNpLBxkKTk3VKbX7 cDfHDDavgfWtN+kS+KgvYud7O4VestHkg3KG/9KM0RtGpqJVhr8+bOLB2QUBvJDdzNyd lZ1kNtYYRfSFzkfebQkNcXE+0xkjR/R1BL2/VclMpmRQKsabK0BZ/nxzHfeDUR3Llig+ 6cH22d4B+ruzzX26wSOvh+zblxibC9Ly5m2D7p3AOEDppxcIbW9/c+yM9G5sLhkMy5jE s+1Q== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; fh=vEpmipvtuUUFFWbFJZgk6ER9IoVi7xyBonilERpGTtE=; b=u/pgxx46rFNaAZ1ZtDrdEd03CSjImUMde9SAWsWuAMarvw/q6N5K4UcA6HZOQGyg3b V8Y0CFlTZE7+Bd0yNetBOX7uht2yiTMHva586AFYwldr3134WWafkTM4eDgK2OnbbZwy F7z00ziUMk2S2KzpNY0CiHNzFfOYyC910dAhH1QX87jXm3jtdZxKv0xnpmLPKTT5n4RH if6pojGupCIOhTM0ya2LIvYnfHwpJjCeH75lKDyoyqMgubpK2YoE9YrPUnTFIoS5H6tS B5Ijt2TNmmn7xIWNvMKoi7drRdXPs3IGV8wtKrtnQHYOkySKeW3JItSzv9EoBztfJ/kc 01gg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=RdjFo4TW; 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 br15-20020a056a00440f00b00666b8536d8asi977003pfb.305.2023.07.27.00.36.55; Thu, 27 Jul 2023 00:37:09 -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=RdjFo4TW; 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 S232697AbjG0HBz (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231423AbjG0HBV (ORCPT ); Thu, 27 Jul 2023 03:01:21 -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 C5760268B; Thu, 27 Jul 2023 00:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IdfqWrCDkPMf0B4r5l0YDmMIFoo3GUe9yLpLkthOh0hjpIThN/ayOwm3tAxankX1EfnlmYiZQvX9tTKwDsIhZIvTlfDZhQ/fu/iyIOuIX5sTCyjiZa8szSYxqsIovsKNgHlyh40LXzOv3oiU75/PPu152XhtsLpmLbhLDx9t4BFDVLI7OycpVYW/DHQVPoX/16v0aS2Lj9pVKfxpzxjvFyTC8MZAnr7Yy0nqMZgqZRzt6+eM+tEXqiG5U1D6bLRhhnM1f6mNfmICL8WRPj3xd6CMsolNxHRBzxWNI+0YDjV3PcHLfAX+bfk8/Ikl/v4gM1BEBsDlwOKBHX0I8mFC4w== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; b=bUXst8yk2XKPzXhSH4YVJdYuFAuHv+Zv6tw6cKUCRwslTm+NFMcvqy+rTKSWkuwMgADfCHkPPiviir/FROiBqgIpz+rE6NhDQCDRzYxNhzSK2+IpWBumga2+oEOmmyDvuKLl7HuysWcjCKR8F8qQYgbIQNMJenXV0Nkhyc47fePnWLVK1tgty86X40PrxeEu0KQdRfcxgT1DYIf1GBPD9C7vsi1QDeivdWbTQhUEeXs9rklIhXAuL7zcNdWMqdjHQe0MCH817j7gBDU9YTHi11twszvAOK/aoPjuMtUDwjupbrTYtBk+9zlsc+jlelIrUXYQNPkedp+/xTjTc0goZg== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; b=RdjFo4TWUqrVmr0FRhI8EKIIzUcq1KM0iwYpacKLUoboLmnV5I94pB0L+Yrc00rSCeD2YBpxtwZCuTsWsesrXWOGFtTZOCiGqpc3tPmxQeEIPEGcI+e4wuwfEIcoHHV8fAR0ZAGPvK2AVKGVRejEZU0FDuMYozK2ZffXBkwMUmCVUbZKkKnVm25nw/NbpWXisWm+E0NGNlbofuDjH8FRCIXhuQon95qXZn+Ppfctf2NHvHlMbPNuHySCExVJPYGX+3OprhQhOoYMqlUttUAv5nz0WJeuc8tg0DbIL7PcY1/iMwpC6Sn4h/GPsZ4tN1JgDuJzisqh5Qk6q7LgzatUJg== 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:15 +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:15 +0000 From: Yangtao Li To: Jaehoon Chung , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 08/62] mmc: dw_mmc: hi3798cv200: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:57 +0800 Message-Id: <20230727070051.17778-8-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: 621fd040-264d-4dcd-764e-08db8e6f44e0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +I71yupEiYIK9mGrudvf1CySr+AQll6z+IivwGplBaPoV8PVbSwgmV6ojvYY8auz8rRCLEVHboOf0veE7vvD91Jn2nxM9sYs7W1TTW0htKVxKz1GTCSzHqmL/0Q0Az5nWozu7a6zEqpgx/5G3uwtc7KE0SN868viisevogV+ZtC/E5JsiR29FwOvezbuZxkxE3f7jsWnYHorIQ2LwmTQIV7NmM5tuuOwUkRrBk98WpQ+TELp+DO/zLH9DSINyYSx7wNRGIcqywYLEb++/IWmHcsHiZrJzI8cWcM1zvxKZNEiJM8mr8RtcEw7if5bSgpUyHUnBhf84RgNDaPEjCNoJldbbbUTcMu+Oa/mL2m9/yC0GLoCJlFOs8Fg8bhAEdK5Dtcc7UjjTgNyNYbhIP646wuRw7Ozzq/+x2j8OQTQLUiOpJLhA0hd3hsCASR8+VXqNIrncY+pAa6T1nyV74bj4zLHJ9NhSUeAIAztXMv2J+hOyLOUbHiY6zUaFBm8pujstpn6ecsUaDxOULjFYnfTftljCyWsScoA3dOUT2Z9WV2utlx2+9J4m4lZWDl493aiOLrj68Qfw4fwf/7YjFBlCEUg1bUXKgo/uTA9AGQa02FJlVdxWjfPfI6IvXJ8GT0m 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)(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?2WaSgFAOiyC0JF6upO61fqYmprl/?= =?utf-8?q?EqnebCQHUkSLk8+JXAo3I4zhYBtT3jcS2S04QXCsLhumZPZHLPmFnkpBbolScmedX?= =?utf-8?q?aCp/43c0Jy2K9y10aBJDxy02rqavIuzE+cw1OlRI+R/kP0c/cgodyHcknwUDrjK4f?= =?utf-8?q?vNxpzbqgYFmHW/5tNFsamqq5UFYZYp5afJJZKCYZzidMZRpOQ19bP5yVgmOq29BzX?= =?utf-8?q?GkJ+vQiJcBLvCXogLMhJ1shmN3plyoGnEObYwlmPp0h2SFT0UH+cAcMwcX6suZLpE?= =?utf-8?q?QYoiqyrjgCVr0Ob/2HbzT4cSNrxMgZdw11j1I55H5lmVP2G6maX6spHiX8w4HTT4M?= =?utf-8?q?8TDvNXJClkATlcg64ByTDG+zxY0imrfQt9U7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6AMQgu6FLGvOMpXTS?= =?utf-8?q?ckbiPzkY+nVJr0W7iBdh5LlByeuff/YTEw3fzV7HCfdb9kkYr9JdFtvsn8cieX3P1?= =?utf-8?q?WQvVyq2H6Ct1ShdLjuT/Of7U5l3V0EcEMnZxy9wNC1W969uAiTsUpnisI1qaVjqZR?= =?utf-8?q?uUqYOimIS6Kihov0IGvWjq5VdFNTDExA2vzPx3AlVETnj3bj51Xq664Tk3e2GxSsP?= =?utf-8?q?KayhX8Xp9R0MwF8nIPqxq+OFhXV7hMkDvY/BJEYvLUS7QDWEUB18pk/kmlhFgS2fq?= =?utf-8?q?k7LgHGnUNo6r?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 621fd040-264d-4dcd-764e-08db8e6f44e0 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:15.2378 (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: +7VNosngJElp3aPuh8sfbZ4wb6FAwyvKFuY1z/QJfd/PxlLgyhSfshGQB/jhKIErm6ZGJigJ7P0wKXvMELRjuw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772558409872110070 X-GMAIL-MSGID: 1772558409872110070 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-hi3798cv200.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-hi3798cv200.c b/drivers/mmc/host/dw_mmc-hi3798cv200.c index 6f22fe054087..e9470c50a348 100644 --- a/drivers/mmc/host/dw_mmc-hi3798cv200.c +++ b/drivers/mmc/host/dw_mmc-hi3798cv200.c @@ -171,7 +171,7 @@ static int dw_mci_hi3798cv200_probe(struct platform_device *pdev) return dw_mci_pltfm_register(pdev, &hi3798cv200_data); } -static int dw_mci_hi3798cv200_remove(struct platform_device *pdev) +static void dw_mci_hi3798cv200_remove(struct platform_device *pdev) { struct dw_mci *host = platform_get_drvdata(pdev); struct hi3798cv200_priv *priv = host->priv; @@ -180,8 +180,6 @@ static int dw_mci_hi3798cv200_remove(struct platform_device *pdev) clk_disable_unprepare(priv->sample_clk); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct of_device_id dw_mci_hi3798cv200_match[] = { @@ -192,7 +190,7 @@ static const struct of_device_id dw_mci_hi3798cv200_match[] = { MODULE_DEVICE_TABLE(of, dw_mci_hi3798cv200_match); static struct platform_driver dw_mci_hi3798cv200_driver = { .probe = dw_mci_hi3798cv200_probe, - .remove = dw_mci_hi3798cv200_remove, + .remove_new = dw_mci_hi3798cv200_remove, .driver = { .name = "dwmmc_hi3798cv200", .probe_type = PROBE_PREFER_ASYNCHRONOUS,