Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2034760rwb; Thu, 27 Jul 2023 00:36:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlGZTpDfzEYzeAEZJ38AwaXvyaGXZBjOFbVyolMk7ihkCnN1Me1ecMiTePlMXPabS/hA/HSr X-Received: by 2002:a17:90b:4f8b:b0:268:1355:b03e with SMTP id qe11-20020a17090b4f8b00b002681355b03emr3398047pjb.38.1690443371493; Thu, 27 Jul 2023 00:36:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443371; cv=pass; d=google.com; s=arc-20160816; b=mUxYsqXL5anUb5ZYEukxJqlfNeCG1ZAvjAjBydB5sisj9emCu0MLtZJQsTmb4Ibs2+ u9ASK24sCt2vc1+eimx2eCOaHe6UaxTmQ7EP+z/Dmrv79sZ/cyhSqZE6JmQ+u3spY0hu LjhX2xXysA595NyUqJWndIhcu4Xk+OTxP74MnJfCEirAtTpk80+R7lGUzm4z15rXIzg6 s825RV7HcSDG7tOtQm4Mxwo2HDkmBzHjYUL0nqJai430hmEZrpXxEMrWfRUPafNofiDl t2Q+pZpluJf2dS3lcUl5JBhU2kkwUlPyNsRwCxUj5OQjI7lp65aIN7C8h8mG2VU6xVqx DZLw== 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=+10ydIUPO5ixnkrhznKc/nkVD1LxngV1Yz/wNMbmTJc=; fh=7lXvta9MJug4t8hoELf25h+M0URbitj3nFMpMJJfBcU=; b=WUi63We1CP/xZZQDXgJt0KcCXwxqJvjtQFDQM9/GTggl0gWKATo9Qoj/RgC9XwxYgF BjgxbpOQVzdoL8vmteeYGVidm0KuDjYK7aP9op4QhQuqeMk0QgIJ3B81qOQKZ+AZkR84 EQJ71qJHU1ZqRucgeQQCiHTcrsddkMZN3EKfZxI/gJsQZE2yjFIi3Vp7wzVV9eI2/aSE FRSGUpdRzKxbfj64WZkbpJMr5oqNy3E8nhddGqguRhgnKSyQO1RrtjCY2ZW/ntDobT8v EnYy0t0mpMrX7PaFL5Fwg2y3c2jQ01l5q7rol+jzCqfQYTNcTWLxeE2/HbNYGrP7yIMX R0nw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=pYvwPbyP; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fs13-20020a17090af28d00b00262d692db39si2541463pjb.12.2023.07.27.00.35.59; Thu, 27 Jul 2023 00:36:11 -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=pYvwPbyP; 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 S232997AbjG0HFj (ORCPT + 99 others); Thu, 27 Jul 2023 03:05:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232990AbjG0HEj (ORCPT ); Thu, 27 Jul 2023 03:04:39 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20709.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::709]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D37813A8B; Thu, 27 Jul 2023 00:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cX9PqmCjPrUIUtGkrMqDWSN3SqmyxtHC34ny0Kqo3wrXWY5azf2kh9CX6vNdTNEtGR98BYA+7x/t66pykVAWoJ5ZyyKKQ0FY8zRuFJiomUdK00ryWgzl3xETyeYqWIb+ugEMeYifYn7zXRr3EzsDoxxGRq9ir3vEGujBScjj7MsldVDQU2RzJzv9RydJNAe0D1dkXtwVP/ZquVGsbAIEPCs0L4yTUzi98Wy1C5SeYXqRxU6ZL6raTgIhk5T/LXMU9CrUWTL+o1qMzK+vTCxwEKKi2uptz5JZ/CHjHpxtgADeaNe2fTTjeMSJJkE87UTWYodvuJdik9Goiqu38htSDg== 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=+10ydIUPO5ixnkrhznKc/nkVD1LxngV1Yz/wNMbmTJc=; b=dNYuZKxvb1ToFxAb0MW9pr3+O+20ZgiT5P94dI+BJ6Vp61IVEHmLw3W9ziYonNCzqQQ1aapmU/GHHqWt0jn6C6t2jkyhAqilp2kmkBcU2BH5Lo4nnFd+mikfYzsuQbMqYNn5gW82PpiReK0WENqmFFi7b1Re6BgOLsuo7uIuptud5bHQqA+RXCEVDeFSa9Lrw+Zhwt0mz8cK1znWrP0zptZbg4/Cvp//b7xGTOuoZQ4mlxln57GattCUXSxW2zelMSPHBqqAjvG4wNh9z8akhWg2tdrf+Dd35Mt75uCd/jfVqZqX95QLxV0Cj8y0HT3Mxk8mtXlCXDQyO2Mkh2VcJg== 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=+10ydIUPO5ixnkrhznKc/nkVD1LxngV1Yz/wNMbmTJc=; b=pYvwPbyPIqNG83Ro4tvg0I/eh4R+o0YMAZR1reAYzLvUDKgeSVbxQcdUjS4OfIoq6+wGjJ5k7lDKNxmIDq9RRYH7+YUGEUXim434tZwT0cG5VUAk6a2yZruQU8XoZp6O33fulbcIHKeztDDiuZ0pf1u/73byyLrtacgkzWe4T+NB/bWkpBg5VtEfiDzEkRyozd8Sn5Vyq755hAJ45Cm7zABwedLJr2OufR3XHKYL7LOPUR0VUKSb4x5lI+sWCM9JLbRRvE/6KLjEyoEMK38PDLGQpY7NZxLm9H/ldZG+/l2uFCWMua9b4EpS5lMQ1GNSUOUkYVaU5PdZM13c3k5zVQ== 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:35 +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:34 +0000 From: Yangtao Li To: Hu Ziji , Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 20/62] mmc: xenon: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:09 +0800 Message-Id: <20230727070051.17778-20-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 0ff12549-9538-403d-fa4c-08db8e6f509b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jjlesebFxVEvgi80YwEgVinyAMYDLi5I2Se+i6K0SD8lruWBgfSRkV6PjKyrgOZCrciMseaOuX6qkbN9bIfQ9/ivFgHlu+0Dd09vG1ogiEWVC7C3cI7tjMgSuewfJ0E0txFd85ZXIy71Tlzp6TfqoblSG/WRJPbientjufiHqDVCnka2SKD0VivhY2AOYZmR77ZfcPCHrGXsmRh7IffzdHYiJ68qqoZcm/nZk0E8/BNReqUI89EkWlLFnroFPj5ItMMuKKfAXkHZs0EQDpLdv9GlVBR1z76Fu2smI5MaOM9uiQrrGf91uC5nRJFovw6d/JFFWCB6z30g4UyFPOE13lG5IujSt2qxM9qzT68ToHYr+BbEt+xYlCfitl6ozcmjE+sP8oVttwpLJuIKt+EkU7bjUCU0f5j0uXzV/hUoJv/M/7nH6as3kynU7C+ldh60bcRqtcA9BzhA1C5ckngOdPzfDEGbeW0VfGn+cpPsRyeKLC1vvcBtCL9WMk5y44MO/jiH5mTSkiJM/OVyfltGJ5Z+jEiI/oTnIx7nPwQoLrx3NE5RK5/qaFOelGjCRtpeQ7YwXtClOyCCARZicqfaW7CKMho1Wz5mUhLjglxzQqRBbx5oIHzXGE29EIpGpL6B 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?B?NCtrQ2VZUEJmRU1WNWpYWGlCUmV6YmdlbFpFbEFQc1VaNWNjNWQ5ODkyTlI0?= =?utf-8?B?WFY5dGFJYW9rUmFoNkFHUjN1cTRZdzZBck1aTjgvbW0zQVJzallNNTdZWEFZ?= =?utf-8?B?eFRiK1JoWDd3dm55TTN5bUFkSFBrcW96VjJoYkdFZzlmY0FsU1ErNktITlQ2?= =?utf-8?B?SCtZWTZtWGZ5Y1Jhekd3TWJBV2FiSEdCYkQzUXhHNG1wZFZvM0RzTlloZEIv?= =?utf-8?B?d0lDelZ6dnZxeWVabUJoZ0V4Qk1nYkoyT21PbGM3VVlGci9kYTlVSmNLWHNh?= =?utf-8?B?MDYrcG1uUFBLWmZUQXRtVCtud3RnNkloNUdNV1h1ZXNNNWtuMDBINlF6ZTFU?= =?utf-8?B?Nm84WDJRODdidWdSWEgrMDVYUUxGMzBCSVBPcDZIbzZFd0Y4Qk53VWZCVFdU?= =?utf-8?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6f509b 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:34.9366 (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: cev87AmiUCDQJyJCAHNsDhilt4/m9ShoONRAslXOlRGQ2zFQ4PH7kAbN4+k8hbHltXlo43mkuaeSPpJz7weH1g== 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,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 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 Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-xenon.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c index 08e838400b52..25ba7aecc3be 100644 --- a/drivers/mmc/host/sdhci-xenon.c +++ b/drivers/mmc/host/sdhci-xenon.c @@ -578,7 +578,7 @@ static int xenon_probe(struct platform_device *pdev) return err; } -static int xenon_remove(struct platform_device *pdev) +static void xenon_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -595,8 +595,6 @@ static int xenon_remove(struct platform_device *pdev) clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -705,7 +703,7 @@ static struct platform_driver sdhci_xenon_driver = { .pm = &sdhci_xenon_dev_pm_ops, }, .probe = xenon_probe, - .remove = xenon_remove, + .remove_new = xenon_remove, }; module_platform_driver(sdhci_xenon_driver); -- 2.39.0