From patchwork Thu Jul 13 08:07:37 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: 119610 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668128vqm; Thu, 13 Jul 2023 01:14:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlHb2S8vdGM4/fUTAde7iugA1xB+WOA/W2dNjEnfnyIQ2V4qOxgbShFTZZAg3gVxwObqNJiG X-Received: by 2002:a05:6358:7f0d:b0:134:c37f:4b60 with SMTP id p13-20020a0563587f0d00b00134c37f4b60mr1105595rwn.32.1689236058745; Thu, 13 Jul 2023 01:14:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236058; cv=pass; d=google.com; s=arc-20160816; b=kutEGgRrbDc9Nxs02mFnArwY1KdBql/aDT/yz+K+l/bmvJ2HO9KoLV3Hxkj1s8T2ZL hBD8UyTw2kqnlo4Wbf3lB4ZUJc0L3yTHtpdZ4w5eustitN+koWEVeR5pPwLUoUBoFZH3 yWtSr6iIfIRAd6vMDwME5Z//8pNyfkMqWTxdDW4oRVXESYipzb5RbNTOwqkgazMQi6kU WjtRno+c9g3yjc7mSte0+amyrkaTvCngwbkU+/nlMpg4fEmW5Jzetong0PMkQXIjVjBA V+8nP6qV++JUE1dWzHxtwDZ2zWANEKk0lvxrDzpI0NSKjSPtk+HyRMX/sIuofkn06Lwd /gIQ== 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=SpY6vRX9+fV+aGIzDgKV7CSAOZ5ZunmmE0jQlRuvPxo=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=Tm0u0rzWRrN+KLfa7Ipo2uNcMOtQ13K14A88H0wmhzQcfzMoJM4SNv9pJnMFUWJ7lJ QlPsuNi1J4G/4GJJytyFAGAdI55MOI8YQAcW9hBFZ2doGtxMvdsMVuNm4/HjKKIe3hCa p3XrfpMoI1oX2RLT9BSn2qqI+BZXZbUYmV7tSRMfp2R9u/A2oQ/uU9Ac0iI9ek63jF8/ USVAdmEKVtLSmDxMvcJCcOJEWrwQRlSxICyJca7OkbAmXeUnXUl/FRfaz19oh+HD2ErZ 1NJg9wck4DTakIt6Tgfez3tt4gGWmnT8x6P8SZVjIquHxGdwHTmyaf+iTlUSETuH5deF s+CA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fBdcHnbj; 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 e1-20020a636901000000b0055baed7e7e6si4676728pgc.251.2023.07.13.01.14.06; Thu, 13 Jul 2023 01:14: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=fBdcHnbj; 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 S233951AbjGMIMm (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234175AbjGMILV (ORCPT ); Thu, 13 Jul 2023 04:11:21 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F0032D5A; Thu, 13 Jul 2023 01:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AAfG8K8oiLmTcxK72fLT+71a0lDjX4zaQvspW/GQMcf/xXz6UFfPfq5GqCdpuLKYjSbLZyNwU7Xfk2OmrN4Mtv74m648GsE+WVFxfRszAy5QvV84ABlHqCuv9yiOSbi2ALoG6WEpof5w8LANFj6JRLiAfED8x7DKt+TqQQWN2pbsK8ZCwoi9wXBg2rOT2qZDYl6cudFs1+1JoqQ10bp1uirGW5OAeUADicgDK7T8L4oTLOkcUmmB/QY0Zn2biLOe+REYe1Mq+5fYOUd/CQ3KsMxRkanimRwWq7wS5Zvnrj8ezm5LYkHClIRW1Sk21dshRF0KZ53zYVGqtYNGZqma3Q== 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=SpY6vRX9+fV+aGIzDgKV7CSAOZ5ZunmmE0jQlRuvPxo=; b=HMDq/X6m8bBQTyDpC8haWdynrv7OZlsenJCXmyUfy7puGprKzenCJDXaI55iFwo2NgNrvilEvnaEVHkk6zjlDd4YW9d6yOZ9A49l6WAr7gy4IXC+fVhhBuZyCabKNnqNqG0/4gpt7hqWO2Hnyux7/HBPdF+A1jz5Ipej9qP6j6dJzcx7hwswhAQit4bz9nTX7y1ECMDE3L9CoBnHiS8++enqdSFpm4c0OxwbLlhqDgIefbRTAcwbTvzWcQ+nXaMQ4IL60oS/twWkhVmx+fp2q7jIzn77GAKwXYAmq1r4PKUCJWIBgx3dEh+PnBN5Gczmyu7e/05j3qju3DzlAGeftQ== 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=SpY6vRX9+fV+aGIzDgKV7CSAOZ5ZunmmE0jQlRuvPxo=; b=fBdcHnbjZ4vhrGI5tGlAbpy5gZBD3/cA8NnwTkk7DgfG6+45KCQDMMqKJKMCEm/AE16d7hux/ry5m++NgMfa87Is9RmpZJk3onauAfsealPbxqGntE5T2gJ7VX0UBQU3+ibVm/C3f+/R4KM5cqiZW0m8J4ZwZqzVMcCNS8dbLP4oBq+56jcnE636WLvHLLw5UTLvTbzEodfyWK1D6q3YqqwGyighH/WtHWnnFBGNp5sTEAmMXH8iuJYQZmDIT/wI2H+nV9V70VOGNmKVQweVwXzDkg8jHPbPp1Kjy4fqM5BoA9/IVo1EnVxvm6tu/DPgihQPaU/6Q1WidGaba7SjqA== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:09 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Thu, 13 Jul 2023 08:09:09 +0000 From: Yangtao Li To: Adrian Hunter , 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 28/58] mmc: sdhci-of-dwcmshc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:37 +0800 Message-Id: <20230713080807.69999-28-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230713080807.69999-1-frank.li@vivo.com> References: <20230713080807.69999-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR02CA0091.apcprd02.prod.outlook.com (2603:1096:4:90::31) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: d383a0e3-4b9c-4f4b-2098-08db83786f67 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cHzKSCmjj2eVBEtw9yVNG6ROnYxfU9u302A5Ot2ZwOzOOo8TdwyI6zvq5oz2k9RGGybaNoC0URrRo4KiqK6df7we61dD5phPeII4sz3PD6qBbctIP1E6i5Ys+8TIaC4CX9es8I1t3zeiqoGhytsDzJp2vP0KSZ3i0Gwt0HoQGbaTuxKgC30yebc+Xlp/lWaIXiE0zIbSoLKMGlTgTNTJKL8Zmwd/ZXuSHWpS8U09tcnHxNmUZoamPr1J3lNTpuwXxr3FcuagT1RKKGVvqoXjkGzBBLHC65z+g3c4KHBiI7vtQs7x2tIMyFT2RMCneDgzkAXyMLr2KFFhxZX3z7lqkuKAd70S7wwXXNs1OoENqsvKXAVa8Dxdf5BKyxKEX4I1IWM2M8l2DaVSzV+7M8LuT91gxK13c9Ac+0v48LOQpwIMAUt3FJuDa1vSGAfN40h2esRbH1Anq4ztWexLSMXaVK+0DP7/FG3lQFIGvbSLqxNy1jvWL84PNOkEVq2HU13Q83ttyHZowi/Z7us12XUX/1hMld468YFojBbbGFiVyEfIOHKPobYXr+xCLMjt8kKOUmCq47Sa17DT+wfWhb6LHFOeQ5qlHleePV790Fxy9WFZimCO3eKz/1cccZPZZcV9d9cwnlLz4hxyWtuGK1d6MQ== 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)(376002)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002)(133343001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?LIdkBnraeQyV1ffSteSwLEv1IcAf?= =?utf-8?q?aT0w+pLa4XcAPL91Neoi9NnUiLgCuQLjzqhOkrh0UtNl/0m5bwgqOPRsfiv31UdMF?= =?utf-8?q?hdc1si9QeO1CmQA8RX0Z9wLMTuDtC4CBTzH13WDDclj/KOqe27mneWDEV5epHcPJB?= =?utf-8?q?6SPur7fl4jkqZxKwbBsfDxUl75qj6OPA68Q43PCfgHY1iFM3uj5sPG3cH0ZFjJpjY?= =?utf-8?q?m+aaOo207zJ17dbB6WrsDeCalS6UlX1zpD5vt+g7NlMryRGsl0lJkHwDHiyQq+teW?= =?utf-8?q?GacCSOu0cbgBPtcqoE6yU62SB6Izrhw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g0jwXFKX08vUmTz8ITbWA?= =?utf-8?q?VE/KEiF7wDzsiDZHcYuKPmcckXxMNz2QKYic+csAruzVBiJ5DfvqCcTNhSLh7MdW5?= =?utf-8?q?e5/BKDySBWTQObvsu8OWGV+WxPKctHrHpSMFJg7GrEKjJ8JEZTvNCjST9VhVztqDO?= =?utf-8?q?joJv89cClXfVaPMoFC7AtWukuujdMnkHcRg6Aets2hyESLPac6Y/d2QaZLvRO34To?= =?utf-8?q?vUBioyNTIdwZ0tzdSdnNrFfdL7ow0X3V+f3uq4eV5NovBuKvORzkxcfq6pbvRr8tN?= =?utf-8?q?sOuV8JivDT02nGDiz8u1UQ2KroON62whMjXPaXsdDAvjWDvT/nsR5ZBzSgkIyKAQ5?= =?utf-8?q?/OeGfrHPRVkn?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d383a0e3-4b9c-4f4b-2098-08db83786f67 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 08:09:09.2708 (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: 6n7Vr773Ei7oycpmUGyAJqiWWuGrVWIelnE6zbtB6oFXNFfffisfLHtwYx/3SNN6KwDCyTWCfF2poWhLe6Mo2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771292389900354322 X-GMAIL-MSGID: 1771292389900354322 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-of-dwcmshc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index e68cd87998c8..5cfd24cd33fc 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -574,7 +574,7 @@ static int dwcmshc_probe(struct platform_device *pdev) return err; } -static int dwcmshc_remove(struct platform_device *pdev) +static void dwcmshc_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -589,8 +589,6 @@ static int dwcmshc_remove(struct platform_device *pdev) clk_bulk_disable_unprepare(RK35xx_MAX_CLKS, rk_priv->rockchip_clks); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -657,7 +655,7 @@ static struct platform_driver sdhci_dwcmshc_driver = { .pm = &dwcmshc_pmops, }, .probe = dwcmshc_probe, - .remove = dwcmshc_remove, + .remove_new = dwcmshc_remove, }; module_platform_driver(sdhci_dwcmshc_driver);