From patchwork Thu Jul 13 08:07:46 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: 119641 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1678093vqm; Thu, 13 Jul 2023 01:39:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlHU+RyDX22Qg9Oxx0PJ/zE6CYKk77CwYGoHodpzfrWSWCd6HE5AsumVHqmSydVR7HPuAThP X-Received: by 2002:a05:6402:12d9:b0:51d:94d2:ffd2 with SMTP id k25-20020a05640212d900b0051d94d2ffd2mr1429837edx.2.1689237551967; Thu, 13 Jul 2023 01:39:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237551; cv=pass; d=google.com; s=arc-20160816; b=FgbXcgwz0JPKLR33hZoJiJ9onEIF9asNebm2usZGzE9zyBIcz9nxuGlBK8GGRKShb3 wO2sa2VdpQ60LRU0Wf7aiLSozbUaxX8NwlEAvHF3nKOVaUxNS/jnx+TaT6k2HDSMCV/c BJtTWFXFJAIZ7ix+0EKYrMCZRU6pc1OjBT1cDMRs4cx6M1wVDea9/FaCF3IDtArlWpj2 Bpt8P00Pqg5uEIMRwAH6j5OT8ZZmXkzW/aXwphweiUJAf9lE4SjNifOUndYSx7DXCFz8 zVl9J42wRXXyTDa4CFucYeOfM+pN9bun69gNftu5a7+taagYIMdxG3Cln+y2pV61EE5u QsGw== 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=vyhbeNXUgBwkQepDAzaYajBffSTDYfSaQABURS0z/Nc=; fh=wZYlUM3eR9DzHU7b0SBT2HXVkVx6ajD54pczVSribH0=; b=UWEbkaAYNYI5Lr+y5bRvluqz9KpzC+K0r2JBbfQWM4Xs7uK6QR24HJaXz17wMollG2 JkR0qchIaqrxwwXA+paIkOiFnBODvaMMcn5SNoNjZ2XswhvxQWfN9/jN8O0KbAyGJt6/ /8GPdhJ7iDjwLUDTaZGUS0vS0zyAayIovIGKQ29WwdqRJyYG4lDB+2m/XHljOsfYxcHb bIJ7iiZ+axdFeyJ8Y/bnBHGVevSLfaODdlGsSKgWvCNJWrZvOBkR/prNdbzlJiRAERV7 dn9s7TSQsxeDGMwWZ/8TofKfwbeDSsCzwgtYUPQPEGCC+YXGeSEOsRsRzwhSY1uTM/it dgug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=g98B5KiH; 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 d4-20020aa7d5c4000000b0051ddf359991si6855301eds.344.2023.07.13.01.38.47; Thu, 13 Jul 2023 01:39: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=g98B5KiH; 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 S234052AbjGMINN (ORCPT + 99 others); Thu, 13 Jul 2023 04:13:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234053AbjGMILd (ORCPT ); Thu, 13 Jul 2023 04:11:33 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2100.outbound.protection.outlook.com [40.107.255.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B46561989; Thu, 13 Jul 2023 01:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dbhbVH2hERxPHY52LWq7/Ckgxkiz4fG1WTAhAKw3Ncn8TTwCWEhZMKRAxvZDOSi0CwuYLxUW4vaI3t6+JZEBLYqVZdrxvyor5rGhIc5mpIE6s0925qjUaCz1L21BDagRhJg3XrwSvnE/+EY+olUOAlVQ6vjPTU0q/Sn+RAVz+6UW+kuQPPYSTSSV6KdzRnSyFu0MVP0p6fW6GQlz91Ma7nOydOZxkqOICVnXXxYV89RHOdEEMdjOF/HxpWhVioJjPkacJRmR3x/wvnlc6kf3WDnAIZIqaVVAACef1AkcRWi2rQfs1gFCP5nKsymKstWWENx9bGaG3ffKlqclpWmayQ== 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=vyhbeNXUgBwkQepDAzaYajBffSTDYfSaQABURS0z/Nc=; b=HgqKI0vdHsrYi493pu6Vxh32DigfaQHXnm0lXDK8tSYVunHxSo4M1+k6EBB6eRy79c9p1ZSdQCA13VBqyHgAg35BgcLgnwVT5KBcr3SFJCH7YtkQvZ76e2SEZV14P3SbiI4lPo9lY1u6zIgmR+02JPoCK/fVDfCvO8QJWHCakOvVTqnp6PEC57vw4hV49ycuIbIsH037MLYorqxqplulE8wnPKg71vd4aCZxXIAFkCK15PC+OVwjQ4wnSTzQITjxHA82UhI0XFxUKy2deh6lvbw5hl3SWHSWBPqm1SUICLQkeziioUSNFKbyo1WNcGGiLZy7RQ3kvMkuLDGCOgk8FA== 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=vyhbeNXUgBwkQepDAzaYajBffSTDYfSaQABURS0z/Nc=; b=g98B5KiHqYILHCXHjabDjza7uZGLglBseExTep3eWOlmqgw4gGW3eKXHDErUCEJ1mkPxyY6/UXtoYZPTQN3c599uhOapK3ZFMtpT6+/JGe7U/PRNdS7s4Ko1RT0xz3XB94v5zqyfmeKPKlTDi72Ords6SvFQbxMoUUWTGxdKw0TAPsl7QLLgDXZIIPLmr/q+OrlWSI6BJ17oaskdsfKcG6iovoc5/iBSwWCcT8kz6NiRKgX4lald+zQSIMvanecH2nUCaHUWyM1L9ysdnz6RRwqDY7zDKkJRezl3ZOWFIN9bEOSuFpTm/kQ2c9jvLcRYbDmdov1egv7QA8HWvWPAEw== 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:26 +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:25 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 37/58] mmc: sdhci-tegra: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:46 +0800 Message-Id: <20230713080807.69999-37-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: 608b097f-ff8f-4778-228c-08db83787941 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E0wvJjjF4LRBa37fubI0Bg7mZwS+RLbcOBm8HH12kcMTUDUdJ5SwItfLvISlC8iGmk8IL9D1pf2HQECaT6JlOgKR/y2WiEZVel2r8BfQYpK2cFR55kR7ehxOSjYNzEKQTMPqxxUNaOjfk4DfsqCQOhbUhy8ZE0YZQ73aM/hCtxWhzo+/xFRk2T4GynXpxwT2FGeMtkGWdeDjs0tvHTdTpr2kcGo8PtXfA7T8AbxrLvVLTydf8+p3tziigmBptHBZo00xE+jUjQTGJhdAwdL/9DNwbkrF92EI766Vmi20yoUuDyDkhrRfvXA57OHoG8ijv4cajZDxTW7nWo/NfWlc6HMPK2z7fiiP9A3D75SfpC7/XqyUr7B+BltI4DpNZBLv1QXJNM3b8i/mKiKWSzEr9zZlyIOFCRN4wv2CsrRAfS+dRFPRlPKl9lARXOsp4qelzKTOvJ+xRw+ClqXPyxIlYnvrKn0onXaMWoGtSLs5DMJstpX+Nqq7rdRYpwevV04uJHZW3tFzPXNLtbNakYEBsg2y5Zn9sgn6CM2mpyRbNqgdvLLyOwzUT6ltdFgLBdcLVqI46DCMXJd1wNWy/73lI72rGWqdu4v+IvT3SltJ65/VgS+IMGU95SIIRkjMx7KX 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)(66574015)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/C4ROe35KJlhi63lqIQK/h8X052w?= =?utf-8?q?88A6IcCAFfG9+6gmYMQL2MACaiGrqCnWYY1l8V5P0aP7QKRktQolxWTxkeFNB38sE?= =?utf-8?q?HkKu8So30muRwZuMvICdBvb0Rvn6XjqMW45mPcmX3A4GZQ5Sn6wDoJ3qMhcybsT+H?= =?utf-8?q?LaiV/v68vfGTmgocbDkPgCZKyfCt9TL4hxjVN2RuK+QYYRLYd4SzsnABk77YMOBW9?= =?utf-8?q?BoZvMhdqPt/ulLEcx4uUgF5PHsluPW5ZPh8ho2X+OUp7K1SO7AJ1oKLm1vfFEuGuW?= =?utf-8?q?5q+8WXj9wWdOw24Yq1fUevO+9puTxfqpboM16rTOgAoy8m41LHzzcfmQTqg4C5zxG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163F?= =?utf-8?q?eqw9DibOaSOHLTmjllgtSx7G4nxpCcGrN9d7ZJ9Rjv9duzJ6yZWtWuos5gEJgk8eL?= =?utf-8?q?4ngLtsrkCj2GhrLdoiqVbT6VBjD++83vZEBEueIHTIbwsMQtyFOxIYxe6sKijpf/Y?= =?utf-8?q?Yi487qgTmgdMFyn6pq6HPxU05uUcYo5vY+XJN4nyoWeS2xyFWZSypRn4Lsp1V7U4o?= =?utf-8?q?LCm3Sjmtm4DaMutZG768hc4rx9mPukrsjiFGkF6dRcYIyK1FdjbRxgmNvuP8w8ujZ?= =?utf-8?q?aYg79u1TaxO7FAuCWJ2sFP5/eWTBPrcrVqrgJO3gWa0E78XjcdrdH6h8jkv4ZsiWc?= =?utf-8?q?QnnE0mngkKnr?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 608b097f-ff8f-4778-228c-08db83787941 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:25.8272 (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: IbVOEdo5JOIPyj6g67dd3yo63D/I1FjKCJ67VKlgxdGfyYprgdtjJ5XfieSE7PfJUFupZgkB2Bo91LiDmYSKbw== 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: 1771293955151894362 X-GMAIL-MSGID: 1771293955151894362 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-tegra.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index bff084f178c9..6a50413afc8d 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -1818,7 +1818,7 @@ static int sdhci_tegra_probe(struct platform_device *pdev) return rc; } -static int sdhci_tegra_remove(struct platform_device *pdev) +static void sdhci_tegra_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -1834,8 +1834,6 @@ static int sdhci_tegra_remove(struct platform_device *pdev) clk_disable_unprepare(tegra_host->tmclk); sdhci_pltfm_free(pdev); - - return 0; } static int __maybe_unused sdhci_tegra_runtime_suspend(struct device *dev) @@ -1933,7 +1931,7 @@ static struct platform_driver sdhci_tegra_driver = { .pm = &sdhci_tegra_dev_pm_ops, }, .probe = sdhci_tegra_probe, - .remove = sdhci_tegra_remove, + .remove_new = sdhci_tegra_remove, }; module_platform_driver(sdhci_tegra_driver);