From patchwork Wed Jul 26 04:00:27 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: 126116 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp194188vqo; Tue, 25 Jul 2023 22:48:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlEPN+A103dNwg2ry1Fv9S+3eVnwJNByabEPcsv/+dlhLUgR0gXv6xqh+WA8DCE/rzhl2MKx X-Received: by 2002:a05:6a20:dda4:b0:115:5ed5:34d3 with SMTP id kw36-20020a056a20dda400b001155ed534d3mr792348pzb.20.1690350498504; Tue, 25 Jul 2023 22:48:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690350498; cv=pass; d=google.com; s=arc-20160816; b=rSmgVWbuV8kt9dSn4Gq2n4BNEVKUCNfU3gEMbDHvNVrVGMWo9e6EK0SDgl25AJsAtX PKFHB/4+5hhXpyQKzc1iGR09zl0ujJpdueVsn0NTBZVAa4hBermAof9HMNodlyH+DMFa GbyO9SkiLt/hE8o8HfQbPcNDI12fNRc51h5T9JknGx9/mkBWfIjvMMpZAeXRDsqTUO/i LWcRW7gzZC11cNyI073OF3STu1ZBXJXvdanGwcVUBj6+WeVXWGBmuK6zeTU6rdS1NB0S /jMvf8GivnKEMUN2Zk2PytUbKMfEGdVYXXlnR2/xQeK55gXom4+AH+R1Fzn+veBHsc41 Cqew== 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=lg9rpO+O+Vuwq16/2wqHAmJUAen0JpqCAiTPkimHe0w=; fh=0IxJXeUvkLg4fOfNSZqaLHLueSytlsxbZbmTt4C1D68=; b=liO/hqvQRP/Fcj/nP04Qa9tNbfeF/3iirZhNTOLDpnS/MSdP9CRV5tQ6XpQno00g57 T25hWpnTzExJMx/TH14T4vNptVSdkRBUazLQIESfh6eGJDXJfoy8wguMTA8dJuZmDvCy AM82sfG/lMeeP3PMvpLudeqj6inE7qO38LQ9FluTQhhPS3hgc0HlzzBi/QRojf9y9xe4 LX8m8dbYwtlElNAGYwN6dTQGDo6mXYZYKIunkEDxO/aYKHu0csUlGq0CYsHGjRyqLivX mW/e9Pl1lTM2C8cgM26K8JvYShUx26XLCjUg/SiRQaTrUa8gtSck/Fw3PDu4dlpZUpE1 eNbg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=X8zy3zNt; 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 f15-20020a056a001acf00b00679cdcafec1si12678788pfv.109.2023.07.25.22.48.05; Tue, 25 Jul 2023 22:48:18 -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=X8zy3zNt; 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 S230003AbjGZEJ3 (ORCPT + 99 others); Wed, 26 Jul 2023 00:09:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230396AbjGZEIZ (ORCPT ); Wed, 26 Jul 2023 00:08:25 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2071e.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::71e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0C30448E; Tue, 25 Jul 2023 21:04:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j4XHDPI1lHO+plL/VmcgemDDo1eAWJAsFIDKYZFeih4dpVpejU5v+LzO1SdacgZkNZ4vQQ8d4DGD/umOZCgtT+UfRFieoEIkhq4ASfhhq2REXEDwDFm8i/V/Fp7nQXQlTLsGyy9y/xNQTLkfA/hB/NOaUCxkI/b8fGyugYqMDJhO5y5oCe3W9tpY2y1dmTKG50KPAKhq1TWU+tcsH05bHPHquDc+8WhgkoE1/iQS2bWGATF8WU1xshLjLFHTKvLly2hF2B71WNSvCJSzC76z74UrtnnXCmrJcf41b2IL3ZyKrWsf24ywGvc0TNJcZ2J95R66BoBsPuX9U/Ziy9pwhw== 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=lg9rpO+O+Vuwq16/2wqHAmJUAen0JpqCAiTPkimHe0w=; b=XCp/M99SFUhm2aT2Fpx4vE9avbdVGwAxKnGCzyPNDYeJzQCrqOabFcAXOLrW7pNEF52213f8ehvmnBQCzIerNdBB+q+8U8FZtKYg9M7AonMblPEqyMvHtdkFauzB+GfS4UCcT5Z2QU+Ulx9e2Pgnkef0ZDbNz5pN1v4VCy9DmxpHVeA7Up/p45uYA+b+IAmJQiKpQYEuNh+5lcdbO/+ZhRZfgj/el1P1vP7ewnGU9IXC/V7zm1Sk95HkVA0Cm4xy02V4Pq43zfwACIXGCrkYDjcON3u9evDI+/EKKKtDdQuq8bl6+IzvaLRU+ZIT700qDqPT2S50T9h8pGCWNuEOog== 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=lg9rpO+O+Vuwq16/2wqHAmJUAen0JpqCAiTPkimHe0w=; b=X8zy3zNtoFEIPoyvS+JTVGircL8d45et4Ip4b6WnSc/exjicFvT3bofyGESVII5jhtNlymePgb1nwKScqYYm/mJyN2vYvsgsZq+dOi0v4q3I/h9IRlS+XEKY1/cuu9nGdI40uERkPMriLX3c/kyAntj6BVYqV4cv6+Ov6wsEs8YhVdZpWn6Yzc0RAWE9DU0bzBzLrBpPJVESJyDErCFQfRfYcDFbV6FzI+vTiYR3tLtCo4sK7RfmcQcBFtz53R+mj8Zs4orL5CjSauZCoiR2OoH8DKCFuXOuRixFlInZeZQFQAV0DoUip7hds+NHiv5TlgnsOGEED/uVUfUIgHTADA== 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:31 +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:31 +0000 From: Yangtao Li To: Patrice Chotard , Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 47/61] mmc: sdhci-st: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:27 +0800 Message-Id: <20230726040041.26267-47-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: a9eb9e51-28ae-4395-4ad1-08db8d8d1c9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4KOa4FuVgukNi4sySAOxPdfLBvTLVrsSwfKYb4ParvQItOXQfzORcPfINP5+st5T6/I1uPCVReqozM8rb1gJBgQmxINt/WPWtKVVIgqRvX/NiUX3DSaggjfoA7rs/n9JuTWzErJa/mdOSRxKBb5vDywhiLFm1zTdBMbm6rDllfFjmadVsEGUJKwQ5y9hcQPGOir/zYtx889EOnZIc7v++NpumTBOz8T1IpsHwXqRDIqF5+b/JVSUtGDKgRaetwsVKMbvlHrOz0WFedGb2pWUWYS/FawZn8VtxXw1FQh8CNdjpvsnFc6f9odKmXOZw/iBnLyr5k6axlGyMba0cT+4kJpeEVW5sTzGO4avWmwX3xMVBlE7fhe94PTZ0NEKSBlXnAeS1yg79loda6SG1KDQlYLZSxrOW6ULZyqUBl66JK72BmtQparEodzLAKlOpJuhraY7xgVrUrgYqthy78pe8fNkMI9dqBDNfA7vGynMNEStcmTsWQd7awHE91L3Q326G4/vZmGAV71nGwZseo26Ecouwt6uCT5gH+fLR7rRzvmb4vNCJiZEYfI3nX6NO3l2h/gV9kAT363GJS1K+q/mR5FCVR/CshE9HRJb8xY8tW2IUMpvWdRnKcsbn1o2NigG 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?Si1w1PPOtvmAtr91fPyPR2KLq4g2?= =?utf-8?q?eUc11ZMOP51QXjteBt71NkHRpgd6OInKaG14uR0JBQmol0X5Ha0N1Mzh9AylLyPaG?= =?utf-8?q?Xfz+POrmSCDHiVmhzMUurLsn1PEQ+UOruHEo+vEiPvsPbhbmhodyqz8GieOWNLU+P?= =?utf-8?q?8DvcD6/6GdPo3yOJQzJ39c9K0Rxuu5KfIElM6CbkVpDD2FKTsj2+tzAjWymcmj5tc?= =?utf-8?q?q8g7PuyayUe84Dp6WrRGWFKvrNQgu9rpda9kWlYfUhlERbJmiExxkA4dPVENaCAsQ?= =?utf-8?q?H4xsK4NN5rU8IPez+khc++xPha/f5h50fkvkf4aD16wgtwzwLTAab8/E1kk4LBaIY?= =?ut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u61/4xl8Ck5/4bY357GfpZaSe8pMkyaPl89R1NuQ8ENsmwKhhAmhC?= =?utf-8?q?C+SsUKU3aNbM9fC68/EPzR7whicuFx73sZKdVu5g7p73hLM2pJqEi4IQSLmlSrSVn?= =?utf-8?q?fK7dC9HrmNhMDBK1M4xG532HIVnBsuDIHUII74a+jT0MeQWMjZsYqdbZNBlKuM/c9?= =?utf-8?q?I7c6ecEJF/Zvj0NEA8aWlCFFJWfJlUxTGntzmxrMRPcnE0EwpW1jwr1R7kfjtmQuC?= =?utf-8?q?qqlwRRxAUCtiXsvlS5rNV9aLnZKnnlzG83Ve9SQ4fjefLtPqXvRr7nsWJpBT45zS6?= =?utf-8?q?iTHwlkIU/hKH?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9eb9e51-28ae-4395-4ad1-08db8d8d1c9c 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:21.4588 (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: XUR2cmGN+Go73rY3Xn5lUxneYW8DTNS118ZrBg+kHsgDmpZms78CEVIYAvNoVlnEKn0wd8mImY0+ahLi8lM08w== 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: 1772460964110050255 X-GMAIL-MSGID: 1772460964110050255 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/sdhci-st.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c index 6415916fbd91..d955b5f4b7e9 100644 --- a/drivers/mmc/host/sdhci-st.c +++ b/drivers/mmc/host/sdhci-st.c @@ -434,7 +434,7 @@ static int sdhci_st_probe(struct platform_device *pdev) return ret; } -static int sdhci_st_remove(struct platform_device *pdev) +static void sdhci_st_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -446,8 +446,6 @@ static int sdhci_st_remove(struct platform_device *pdev) clk_disable_unprepare(pdata->icnclk); reset_control_assert(rstc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -510,7 +508,7 @@ MODULE_DEVICE_TABLE(of, st_sdhci_match); static struct platform_driver sdhci_st_driver = { .probe = sdhci_st_probe, - .remove = sdhci_st_remove, + .remove_new = sdhci_st_remove, .driver = { .name = "sdhci-st", .probe_type = PROBE_PREFER_ASYNCHRONOUS,