From patchwork Wed Jul 26 03:59: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: 126124 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp209007vqo; Tue, 25 Jul 2023 23:27:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlGvOoJm3InXaORxdozYCqRcmv4hsicv+qiGE541+M8JPczl4bszzKxV8fDRy7yIcAjenXP7 X-Received: by 2002:a17:906:3156:b0:992:a836:a194 with SMTP id e22-20020a170906315600b00992a836a194mr983147eje.59.1690352868874; Tue, 25 Jul 2023 23:27:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690352868; cv=pass; d=google.com; s=arc-20160816; b=j9vwH0FJaZmVSEl+sh4WoOCpxJ15Vbadz6884AsuMlVx39qap47rH7pktye5XJsjCr HGOYxJSWGdK2+bts/evp6z2xhE04FS19EUyxJJe15XV2NqbJbdBLMaQ5QsmKSaLi2/+O xx8C2cWkgUHacdRpfQMz8puA0pQ7NxaE9SZkUWjFwqUA1xHr6P8RQi8Ji+EfMoKPI1iD GFHHyjT6LKY+rj01BoM2Wo8s0DdChN4xMjQY0Ae7/jA0FVJ+8xzWZuk8ew1NeSn1j1OS rd3eTU9Uc1gJBGAQ8VqxYR4UE+Y/blNEW/dHBYyrMVIMOGgfJL9lWZd51xHA89L6ePl5 v4mQ== 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=cO/T/iqSahPS1fYBVSCrfdexxtG7yArNkbxS9PglIXI=; fh=E03QyiWENBCRDAuP5hv9oopN2sdsL+hYvdCq53xM60g=; b=bt/Fq+J0osUEcbEz+SfEjByz3rz48dgRRcWgS96/16gXYxvz+hsmH7FrJd8eIpCzyd +tWVvf0VhA+VAIo8z8A0GUuFgawyhkmedfZX9FQPBleM+ma4P1/BPvMks3yM8k8vSn8k ljRD8EsFR0fFcwy0jvaf4pK2gy3UPJQjiHo2ksD7TC7GVSMbevEmxNaxp2nTkhbAa3jd hbGfIFk/O3OCN/bvwus9hYFdJYYNiGHe6oTYv9/zenFZ2oLMVT+rZ4LGHlfh2pIo+OJv eCIRrmUpubNSFTlVMJKPErKs89Nz6n3ggllC/h/A31c9T0Pdw9KlAD8G0/4HgO2JBhsX RnxA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=QhMbmKRD; 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 m16-20020a170906259000b0099367350a83si8719850ejb.898.2023.07.25.23.27.25; Tue, 25 Jul 2023 23:27:48 -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=QhMbmKRD; 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 S231421AbjGZEBk (ORCPT + 99 others); Wed, 26 Jul 2023 00:01:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbjGZEBN (ORCPT ); Wed, 26 Jul 2023 00:01:13 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B799C26AE; Tue, 25 Jul 2023 21:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q6Fj2eaCRx8IYRQ1S2pTdSEL5ARbT8T1qV6G9GIOxcxQZ1AVN3bFvaJM+8ykxobvEMor/GThm0vaiJaTL3ziXTNuv+TfPt48P690gqdFnASRotCTfIjUwplw4RNG89TeEPAZyT+Ep39TYGLWMulXFA1oLv25vGZl1Sqzfk2MVqR/u4zBoUM31BxVXaR7uS1RkVYPwKLULdkSdv/mquxlmtxJj3UPUsj/L6c4SqIPoKIPqg0+ed+UaE61BM4GC8b469ipG1k5xe7GVVMTcz6W2ZjCvYnFE9lp90SxWqip2ZbYvt2sOCxskfVIZw0W3B9xk8MM9+5kaVH8o1KbdsorMA== 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=cO/T/iqSahPS1fYBVSCrfdexxtG7yArNkbxS9PglIXI=; b=Fd9oFGRnnzLi+AlbLo8y1jFKTXmyoDmbwne7NVmEz3v6sybuCYSUw+StAXyHlB4gS87NDL7QCIPiKQ0H6RmmIDDeo6xbpi3LBLhixwpkRsTf+h2DCGgX7YTo0r+m7g3qnVRu7ZBeD3O790fRjtWfXZ4qNXkRj6d0mJKcayCJ1+fp6pb5wg+/sTkvg1VBI8/PWM1p2TKQL7UfFxMWZLwAW4k/p0BCUQ0jVE7M1hUZ30ARObhz48FhpNzzM8lUk4drohzLw4EeWMnVr2GU1JS/f3eWbUwdAy0NMtgIjinzSgzrLXYEiZM1TT8u6NjU0lfNgcCZJyiUoosuHKpDzGhHRA== 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=cO/T/iqSahPS1fYBVSCrfdexxtG7yArNkbxS9PglIXI=; b=QhMbmKRDdXg/OOQl6guPZoP+oZy9Zw7wimdcwfz21ME/zvYegLzLrQhJNP6GJzaZ7rleJE+mFuv6MCJxLHKP6Y7WWrZ5L5lBburryLpFkYtuU6H+V3M8PDYO0FsCi2LEAmNuJ+oh1IudwNcPhSLhltIRN22J14ZJpudo1M5I82BK/YNokH0x/LjvltoDdjuEiSzt/AAKrBM9SaUNoDa4jg20N0xfdthwrBwtXDhZKh3+fgJqk/tVTZhjrvofKOXa5I/zRc1wptjMt+M97pKLJ8xsXOXLWMy0msojDyS1j0XVe2on5F+0ykUynkkJPkYJO0o+M5ihzVtXTI2kEM287Q== 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 KL1PR0601MB5463.apcprd06.prod.outlook.com (2603:1096:820:c3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25; Wed, 26 Jul 2023 04:01:07 +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:01:07 +0000 From: Yangtao Li To: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= , 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 v2 06/61] mmc: cb710: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:46 +0800 Message-Id: <20230726040041.26267-6-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_|KL1PR0601MB5463:EE_ X-MS-Office365-Filtering-Correlation-Id: e7f4c318-dcda-4de4-0f5f-08db8d8cf09d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wLQCY1k12dIcrpD6mDGr2zwjvt7VUyMsPucb03BhjehQmdPbveh5ZKpCqCOwK45KjPkYtOTNL62MJHnFoMS/6Gxhbft4YlxR+KUtLtG0YRBgJhMQdm4TiU+vNR1sAY5bVN4GhfxDkU7iqQ1eX6aH5hz1qaysLCtxcgCcEmPfZpMCJXLofLsclJunctrEVkMU7Bbdd46C/tm0vnwwYEBKpMe30BCchBcSJpmt2lBghH5MVwaJ8GlaNq0ZBfHloHydOGBcLJ6pNLM/cmdod990TieIXHYTMVs8MA9hPQtdfi/c4sLHniDSquqIraTkQ/zYH0bm0GVfc0aCm0DHEi/9/OgUSJ5CRd742k2X9necMSEInaqypfGD03PKVy4aq4YgHQQehgTX7nOsxu6soj3GuTCLlv3Mo+IQ9cJnewiRvRbrIynvg2uUxytI1orKvjvbFVnj+wr7SNJpRPHH8l9Bi2i5zZhSS2verJh9YtgR0CXh7pu40vXUZUWwc1MbWd25mzDA58aZUHHPhIv6QpnplQjaBcN0q9FuZfs1YQHQUD6jMURD4/Mzdtcq2P4Fj9gMU75ujF+2oeys3DlCeIfZ+W1bOaU1yO2xxNh6l0cVUtM74Ndv5vrlbzRg8yNFMuzs 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)(66574015)(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?k9KjAdbL/AhGgcizUpSPUwNNcq6K?= =?utf-8?q?16vR/CrwT+Z6rdb+g7lUQ+I2E2+easVpDspLqAWMR1AP4ytO9HnuAUSKWagcBw1DB?= =?utf-8?q?LsU/48gxxNlXiPmCw6qikDaRvj5Vt2YAwqc+ZYswSQSIRzVwhXAZp1FXf1AEM8xX0?= =?utf-8?q?WS8tmUSOnDoqbHUK0/hYx4ZEWk0VnLQzX7P5/kZbItH4NqTn1O4/rfpqAtY9RFyYO?= =?utf-8?q?1EAm+Vg3Rm3c6rWwP7HHtcTQ57ii2vjx2R5pySAqeSlO1mGvBcdqlA9DvWFxdDnyj?= =?utf-8?q?g1W2l6VEI6jJSEInoYNwgkS0E14FM6kcIjDaLIKDmSbHT7f1/eRQ6op0W51tI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2cWgjfFiwG++aJh/HC8Ojr7BSnLo+DTyCSOW4+XeGsl7WznfyopLea4CGHTH?= =?utf-8?q?tGIUaGtSjdik+Ord+eBsPBB7MO3txy3OGx4MJcRk4/yLwff0x/lqUJ8R2GZODaNoB?= =?utf-8?q?wqyOGb16PnBLTjG3Vay8fVzOlbK6C46qX5rQ2GRXDQ1zpnUtRa7ZH5xrD35uBKFie?= =?utf-8?q?gR2NekZeNEU6L5KU5LdK7gPuFPY5n7bz6lsDFaoxzhrnSMI/NG08h3lAR5HT5rYYj?= =?utf-8?q?ePnqN1R/fKq9vsmWf8YrVOLQmsCkHSxNW2Ok6F4UIiavUfYrjvUKig8piFjIId4qs?= =?utf-8?q?/Hi8MbOhQ+TP?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7f4c318-dcda-4de4-0f5f-08db8d8cf09d 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:01:07.5966 (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: XUcIEx4xz10cX0FJjvBbUcd0h+GklEfN9Pqbhpnxak2irWl4W/01ec+sgjNeUdCo3fsubaw3Jsh2YZlmcbyhOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5463 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, 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: 1772463449718684752 X-GMAIL-MSGID: 1772463449718684752 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: Michał Mirosław --- drivers/mmc/host/cb710-mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c index 6d623b2681c3..0aec33b88bef 100644 --- a/drivers/mmc/host/cb710-mmc.c +++ b/drivers/mmc/host/cb710-mmc.c @@ -745,7 +745,7 @@ static int cb710_mmc_init(struct platform_device *pdev) return err; } -static int cb710_mmc_exit(struct platform_device *pdev) +static void cb710_mmc_exit(struct platform_device *pdev) { struct cb710_slot *slot = cb710_pdev_to_slot(pdev); struct mmc_host *mmc = cb710_slot_to_mmc(slot); @@ -766,13 +766,12 @@ static int cb710_mmc_exit(struct platform_device *pdev) tasklet_kill(&reader->finish_req_tasklet); mmc_free_host(mmc); - return 0; } static struct platform_driver cb710_mmc_driver = { .driver.name = "cb710-mmc", .probe = cb710_mmc_init, - .remove = cb710_mmc_exit, + .remove_new = cb710_mmc_exit, #ifdef CONFIG_PM .suspend = cb710_mmc_suspend, .resume = cb710_mmc_resume,