From patchwork Thu Jul 27 07:00:39 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: 126728 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920218vqo; Thu, 27 Jul 2023 00:35:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlFg7vE/U92O75j0JgoZ75uspda+6eKJ+gwcUIsTuZs5dgVZZzCdh//0gPArovW/dIJ8mO4j X-Received: by 2002:a17:902:ecd0:b0:1b6:6625:d3a8 with SMTP id a16-20020a170902ecd000b001b66625d3a8mr5418029plh.16.1690443303937; Thu, 27 Jul 2023 00:35:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443303; cv=pass; d=google.com; s=arc-20160816; b=yISHUP3jXtI0yC/ToIQ7AMIJAmt6PVgmhNEvI9G6SNfu4X9MD4VYuPGkpTQFNeOaMW kEcgpk0Kdv3tr/KTdjOZ7FEbvCh/Fds3v8hALQS3uyck7zEkn6n5liutmP8PpTObfF18 HMYlVfl9YW57e7DMmaAAXdEarKbxrHTOLH54PMqrtcIb7Yd2LemiaNMxRjU3VgZ8SXA0 xAUkeP2ojtmVdvwekQAme4tcNOWKlrMRlAYLmWnLWYnO1ZMhC+d4oE/e5koLE5MwoZR5 qleSg31PKxR+iG0sYoAww08/ToquNt+lXBuUx6isvYVlqYknp07P1gj9JfOO9ACGxOMx 1S9w== 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=/w/6Fs9xKHR+EexM64kh9CpY/b+Wy9xMwnRnCjo2yD8=; fh=M5PJ0QPvxaEtzFzT/QWaP4ZjWGMUHe+0XLMcM/KMfKM=; b=uo+YGkoy2JciXpZsw3VjRFgNFPsJkXHYCM7hUkMDkOmqnWJ+hcaoY018Llv2x3STKa bemE9UAsnZXd17s++Q8PQknJCZ/HKhby/uBZc+7bXYJOz/M2HQWrabTVOnC/zPDn5fIL R/Jnfw/qTZvPntmnSEBLg/xQ7dlDjLHWJNMTfmA6dAuQGuycEyeV8+3NDGxtQY6MpX36 vQLMsGDv0TB2Kk0IjZkcCNrc88ICe++mqH1DwwX+4497maDzwEBwSlGhX3gv+vQRoMq7 NwKKxmkOKejfwCjyUNygGMnAARr2JWEcUGRbDzUTWgAtSZG/XV+AhdyahjCWgryaBGNf 5xXA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=MFFJfyPo; 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 cp9-20020a170902e78900b001ab089f7329si909002plb.73.2023.07.27.00.34.50; Thu, 27 Jul 2023 00:35:03 -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=MFFJfyPo; 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 S233142AbjG0HKT (ORCPT + 99 others); Thu, 27 Jul 2023 03:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233140AbjG0HJU (ORCPT ); Thu, 27 Jul 2023 03:09:20 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2136.outbound.protection.outlook.com [40.107.215.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 185D74C1D; Thu, 27 Jul 2023 00:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FvkHurdC6Bsf/dlmd8nGKveZU5XNdV6VtQOUpSBlt0yVzq1nDJYVt2CK4jvMckCmhKi3I2QSkxBtHJQvKqAMfDF0uf6udYa8Juj0ehm5Oq+197GVuoYvRg7osX3ktlreHW/LaFfcrDyv6QM2dWBZAh90Zr67SS56wPs+N54o3/a3xDZkDwe18eIohsEwfqjWsEhto2M8qAob+0JpXTAqj2PcKt2QCejzrmj7PVyxxUMBAtIXb25Dkv7OTGkhmhxy+E7tvJ1eRxjj6VNLwBPPHRcZ2KDxVwjyrEWSK3sd4n0b0q5tyJhbFHnl1eqkRbkv24eWs6+afkkMEjK5a5pTew== 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=/w/6Fs9xKHR+EexM64kh9CpY/b+Wy9xMwnRnCjo2yD8=; b=UeV6l2Q9wdJTzmLcuiyEOSUfUHghSk7kUm/sVr0NNODBXvkC0XcEPY8Ry61kD9tWSi4kQ29WqeR0Adzdut1pk0X1erciFstxZh8eau4cGMeuDGE/seqC18OdyFScSfWSdUHmacIBtezkJ3Qq/M2dZiNU137/PTmbLwvIPgAGjWYazzY0KwX7dxMwWjj2CGZK57+iClDFeQ3ZYj4A0ZBHwrnUplP6zByx5ewJK9X0DDx11v+s59EiawBSBzfRJSxSZ5eEzdqf2ZqWeAlWVhvcEe54ue0l6rI7hiN4cko1fbmd7BVWkY38blsi5fsmq1ic5BQjh4TFj22epaVK9ZGhTg== 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=/w/6Fs9xKHR+EexM64kh9CpY/b+Wy9xMwnRnCjo2yD8=; b=MFFJfyPotjjQxf3vBJS1sL4JzAC/ZnDfPvPaA6rlZ5HO/I77iadavi7hfHqGrJkTGpa6muhfa7jyKnM8zCCzjvh2e2W7bMbnVTaKtkiy4ytqiMtPXMywKpeWG/nCp5xv2zeSiCGJ5OEGk9XTfTzog4aI2eeGubKDYTOxV9Sc/eHuNdiFWcqVw1S+2sWEsSnUb23UVFcD+yKXXItl0svQfSwhZn58Z0haPHTEathdPetAeN95h1t/EipFIOQOttRhzS9/q/N5m0vl1IuLUHilFsg03md26PGPVHZ0UB4UkiFut6pJG/lbORmCIcAP+lpamSGa/bJGBwlB/ABq/vKu3w== 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 SEZPR06MB6644.apcprd06.prod.outlook.com (2603:1096:101:181::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Thu, 27 Jul 2023 07:02:44 +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:02:44 +0000 From: Yangtao Li To: Adrian Hunter , Viresh Kumar , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Viresh Kumar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 50/62] mmc: sdhci-spear: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:39 +0800 Message-Id: <20230727070051.17778-50-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> 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_|SEZPR06MB6644:EE_ X-MS-Office365-Filtering-Correlation-Id: c7819afd-98f6-4992-d65a-08db8e6f6f9d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZAMJNADZb4w7SVadaLBU8cEVtjUkVY6UCWujfRyiF56f4/UY3bOX1jvmmZ4yNwioyrokZAAEY2ZLFNadPAxHojnFjncNA8NgPVhq2vA3rxk0IfV6DR6Y2IGlW7RWH9/UtvySYmACLtZXc9ozD/CbNgM8r/yZe/iEpBvGhOkGCv5iwFr4g3NWKtlToE2/vAknhLraBzlriG9ppiCuWOfac1EXKUhsV/AWvHzTD7m3Bhjt3h21t3iJbxz2lmwNMZjWz9eWVTcbzZC48K+wd91IaY+6RxzSQXcWvkS8Z64hGslzYutSG7SJyQL9gOf2dgYbWfJ36EPnqeci7me4yA5YRnGTlOsTDz//9Ou3fc7gkth/ok3j4W2BXDjm46dnrF8zrvbHVl5s8o/mNkVRVWyLMeuioLl8wCWZsEicnVc6LoHuwSzrl8+ukE0l3Kl5oUGsQdbMOkcgLrDw2ZFapXksjlK2JPndsRBHbli0VAk8O8cgpRW3sT+7L6a+iLU2uu5ByqPUQq3DOLCuQbmrybUmkE0GgCxDnGcWuvtVriqORcbpApV9vneUAAOfakeR2jv+HErdpfNZGZNzKs0fCatGKXpWxhH74iPp2idNZ90r6vhEIwqIQ1g0HM+kQj2424QD 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)(396003)(376002)(136003)(346002)(366004)(451199021)(6506007)(1076003)(26005)(186003)(54906003)(478600001)(6666004)(110136005)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66946007)(8676002)(2906002)(5660300002)(8936002)(38350700002)(66476007)(4326008)(86362001)(66556008)(316002)(38100700002)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6G+5gLP9A7iV81qDS39M6jTkw1da?= =?utf-8?q?fh9Q0/mC9vqEZyIDpm0LbPIxjOUpf82VNfDulWzOm3iekefg+aViHlXQ65mMJhell?= =?utf-8?q?XpRYAsr0qEounAY5OTSHKu5YN8K4Kuhdf/GhQeQDJeVN4ogDXOHv7hQedXVIVggzb?= =?utf-8?q?HRisjvRylIxoUOXXYst2D9hTZC4ep3rzb1rJB5GjAiRucQpSb29v4JClAo6H5+kkZ?= =?utf-8?q?onlDx4Sq+5Q0keAAWZH7MQ17nMxvwx/V+Gl2NrhcdsuUhT+aa8n/KsQWwJ8jhuP0O?= =?utf-8?q?gm4/b405A5PXSZlVwNxNUJrbnyTPrrqFSiniVhZ20nbLjGTqq5HHx3d45sokKDkxW?= =?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?= =?utf-8?q?sRiVy6LAiAkCOilFsvBZsKFJa4JdREv/swKfZ+y7/oPS05wNludvd9UEbuTLfzEKN?= =?utf-8?q?AiD/A3HZpyBjhAIMu0g2h+qz9U9bWbwcNTCxzbvrZ5XpKc0bE16bWr+leJgPzD1dE?= =?utf-8?q?yQxDQFMuqm2GeaBNlNuWrPj2tXuVx0cXjyqeJXvVNRYX1reijibvcNjBLWVQ2uVbT?= =?utf-8?q?nQTe73tpbVEKXvR3h3PUF+co2gzHsSlrziSNVSI5BQ+LPG5g+oN9GfbLZEHagO/Dn?= =?utf-8?q?DKWoMUynA/MAmsmNK6dhvZznx3sQ82WOL5LNAoRkQUGurDqNqlhI+HdkZG8gmgYR5?= =?utf-8?q?GQFi2E2d/h14?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7819afd-98f6-4992-d65a-08db8e6f6f9d 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:02:26.9525 (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: H9ALygSHYvuPPJqeEVbHKGk3SatsPF2QpC+PXShpsyMGH70TcCWKphnpUvQV0dIhQhBH22V1MJ7o38nvRtpMNg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6644 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: 1772558277521675088 X-GMAIL-MSGID: 1772558277521675088 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: Viresh Kumar Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-spear.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index c79035727b20..ec6c7d8e3736 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c @@ -117,7 +117,7 @@ static int sdhci_probe(struct platform_device *pdev) return ret; } -static int sdhci_remove(struct platform_device *pdev) +static void sdhci_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct spear_sdhci *sdhci = sdhci_priv(host); @@ -131,8 +131,6 @@ static int sdhci_remove(struct platform_device *pdev) sdhci_remove_host(host, dead); clk_disable_unprepare(sdhci->clk); sdhci_free_host(host); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -186,7 +184,7 @@ static struct platform_driver sdhci_driver = { .of_match_table = of_match_ptr(sdhci_spear_id_table), }, .probe = sdhci_probe, - .remove = sdhci_remove, + .remove_new = sdhci_remove, }; module_platform_driver(sdhci_driver);