From patchwork Thu Jul 27 06:59:50 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: 126748 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp922064vqo; Thu, 27 Jul 2023 00:39:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlHmtrWQziUdAwkR4DVeAGqfBY2jr7fMNlCmfgPPFvbiHHQlhQpNvRpPPOaYxsfLeTl8iBbn X-Received: by 2002:a05:6402:517a:b0:522:1d23:a1f8 with SMTP id d26-20020a056402517a00b005221d23a1f8mr997019ede.26.1690443552922; Thu, 27 Jul 2023 00:39:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443552; cv=pass; d=google.com; s=arc-20160816; b=LBiqXEf9S87pyBXcro7Dcis/WJRc8vt0I4BLC+h7j80dq4g4QPEPNndkOedNXyPAIx zjpwvR5auzi15dQzQls9bgLDXRqZDJPlowEas93T37AXerGMLDb9jqlBWD/YfgEZRar2 h/CH0kvPlx3+CyI7CMGmTP+5LkUJNcqOd8oZYAJAbmqDarNJgrTMlwB8Fier0ZsAzCgC /QrUI7OM1zQnXXYFfwbsVAjXOREx9fgB5iF3M5qE81QsiNwjL4T1cxssYGSDzKhzMezB I0ViER0epVuPvyJ0OaaxQt6ltYL+u9jzHXl7QtjP63Bsv2gTZ8SUACPDVJMcTXyJksWG OFuw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=3BDV2gitE9ZgnfS93zzj6+ruXHPsGkYOE2qo/yJJ5Ek=; fh=Obr7MIEUOpnq0pB6zulldJnRaWUMQlXEdPVcMkgQvIc=; b=jIPy7CpjFNlddMt4Jin8eKXe0k9r8WRzliMePSg4fmgE1+Js52Lc1zc4YjCAVmL6MD f8QL/tcmxFS3CMq1G/pYeI0uOCLH/WsSXJDt2MRUKDMC+XnRo8ktfQMDOGFoJ4BNC2EL H+RUQmTPmqepf7P7pBikHDF36fVnk5qrktPpifOz+ameiAhZHeMxHTo2nHmMwu5PVYK/ nBsdDztinveayl8fHpWoXZm1mfZaObQAk+nhJFJQHHuHiaKls3dcwcOB+Cf/p7PQhWzp PCbZL93rY/mCx7yjQ37D6tpm1hcO+g5zA6XiHbsfpo340x3EfzsuphcklTqwsWTNNn7i P5qg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Vy3j+10+; 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 j6-20020aa7c0c6000000b0052280c939fasi569786edp.481.2023.07.27.00.38.49; Thu, 27 Jul 2023 00:39:12 -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=Vy3j+10+; 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 S232802AbjG0HBS (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232774AbjG0HBM (ORCPT ); Thu, 27 Jul 2023 03:01:12 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2093.outbound.protection.outlook.com [40.107.117.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E1B3272D; Thu, 27 Jul 2023 00:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SeBCEBloFsZoNS+5J1sO5KnjP56xeRnO3/XX4lEYgNV7foyxuX6xYd1cEY0kua82Vyi1zjBpdCKvsQUTbbDltxauR4mdiihDPGTYa2x1TK+l1xQW5dgVykwhvpvcL6GYVkZXwFvSnjNyilZwXriLPICeJaUKctotx/kO/11KE+g1YxLXYo4vydrZipys3dOxArVMQW21R4wx6ASz92Fp3w1naHo9/QlWPKhewFgBQvhJejN4y9Woli3zZySQ5n9yzpY7+1ncKv4xfTryPdAQce6dmYNXD1CXbWgIgJwTHvPUd8VRGPPcOlmgAuLvZ5oPIRnMUyCr5Qm9WixfPWK/Zg== 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=3BDV2gitE9ZgnfS93zzj6+ruXHPsGkYOE2qo/yJJ5Ek=; b=APvguC5UvVDVSiIVz5eyTxR+aAZ1p8xqrBcuppT4ocqq95GW+J3SwEpRofbjBjVrQPQvM+GT/Wk4TKOnq6SmemyrzjYUjt7FO/ou1gORpq6od8mojZRcal6jeio+yJQZjVB5QE6ep6hsHzUIGWkxmOfo32FAULqcNDJPKeoQgEaMNBt6PNeGbvYEL7tH9c8qsc2PgyO8NHchLvtHD0S8hxb5SX46ELWE004/FA6Z/gkm3WUnZ9UV3UuZiCfMdv9h3kVX9PEBel3udNyGwjauWZV0oe7P3XwyLPhzeJ+/y2wHFd0xGFfKf3XlU/U2WTWTayrjAoH8VrE7/8eLrXTpXw== 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=3BDV2gitE9ZgnfS93zzj6+ruXHPsGkYOE2qo/yJJ5Ek=; b=Vy3j+10+n2IeLbIykOj5ObhTpgPSlbR5var1iqWV2gsCdxETsXiSXeZTMB/9HRUd9XrARXeStiVxbbxlupkdNV2F26C/NPriwUiyimdn4t9/wU/QPdQ7OwQOjy0b8AFYLA+vFx9MBWK2RKOcIXJ9TzeGTQVnnclwb5Ngduc6vVQQeUelr2YfbVUndfSEGM47Sv2vRvO1016ixd/hcq+9C0oBiBt7K1bVbSwJb7KgJqKAuCCyuMmj+ShuTsuz2rKWLEUnISPNKYS/YkzP0ACGEyaDm7q7WMJjQ0tKIzJNtt4pbFlNP47T6Opvo2Ab9qbzY8Kp5xeVJh4o/DBeFTi6pQ== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:04 +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:01:03 +0000 From: Yangtao Li To: Ulf Hansson , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v3 01/62] mmc: sunxi: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:50 +0800 Message-Id: <20230727070051.17778-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 447573a4-1197-46fc-4553-08db8e6f3de2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5x5QEOI3W1Mtsz7E+kTSWli66UZKWJarrbbcYCYIC5sDLUstFY+23H4a5CDZWjplFJv1LNMFIMRK2jREZ8wz+cTXcRdTsI8/1lYUIkkDsm64+CTTOo0A5L2IFvfV+pcs0e9M5SUgHA061bmK0pknLkF7mbYfAQp3/dy/z1eRK5Bn4EiovffEmXTh3mZeGzh05GoXzs+QqCJo+QUJmZFsm9CtsVp3zH5w0l0itjOO6QsS1gNXXqqytenNE98R7mXhjKY98cwyeDGVOZ+Ms0h0txXXI1rH4XHVmD97Z1kROK76PXLm9UAa6JDFQiUkxIeDlE/o5qrtBcT93Kt20WHNZ4vnzRwH4+ocDdWQeH5Ay+JLMVNgsxKWzCliaEAqtvuvQrNiHjNADGYUQcvF95WNa7QkikzFyg0KVoGlXYIHl2uxLQkjyB491npV1VjM3La9YWhebxtLCABjLZfxq3ThNufQtfxg51HVELJtFgXvaHW5hBozGFzTFe2DguM7SK55mcjI5bV0T0m2N+zI2Hx7kHbcaO7mXNDpeqMoFdqfdXBaMDFhSeMfjgjTsmN4EY30H+muoQiIwGwyH7is7EEa5tm6fKItXhJ4fkshTfijsXalqOEig+Cb73LV5sF9GpNa 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?p2/wOS5ZrRE5TqymHtY/ZvvUG5Kf?= =?utf-8?q?cxeF0a/GkOF/NRSKDQxgB41b+/EGZmU2c434xSMQ1nBp3dwv5u8KaQLFoHktayVd9?= =?utf-8?q?2nSMmAAjFLn78CfOAA9A6oX+V2tPplDTcCPKJQuzWvnSqW4mcOFmkO+u8Tya+zcp2?= =?utf-8?q?uINkPQQNexYBzIY8CeAV9F2x3yNNrYYNhptCqI4zwHfOQVGoW/ZOtTNYyx1toYurm?= =?utf-8?q?0YMTZRyCkmxFsox7BNDLhtIEi/zb5Tkq+sUkfyXkE8Ryvdtxk9i6MMdjmMiEm5+XI?= =?utf-8?q?5Rk+PHg1fLSMVVydcRF2bT4XqeWXPfXtL8860OXhZSfQkwPAZQawH126PKrfdoZbC?= =?utf-8?q?wJL2dJncFFE3XilA9AIQHvSt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psXEOkonG+YV9nY+SBS1oUxn86sLAxJG?= =?utf-8?q?hQIhivN3snxOVkZlU9Keo9IvVLg2C0Uyo9x6FOKfzhQVXvZTdzSdFCBn2nKIuQZxw?= =?utf-8?q?F8xzU76LB0HcgiPrnLBiThAYh4FCDw380Wrh4zJiRCCFRO8qZm5+Wah6fAAD+h7dw?= =?utf-8?q?0TclDpSDCibaL0G9fyUAI/Fzj5ItLWB1eKzFOpeEMHdT9odZVI4un1Hx7lE87aN6n?= =?utf-8?q?XYvhCkqWpgwU8XPDIiEcZsF6mGA4CJetMK3hNf1+BltJM/JJ73H1r3FT7iCh1EGmh?= =?utf-8?q?DDEOk0Ok8o2E?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 447573a4-1197-46fc-4553-08db8e6f3de2 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:01:03.6262 (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: ez8EhYmmXmBQLB79mjaF/JzcIaO+mmCOYAH4sxOYAzOrgNSh9+iv0xQC0JuY6rSAkqFi9zv7OCmJd5OPtL/dkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772558538845659239 X-GMAIL-MSGID: 1772558538845659239 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: Jernej Skrabec --- drivers/mmc/host/sunxi-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 69dcb8805e05..d3bd0ac99ec4 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -1486,7 +1486,7 @@ static int sunxi_mmc_probe(struct platform_device *pdev) return ret; } -static int sunxi_mmc_remove(struct platform_device *pdev) +static void sunxi_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct sunxi_mmc_host *host = mmc_priv(mmc); @@ -1499,8 +1499,6 @@ static int sunxi_mmc_remove(struct platform_device *pdev) } dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM @@ -1556,7 +1554,7 @@ static struct platform_driver sunxi_mmc_driver = { .pm = &sunxi_mmc_pm_ops, }, .probe = sunxi_mmc_probe, - .remove = sunxi_mmc_remove, + .remove_new = sunxi_mmc_remove, }; module_platform_driver(sunxi_mmc_driver); From patchwork Thu Jul 27 06:59:51 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: 126704 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp909003vqo; Thu, 27 Jul 2023 00:09:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHb/Dg7MRev+0hAmnBl3LJ1RvrLRVgP3xcY2/YZFwX9hOCHFi6pH8DVBeV6OTulY6uxyUEZ X-Received: by 2002:a17:907:a0d3:b0:98e:26ae:9b07 with SMTP id hw19-20020a170907a0d300b0098e26ae9b07mr1005737ejc.35.1690441794809; Thu, 27 Jul 2023 00:09:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441794; cv=pass; d=google.com; s=arc-20160816; b=jxcbqFH2ghJzVZinQemD373nrFCH+z+OZe95Lwfn2sVYGowUFmyFQDonzy2pl2JHO9 FcIu8Ue3OsQgJpfwnp3rcQI7c1MnGrx8pqk0w25jrxa0kDLjso6bEz5m/2t/L2oN1j4m enjEIId8lQo3xVnEuzqqMHFPQdbHuYL5Eez5vS/AaqE/WhTSTcCghQV5jLOHli34aenK +D2+OEEdLGChhuFw/94X1a0NjkOFXa2fKgG/Dp3B/fgWdRhZzd2tA5b98M+U/txCRfJd FGyUysZMWWgs/FW1YqScvco1PNlvuNrBZ5tpWdm2LMU48+qvml9t+jYtiKFzcED5ZVyN +cQg== 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=0QdurEMlGIZsmiqW8S2xEYZCcDPaCpY8fWT4ehR5P58=; fh=tmOLbH7PZ//VzAvy0/Mm/oOeEk5S0CiCNa9JIbgA3uk=; b=YwNY8ER8L/eEn7+QhjvzVCBb9fB/wwtguGxaeNog8D5vm+R3y1IDkpCdg+MhjjuS0h HrCsmdozja3W8icPrfaybv/TS7hRjgy3vCjFJOk+6i6pmKqhuCQzVhW3k2fjWVh0+Pjd Vhdbx9v6InF3qgcgtCHv8R6iT3HG/h/qZTuWlzxgGRUZ+1xy0y0exKj1NDU1Nu9FhH8E Imz3fGi9vusSFCv8G1wbcqkg0kWQiwywzMQFeQ6hQx/MqWKCsXCnL0aTKzCpdCCRAjio rCgv0pSFZ1Bdy28YlxmIWN9Er7pCJ6s6RomhhE+dx2nC0FQtxKSEAIr5GL3MKX5NR0Fi PSVQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=IyHDCuqr; 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 r12-20020a170906c28c00b00992bd9701f9si585913ejz.798.2023.07.27.00.09.30; Thu, 27 Jul 2023 00:09:54 -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=IyHDCuqr; 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 S232820AbjG0HBV (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232784AbjG0HBN (ORCPT ); Thu, 27 Jul 2023 03:01:13 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2093.outbound.protection.outlook.com [40.107.117.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDE9226A8; Thu, 27 Jul 2023 00:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hh5bLWAVK/JEBE1WOI9kiYHZB1+uavj4ilI/IaeAvaUfVrwOddHtu+sXI/2SfZrbZkWxY9oTyR3gyMvmmHnv0kasjEnd99B3k6FGa8lLE89flvtgtDOZYTbWuoZ/PwbU4Eg2e296vyURnsd18z2iFR33P/O3Lwp+xQT7JFJW1YCXlS5+7I+iojlQUc7jHpeWTNk+/6oij9vz69/Hg4qX6fYj/GBIy64o3Wv+jXx4lN0npnWyj7WtxiuQ0Q3YEFXuRN24EMAFb7nVdbK9vWcvq6JzB3FTaVk+zt3V+YiQ4LA4wi7Kb+CoKhoy453BXN3VYZZGbnsqXk46S/gjRORVfQ== 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=0QdurEMlGIZsmiqW8S2xEYZCcDPaCpY8fWT4ehR5P58=; b=etbIZOC+HxYEBIVdsKAgak6csW4ZTo6fZWebwB/s8TddLdfnSCf4FteupS6QHwgZylmkWCo15AlZ+rGsJbnhiIjj7H6FqnhfNVZjLn6d4FUB4KAinVIW9JadbEpFLh1bsfAzJ6OSy/psE4qgCYiV+EpZMcYLBUwuyNYn48yD6aofoPwOEf9s2DQUdFbG3hId+0cMgAx+t1/jyBRWpQ7Xm9MY01QAs01aGwIaZJabfcJ1OW1N4zPsSrZwhHy/tQ400zHScjoeDjfPgPQ2OG9D2CJrd3W59dDgcwsHdteVEZH5nvPrENrYWaa1P3TOTlCY1VCXOBpFkZIkpQYidDDobw== 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=0QdurEMlGIZsmiqW8S2xEYZCcDPaCpY8fWT4ehR5P58=; b=IyHDCuqrz2YOHS2j9lwl1i0zdOqLZuB3oQy2Z/6jlr8lVcRf7+L3D7SGltKmVgvubsV8kFLC2AAbiimVV+hTtJBzBHUAZkl35TuSqMSQMgzRFeZMymIq0L5pMQqFnKbiCkActi5uqhbrCcOIX7ex37xM44Q4sQLgW0i7r6tJ6aI3gvgEfZTdbkXrrvdeLyCz4pSavITaLisuGUgY9GcQnix9+6nfKRHFCJc1DphYTrV41L225YrrBJIER0u/sgSxVkX+m4PeBGOkovxM23M3GcYMgQ6TYa6EDH1lEEjY6Mr3LpVjMy0IykX5DrV7KszmDj6cXJwf42pwOaU+oJkzQw== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:05 +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:01:05 +0000 From: Yangtao Li To: Ulf Hansson , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 02/62] mmc: bcm2835: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:51 +0800 Message-Id: <20230727070051.17778-2-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 0138aed2-a23f-49db-9c5d-08db8e6f3f2d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RZG76KbSoD9pwyH+hBC4G5gyzXMYWVQYRe1Q3RjlCVFizCio7tQA3zt693Zm7U+VMSnJtSjbsV1N53vsOd6phlSS+lPL5pJTAO7WsXbCImr3jRMhqBs1Dy9m9yb3jC2RwORwz4on/P+ZXflQq7VGReJvOzFCjjLyDt/BOFK5+8zW2S6zR/SEY84UcaNTeUrNxbA7cwMSpg1Trw8RbzJEhk7YSOxo5TKmWbRBfoxwpiin1jPxlrQv0uVKT3QYgRW0nWmX+uX9MGd4917IxYpudKGtoK/T2wrJkbCIcHKyXTepBmT2FMo+mW1PrQ0ZPgbvIwrFpl9Wby2vzrwvTaPrRHzLe+cmVu0uBF1t5EN4kajMgOkmjr35oOkXm3Og/Xv0gzBAC6LfVhYwBAb2gy+SpUV88yijOgSuVxuaK76WQWJn9XGBY4ndMbOvfpo5dmZ4FqOqSc7wiEI168EfYREzjDwwxocI2jS4FnLvxCsH7VUn5SCpL9e46aB+NmgHYHSYD9UjpSjt/QlODf1t9+lX8nNB4Y3aaawPRWUoTZzVALB5sEH14e2b0etDv4/ITAj8QRRiFQOHFqWSzFN9R3uQG0qW0Oa8SzR7Z9GqxklpMOlqpnEIiY+qHWhxg90wLRdV 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(7416002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?gIpXRcZjqrLsO1hLlc2mlrnq5nfd?= =?utf-8?q?05vDZbQ3op7I64SfC/PYi+RQhp8Z2p3P+seStrNFOfcR54hPbNZ3oDVM16VIbHi7G?= =?utf-8?q?0uEeIoOwT7+DEMVFA1SVrLzOrfqy35Vy66P2wR0KnkJ0MUfSfj9FNK4krWP/vTXpX?= =?utf-8?q?LMv4XWzhdj0ZjMLyrcOsbYxRr9obRO1XDNeOVV1/3vbb000Cvv4iiYf/n1pxECuWX?= =?utf-8?q?Rfju5oV9BQyJ0EhnT7Xi6kGwH1MEJwY3JAae+tIYyfzlAXBe+wcwt0qrMmrDn4rLY?= =?utf-8?q?DA5j550kTJO9mASmj8FCcwUU7NoebZL0emwCq4FOn9sudIb+qGuraBqtdMrx130el?= =?utf-8?q?ouLmu183ceRXrpjcGsKBwgG8kvMjLhTGA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r/jP+7J3b5SFQ49X8a?= =?utf-8?q?e33f8x0TR34+0rKYe+szucHZBoipbmdHJRmUXjng8rMLca+5vCMeIp1XOjvBqnzUM?= =?utf-8?q?k24tanyUpDOAIpwOT1pNRTtzImFLqtCleJ3jmc82SifbmkUVQlKCtIk3g5ir2fp7g?= =?utf-8?q?BfrxlfxvCxJulZJQZj6jWWimNfaSz5sTzXbxyao/jxAbnGay3sCWP3FOe9OoZDMq1?= =?utf-8?q?H/0COPC/aoAZUVxiTHoUXx2f5l0WK+trye+1Fgld/z3VsOoe8FwrNVweFEXt1BNjn?= =?utf-8?q?Qjcix7MyhEgo?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0138aed2-a23f-49db-9c5d-08db8e6f3f2d 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:01:05.6922 (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: OPhGKlukEo87AaMGy3jUccm54hayZrwfpuhE4mb7WG18Ytl7/D4aLzHF3ziZpA5hqfaK0wN5RALsN9tR9Wgz2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772556695470740701 X-GMAIL-MSGID: 1772556695470740701 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 Reviewed-by: Florian Fainelli --- drivers/mmc/host/bcm2835.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index eea208856ce0..35d8fdea668b 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1431,7 +1431,7 @@ static int bcm2835_probe(struct platform_device *pdev) return ret; } -static int bcm2835_remove(struct platform_device *pdev) +static void bcm2835_remove(struct platform_device *pdev) { struct bcm2835_host *host = platform_get_drvdata(pdev); struct mmc_host *mmc = mmc_from_priv(host); @@ -1449,8 +1449,6 @@ static int bcm2835_remove(struct platform_device *pdev) dma_release_channel(host->dma_chan_rxtx); mmc_free_host(mmc); - - return 0; } static const struct of_device_id bcm2835_match[] = { @@ -1461,7 +1459,7 @@ MODULE_DEVICE_TABLE(of, bcm2835_match); static struct platform_driver bcm2835_driver = { .probe = bcm2835_probe, - .remove = bcm2835_remove, + .remove_new = bcm2835_remove, .driver = { .name = "sdhost-bcm2835", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 06:59:52 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: 126721 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp918109vqo; Thu, 27 Jul 2023 00:30:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlF5Q1zyDWe4DC9jz7Ir695QHQ8v3ATC6IvP7gvZEahcVCN4PUUm/2TVgPlj8qy7RbomPriV X-Received: by 2002:a05:6808:b08:b0:3a3:c64f:342a with SMTP id s8-20020a0568080b0800b003a3c64f342amr1935397oij.34.1690443037596; Thu, 27 Jul 2023 00:30:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443037; cv=pass; d=google.com; s=arc-20160816; b=q2AVxF3heK9I+iUYmyOOklaFIrAuZEcQgQHuONOQjFOcvC/2G0cnw8RQHdNwPU2wje M950ewSa6PkwL11npdlUPwK4aZZ+1LTUWJOFbSy1s5oQIvLZd3jaSJEgmlkw48osKgJR Oj4n/3xkXjVqmB7CYQaGLzgbq8WJKWyf2rdaPiwupyHWMRm/bMelVPPvhBvMQ21gKOv8 VS+G/nP/YiiaBoljnZRqWIEj2/jBZBlV2wbPB7/30KjbEIW24pZKEbPzgTkYbDDACpCv RpITow423D9yqY4UWGqkvOF2N4De2FBFlQa/6chiT+mXpFn80Y0xpNz3RuqE3jI76GYM sLCA== 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=vqxSuEFdgd7k42jXTQq9t2x1NA379+lBETFrgOHf+Eg=; fh=RRst69AylAmQjTenUg5G1MIx2YhIHWYClupGBxgNKIA=; b=hexWvn2b2VSwPA80qYCulzbAMyWY2cCmRNTxG0bxS8IAQrdsO777SRDluR8T3GLz2j 0KpU69OSMYqSEenDoDw5ZwqWC8R++G02fyoL6HlUCYs4PZIzO45Q/4ULeODyXW10oZmT 2hAFqUThWpnCgrpnxwgFValHJTBpf7SCRQ4Nght8d4CqsGQNhKeQU+hAXY/kvjSScRdW vIxDAiUiITmRtXluiqFL8ItwabP2+FnSBZT7kvbv7f1UalnSURf33csdBitY4El04kej 5/otQjVOjRaIWnfLvJSEO7nqhy3StmelYO7ejitl0Anh3z47uh1gW/+ea1ZhWrRD7WmO ybXA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LWifzvir; 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 f13-20020a170902684d00b001bbd0358ef7si892035pln.518.2023.07.27.00.30.24; Thu, 27 Jul 2023 00:30:37 -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=LWifzvir; 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 S231822AbjG0HBZ (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232797AbjG0HBO (ORCPT ); Thu, 27 Jul 2023 03:01:14 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2093.outbound.protection.outlook.com [40.107.117.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F08026A6; Thu, 27 Jul 2023 00:01:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N06pxx7IxGzgOyjWQ8Ls3LPOc5iRlJprQup8supgKT12d/Rk5Of+HG0+TIL/3kOHxK/PzwVY6HSc/WZW1t4CdT3qUHbiAXIps/uS9VJXKwttLa/2nUu/D86wAZ3iMQXmpt0/2X2PjsF1qQbAAykDyYwMDBGrwFlZ90QWleueBCa/d/PYhd66b4GY80u3nqaEx1W9RU75RkVEGd/MwTts/XOfWP/GGen3po05K7NFwV3pPRVDOCXhsV8Cx6mLwDESZiNbgam70CNTFywYC72qQoh0mkWPm6MlkuCXrPN9HlrZ/6sxxs7/FgSqrHkiODdzlS9IcvxslBngDtMkHrOhVg== 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=vqxSuEFdgd7k42jXTQq9t2x1NA379+lBETFrgOHf+Eg=; b=FmIM5DcUzWCeqpzCET8H623NyFUs2QQlzuwIyCPYgNTjip5shu/z2A0ZwYZKNTZXNhGwepEYCLNAje1Dt8W4CYxW7U/SrDk8wn9KBY96jztJR/xgbsENRKRlshCyamkqCSzga0RxLBzctfXwGMuhTN+Mae45VZ6NIEHayuy6gMsMEBdlOq2XueTRaZnSDqW8VY8Q4ZpLSFj91NOhsKPF3Khya/3vgnD8bLfYHoCkw14Eu6piZbWDA8AuPTtQc8wzIj+YASkVY9NfZXjKAskEF9cPcD2Ns5W73al63nLC1G1KUwOE5v/FwhxClQA9lIQpnQhha18blsrjcISdoP824g== 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=vqxSuEFdgd7k42jXTQq9t2x1NA379+lBETFrgOHf+Eg=; b=LWifzvir0n9+J2mou7SRy6nFjthnQjsLYbB8sdXek0945UT1afppTJ1wcQ+oSVhbdD2NYhkvTu2WkTp4WCJntfR2OqnLLRP47OK+BtnhS/PtI24xTmbVF+9MW/WBYd1G/TSAJz9dJVQbz2IUKKN9u2TaacfM1iMkMeuahQLPdB/z1/QcPIqITKG604pLR6RfMljVHQ9MdbmKjW1hAKp0mBoPJ9PJpFMS2Q7Mv4BIz8NdWatI6/U9I5mnL12CDhY+Jc+qaYuV5yB20iaDOKZZa090ndZ9RqY20mnG3q92xWCvrYjZfT6XnpOZCg6e/xK6dBKknsryMynrcBvKLNF0fw== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07: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; Thu, 27 Jul 2023 07:01:07 +0000 From: Yangtao Li To: Paul Cercueil , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mips@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 03/62] mmc: jz4740: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:52 +0800 Message-Id: <20230727070051.17778-3-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: e1b92eca-30d9-45fd-22e0-08db8e6f4023 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RRVeuUsH71GFGQW8I9Up1WJLAboej8bJ7BQDZa095tgDwq0K2huYX9aCQPsPRpaJsdGjg8VZcM+7zZk/Pfqre0KtpTxybjHNL3p+T3b2n+/mOS4A3XhYbSeH+0Ou75OrTcAcaOmOWrSIfT6g3dNCU9QXjti/ASRLUYnCQIWbjzVUmn/qWAGK2/kUHqpWInQ4j5QJ6ik/bOjlMk3+ftIlMqSU3p+o14xkfiVLIsZ9Kl7MNERg04YNVbbke7ZVHY3HE73BiBt6SPTs7OfRkas85liWQ7RxiNruugYaVIttwfsivmPnfTvhbeYSljWXgOwqP0elBsbjg4EdVN9G6ZcS/g97Kc2OiUFjct9fNbH9Gv82b22lcODrM8F+CdY+/3KKkuQjwZDmBBqh0/GipWhpwZe9ZShk433FlZNuowSEto2ASl9LjQWSSPtUeNDj/uEtLdcFmz3hEYagIVMQioJ+USjMb64oJEV8ZeyAyU2Wj2wUd41gcD5qubwyRTqTlwyJBQUtFv0r8Ka/kF2jjJCZWvZBeoVbEGrWmOLL4hm2MnjuAPVd366nW3Cq6t9Pq5YbBk7+Pzi1+HdxfoSVEKUlU04G+yXUzID+AflxGwuOpPr+/oNl2vYh0fLrGUb2OmWr 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(66574015)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?31cpRyNIZA3qhEXJAMwE34BdXuAO?= =?utf-8?q?uQtxHmj58GBm8I97FLdboB7KKkU+i5/vGjab15NX8tmYUX7SvX8OwEQlYVR22fmgf?= =?utf-8?q?xM9eSPvLxY1/7B79x5ODImCa3IWnv+4yXq78ZATK7KY7qaSlN+EW9+wbKNYDSmtN2?= =?utf-8?q?XuSeER+/4CbHlrVktG1qHHs/IAz6AFoX5E9EE3OAgsswVBsLfns+l7pGUSZK9Y45W?= =?utf-8?q?+ifuMs8MnsTl5Wol/S7L5/tNNEmYCXOEilRRtgjhHiZTBeKKcLumKahNa5QpDmEPA?= =?utf-8?q?85PnfzJgqp5eEgzNoEiTiaNelcTEIJPVvNImjsSyjXKDloPlDbRWCTWUC3JU3l41p?= =?utf-8?q?p6WqeYu/dernUSk7y788yxHYQsN9c6+wQCrskQi/AHCCTZK5QygQ/K8Nz2HwC0prc?= =?utf-8?q?JMDSnCf+32PqtTQBwjW4EwuGFYdTzhRNLRNJlqnOAsZEZQMhkYmSNJ06Vfy366PyW?= =?utf-8?q?QnjCn75PUeAYhl+ZVVmddVbyNGzdPbTzrQ7CNx53UvKGbUQXZBxYt7Trzj2RMFe7+?= =?utf-8?q?Q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Dul6KiOS4TvYwlks+cWN68cuP+AD9wL+ExT8nWyDLicmTaDWMOKcP2SKTgs?= =?utf-8?q?tJOvwEN+82Ylnq7gf4XJTJ9Z/1Me1cnFHtJgQwc+8k2rSnMQ/rppT44IVOfPikqGR?= =?utf-8?q?7ph0J4SsUPdk?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1b92eca-30d9-45fd-22e0-08db8e6f4023 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:01:07.3067 (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: AusrcPFAqoJlZ9y+FNCuL6cPLCQPXPTLhouFrvOxIcE7lFmvP8iEGV78MusOqIIeJc9TLxrm4NUc7Q7IMJddMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772557998610712578 X-GMAIL-MSGID: 1772557998610712578 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 Reviewed-by: Paul Cercueil --- drivers/mmc/host/jz4740_mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c index 1846a05210e3..f379ce5b582d 100644 --- a/drivers/mmc/host/jz4740_mmc.c +++ b/drivers/mmc/host/jz4740_mmc.c @@ -1163,7 +1163,7 @@ static int jz4740_mmc_probe(struct platform_device* pdev) return ret; } -static int jz4740_mmc_remove(struct platform_device *pdev) +static void jz4740_mmc_remove(struct platform_device *pdev) { struct jz4740_mmc_host *host = platform_get_drvdata(pdev); @@ -1179,8 +1179,6 @@ static int jz4740_mmc_remove(struct platform_device *pdev) jz4740_mmc_release_dma_channels(host); mmc_free_host(host->mmc); - - return 0; } static int jz4740_mmc_suspend(struct device *dev) @@ -1198,7 +1196,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(jz4740_mmc_pm_ops, jz4740_mmc_suspend, static struct platform_driver jz4740_mmc_driver = { .probe = jz4740_mmc_probe, - .remove = jz4740_mmc_remove, + .remove_new = jz4740_mmc_remove, .driver = { .name = "jz4740-mmc", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 06:59:53 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: 126732 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920529vqo; Thu, 27 Jul 2023 00:35:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlElN0BVMRlR5xI6HgKyu1I+mjFzLrlx6aA86+Kjv0xCIVvZBLMZgHHpx5hfHOQM4yKeD/Ei X-Received: by 2002:a17:902:ba95:b0:1b5:561a:5c9a with SMTP id k21-20020a170902ba9500b001b5561a5c9amr3674694pls.39.1690443345837; Thu, 27 Jul 2023 00:35:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443345; cv=pass; d=google.com; s=arc-20160816; b=D75kaLCQ+na4/ylw7MG/Nux/lGg5FcL5IKb/EpWrd6hXRVwXVhqSE12MZ/ARUJoFjr SDxdqGHhG+M0FrX7AwctWbNBXGrVDs4zV0nAs4C19w/m8AbSjt1h4KuxQARm0+MWbKG1 OwC/BYWO24qvrJRGva6S1AtohTohxf7aY3i8xOBlQL0GHSxjb+k7hRElugcNz/ll2i6L pVR2LXPFJ7R3CGN/lFHD3H4OZGNqDMO0fs7cY2AGoXzIzCbGFX5dOnUmUPYWaq6OM/aU consoVRxA88Y8hBJmSicjiKwifCNTqwbcjPy48wcEo8d9qN5upW2W9JuUKRRshSKCbuJ tMYw== 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=g/FjFXOniG69N9nJR/0wcardmXaPuoPDf1/5LYlD30c=; fh=knVXWtuCx6XZGhgGSUU7JJPQq3c9JBqKNP/6OINxeGI=; b=wNgS9h9bM/4PV+nDjehk2lIkQU2VOFUiREhMPLsXYQCXiKC87cPhEaLdH6KKdS7jAy 52PkoA1wUKIipysnMZOIinVpdzasEXE1oyECaarRRL2WI5o28impFwFxx/jplFge89oL Y6knZGwrVrOAshMtBFjl5xSD8jIVq70m15WMf/NvnkhCWlFdlFAt4y/XJOMR3YB9FdIW CwxRzoZSahzgbznx5fnettCWkWGEuI7GMSR6DhOytM0og3zoZLhtE2DtvXUdZdGKplka cpmYkdEJTUPIk3mO6OdYED8dNffmZNBXna1B7fJiaOpOS9i8r30Zdfyo1RhfSQtc7le3 VCIA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="aEKfCZ/t"; 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.35.32; Thu, 27 Jul 2023 00:35:45 -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="aEKfCZ/t"; 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 S232874AbjG0HBe (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232733AbjG0HBP (ORCPT ); Thu, 27 Jul 2023 03:01:15 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2093.outbound.protection.outlook.com [40.107.117.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D2392688; Thu, 27 Jul 2023 00:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T58UdoufVXVKb2vvVqHK2Yhp6bAcBOgJQGFg+sHs+hvTAd3IULLBzaRraAcWDOLxAznf9ZU1m12jOVoHsKhVX1o5V5D0UTUimfvPruBsQx5kBHG0Ek7XbCRbDnYVMcy/VOYsK0MZik2YFwbr7y8Tli3Wfg4qZu1X/NUfeh+8vosr7WVmZMLhFkvN5/zD7wgr3WTVJ4ok0yPYhFxKkV8yoTnM6HnnpzsD9z2+pxRXkYavA8pzYcbJs5yYd0eU9aWjl7Ye6ApOkInkZB/9+gJHJxU2xA3xQZtxB0eLWYd/48q1w63wHPWMKDfgz6RrQ//kDFmioCLrOSIIrjSyxYlJdg== 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=g/FjFXOniG69N9nJR/0wcardmXaPuoPDf1/5LYlD30c=; b=a+cfSVG0/zTs8C85pmqzClISJ/+BfmJsx/mV9LbX6Ob4olK0BZd4zmwV50oj41CoDNDGo15SoLiFzyIv01LVLIiKGqPgtnJ7PsxuAhY96nQa9bj5ZzWDr4fI8/+aRgmfBt8NQ5t3rjEHCwiAdQuJNryretr36zyXFRnrW7QZ3ndc3JyeOge1siVr6pDFSBlMhOWR3S4Smae/qeGz7dTvGz1PCwWixHK6kJX1p1f6L+SmOMwgfYtno129+sYDGhasvfpV4EjiFrglC/6nnrqTcqn1kgT0+kfJoXV7H5q5PseBEz+Hk+0D9r1nK1+gI579/TAhRZ4IHiJxCryed5Av4Q== 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=g/FjFXOniG69N9nJR/0wcardmXaPuoPDf1/5LYlD30c=; b=aEKfCZ/teHvF0Y3Ot1Tcx1v+kNS09ILtcwF5uNoQI+Ni1CLzjtoqCTGUo+adFw99ZcSPw9et3YQXbtdmRRragDzMKpe4MJwNg3MJycnCTgeIf3eV3kBhMaWgxjIkmlwG65c7OmLTjIBhr2OYB5GB9l/Q3dyiUGNg95QWNmKI0pXuzMBULdRk1uU0BU/q+KqCNELR55xqdg4prFPD5wiHnlKyrLWqMLdKvUriN87wyvp5R7mbEYKYWtMw7QWBPmfeDL/NpKnsTSUS7kUqN6Kb4LX0RE92WzTa+F8qTfNg8h4FdQW4xWZzmZMsGQHDGXidzc8dfAMtyrUL4Y5VdEc/Hw== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:09 +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:01:09 +0000 From: Yangtao Li To: Ulf Hansson , Karol Gugala , Mateusz Holenko , Gabriel Somlo , Joel Stanley Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 04/62] mmc: litex_mmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:53 +0800 Message-Id: <20230727070051.17778-4-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 6281c39f-3092-4a35-a6fe-08db8e6f4137 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1iyLwjcVwaZ1qt9ZwPEvvR2+UTJ8JH6qJJCFtsdnaEUkGn3F++vl8v5f5JWuXHSXnVUu07KUI5ULSVHAHBUqLSAcWKeOin2yQPxvx7VD3uYoGec5ihqyGbjOfQxq+6qm9pvGzuOyde0WOsV7rrfnG8qGoxmqAeL9mJZsaVIkD6BIMdCxK+9fZid8rdhh7j5SHgrsfR99tEUmG6mUkaQ6UEqVTFwcobXs0VYUoTpdzmtFjFPyXuTV8vCFKylw/a/olJTikzkKg8HS6UJBeE0YKbA6QkFhZsxpNvk+l3xIQH7Xos3ZYBL/tM0/y2s1BMiG4qvZuSk4mNOa9bh3LB4ocB9w6+XhT5AiqaFNr3WHLGTfzbN0wZ/wPojvfzx9hep/KMfV+gCpvccdcnnVHdrnhN6KrzgGybdkHCbtWoAhWA3vsi432g5QQ32erQVFrr8+bX68BKwPboiM3UI2RULf64MSg0XbpF/Zqgdrme6nOnt85y/nwb77gjA9jBhpFIuvbSbRh3x4FXzAv872ROS68erIAJkL9EVRHQL+BEKgfgpnZZJwK79iJ2rxioYzB/G8lSNSTwlZjad4Yo7gbGu04jEfRHCuj05gKZNpWexRZAw50T+3rrpG52beltVjGyj9 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?BWubmoUjeB9NFqvfK6wTrJ7d8fJx?= =?utf-8?q?Qbk/q0HORbCDz0KyagSFKjeZeKUOsKXVY5OyHeWBuC9F62ikBOxAFBAwxMLvtJSgJ?= =?utf-8?q?81ZtOLwu7wzH0HGMCjxDopV9hTWWfJsNnpr5qfH+fsZl6J3W9l1Moo7UMkAEHbnSq?= =?utf-8?q?9SzAuoLrLDVAc+CE+ktd1dstKtZkT9ZMqCNr7oIGkzGU6w+xBgv/S4VoAhRaGy5zA?= =?utf-8?q?MSpVMTbCPlY6vuPgSSpA/wopJRz/yS975z9Mvf538O0/emT+IKF/Ag3kIjHnA2jY/?= =?utf-8?q?kqK4KwO7uQXXoYFI2I94BgblmUPvTPnm0zCj9J0MSt5I7+pvkD2fA4EWDgVyzZ9Kv?= =?utf-8?q?7WFatUMXXc3dNGQEUkH/2KMlPi9Uco1udpd8tDlTndcMbHWCb4eRcL5frYi8+67ys?= =?utf-8?q?9x+BTIxLpUGLl2ciJcX5VN1zJ/gvkA9fmps/DDhJk3EA+SCZx3ne8GPnEsplDkj8Y?= =?utf-8?q?fnuwwvRMS83W/CzSlnA8r4CfBagpGL2+xXtejo3Yv9ZoC0y05NmKOJuHWPmgqilFj?= =?utf-8?q?2JCLxjZfABpwGaXWw2IPc8Mu4XGYjtE503bYENnUparkXKkQ0SIdSf7TLO1j+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KRsxj0zrHQx?= =?utf-8?q?BEhIqM/xGtCskU158bYtAabVP+yMmcLYupm6mCGrwZT5uQasgWxKCwMyTTahledP7?= =?utf-8?q?Sf53i4n4VSv8?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6281c39f-3092-4a35-a6fe-08db8e6f4137 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:01:09.1289 (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: xGXpyvwRqXWH6y9cozQHNmJLuawhEOHNBe9qg7/yjgb3ufb7JYcsZRFHEetU0FYFXYcnXT2JcNr8kLlCRLWeLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772558321705055950 X-GMAIL-MSGID: 1772558321705055950 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: Gabriel Somlo --- drivers/mmc/host/litex_mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/litex_mmc.c b/drivers/mmc/host/litex_mmc.c index 9af6b0902efe..4ec8072dc60b 100644 --- a/drivers/mmc/host/litex_mmc.c +++ b/drivers/mmc/host/litex_mmc.c @@ -629,12 +629,11 @@ static int litex_mmc_probe(struct platform_device *pdev) return 0; } -static int litex_mmc_remove(struct platform_device *pdev) +static void litex_mmc_remove(struct platform_device *pdev) { struct litex_mmc_host *host = platform_get_drvdata(pdev); mmc_remove_host(host->mmc); - return 0; } static const struct of_device_id litex_match[] = { @@ -645,7 +644,7 @@ MODULE_DEVICE_TABLE(of, litex_match); static struct platform_driver litex_mmc_driver = { .probe = litex_mmc_probe, - .remove = litex_mmc_remove, + .remove_new = litex_mmc_remove, .driver = { .name = "litex-mmc", .of_match_table = litex_match, From patchwork Thu Jul 27 06:59:54 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: 126705 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp909100vqo; Thu, 27 Jul 2023 00:10:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlGave+aTcx5NclIMMYu+4u/wvVvDMjhshcdrzpQVUnBvHcKl+qbG1kWHEzEzdumNHKVnhRo X-Received: by 2002:a17:906:b2c6:b0:99b:cd46:844f with SMTP id cf6-20020a170906b2c600b0099bcd46844fmr1004638ejb.58.1690441807362; Thu, 27 Jul 2023 00:10:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441807; cv=pass; d=google.com; s=arc-20160816; b=bk4Jw/V1zy8CahI25NAGgLFkruxuTzHIdq/ESH4DQFu6P1HsjfobYP4baZIynPdVaq YjRGs8hdKfvVZFV9Bqhy78Nzgxlsu5Ktj02IbFQSq06j8VeHx3VeItvWrDXGqKJWw1gy 2oWplxcXFbXW6+EliNN6BmzG1tzqde+60AdjeCsmOB71e09ScwfAgaq2gar1DBLBEWC0 zmzp4+qXipAF8HWKS4djwH9bV6AJtjXsD53SSwrRTza9+1cKLaU9aFcNhhg9lhrz0SYI /7bIycUfoUOMh+xnF2l6wc8Ps3qKUrStgD4NmY6ZhzXKn+sg/J0Em5mzhyj8KP7EMiUq b8uQ== 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=XGvwJMjXkY+aIWcQi5FBmNL1QkzER169wqMxqG1gqGg=; fh=CYjPLkToiURQRXIzKWym/VgPpx/3DQOiB4nlUMd4//U=; b=W8Tby5q4ZoGrV/vnPdwuwLKttVTXrutjyjJj8NJR0Z8RyHj8eDM1pARr2RzV5zZXu3 sZi/T+f0AmfmWkn0CBgk6dM1QYd6xxbD1svs7yBTDvib1cLqVZov2KS2IKAO7uX1mJjB bxLzi7Wm/puIv8xBW5W6vz8UsJ3L106AJ3dQd809hFEs//20paspN7n4tXoyYFEkUTJH KLF5sX76xGP3a+TSxydHk4Eba9YQIBeuF08DVzosurH6e5R8Hf4qWNh3fs9ptvZNXcws rqoGGvEfNAyPusLy5sybhE1ajgGi1Tkp347TXmmNEe9dgNyFOuzBkUOVdM+e4inp778g q3uw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=orMpc7VJ; 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 l12-20020a1709066b8c00b009930d1379a0si623273ejr.885.2023.07.27.00.09.43; Thu, 27 Jul 2023 00:10:07 -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=orMpc7VJ; 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 S232861AbjG0HB2 (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232736AbjG0HBQ (ORCPT ); Thu, 27 Jul 2023 03:01:16 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2093.outbound.protection.outlook.com [40.107.117.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 866091FCF; Thu, 27 Jul 2023 00:01:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YbzSfAyL/esAQASL7Bu02p03BN93Y17xGgwu8X9JxnT6Ezet3Y1sMtgr5Cteia23TdZq2E/jG+LLCMG0WfuiNX8Rv0rBEp8iTgiOYhcVAjA/aRXpMIfMOztAvlb/dPT6FxRPUp9iK1Qbw+qsHc4BKYTbPcjN3Xzez+cqIlNiz/QBO2iLnvUvC2IeI7vEu+w/52QXTq85JSHc8hrFNmFAOMLMvOgibXErooZbKe79yysF8Snt0Gdi6cgoEQMooboP/e4Es2+mmz7qJ/sojSPUl8sKrrR77gFrZNoLoTqIEjtV8ixspME/RaxNSB8+4MIYi5E7B9qDyug8fbHjiULH5Q== 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=XGvwJMjXkY+aIWcQi5FBmNL1QkzER169wqMxqG1gqGg=; b=dImUVLP5YKPyIG4kDVV3Co8rhavefJpZtFSZmbr/rrIdnpvQ85OXBh4YGy2OH1i16OuLvcIEIo78IydNn7ITareZTzDvf96E4XcuExLVg4emCmBLmS6MHGwXll8cAZi+6B/YNcmc+w1tDyIbJDTm2BvvwVlBAxDnaWo8S6ui7cW6cqo8pcE+erPz+Cv0r4gr/uGVj3A2NEiOQdzhkxd9gY8IrqQ7OOvQQfkOECpYsTjpVzuSqemQvlTmhp9Q5H58yBXJGyDzi/YqLhW23iX1Lt6WSJOA9TJFwnMicPl2KF3rYTr6da9vL45VZFa2+sLpsP022amT3dnhRy5KR1wyMA== 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=XGvwJMjXkY+aIWcQi5FBmNL1QkzER169wqMxqG1gqGg=; b=orMpc7VJ8hxUJ1dEAatFvtGatJLWxHtsEYvHx/WDZS9IBYXVa5CCSjLuoH6lDbjCdNluhgKFmXmyvrVpqI66M2pnDD8WfniqAOl22XMaFoMYUMNZAmzDX+dEaT4f5iKdzaTTnCUU8t20McmXDfnSWzVJSOc7esINWoUGV6xTJw5Q6WGQNNDf5+a7Vkgi/EyUVDN7ZIyKk3MQPUkRiQ5dcrIQFlhEShSwpCuQ/yXExJWuORDFPNTd2aD6//XvSF0amD5j1sAc1sflPAN6o2cRz3QZx0geAxupREtvfeRdZN9/TcHhhNrRuJLFY7qdPWod9545K60A7Q64ztRAN84jSg== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:11 +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:01:11 +0000 From: Yangtao Li To: Chaotian Jing , Ulf Hansson , Matthias Brugger , AngeloGioacchino Del Regno Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v3 05/62] mmc: mtk-sd: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:54 +0800 Message-Id: <20230727070051.17778-5-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e7c6b32-30f9-459d-1563-08db8e6f4258 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dNIVMUIk94K5b0FrqRVedTmq3dOB9u8iXD3BNfzMG1bzE1wu/kDSKZDqPL5fc0+66x+meyaODuRA2amiN9Zo4KwXMlwgXS1UPJs8sMedDsxID2s6tVPR12cLJaau6OUBz10aRxEX31rsVbZuf90eMbPu0hlakfk9XuzgWcpaH0pfPE03Fvzv2hiH3ERjJtAid8GKHetOOBQuYcJVxBNddb2YrcDmJYSeUcwGtulvlnRAi3wpEwkaVhJHS9YSbSQ+VZLUt4p0Yjmq7OLlDcVzgw+dfKnRi1UPO+OPKKW3tRn5ALxC5PL+meUySZ/Y4L3/orD9l0fXAUPyHYWrywCb05R3p0enGN68h6zcYsq6yWgEwc7+S+xhjR6D1BrdoaQn4zZs5I8158wr3Wptzfp4u9yIJz+2nOdRUkXzDf0ACQb3v7749Daj+9frs9oxRY2s0XoVNImdMmmBMhad2cvSwwmXWceMi8RBqtcc06nfsjkJTYxeEJgo9g6Vjm2ucob6Ui+0hLJB7v+XsZs34oIOIj2a47Er/gOgvg5d2rTPDjdTVirT7/Pp1VgEbTZWyErTTg/Av1ORpPu8ym4ZVtcHTruLU3G+ziFkycl1Y60I+lwV47tNrCG6xt31G5I/HSXO 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4mTRqV2K12dpDhPknfNxVk1fmxgM?= =?utf-8?q?0bpvcKxeiQxQKUQvONrRNGM8LB29LoRNhvfMepX1b4MunkiEu89QQ8s5mxpC/uQKJ?= =?utf-8?q?gctGEArb8jK9o5QRxpFHo0pf+RVlsiuY5CL31otNNXvZBTYWwJdQ2016JGumY8zH/?= =?utf-8?q?MdIZunbimGqXDBYuINmfYoq6UBN13iBBHOAFZePPchJA6tv1O0waW2DBYJd3ryNqh?= =?utf-8?q?Vo0wl5gVpAGrEvM03UdoKko8wQOexN25U7GpnT7S2o+kiwTlxXOlJ6VGvQXf0dS2e?= =?utf-8?q?p+aLMdBPWlbbw7tM4rLcn+v4Me29smQicu5RsF2qcKy/xDuGe5esJMpJKvLoVIQaU?= =?utf-8?q?3ideS+FlFxeaG7uQjibR5Nt86xtD0qQDx3tJYCQcGU077K6b9F4JjPxs2BXFVXh1p?= =?utf-8?q?B1dh1ymeP93qNLaqGecZ0eQ0Ni4atpcSS9gkrdtHOSCD60RKR6404vXer3iPOc+WW?= =?utf-8?q?TqUqBaIZChCejrYWYXOrqhpBfPkqaW8EH36vusrA5mPH31OwZryJWq19Aebuke674?= =?utf-8?q?HdG0hnL35LADBA+ze+MKlDSCm5o92iyvfM+VL3p94H7k0rcajbDleY2WwGReSY04a?= =?utf-8?q?sLHQna5NbaSWG7O+zGyWIjjIFtFccLtAOcX1iHFBDKKJ/l1XbSqY4JTh8NRxgOYOL?= =?utf-8?q?E9aLGIgQk6kJnERRhFC/5tvy91s47UYnOxmZ3/BFqtKzoHeecs4Tp90B10oC+pLZI?= =?utf-8?q?zNqCr/aK67bkY+BjBkgVTvgbu9jNUzL4p7Yl6RIwFGrlc/jz+zC13CRcmiGZzNPJe?= =?utf-8?q?xNV/3TYX7CSIaixXOK3lRYv1pzSTbkhYv+bhFvmEFqacH90lBSRpJY297XVdy+NUY?= =?utf-8?q?nzlYJUfd0EM4oiimgznv9i69/D9Jn+0MNMsAa4p+ZAvYjNEo01IlLeA5E4vwfjuB6?= =?utf-8?q?zn6bmmGiFmPhphGYH3Xcghp9VeFar95B/hqAqO8m/5y1otYhx+VterMwD4vCQWtJN?= =?utf-8?q?66b/CTN7uO2Yfbezfbj0+dj64sOWtWhBerEmjMcabRKDL9lrNG/pDWX2VpgtG9Qqz?= =?utf-8?q?mh3yguBfl/8Biz/n8ftOoEcXBihYjuPDby5OEUw/qQSBqQUmU6lShOIgoCJOIUb15?= =?utf-8?q?DIxxYZXdy+75OarJADXnZm9/XCMji7muxhEBON0Lf7K6vp2bG9Rcfh3/znmH7y58f?= =?utf-8?q?c3lNahGhlj4GoPWiJhGaPK3I2OaRnvziGNS9ns5Y52BBUZq1hy8O7tm6IiJ8r9di+?= =?utf-8?q?JF+RL/wj/e404NW2lP0tZcKfPH5IU1N8jEMkQld3IGhvzkfrjhJdYRJehczH2U+28?= =?utf-8?q?prss+L0qcep9B15jEtV1+lVxIAyCuyGT103VQ/6Kgnn9obo+Yfka2kBcYMRprPE0T?= =?utf-8?q?/yTaFq3tkAFG4w1vQZsqR26ENRcaTRqm1LZf3NnPsMIrZxL9ztIupdFN7nzKc5jTT?= =?utf-8?q?s/HL53D7JzZUPlE/me03gfkSSndrwfMEsRuRQUHjn6ogDnGaX0sv4gZAIH0CZuQ4q?= =?utf-8?q?g7G0xxSeHMsuTBYAQnKN8XYp+8sjB/9HWh+qJvXYso0cHFnvqyx+1ZV++nByTQbRA?= =?utf-8?q?w0EXugj86n0a?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e7c6b32-30f9-459d-1563-08db8e6f4258 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:01:11.0148 (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: d9Zw3WftG5PuUdJFBaOiV9uudrU1iecBJy+55xXogGlX40MLOQudcX9OdR7He3b4wRgbA832u169CtQMq+wWWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772556708519032689 X-GMAIL-MSGID: 1772556708519032689 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 Reviewed-by: AngeloGioacchino Del Regno --- drivers/mmc/host/mtk-sd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 02403ff99e0d..9e2debd1edbe 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -2887,7 +2887,7 @@ static int msdc_drv_probe(struct platform_device *pdev) return ret; } -static int msdc_drv_remove(struct platform_device *pdev) +static void msdc_drv_remove(struct platform_device *pdev) { struct mmc_host *mmc; struct msdc_host *host; @@ -2911,8 +2911,6 @@ static int msdc_drv_remove(struct platform_device *pdev) host->dma.bd, host->dma.bd_addr); mmc_free_host(mmc); - - return 0; } static void msdc_save_reg(struct msdc_host *host) @@ -3054,7 +3052,7 @@ static const struct dev_pm_ops msdc_dev_pm_ops = { static struct platform_driver mt_msdc_driver = { .probe = msdc_drv_probe, - .remove = msdc_drv_remove, + .remove_new = msdc_drv_remove, .driver = { .name = "mtk-msdc", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 06:59:55 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: 126733 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920570vqo; Thu, 27 Jul 2023 00:35:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlEBcfzPEPDcvTXGLSoZno5+Z3YwyP/Zx81MDOOrI2eO/gTKZATPhTXq37a/yEW9dvjjHDSo X-Received: by 2002:a05:6358:52d3:b0:134:dee2:8c18 with SMTP id z19-20020a05635852d300b00134dee28c18mr1971255rwz.27.1690443352261; Thu, 27 Jul 2023 00:35:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443352; cv=pass; d=google.com; s=arc-20160816; b=Ribt6zzxNli7xD9h8UvbjrYpF6dtIg+Nj9kLOSzcleobJGvOdnx78eW0EqISAmfG1+ 9P/YStcCnFwxdIJIHITVZzaS3LIW+YsJhm0XUi0U1BS8CXkDRjQYDWObnl5uMEN1tAW6 WRWY+YrufUhZ785sa3jPcZPdy0yql2csZ+bycPqj4IwLkWfm/rfrBZVHn8q0Rs/mZH2G KD21NhNa0VnmYN72YU2V17PUFxXTRw98SsVXWAuWX/oNkVUzAfBhaQ3/Rc0fjhoEHtoB WP69ukr6hA9V1kvgfQrq8nl6esaaoAIqthaQ0bIdWfdHVeUlGf5/pp0RNWxlgEH78w1p ddKg== 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=0+3n5fn2IoZngB6Cc3Kclj+LLnDmum0i3O9OADfIUwBsvaMDDrEGFJ+FAa+oalE9To 9KQ2u3S9XyKNaYa1sHxe0zMOv4QCqsOlLiMBkxPT0SaTSYAiV7TDxddJOYZnFZhoQrJf BAKkGzq8reOtADWyRjuAoFtFAkL+20WdIygwSNeVinP57cQ86yHJhBymOXyRndr4kXaB p0oJn3f0oXHm04H+cOIClCqCPSJLHZDUb3Ciw0y2l+RuZOqAP5MmWVh48Y2tKaveLLg7 kWAsdHlSWd53OW8CqEJLClhcjXYEqdUlaV4OTzlFqpyIFG1SFTKM7OYp+AgK8XQdwTHI sAHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=NQkBog9N; 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 k189-20020a6384c6000000b00563a8c6a843si888096pgd.178.2023.07.27.00.35.39; Thu, 27 Jul 2023 00:35:52 -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=NQkBog9N; 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 S232847AbjG0HBj (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232799AbjG0HBS (ORCPT ); Thu, 27 Jul 2023 03:01:18 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2093.outbound.protection.outlook.com [40.107.117.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4A58268B; Thu, 27 Jul 2023 00:01:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XQP/RTkGo7KbEUeRfuPlqsM0ugp4OCR6FKxgjzET3gP+/7JksPK97skLGKa2Ih3znlKPCeCAaytaYtzEQmcNVfah7QTZXhm8Hf1Y9e1QD5+PbQHIGQ3dSNTe2KkwRdWcX52vjJlnZNM3d1wX++rn/EphNHv3XuaZgJE/QgjPEbOJNx8xTRbZgpxl9F8xtCDfVWrVQ2b2q1poqLq01mTcNhr5BxLtohM1PHOqEL451HMUqjBsLV/knA8IkFIAqD78CNqVibWdluI2aiQ6U8Y1qCrhQmm0lnyypSMOWQUU34B37NMI6OsoEGUlKTXgGUuDNcAaVY8KvlFoA85DGO34aw== 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=bA8AjvynDULvDsz6KZaJ2XhLENaJ1uyFl91T2vjUxDZoNd8XefsW0cGmo8ncsUtQ3LQ2YL8t9nDbHAIys23oE/aJ+QcbPGnOYBHwYWBNRclNhE9VqDk+i56i21QvMXGUtoPkPXQhzW7fe0c/plqT3LcjvI5l8jnjIXdxo9kjKtoWkud8+56IZMcu1vY7yvAXTIJIOEqmhFWOgp6YqCZh212D+lcJtjPD0a70IbCRCoYHztIoMyy1NdQsn/vzGnCQOkzBIPo75tRxykbUfibk+H9/kljj6s30RVZ7GymNtL4rSvQLhDK/JtV2LjDAlfGejqS8cdcizYAFwZK0G+Ff7g== 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=NQkBog9NL8GmejYk8svz5s65swDEuDuo+qbOlV2vHZaRs43uwcPoktfH31ioaWuwb7FeGURAC9m7LF3ftJ7CfzIMPAYgpH9zWvxWa21vWgUyoZ/Xd6LONUoGuK77vde4vRV/ezU6Lak954jZedAlr0kWggU7F0pcGH06KLDL2uDW7sendWbEE4H+F3bQo1Z8JNyVIWS0Vjx5EC6pXcOMVc8vWIyLmHCMAobYVNS72WJokclWfczPkiNUvIIVgXhqn8v7hPSDHd4yKlEVzX+FVT5CMuAlsJxV/s674DE6AooRC0etgAu706SZrHh9rErLudwywkgLGzEbIm07BMws7g== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:12 +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:01:12 +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 v3 06/62] mmc: cb710: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:55 +0800 Message-Id: <20230727070051.17778-6-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b16ede6-6950-489f-c588-08db8e6f4335 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iae5BqMxTaO6TRR4Wlvl7uSeHnXg7Tg37b7XCyOV4Qh/AArj59jFzW7iKauinnOQO8d4hOBTLr2R5qqcPZFxuterIGO7/Z2MM2wmebV1I/A3ZP0La+tTNCPDMomFhp0hsCIXCZQZ3zkcfPqUJavVH8fGF8wQeVcC3c+nlClwlbj7aFNz5x6MeI7WM0iAa0rYd1CRj6+6/mgV2H9rTaU1r5iolAmSBq5nWjFy8l/OfPdECfOuxhl4pj4HOHYgZnNav5T9x6H7Wct+Kd9O/U24rEKzZMz1oP5fyjU42xdoOGoEsPgjaWovw5PSaLpUAoJdoo8AbEd4GbR7nYdMmk/O31aV9ttWu/uiLMFPOkpVfQQe9/2E8UcjJwQ1QK16anxQDE7SOL1ADRuqv7qkBx4P2I1y4GVTcG8CpZa58ZyigKDG00VVopGl0CsHlENtKOoaFf4ma69XS//38wwapcbvFCt14by2ggOMUqnAsz3g7k3M6k23QN2INjENP/bb56Vw8gf7DvQGMahzcfQHBFzNSF/yRf+ii00sr4Y+32YKvlNJoyQk4Zm5b/rk8YZPxcQlBAYMokZcepcZ/XmYs4PfUgBteh2Z9HREQAr+wakYwnKWYBZfPUtUmpD6bARnJx4a 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(66574015)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?bi8igpBKrCz/jW0SjbxUH9CDFtS2?= =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K9e4+5b662T1Ps3Zqvm9UxHAsCLdjmsvKdLDnnn4/0V+GIWOQwTgVGigNmnaB?= =?utf-8?q?kTfuUILxz3GNCSeSQ/q3XcKAPFMXNB3SAFVqcKP+6KsT7pqpe66qhFfC0w6mHzN2W?= =?utf-8?q?HD310hb6U52So8mW6voA48yNrYfUCdKsujXnbPbnNFPx0EpI7LepxqpKM0b4gO+Tp?= =?utf-8?q?tmGdlAYpvciCJion65gX2/VzijnxEM+Ji9gYUXqkZcezLXNQrp41Z1fxt8KhC3697?= =?utf-8?q?Nw2lPMvk7XmqV58Q1i3xYAfKl9ygHAtWfjQbPvLUSgyjmE9J4FWosFfS4xdSahdVQ?= =?utf-8?q?KNqXaPoq3afHaz7Z5d78bb8uf6nPAHQ3aEzOTLFEWu/KgoWQMwmwougLq+jDcTtlW?= =?utf-8?q?mlzGAiCwtpsha1oyu6iProTs1ke/7Y8r91OqiG5xwfnR6KBLNFll5HFiWLVeb0BiD?= =?utf-8?q?M03qcDwaAQbTg8lobKlTNMf43BLBcYivf+36EQH/DERwxEyZMiW7D2WPVfd2ZxGrI?= =?utf-8?q?7+RrFeQ0Qz5T7HGdciH8Vv5m4cPjsRZcxBoLRmIjOHjZgTWkcu+rRD+kjgXM/cy0Y?= =?utf-8?q?eQIlnyjDJACFMj1Rb72wkyGmWscJNp3R4F/2ddin3pPQOe1GIDqapau6IRdY6auAF?= =?utf-8?q?n3gM0Gnq8itD?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b16ede6-6950-489f-c588-08db8e6f4335 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:01:12.4357 (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: NFH4Ij4vjc8vtMqnGXfx4OOcG7ddD/3kEyBe25rN4m4ZWlw6jIouVWsV8IMYpi0t4s1hjXPv+lVYwLkZCKO9XQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772558328846434482 X-GMAIL-MSGID: 1772558328846434482 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, From patchwork Thu Jul 27 06:59:56 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: 126734 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920631vqo; Thu, 27 Jul 2023 00:36:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlE33tAJjwh/eFKgPZYHV4TkhY8YrpKXe/8VPLy4intVah4oZPCtusN+D5hM/+ogzBgo/KeY X-Received: by 2002:a05:6a00:3a1f:b0:679:bc89:e5b with SMTP id fj31-20020a056a003a1f00b00679bc890e5bmr4378333pfb.19.1690443362803; Thu, 27 Jul 2023 00:36:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443362; cv=pass; d=google.com; s=arc-20160816; b=BODAPpJb4rwQPMVlEupSEc3ICD+8GYoegq7DgPs60MpHaj5/x273WdudUkW/JPOqF3 xkM89r+RnureJ9Jh0prPwUAK+jan5IIozgJMHL3ERChh+AkIgwxqypJPBc6K6z7/0sxM ow0VT38iY+4J312NbdQEDgKf19WXo1qAIG7xwlhH9hD2Ps4qR1Mai0w3W5b5fyakKnWl YIQKX7tplB7Uvmr0acxxEkO88lp/4voLeE5Be9+PwSYv6Ru3sUV0J+5kAlwtZzMf06zo 3kOIRb0SRSBqAaPkxsWSBs98MMRHa9YHTK56ELIbKhbBEoL/1KFkrYcMNkiIGtaRItgG MvZw== 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=o/FEi+NHrJgVzPUdApTL1O5ZKA2lbL/MoTwujWdTFXw=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=S8M2mFKvcqDoRXEhLnGJ0tpGgEU2jo5IA/3fDALDZDI5Qerj8purDjc2iNPVO03y1k 2LwGHeOkHCluSawPlqHzj2vojqIFFr/eeLHUzNdsP4ffe2f3grY8gqFVgHWfFv6j0D1B CyZZ4G9odVb1tolkZ+1ivAts8SAys3D4tKYUIAlQ5XgSjEMIGvYHLSjctRJzQ2AzgSWu eDVViyNZFDTT36sfGO1lHFokltm8zsWJuwtvcMcT7Cc87mkrQnWRbZ8j1Rfuf3pWy7iv oIL2/DrRdXlhirKAk8xmR293RBsqOngxcqCZoWWDWjfFPLseeeDnahnXHoZggVuNRvlw anqA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=jnyUevhP; 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 fh6-20020a056a00390600b006828c76a9f1si1012852pfb.74.2023.07.27.00.35.49; Thu, 27 Jul 2023 00:36:02 -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=jnyUevhP; 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 S231486AbjG0HBu (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231859AbjG0HBT (ORCPT ); Thu, 27 Jul 2023 03:01:19 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2093.outbound.protection.outlook.com [40.107.117.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8F1226A6; Thu, 27 Jul 2023 00:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fEe7OF2RFmujTYC6kYlCQDq/+fso6//badFPk13SwphhDewiPk+t7UTS7Y+1K9HntYflycf7MUcRbpnfKJZO8NBGle8ThofjXoMGT1u8zB+AtRRmaLO2CpKsUMHRu2dsraOpvsJdEj5Q4jaa49mK3gTEiAoEepIPEJiwwXHdIrbs4FlBlgEGgLk0gPHPxbRgXKj/UwsU/9VHOd0vLuXoWdvJSFEKgbF0MYSMvjjCacPuA2SMtkAk+JxDNf4IH0ebDUCQl5ErEjKny5XO8U+MHYgF5orSZDY4CP0ZG9RkecurBgynws3zhrwi03sFgRR13gVe6UqPG+s58faaKylo/w== 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=o/FEi+NHrJgVzPUdApTL1O5ZKA2lbL/MoTwujWdTFXw=; b=jooUmuxIQwp4hkknl2C8SmQOnxui8JdbQGjqpUzm9BLCRGYq48q9BZETlf2lPm+QS29ridlTi9UTiiFasgvQbPB8QuKZyDIrYZmPsrCIX4ns2RCo9Q8Zhl5G8tox3Szk89bDVeZ+a9x98fKAw1ZGKT9BuYlf/wwmNEX+b8RzUsaK1UlN2pD0TKqqa+1VSev0/8OKGmawujj7mtvIo7IvZNJYkW6bGvNrLqZ/jJbRIzgptl+cWkHEO7c7vCoUIEEfSRuY11Hhw1E3j/9RyMf4l2t/bl56B13qRD0Bry/beqkahUe0GV6Wx5wbiGpKao5NK/OjlEcZT1Wj9ugByiW9yg== 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=o/FEi+NHrJgVzPUdApTL1O5ZKA2lbL/MoTwujWdTFXw=; b=jnyUevhPwybGl3lv4jrdxNBXPK3FOHYgJeDqJiI+dlnFFYZxtPRAuosfgAj7kMM3DScJaTqP4wpShlX+yi+nVkTK/oZGapM3/YFulVhLNijC0QDZRL6MmwIHCz+Id4Pt6PD+bnIEWHprM66/j4mIMxU/M3ikaMypesZibssTtVCX5jq0FRIsUw0desYeZIMDjARdZZSFKSghuNlFob2Y9kMdIbAzakD//8MC7srW5b9bJxOBe8hVGtHLKeZlZgtxl2P9ALjIz4w9JxiJyy+VNN8X27D5+BpeQwIXDJdn7FTfwgwS6q9GOVzbGtYdi0n/LF6t8FnKwfRrcIwU9tyO8A== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:13 +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:01:13 +0000 From: Yangtao Li To: 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 v3 07/62] mmc: davinci_mmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:56 +0800 Message-Id: <20230727070051.17778-7-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: c9f08c3d-8f24-478b-c605-08db8e6f4402 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UsGP/RV40bLflh50vHlztjwD/IwdOJ8UBH6VnYn/AzwZlM3H+dPQkFYGH9AE+nsUHGVFyD1dipD99vDX0T9xWOyV7Jq7DzrJTmtp8+aHubadjbvLkADktWNTOpfSY5/KmEOx5Yvz8ecq9FIAH1DSkxBbjkw04eFXYF8A52x9NRJWh6eFVIF0LSkWOKTvvufuNwbbSWQ/XYyuQ0R0qYY9rK12BV/Bqj/Hnap2oa95kh8YuN2C/6TueQsHXgBZo4d0ubi2KojQu56Tlog1uxh4RSOR+z09EfBhRlYaaw/UHiUoy0+LWxcB/Pka6Ify8uSOVLhRzPQS/7/Hkl/Wp5hutyswnvOC8imlsgQ3TEVzyV3mqXcEm3yffdTxNEvJ90HIZwJiuDWeGdeU+8r0xhh9+/gY1v/A1nXYGMnizUmMpNGDGtqJdSdYid950w/UmqbFpp1tonctQsdJRphGeKh17Oq++raYyYkG6/rxBCb5eqWyp3bSIN7JxpQ3jwvb8uBIV1YSxz1rQcDh8Ipsi0n/yPwxzJE4Vzpo52myxs39+X73a9LDMeGkxHstP4wW5zSAOYK060ZHUZXrYYpPjdhvS1ZEzAkgLri7ECC5YaerP0VS6SQd2xbyLNV02nW0C0BM 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(6916009)(8936002)(52116002)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?P3l2pqRSbZylBciQ/GgMaAeq6KE7?= =?utf-8?q?P+dCZvr9WgFOLjtASAQG5NtQ82Em8QVEVFV51TgvaCzMJAFfo6I9k+Y4Td+5ovI5f?= =?utf-8?q?6FXUD7cULL99LpvmvI/WE7zHyQ8dCFj0wPz6DhL4sOV5y4S4iWI4SNZjAN5tJ1Cin?= =?utf-8?q?R2ipsAbi8zT6iG9JQO7g+ZnDuXPELQsADl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+r7k1Z6EXABjKlXRFz2Fs87Qaf4a?= =?utf-8?q?TdDxZEUotQKPKdW2zCfr3uPqAtlDGMB16dLCTOy40XIuzSoHvZORK0Rc3xopS8PGs?= =?utf-8?q?tNXA+/E2YwzevUG+sKQjMf2YtPn0t1qjbb3q03waE04eGuGM6bBJVr9zjAkz1JYBp?= =?utf-8?q?vbwjdx8uh9pkkGCBJMtZbtMnibh4G3yhUnrS2CiHM2I6dK+zXU/IvAox+gs1XSIC7?= =?utf-8?q?XA2Q1R7fbSt5wcrRBaeuI10k1AbBoEzt8wcH78IF3Ykk/z+eLryEHbuWe8AUlAGsl?= =?utf-8?q?TjFgnddAvLtsh5Ydimnj350nWazSodqJsZLcmUBsiyZIwVekzS2YGQTqiA3rheZ3i?= =?utf-8?q?nK02GqwT+iFIW59zmtnn91XixX77ggYg1qLn1Vo91c0oYS/uHtelDKtk3fn4WVLN1?= =?utf-8?q?sEXw+I4Z1d9T+Pj4nlHh+6OeA/wd6TvaMYleJRz+PW5dYEPVJI3fXyas83bIBZXOD?= =?utf-8?q?KGaq6fQXCRML?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9f08c3d-8f24-478b-c605-08db8e6f4402 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:01:13.7948 (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: /HYuJhu78zYIOORwtU89mPWkVgOsVLuY3HR6Vj/7Gx/Lp6WEK0G0A6w59YKtKKYSssAC6Rha2RlXjprJ+W8gPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772558339449473254 X-GMAIL-MSGID: 1772558339449473254 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/davinci_mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index fb686c0d171c..3757e4ebb614 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1345,7 +1345,7 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) return ret; } -static int __exit davinci_mmcsd_remove(struct platform_device *pdev) +static void __exit davinci_mmcsd_remove(struct platform_device *pdev) { struct mmc_davinci_host *host = platform_get_drvdata(pdev); @@ -1354,8 +1354,6 @@ static int __exit davinci_mmcsd_remove(struct platform_device *pdev) davinci_release_dma_channels(host); clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); - - return 0; } #ifdef CONFIG_PM @@ -1402,7 +1400,7 @@ static struct platform_driver davinci_mmcsd_driver = { .of_match_table = davinci_mmc_dt_ids, }, .probe = davinci_mmcsd_probe, - .remove = __exit_p(davinci_mmcsd_remove), + .remove_new = __exit_p(davinci_mmcsd_remove), .id_table = davinci_mmc_devtype, }; From patchwork Thu Jul 27 06:59:57 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: 126740 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp921194vqo; Thu, 27 Jul 2023 00:37:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlG3jnjOI/JM97d+gWkpXXhoEV2Duh9h8gVZcEGOHqY19VovTwACUVIptHaLufYGmYIdE/ek X-Received: by 2002:a05:6a20:728e:b0:134:1854:c136 with SMTP id o14-20020a056a20728e00b001341854c136mr4566964pzk.0.1690443429911; Thu, 27 Jul 2023 00:37:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443429; cv=pass; d=google.com; s=arc-20160816; b=krMJKDTwVIIdn/gKr6aWZjaYpwIZ1IGy06hn658BF3xUeiqHYmWcN1RP8XXjUpN0fw jMCUmBkx79SKqqZrYaJVPn8wluVo575DDvvacfsLb8SdU+2qNx/0NNpLBxkKTk3VKbX7 cDfHDDavgfWtN+kS+KgvYud7O4VestHkg3KG/9KM0RtGpqJVhr8+bOLB2QUBvJDdzNyd lZ1kNtYYRfSFzkfebQkNcXE+0xkjR/R1BL2/VclMpmRQKsabK0BZ/nxzHfeDUR3Llig+ 6cH22d4B+ruzzX26wSOvh+zblxibC9Ly5m2D7p3AOEDppxcIbW9/c+yM9G5sLhkMy5jE s+1Q== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; fh=vEpmipvtuUUFFWbFJZgk6ER9IoVi7xyBonilERpGTtE=; b=u/pgxx46rFNaAZ1ZtDrdEd03CSjImUMde9SAWsWuAMarvw/q6N5K4UcA6HZOQGyg3b V8Y0CFlTZE7+Bd0yNetBOX7uht2yiTMHva586AFYwldr3134WWafkTM4eDgK2OnbbZwy F7z00ziUMk2S2KzpNY0CiHNzFfOYyC910dAhH1QX87jXm3jtdZxKv0xnpmLPKTT5n4RH if6pojGupCIOhTM0ya2LIvYnfHwpJjCeH75lKDyoyqMgubpK2YoE9YrPUnTFIoS5H6tS B5Ijt2TNmmn7xIWNvMKoi7drRdXPs3IGV8wtKrtnQHYOkySKeW3JItSzv9EoBztfJ/kc 01gg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=RdjFo4TW; 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 br15-20020a056a00440f00b00666b8536d8asi977003pfb.305.2023.07.27.00.36.55; Thu, 27 Jul 2023 00:37:09 -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=RdjFo4TW; 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 S232697AbjG0HBz (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231423AbjG0HBV (ORCPT ); Thu, 27 Jul 2023 03:01:21 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5760268B; Thu, 27 Jul 2023 00:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IdfqWrCDkPMf0B4r5l0YDmMIFoo3GUe9yLpLkthOh0hjpIThN/ayOwm3tAxankX1EfnlmYiZQvX9tTKwDsIhZIvTlfDZhQ/fu/iyIOuIX5sTCyjiZa8szSYxqsIovsKNgHlyh40LXzOv3oiU75/PPu152XhtsLpmLbhLDx9t4BFDVLI7OycpVYW/DHQVPoX/16v0aS2Lj9pVKfxpzxjvFyTC8MZAnr7Yy0nqMZgqZRzt6+eM+tEXqiG5U1D6bLRhhnM1f6mNfmICL8WRPj3xd6CMsolNxHRBzxWNI+0YDjV3PcHLfAX+bfk8/Ikl/v4gM1BEBsDlwOKBHX0I8mFC4w== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; b=bUXst8yk2XKPzXhSH4YVJdYuFAuHv+Zv6tw6cKUCRwslTm+NFMcvqy+rTKSWkuwMgADfCHkPPiviir/FROiBqgIpz+rE6NhDQCDRzYxNhzSK2+IpWBumga2+oEOmmyDvuKLl7HuysWcjCKR8F8qQYgbIQNMJenXV0Nkhyc47fePnWLVK1tgty86X40PrxeEu0KQdRfcxgT1DYIf1GBPD9C7vsi1QDeivdWbTQhUEeXs9rklIhXAuL7zcNdWMqdjHQe0MCH817j7gBDU9YTHi11twszvAOK/aoPjuMtUDwjupbrTYtBk+9zlsc+jlelIrUXYQNPkedp+/xTjTc0goZg== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; b=RdjFo4TWUqrVmr0FRhI8EKIIzUcq1KM0iwYpacKLUoboLmnV5I94pB0L+Yrc00rSCeD2YBpxtwZCuTsWsesrXWOGFtTZOCiGqpc3tPmxQeEIPEGcI+e4wuwfEIcoHHV8fAR0ZAGPvK2AVKGVRejEZU0FDuMYozK2ZffXBkwMUmCVUbZKkKnVm25nw/NbpWXisWm+E0NGNlbofuDjH8FRCIXhuQon95qXZn+Ppfctf2NHvHlMbPNuHySCExVJPYGX+3OprhQhOoYMqlUttUAv5nz0WJeuc8tg0DbIL7PcY1/iMwpC6Sn4h/GPsZ4tN1JgDuJzisqh5Qk6q7LgzatUJg== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:15 +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:01:15 +0000 From: Yangtao Li To: Jaehoon Chung , 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 v3 08/62] mmc: dw_mmc: hi3798cv200: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:57 +0800 Message-Id: <20230727070051.17778-8-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 621fd040-264d-4dcd-764e-08db8e6f44e0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +I71yupEiYIK9mGrudvf1CySr+AQll6z+IivwGplBaPoV8PVbSwgmV6ojvYY8auz8rRCLEVHboOf0veE7vvD91Jn2nxM9sYs7W1TTW0htKVxKz1GTCSzHqmL/0Q0Az5nWozu7a6zEqpgx/5G3uwtc7KE0SN868viisevogV+ZtC/E5JsiR29FwOvezbuZxkxE3f7jsWnYHorIQ2LwmTQIV7NmM5tuuOwUkRrBk98WpQ+TELp+DO/zLH9DSINyYSx7wNRGIcqywYLEb++/IWmHcsHiZrJzI8cWcM1zvxKZNEiJM8mr8RtcEw7if5bSgpUyHUnBhf84RgNDaPEjCNoJldbbbUTcMu+Oa/mL2m9/yC0GLoCJlFOs8Fg8bhAEdK5Dtcc7UjjTgNyNYbhIP646wuRw7Ozzq/+x2j8OQTQLUiOpJLhA0hd3hsCASR8+VXqNIrncY+pAa6T1nyV74bj4zLHJ9NhSUeAIAztXMv2J+hOyLOUbHiY6zUaFBm8pujstpn6ecsUaDxOULjFYnfTftljCyWsScoA3dOUT2Z9WV2utlx2+9J4m4lZWDl493aiOLrj68Qfw4fwf/7YjFBlCEUg1bUXKgo/uTA9AGQa02FJlVdxWjfPfI6IvXJ8GT0m 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?2WaSgFAOiyC0JF6upO61fqYmprl/?= =?utf-8?q?EqnebCQHUkSLk8+JXAo3I4zhYBtT3jcS2S04QXCsLhumZPZHLPmFnkpBbolScmedX?= =?utf-8?q?aCp/43c0Jy2K9y10aBJDxy02rqavIuzE+cw1OlRI+R/kP0c/cgodyHcknwUDrjK4f?= =?utf-8?q?vNxpzbqgYFmHW/5tNFsamqq5UFYZYp5afJJZKCYZzidMZRpOQ19bP5yVgmOq29BzX?= =?utf-8?q?GkJ+vQiJcBLvCXogLMhJ1shmN3plyoGnEObYwlmPp0h2SFT0UH+cAcMwcX6suZLpE?= =?utf-8?q?QYoiqyrjgCVr0Ob/2HbzT4cSNrxMgZdw11j1I55H5lmVP2G6maX6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Zt?= =?utf-8?q?G698MnO981WdZJkeIzTZmDotIPsSrhjxBAjbrGXaDlDTStmt6AMQgu6FLGvOMpXTS?= =?utf-8?q?ckbiPzkY+nVJr0W7iBdh5LlByeuff/YTEw3fzV7HCfdb9kkYr9JdFtvsn8cieX3P1?= =?utf-8?q?WQvVyq2H6Ct1ShdLjuT/Of7U5l3V0EcEMnZxy9wNC1W969uAiTsUpnisI1qaVjqZR?= =?utf-8?q?uUqYOimIS6Kihov0IGvWjq5VdFNTDExA2vzPx3AlVETnj3bj51Xq664Tk3e2GxSsP?= =?utf-8?q?KayhX8Xp9R0MwF8nIPqxq+OFhXV7hMkDvY/BJEYvLUS7QDWEUB18pk/kmlhFgS2fq?= =?utf-8?q?k7LgHGnUNo6r?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 621fd040-264d-4dcd-764e-08db8e6f44e0 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:01:15.2378 (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: +7VNosngJElp3aPuh8sfbZ4wb6FAwyvKFuY1z/QJfd/PxlLgyhSfshGQB/jhKIErm6ZGJigJ7P0wKXvMELRjuw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772558409872110070 X-GMAIL-MSGID: 1772558409872110070 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/dw_mmc-hi3798cv200.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-hi3798cv200.c b/drivers/mmc/host/dw_mmc-hi3798cv200.c index 6f22fe054087..e9470c50a348 100644 --- a/drivers/mmc/host/dw_mmc-hi3798cv200.c +++ b/drivers/mmc/host/dw_mmc-hi3798cv200.c @@ -171,7 +171,7 @@ static int dw_mci_hi3798cv200_probe(struct platform_device *pdev) return dw_mci_pltfm_register(pdev, &hi3798cv200_data); } -static int dw_mci_hi3798cv200_remove(struct platform_device *pdev) +static void dw_mci_hi3798cv200_remove(struct platform_device *pdev) { struct dw_mci *host = platform_get_drvdata(pdev); struct hi3798cv200_priv *priv = host->priv; @@ -180,8 +180,6 @@ static int dw_mci_hi3798cv200_remove(struct platform_device *pdev) clk_disable_unprepare(priv->sample_clk); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct of_device_id dw_mci_hi3798cv200_match[] = { @@ -192,7 +190,7 @@ static const struct of_device_id dw_mci_hi3798cv200_match[] = { MODULE_DEVICE_TABLE(of, dw_mci_hi3798cv200_match); static struct platform_driver dw_mci_hi3798cv200_driver = { .probe = dw_mci_hi3798cv200_probe, - .remove = dw_mci_hi3798cv200_remove, + .remove_new = dw_mci_hi3798cv200_remove, .driver = { .name = "dwmmc_hi3798cv200", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 06:59:58 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: 126702 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp908755vqo; Thu, 27 Jul 2023 00:09:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlFTIupKR2kl5LZv7//qpvAL7DWtXRYy3JP6kU5m4on7+wdwOe0X9pWwpmWBru1O1Kpw9fGd X-Received: by 2002:a17:907:75d5:b0:992:c5ad:18bc with SMTP id jl21-20020a17090775d500b00992c5ad18bcmr1115581ejc.70.1690441766075; Thu, 27 Jul 2023 00:09:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441766; cv=pass; d=google.com; s=arc-20160816; b=yLw03mY7uSd/3Ht9u2ppX8KXxoiJvyvch1Xw35u+Nm2m2r3w41Bp7gxu+jU/7XZqsk 3L2b0sfb/UZd4FTJdEt+7mOHQ3OSoC/toZCDMgqM1ff5n1k2Aw+pfzzga8Cc7xyy0V8w lgkZua6wmfbDK3+Rl0hk0CaSQrztXbNZjXgxT86JSmt/rv7BuzSLOJ8cIdYDU+FdvMlz yxSFeeGE83izSYCQ91U82LIws+9RcNv/cm2KJO3+PYE2UPi1NB5MbV1Y0/903FPlq+Wo YDST8kICfpGpGAg+7otR/Un/A6fEvrmkyeayPp2BQ9zwZ6vvhfkvnBZnf3PtiaTK4oE5 GVrA== 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=nEbCcoNdzo8jW2C3o99v+KZXBqHVRnLu+pxztFMKspQ=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=I1IGyw3Ujz854d2StPjgcJphGDCICdbPlr5FuzPq/p+LVVwMVRJrFQcPe+0NNwcQ43 epX8fX4PYuG8rEvfDkGb9F9md0rZ1RNMrCaCNJ0aMyhluDIyw5KU//+Iq/c6A5Jd46A3 EZB2OQiLD2lqqie5qXzrbZ8F6Ked9EJRU+sRUV6pSq63njTjZyNEqB6/OIzGMBWcjmgg 6Ozm8JZeXiA9xWV+EhZHXBzEdy2Q25dYCW+JbzcNXiFVaN8WsrB3nisZ6BgPhkz3Ivpu xFZwLsWqmaKSrUQFDdttRCAL64ZsyQW8EuJKcM+Q0GMoCKtZtTXTh7OePsWJlqHIgshL D2sw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=GPnQh9Kj; 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 h15-20020a1709063c0f00b00987b20b66bbsi612722ejg.711.2023.07.27.00.09.02; Thu, 27 Jul 2023 00:09:26 -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=GPnQh9Kj; 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 S232890AbjG0HB7 (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232479AbjG0HBX (ORCPT ); Thu, 27 Jul 2023 03:01:23 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 292EC26A0; Thu, 27 Jul 2023 00:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iVfW2sr3IwycqqKat5ZV5NY0b+4QqsFvrySu/LDu9Vi5eHBWM53vjyR0t2uqwWOeB3c+FeMqgC7vkATjsinHPui0p0uqTS4Z30Fpj/kIKJcZW85io1O6+Db2o/bE4TduAjwmRjRyHXQ1GuLhXytCWLmAg6fonPRycsh/cKxfzrlwDvQukYI6YIo6UhkWa4u+qCVzw6bd6kUJAseanPLj2lNIkJ9R0fahwcLEWTILqcqSGNgfplCczq5WfgG2TbYLc1ybPSBPkcpfD51Hd/HLNKQq2A4E9OuBUXQIDA3Eu2LcodOSxkgnxiezqpUMXjWlQI7+nVvPRQx7Kh+NwGnPZA== 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=nEbCcoNdzo8jW2C3o99v+KZXBqHVRnLu+pxztFMKspQ=; b=l0aEWHfkjsmIDp3mnT82JX2fcsxoriOqkVG6QY+lhp1NRlG7ROfIOQYXFeH71Z8dXJ3QdIffj+XViY2yv8VKtLpZmNWu+KOUYteC2lMcJzZPXnXlBKjlLFi5r2MR6SDxNCS3ig0tQ0i6W8R3OrwOSL/ut80ZyPZGmEexjgorN0dNcLJCu5UdjqOPrfqYMKfZTeduYjUJMx/gPtd7w3r0hJ3XBRRD18oqXSfUnsuWgOsd9ZM1C1ysCC9Abc/AGpSV8mPr9v0paEux2k6X6sSRGrcreC05ix95JJEr2qBYf4DZVqmaM6ttcQfnvyoQmkSLNoPCgMBmrHoZVDjz4OgOMA== 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=nEbCcoNdzo8jW2C3o99v+KZXBqHVRnLu+pxztFMKspQ=; b=GPnQh9Kj/aJI8+EnY0UJGk0tGM0ewglZsdnmJix4XfwrScOBIDNukynsVw7OEHFKOxH3c8Mja4cPKAN4LQQHNQH2AfOKcZNPfwyq3f2FDmveJIrz1AxiIoyzLPSUFh8Qz+r5AbwSnN6ayBIE+HtGtDPid/nEd7x+rYK3cl9VgoywqolfqIdZlV/0WSV/zFY/NGjZxbOTZVfgJ2qn/gpsMM+v6DRLVCPP5pz+TWpYXVnAJmZI2yEUW1kI4en/HyPFUrskqYz4aYYyBDL19rqyr5YkehUrx0bUoy1jereLZT1BP/rnwe8zsD5U2kxeRu9YPIgcHRunpRYFlhSSrXYDgg== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:16 +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:01:16 +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 v3 09/62] mmc: sdhci-pic32: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:58 +0800 Message-Id: <20230727070051.17778-9-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: c6bef073-633f-4054-eaf8-08db8e6f45c2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XeaDDFbW71kzryDpyvJKg//LPhFcSgFzmIuPUUWXvCiE038qOiqDOZ7oA6q2kTclGI7sWpjyfUT2gp2BIEdJUxYCSSQ1RIjpGvgexCT0WyZnZeJipzedANzWpeQyDp0UNeBWU7gcqM04UEeKH6p8F3cDhy0nHmQP2U3ccDsRNsF8glgSYoWd/YeZH4d85CzsbOc72klvLENGqLD2gSMtN27KY3YF2FuGKytSIBW8ngsfr4IywNBdfT5V1kbjYEKd82ODFknO14tvG37bKEQGCZmdCDzf6GAYpYfJWLS6Kzom0Uq1k4qA/wvQ5d33GItF4NaACBpuVWFjp0l9hDcweSz69gTxsPLr1BV6zs3svQUqdXe4+Jr18hEpnMM6lXSin1Zw0iAhyd53hIjuxHs2y6BWjZzTN1kA+fAIgUymhIC/vWLZv7YyzVAfxewJ6HRW9qHU/EDpLC0VQkaQR9FcOLOXMcNX8Zglst8WLrB4+wudBC34/YdDliJj90L+A0GqbZuO+RFaW9nGzR1EDvz1ShCkGDzt8b6yXCEd4a4qHCj2lOCJOHrHj0PRtV9BQwY5RBUtThgxtjR6Lw0lZTNZw4Zd2gzzvylkHzaodAuPFCHEG/5y9ZaAd6YLOb0JcJbP 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?bCW+w8Tcv4ieY900gU/H5lCMa0FQ?= =?utf-8?q?LrQWZQhi8zZpZzcTRkDN1xaOGRkk+rUXxnSdY6xTCfHJ/E/5d+Pw7D6ZzaWHED4SN?= =?utf-8?q?nlpZRdrzY8U2FH1hP7NZ0pzOTKm7ycyt2ad0g+tCYU5+g9yITI53Gmuu1b9LVL3iA?= =?utf-8?q?e8aizC+WqWDONkjw3cBxygO+yRaBVJO1i9Q4KYDwhUqMhxeNunS3w3XZuzORdmWwd?= =?utf-8?q?Dv6GihOmVE/7miX7WEqp+Z1jrAk1Phd3OSta2x3OdGkGeaBVsqr7m4InORUcOYSrX?= =?utf-8?q?Bz3xLz+++v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Ce+vKA9WWyq1npg4wmReyGV+Mb1+fXBkdyhz5xL?= =?utf-8?q?p4CfXcDS1sVBz52TSY4MZy382vMJJm2sZCbC7ZyV+wqYLqAVvl2+DlDTpaaDQjU4x?= =?utf-8?q?C/FAdLDvDvMlL6sDOWkcKdnrv7Ec6l4X8n6dCji+YrKLo8e965HAgu9Lc0RgaJ1HL?= =?utf-8?q?npmA2q3XU5XpLqBoeiHJZ+IXB97Sg9vE3hI0G3akvfjVgUUcsQx5saXDc7y4HqKkR?= =?utf-8?q?5Wpwj5fDjh5I3JIStxUpNEC6QgalD+S77vab/KX/tq2ysMHqMdqWdqJlaAR1zK2NL?= =?utf-8?q?VR00FEJcekv1md3QiBRH0kwc8kYyyOcaf6nmqeTXsvcGF29E/8QBkZHu9hL0rLfaN?= =?utf-8?q?X+PcEsF2rt3m?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6bef073-633f-4054-eaf8-08db8e6f45c2 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:01:16.7287 (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: m4ij6G1mFklyrK0VQtykPsstzP5Sg7AwpxysH9jn30xzBrPxxEb/Uq05mOSYYmxLrL9CmhkzgNBqNtFBHUyNKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772556665281986485 X-GMAIL-MSGID: 1772556665281986485 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: Adrian Hunter --- drivers/mmc/host/sdhci-pic32.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-pic32.c b/drivers/mmc/host/sdhci-pic32.c index 6696b6bdd88e..7a0351a9c74e 100644 --- a/drivers/mmc/host/sdhci-pic32.c +++ b/drivers/mmc/host/sdhci-pic32.c @@ -210,7 +210,7 @@ static int pic32_sdhci_probe(struct platform_device *pdev) return ret; } -static int pic32_sdhci_remove(struct platform_device *pdev) +static void pic32_sdhci_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct pic32_sdhci_priv *sdhci_pdata = sdhci_priv(host); @@ -221,8 +221,6 @@ static int pic32_sdhci_remove(struct platform_device *pdev) clk_disable_unprepare(sdhci_pdata->base_clk); clk_disable_unprepare(sdhci_pdata->sys_clk); sdhci_pltfm_free(pdev); - - return 0; } static const struct of_device_id pic32_sdhci_id_table[] = { @@ -238,7 +236,7 @@ static struct platform_driver pic32_sdhci_driver = { .of_match_table = of_match_ptr(pic32_sdhci_id_table), }, .probe = pic32_sdhci_probe, - .remove = pic32_sdhci_remove, + .remove_new = pic32_sdhci_remove, }; module_platform_driver(pic32_sdhci_driver); From patchwork Thu Jul 27 06:59:59 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: 126703 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp908792vqo; Thu, 27 Jul 2023 00:09:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlEWD9n17lwaOA7/KXoSrbBgDUbF/MhzuBFcLO7eEhYI4VrMKqRrexDie8hmxMWO+xiKBXi3 X-Received: by 2002:a17:907:784a:b0:99b:cf0c:2cb1 with SMTP id lb10-20020a170907784a00b0099bcf0c2cb1mr1267851ejc.66.1690441769542; Thu, 27 Jul 2023 00:09:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441769; cv=pass; d=google.com; s=arc-20160816; b=reYfjZLIzQyH4pZYC6vBFdqq7JAAiJUJ7HyiZj1lfqZWnh9XEAynOODYsW5cLccXrF Ay6m8efuXXIW/3ZApixHgSaPoVGJbWE/uT0Lmq+SHFpMnUiXikxi5Ts3p80JVhBjkyF6 r9fRJDc3q5BlTZtQGfZ4+zU1NCTeG/bkfuKKugHMCUT0sx7u+APlqLSnZBvPBNAKor9g KVzdQmVRk/h0prnEWNuiCYTiBjpmhj4HYBfmRIQszVxfQApzqIM5s9wj+4LX4+iL6M4a 5hkeH1P9p2oMqIlGMa2Bzk1xImARK+g6YjoukoxMrOt9/wqyJkIKHqyiKvevBroxyzWc 6Nfg== 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=P4JU8APsrhrkPun4Q9xIy3FDPUIcIdpxAJYFh5ztE9Y=; fh=rg7X/cuDWju/AN76WSpS0NvnN8m+keu91fVjBG7W/iw=; b=F9bGayLuR//WTWHHapIEMgsmckgLfDFtRlvKI9RdLurVJYx6jU5BENsTeoAUskK3pj noGFKHLC2WdCyy+t8gzNf5K3xu9WNTROc3Pkx56K1bwJ2pXCYJV2tCmzi2Y6TyiUzyGs /Ncp0/OxDo/2vOsMqERjLKxtrDTJ80v+GXHc6y/S+nQ53A62Lmvh0qrAgAfhvddzZcSz C4NDbtXTti8isFxyuKNOAzcMA3411ZpNxNoWYIqxzRp8CwnnwZqGSickrG1TU6Le/wJt 9jDE59In7609IXx5sB9WKZNwJhrGlfFJClitPigrNSVTe2UIUALKLWDm3dNbasuDI+or Yzxg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YZ4EHclv; 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 lv14-20020a170906bc8e00b00992f309c359si592475ejb.430.2023.07.27.00.09.06; Thu, 27 Jul 2023 00:09:29 -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=YZ4EHclv; 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 S232892AbjG0HCD (ORCPT + 99 others); Thu, 27 Jul 2023 03:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232797AbjG0HBZ (ORCPT ); Thu, 27 Jul 2023 03:01:25 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8E3F26A8; Thu, 27 Jul 2023 00:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JlA0BtWEaoC+EeE2oNqRU4v2wiXOWXmFXllqb+fWEA4qRy89jY4LNc1RUmzYQB9G6f3bf/bY8LcKEVAABW1q1U7BUJVXTx5iXtYdLScjwa14q/vuwy+62h97N6e4f52EC2mNMjUdKyOuYr6eMF8iWYUSQHKuZRnIPStAZdglmNlF1nla9ZDWLW/ne5OYjTF26/7TCM9Qz1O+CemslWiZy8cuXeaUC3fSadSDCfCpyLKjfQshPlbXkVCiNtn+QzRgGFdlOgpMZQo0I7K6wi5svLQyuZkdDhM007jJxQMGZH/xuM1byOenulOVI9owXz8BpLmFJ8ATo1RLf0DZV90pgw== 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=P4JU8APsrhrkPun4Q9xIy3FDPUIcIdpxAJYFh5ztE9Y=; b=Q4Z/RCVQKdjsOURHO6bDGMQxuw0ThwH7qbmbu97fXERTemcqcJDddL/lWCwytQXaSMNJJ39E0W1wHz8HfwJhMHUqDJAHh4xi7X+CXXMBUTH8VWREhqN/pge3KHc2cv/FJNCQblQkTPP6R/oIAe26q/pyBitr4dkYMv+v3twrDYFv34mMB1SUIRNqWNYwWyx5r37MjsD4TDct+IT8HF/KtBHYgU4R6KXE3ltn9n42TSLhNnASNFkMVLgojjiDtLvKIs7HMZeN4DyRuTbAoXtKtfilAK/tc4+J34SuBHt2w7polS8v5/N1Q5NXmj/0ClDGBG9MnhFVK9SpwYN3TfaR5A== 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=P4JU8APsrhrkPun4Q9xIy3FDPUIcIdpxAJYFh5ztE9Y=; b=YZ4EHclvN33bMd4dSDUvs13CAjhk+vLm2BG44nnWsURUbIcLZWum5CoSqpviFRKm+wiMMS5XcDEZogPW3R6GEuzeasf+q0dqZuc6r1rV7jRVYuI5z/e7DiZ2gUJiVCtEk+EFlqRM2g9BAcoEz00MesH3Pqd7omGtZs7GNs9RyFlaY8wZ6BbmZwhXO725rc/cQ04dRNPhUzNuT9RunpcVL0zKy8s4RIscIeqWaiybRmouqU9N8DIrdmYfbPto5TcmXmM2gaflCD5UNDTjn7DzQtdDEOal3nbG27BUCx8t+9RB6gcIfosc/Bjjpk/JqNRP+e7YrBvE1tdicU+3/CYedA== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:18 +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:01:18 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Taichi Sugaya , Takao Orito Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 10/62] mmc: sdhci: milbeaut: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:59 +0800 Message-Id: <20230727070051.17778-10-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 10ae0dac-0a7e-4a0e-47b5-08db8e6f46d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cX1sb+/h95KeivzdjfXnoFKL7WK2sLrp+Edg9vSTHuEcL6scTQfeerkC/ryyFDBfqfAs+242UBu2wPoLvCs7tbRUgEU+xPWAY3VoNOU9aKN5jpu6yx/z2lepUPBZ1cpyg3kv8UJLzkrnx+Rmb9+mzfhER3zTn+nelEM5wRa69pbv8UUInhrB97MBCsa+HlyPRnkFmJfMbAfeTD6P7uFipLdC9eUWWB3Y3ASmDg+i4+jQUFj0MPIGYVl6QhyVu04hGTdbnYn+yClVsM90Kv4Abx0ADr6XqelRd855C92ZmSRVNhj6hqWWgWSEHUfNQNBkS999Ir3+tL6siHzvEUKL+iqizvDmNOgd/JsKiH8E3ggZcFJz9ipJ6KObi67gIhrBe0tBl3WvhbI1+piNu+3yyKIAs7bkCw0sPfU0e3GhfGSn49FGf7lQ93KPzB7veHADp9V19UnStpm2io7DOvdv5FXMKoU3VJWe7fTUhor2i2GQ6BaFnX49JFAYnnrkhrd0kHFu4dmtk2/ln0EGBYd1poPZhZ/jDVHZBvh7eF/GCqUO5sDjPxgGhpsBdP705tNqvQE8XRNcgFRkGbTNkzV9GkCL4iJuvxlKLWngPFHy7LV8reeY7Df0m+oFXE51NLv8 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?T3x9XsRzL8vvwALvAffW74wlVacx?= =?utf-8?q?32t9vuCFmt3Sm/U8XSC/ovuho50u5IYkRD0HETxhUreR0nzpgxZrFAUNooDPm+r3O?= =?utf-8?q?UKWuoraxWT8FqDR+BCp2aLvesvtw7D5GlTC5pWtNhh4CxcJFoCF5VfihxeDTiZJK5?= =?utf-8?q?Nxx77PrlUjmg7miO1XBtPZSMOZkYuSJk8H6lM+u6RIDttpw2o5IUFkAnoAI5e2l9I?= =?utf-8?q?Cg5vlZnY74C0Wjuoi1QYXZxtnbkv5LjmF6O2MhbsTaNcA8iepsWcnaYRRID1n2fd7?= =?utf-8?q?CvMLYXCWUukVn4jVWmLEd375WWZG8fV80sCQMyivAUQPkrlPZzGnNKDKhdwuDnbq+?= =?utf-8?q?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?rSRDOEXNby4lPk1Zx/GkpZ9niD83aa9+9cRVng+mdbpUWU9AVTMYN46JOTT4QZ9gu?= =?utf-8?q?xaIEvk2U+KIAV68POik9rXazn3yVhGnXtDqPmzkZE/e8JjJXCii6M45Xgdz/IvTLV?= =?utf-8?q?HEbbvRco8HjcgSnYAQknRD/Me+C77EBNkzIcyevoMXd/cbh3lxO5mU2Q74YTeCISG?= =?utf-8?q?JhINJgN0epdSvxrgJqhSMoFeCRSWdqyjloJV22Jfbkd9DgwrwgMnyOYcNPqtDu2dh?= =?utf-8?q?0iqze4WkTNzaW3Kfnpn+SdRH9U0d568Ojlz6ufesGN9brd3g1xg2ICrvz0/uYrz8I?= =?utf-8?q?B0pN6KbEXZ76?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10ae0dac-0a7e-4a0e-47b5-08db8e6f46d0 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:01:18.5142 (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: ePt8gonIoXTx+GxTnma+72AoJJ7BLeqwy57obaW67kjGTHX+feo/SC2mgOQKiCbmmpHlXxG9R9pf4AtJ88qhkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772556669154817493 X-GMAIL-MSGID: 1772556669154817493 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: Adrian Hunter --- drivers/mmc/host/sdhci-milbeaut.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-milbeaut.c b/drivers/mmc/host/sdhci-milbeaut.c index 148b37ac6564..ee4514c90eea 100644 --- a/drivers/mmc/host/sdhci-milbeaut.c +++ b/drivers/mmc/host/sdhci-milbeaut.c @@ -313,7 +313,7 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev) return ret; } -static int sdhci_milbeaut_remove(struct platform_device *pdev) +static void sdhci_milbeaut_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_priv(host); @@ -326,8 +326,6 @@ static int sdhci_milbeaut_remove(struct platform_device *pdev) sdhci_free_host(host); platform_set_drvdata(pdev, NULL); - - return 0; } static struct platform_driver sdhci_milbeaut_driver = { @@ -337,7 +335,7 @@ static struct platform_driver sdhci_milbeaut_driver = { .of_match_table = of_match_ptr(mlb_dt_ids), }, .probe = sdhci_milbeaut_probe, - .remove = sdhci_milbeaut_remove, + .remove_new = sdhci_milbeaut_remove, }; module_platform_driver(sdhci_milbeaut_driver); From patchwork Thu Jul 27 07:00:00 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: 126757 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp924472vqo; Thu, 27 Jul 2023 00:44:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlH8rCqp5xKbggtJh5iZoYeTDrHSOjLlgzxJPhtO9eVc/B8ckbPfBPMV+9kmOOBBRWqdxXGN X-Received: by 2002:aa7:de01:0:b0:522:30cc:a1eb with SMTP id h1-20020aa7de01000000b0052230cca1ebmr1149227edv.0.1690443889415; Thu, 27 Jul 2023 00:44:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443889; cv=pass; d=google.com; s=arc-20160816; b=QuP0Z+26GbE3Z9m/96i2aL60m/mTNswRBKhjHNgS6G5inwA8p4p0jZxJKGgO1Z24Wr Ofw3wNBs0RjgA1uQVLGLRAiY+fIBcojaqtjxcY2zg9jIddR/sELQqD4x7y6xNFowmjcK zBvTJ63QWU22GwJwSF5CCSoznyj/eor++3W3TSoTRj5JXIdSs4gnCN8OdNWYIkFYdXVj AytvLUDB7n0djuEfUdQ7Gu+iYhEkwfKBTPd/TtMzlJNQRnb1kQBSwKNwvg/iiRufsUwi 2mt/uePJ3JEvL2UfIEjLP/CnCWnehEhwku9X6X2f/TQnVuKSXxrrepuKMLL+LK1wmBCT hP2g== 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=mjvydvAOnf9fdqZRVZUVRLRXIIaoxUyvKCR2No+4ygk=; fh=lsBBgZtt9Zp64MNFIVDMQqe1hUqbGcY3umQCuckK8YY=; b=zWuznhauqZwDNZaFaUGYpAy2Mg8ghYgwSlJyX7tw2IjneU19c/aoQTR6GS+Btc74X5 ah1mIkULgqRokS8tO63tszo9l1jKGdXJOAUFukFBeOJvYP6aH1lblmGj0q9NMnGbkFoD hS4uUWrAsndmQzDR6iF7N2ESD9INll705IwWWdNHyhrWtBFoP2RX1MOnJbvxdXzKqQYX pC2ZedylZuga5PheXWOHcOEKzt9iReqBG6KVxs/PgrnFlQNvoa5/g3mgtfWGQzZXzffx tjd1gaeRQYOB9ghzfTGV9F2gfkiXSdEx5sx+wSiUuDfQJ3iVdybo9pysr3TbHsBsn11F Y27A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=lEHToHZ2; 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 k9-20020aa7d8c9000000b0052238b34601si589111eds.47.2023.07.27.00.44.24; Thu, 27 Jul 2023 00:44:49 -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=lEHToHZ2; 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 S230156AbjG0HCJ (ORCPT + 99 others); Thu, 27 Jul 2023 03:02:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232888AbjG0HBh (ORCPT ); Thu, 27 Jul 2023 03:01:37 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1531A2727; Thu, 27 Jul 2023 00:01:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QQk7J/btflcwKNSyLJsis62vKBpMBuuLgI3CZUU+yAINtqLIicEusbttmt7YyRA5Eyif/NB9VF/EvScmcmMrcqG2P3o7lS1kUbBxlM1JjH74+ryg2QtnBDMkgD6eRt3AUeN4Upwiz7BYwZ0m2kusE8NlDOM41+FXeykm6aQh/+gkFwSrycoqTP8P6aehbEJzI5GaLNVL4s8TqSHyB5d4kA//q3EJhcBhdmHD67VdVrgdPSCXE05GyIDfga3rdZ5C+TRtWWA3ZOsQTHHkZ+uhWgQW5uz8UiCQvldaBZzlov0GmOElWWjczAwosG222mHJjiB8jQ+76PFX8vcB93iz4Q== 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=mjvydvAOnf9fdqZRVZUVRLRXIIaoxUyvKCR2No+4ygk=; b=Ddarg2Hk0u7sKmqRUAh7UsEZdqoEhGY0iGaOfcSyb/1j7Gu2vJ65wlOo+yN128ShXsvZtfoNA1BYY3cecEYxta+yeO74F7g1H2WY6etiyVaw2eNU+8aILEd0aFLE1L8tRZaQJMZCXXIVzDXgLvJvvUGzu1e0wtAqdFh2tlQVw5fKDIQaYZI6vwyQ+HzKrIAD7onNuy9GYbqHapyM6wsIV25EGRbEGZ2OvjcbovxOeIWnbm+4zGUloosrClBV4vwLlrB8GRw9/bH/OwKbwOo676qv949k1e9jo3q4Y1uldfbCRB1lHTi/lfIvGITF9m+LPw1c8C74z2MhIibv4V7BoA== 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=mjvydvAOnf9fdqZRVZUVRLRXIIaoxUyvKCR2No+4ygk=; b=lEHToHZ2X6qBDugXZ6mkNEFchJVvZzN0PzxIzhXHWZxONFmI8W3LI3l0GrxwTr0+D9bco2a/cpbvnl9zZRNG47SMfbfPsE6ec9pVB6Zb3ADADAx7tLoivKNjElMlRnjSCqZKiDZV+4nJ0BGPgeJuzhN9DsrQS9fbYSer6trPevjLUh/TelvsuBIJ8UG86PsV/MHOJHunU06bZu8gFrT7on60PDm+2WqOTjDBLzuEnMe5rub65LtwxmMVgvmdReRFN4fd2TiUZERzQmXdvqwcA5TVEmU1XNlaGtK1xWXSWv1h4YbkKQgBQiE1PPMh6BLEDU4Xjm1X4iJzZ+ij+8c6qw== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:20 +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:01:20 +0000 From: Yangtao Li To: Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 11/62] mmc: omap_hsmmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:00 +0800 Message-Id: <20230727070051.17778-11-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d4eaba1-4d70-42f5-f7db-08db8e6f47ad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g4/6BkalZYL+Wg+qjSluOIIZYqqqP5CiizClEqR5TP1vY7gZkOaVLep1OoSe5w8Gc31B4aUnyz5W0kwQmxRT5CIboKdPA56brs7HPdSC5dmVOr6VasCrg8IRKbr8YxX2Q4EmAjfpJj9g+HJ79+Ovuj8tVKM1WwDzsSE08XEO0MBmA9HL7oH1n9ORVeWIR/9BbQM+X5mffprCn+NgZfQwzQYceh67M6vK9yJaT8GC5XOasqZLEfjUFjU/pUOKCrVsz9sJPcBBo2f296BYB5cRKYBXuTXnhqjhbuI5D7KMWYEaChCalhwR+ilOTb9PsxuySeUaZ19k573Ewlt6He2iuS63Pgb4rlCPfEQcDJ2+cv0c++HQkaGduMOL1irBM/E0cilhmzhB5cszcHbjjko0T0roXvA0EWX2tBlssAeAm2MurVrz5sJUee1jaFDRk/Xm5+xzgPTt+eAZa2jFQjtOa2WIuVPTGqvPZeIXHpDcMzt7Uub0/PCQF5JYt6Sjoabg0t9mvuiLPSYjcSDrPEjKIy1zjRuj3LxLBcxYP1nwRYJRQ45n+wAUrGEjKGi/QmscKdkXCD7uvfWa2VCsUflMx+ywXRWZHIECHeptVp1CVuZj6dkFjE3pfnJhrWAj4kJC 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(6916009)(4326008)(316002)(54906003)(66476007)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0W1VUFwCeE88WOeNapS0FIzOkC0w?= =?utf-8?q?Jek3C6ikFSNmwmsKeNflm5stDgqA4flJLhcB45npyyPxQXHhwH62OH75f224/yNjK?= =?utf-8?q?VsT4iR2VNr5X2FEJUzh1mudAF28J9qQ5tDgKAVTq+w4wEPhv70+/oKdDPVHfljFN6?= =?utf-8?q?9NP1vhQsre3NwaplgnyvBFLViKB5mOjEzgYkbc7JV9HP8r5YkJLj/JV/+e3GCWsXu?= =?utf-8?q?MJQlgAbQLMmpFEDxoquv0EMfNqaWxokwjX7SmgV9NrYqA5yMvvI/qldMNyKrKgnb3?= =?utf-8?q?ftGShDJr+RFSfG7u4HBmnmXOk2VPI3swMYFHiiQEosft6UklVSas5oKJylENt6Fst?= =?utf-8?q?qboFKl8L5h3A2Q/M6kmPddpD5xxPi6HhGA7kXJq4EgzNrB2WamLr/XBjSbnQYfXM/?= =?utf-8?q?7jF1M9LzXul1OZTkHCYvy87hz5q59rJbCMgGlNBY+aj5h6woJCGpveJKfeV6g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77Npj9cmH?= =?utf-8?q?+EvAMI4z5m1+O/XstDsr9MehrCdCj1BNw7zGsVzHMhWtXXVd0jixiCQDQDG5Lqtte?= =?utf-8?q?Y4D07CEdPp92QMN6HNV+JemNGZIT/qUZbpCkUCTx55qTzmnU59/pD5vERqTRs29Pw?= =?utf-8?q?UBgfZIx1biXpYTyVzmWV8xDlOJGHpCihPcXFnVOEAwZayjpd3AOormzvSVhuePrse?= =?utf-8?q?yzOmPDakT1mc?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d4eaba1-4d70-42f5-f7db-08db8e6f47ad 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:01:19.9596 (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: HXt12BNbAVUDkkROB568b0HAmx9IN55W+CMC8i6Em6judpS9f4APWqG5lljGlNmDFuAhnSF+jOYlNdmbfuqfUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772558891523441369 X-GMAIL-MSGID: 1772558891523441369 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/omap_hsmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 93de00a06aba..e120aeb869b8 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1979,7 +1979,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev) return ret; } -static int omap_hsmmc_remove(struct platform_device *pdev) +static void omap_hsmmc_remove(struct platform_device *pdev) { struct omap_hsmmc_host *host = platform_get_drvdata(pdev); @@ -1997,8 +1997,6 @@ static int omap_hsmmc_remove(struct platform_device *pdev) clk_disable_unprepare(host->dbclk); mmc_free_host(host->mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -2123,7 +2121,7 @@ static const struct dev_pm_ops omap_hsmmc_dev_pm_ops = { static struct platform_driver omap_hsmmc_driver = { .probe = omap_hsmmc_probe, - .remove = omap_hsmmc_remove, + .remove_new = omap_hsmmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:01 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: 126724 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920106vqo; Thu, 27 Jul 2023 00:34:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlGJe8GWvBAcJi7CUCCusysHqPrh/OzrgB2tFPMLLgAp+WB7Kn+OXWSQL/n4uJ456uGDGXPS X-Received: by 2002:a05:6a20:a11b:b0:133:cf5c:4d2e with SMTP id q27-20020a056a20a11b00b00133cf5c4d2emr4476291pzk.20.1690443291278; Thu, 27 Jul 2023 00:34:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443291; cv=pass; d=google.com; s=arc-20160816; b=w65xWs5GWAmWq6j34r7xL0lhQZKrd9Ivz3UNiE4Dbraq2EkfpH67zt+D2PazkjcQPY D0N/GIeqOCUcT+FcHpBms7by25HlHOQaWWFeLF2skmrsBY1cOtyWnZgavvvgL8Qsr8RR wVdvqrLBz99LHExueIkxeHc8nmJOH4EmIFh2usTwi1oLImgFrGB35xjFhFO3a7sVKSEZ hJcsF9QTauBHQ1Z/4vG8F/5UxmWno8+WjOEQy2aGZ79C2bLVGrGzqE5uzbF93uG6MHur bKKM9zP0jJNkoIR8U9bd4pXIIIrHLVLlwq2aaHftmatOk4JWfFbFdcLarRPb3J07kZa2 KsFQ== 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=tOU6V6CM4hDWvK8Wspv66nRWzHcyqIZmd9G62GfyWvg=; fh=ex4kDErS8i1M+dOxrorAhj0WFg32360p6UGfHmUVWfA=; b=aqEzUFXswVoHYcocLsJE1V9tGUCnj5YZ4AxFGFjL3E49d6grKn+cGULlK+33AUH8QZ CXuR1YYDwoImM9dxWgEchawB+yXzoaznD4zRsHOjzMx3fkZljWkIa6teywY47jl9hN5E +2hSE1YXuOvwMOMRgFXNR+U8Ck+LDuyfTJVSHNFRAgxU5zkaMv7k5L6qmupzAVG/YeMk ngDqP1BSAlYpI3pVOXavcijAbM284MU+gInv13Z4WfivIMihXMp/VV63lBB4PJ5Vq+fk 5M1fxrkO//1Vk6ThL74i8EYzkX9onGsFntynLWwF1pAqcTw4pyXSP13b9z7yIe8f1pie /NbA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=F1nQSZvN; 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 b17-20020a056a000cd100b006815bf78633si992732pfv.315.2023.07.27.00.34.38; Thu, 27 Jul 2023 00:34:51 -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=F1nQSZvN; 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 S232985AbjG0HC3 (ORCPT + 99 others); Thu, 27 Jul 2023 03:02:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232930AbjG0HCO (ORCPT ); Thu, 27 Jul 2023 03:02:14 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD30E2D59; Thu, 27 Jul 2023 00:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LoPNkdNf3CwBF8fpYaiIjivGUhuAvSL1Q+fswItYF95l1wJn6hyZTK9nWa042TEgmU/T7GUO7ekbxL0csiFmQdeWMrSoiHWYta13N9aFXCJXpry2pWlso9LK+j681M0EBjRQo6EI0dkcTOlgyEecmsOevHFaExgWxGZrtcbksohwFmUxL4e0i2JqqlI4BtLqz06pe40UDvSGTGiUrBjGNRNmFsiSUoycn0k3UQ3afKnlt9VkUuY5OKGimZT3R6VykLY0TLbC4CpXW6YRglfNj4zoWzTap2IOBdGWceiTdWR79lj4sQisPZbU+7zBrv+Ty5myCxErfIk8OZve/tDaGw== 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=tOU6V6CM4hDWvK8Wspv66nRWzHcyqIZmd9G62GfyWvg=; b=hztcn4MBj7Cj6blueolPyd5+6VNLPFBdigPSEhOL1j+8B6f1G1INBeaW0ZYp5ydVHmrN/ytsY0CVfZsdJortCwrkEiMpTi8n9QENiV4rLqJ0zbOmuFOzgIqIOfeZ9fjqCC1BEbUFBr5weJN6PUbJHBLQB7lpY9MiiCXiwn4tALfQU0HAf8KNk5tRMHFlG+wQBNFlG1HQZB0Li2BKfBs4vfzpvwmfaLScFwr+yz/dCKqQUWiJebB4IMJo/oQVmKNyu1kr2ScPDHzvEEb7iPrVHaT72sn/j2QsAIWG7WAGCC5XJH6EJ5NShUrTXAhAAzgcTJlMjb4kmetK6Y1He+iMaQ== 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=tOU6V6CM4hDWvK8Wspv66nRWzHcyqIZmd9G62GfyWvg=; b=F1nQSZvNtlxnABkzwvxiM0QQLI+q96F6VAJAtYbnOLMJlDlNK9YO+o8U+QbzMLGi2RIFONF0D2BrpX1SHjRfBSobGEj06RjwbSwSu97ZOFrjV0RHc1tGzLhrvkC452kz9nZfNmgeEYsTo1bin2xrrkEI5A6oGXdqpNnOQwQLdHR7qqKYXCcewB4ygnXvu1jhkd/Uu2ZaOCa/1g2heMJnDUCCBmsBNsCtHbKva7sO9jqWd+45nNynVWtP/4whVzfMR25G2agC4PDm3oX7S8qacdIMORr4rTQLGqVyvpiS3l9HcH/sjfKYDkdRKrj9c2RtEq19KfCbqNQOqRLc0d0pUQ== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:22 +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:01:22 +0000 From: Yangtao Li To: Eugen Hristev , Adrian Hunter , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Claudiu Beznea , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 12/62] mmc: sdhci-of-at91: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:01 +0800 Message-Id: <20230727070051.17778-12-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 74e8dd74-8c5e-41fe-2850-08db8e6f48f2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HHQzDhAkjaF1gmCxf+M2t3UJVuxarh5r94EW5lScEcLf5xeqhbOV4gWZDpwwYGsr5L6JrMqojdSkYr4yUNugmbkUkhtueDDydqIbdubUa0VKz+/8RUzB2TgoJyurztbj6+18LA/Q6tcvOxL25sTFOVQWlKBeLMF9Jfre9gT+ItI/uv5WgWXtrMzht7d0LUctlNizry5ICqOLAA5CSys+JKX9lB21Y696HIZybSmqMK/fo4j1PD/EG/S6hD9mbxojzTqfdtyWUp4GLrjGKedjZpTdeu109b4b8GAkiDh1ezYm16UnemxHd7WDHDNGqJ1FB6/NDUTdeHdGGIr/LkWfRMKcMQ0przqRBzPZ7j38uTAYnFkmP21URtA8p5/rJgp0hDs3G0xdsW8vsYxnTq/h8Y0Tn2F7771RQrfINy+GTn5wp7gl7Ic0K/mivhFYNWKRvJ4lGik2aNoynvKQxe73d8aLCmYAfWbJ8s0kbKUC2Z/vNbDlGpXQMJ/uMM2ukxJATIfymlvt2coMtg98Elcra0QA+UZgx0iGXnl+wLdw0L8KFFvt3h54QFObKaQ+s24dEUqSjL2sdQadr4LfQgD44zc7C+wV6j+gWPEVKCclprsBtivCRIQkdQWfNKkKHzlc 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(7416002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?C5SLUL0dvT3ASCWscxb+hD35qj7p?= =?utf-8?q?cYdXJ1l/vDsMyF2Zf2UIeNbDGwjR4za61HA5eeOB0iqCGm1/U+H85azGHrXrO0mKA?= =?utf-8?q?CdFDztRUCQ789uwsEeTLibyNOpjcg22x8LggyW56O7Sc08Aq/E7LFFK1G5cj3gZij?= =?utf-8?q?ed94pTeU2Sr3r9yuwRDfzrMlTajkLmyz2G8yhsu4LTma4Mmtp4ROp3PDBIzQQEMrp?= =?utf-8?q?SGWGSRYEUbi0FDfcWjjmh4Ody0Zl71dQRne+6WUhgvKU+FcIms5IHF4J5LWfeGBxO?= =?utf-8?q?NU9IQdFKABljh+5UpBWZIAozO6X+RzA6XfB3FrMdczJNyvAYPG/NYZ3Ho0pBLG3zQ?= =?utf-8?q?i1JUM8dyQK1VelONvybviHCXOHyeuIe0Y0s2Au0GfvvbmAiWRyQlfSDsI2oPIIq7G?= =?utf-8?q?DEwTmMVe6FxLMBmaY/zhZdkFLwsop7GPOKeYae/D+fLoUutIEqNBVsS7QDHeKh9Ay?= =?utf-8?q?VWm0vWzWQe9zVbHGL2Ar5GOhiBRHjB+gmX6uGH8iPbx0Lkja/k5vXCBNr6KvTvyiJ?= =?utf-8?q?GJM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tJvCgs2DdX9gDZms6dw/8aaU/lvf4KbsbjVve3KwUjI66NFVOA4khdRJP?= =?utf-8?q?d8e2hOlx9P1IxDrLC7NbgtnzBA58SMdNnpofAihSlvFI4sYHTfDelJnVsBTIm7wDQ?= =?utf-8?q?bZLJTz7j9VgM?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74e8dd74-8c5e-41fe-2850-08db8e6f48f2 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:01:22.0611 (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: 02Iq30tRozaMujh21xEbKBaOo5gcD6NiTdPSP9sP3wOw89rpf4ohtEJs2AulMxBIS4zC66Pr4kSfvDEHHrwE+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772558264806152080 X-GMAIL-MSGID: 1772558264806152080 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: Adrian Hunter Reviewed-by: Claudiu Beznea --- drivers/mmc/host/sdhci-of-at91.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c index cd0134580a90..af5bc0caf29b 100644 --- a/drivers/mmc/host/sdhci-of-at91.c +++ b/drivers/mmc/host/sdhci-of-at91.c @@ -443,7 +443,7 @@ static int sdhci_at91_probe(struct platform_device *pdev) return ret; } -static int sdhci_at91_remove(struct platform_device *pdev) +static void sdhci_at91_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -461,8 +461,6 @@ static int sdhci_at91_remove(struct platform_device *pdev) clk_disable_unprepare(gck); clk_disable_unprepare(hclock); clk_disable_unprepare(mainck); - - return 0; } static struct platform_driver sdhci_at91_driver = { @@ -473,7 +471,7 @@ static struct platform_driver sdhci_at91_driver = { .pm = &sdhci_at91_dev_pm_ops, }, .probe = sdhci_at91_probe, - .remove = sdhci_at91_remove, + .remove_new = sdhci_at91_remove, }; module_platform_driver(sdhci_at91_driver); From patchwork Thu Jul 27 07:00:02 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: 126773 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp937857vqo; Thu, 27 Jul 2023 01:14:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlHQYutv4Pzw7Fskzif+PEvWpRwsJ1Z6T5lp2gCo1NMti7+lXYnecsPm7qdpvuc5Qo51qWi8 X-Received: by 2002:a17:90a:c918:b0:263:72fe:3ef7 with SMTP id v24-20020a17090ac91800b0026372fe3ef7mr3777211pjt.42.1690445695936; Thu, 27 Jul 2023 01:14:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690445695; cv=pass; d=google.com; s=arc-20160816; b=zr983Ixoy7UnQtucO2Oja/NAauTpO8HH65514AosMciAhKPjJaM6hlUXP7UPNm7hgF CQu4tUjvep36KOR+zAHfb3RgznouSS4RcH7dtCK9KwmgMV5QDIw03QtIQ3frSXbVxcD9 CjYP1G5NxKxIVuPaCYgMQt+7B6taGgmrGUyUWZ2+pVkfUw2rgJxuf7KP85vCaMTrZ7/e c8pFBRnzT8VAdfxW1dpEmGdbWo9rlKP6gVp8ymvoTFVktXJT9p8v/FaXL/ILY6VPTE5h Myh4bwzfQssw4obYfxn6miQb4wJ9cywJv2rjMa1ZKyByf6H92JzpfaFEtlCesRqDDcSY 3Eiw== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; fh=bRV3B52BlPCt3YSalSFThXK0OPnKZx7pv8IR77jUsGI=; b=O4pruA3RZ2vgRZ1CddCfcIwHZ7Boy3UQU1WSIHh/6NhgHVFY8CP2/vJ1pIyGJTE3+5 XoaGgyXvc4HfeuljnPcJVIXJiHLzPqLKi0hnRtNJ/xjiq+o0tiRsaUP+9XVhtHDDsaV8 7t+rXOfTxXykIAvZU9cAcxMkuUxvbVVHUm9qERkY3q9QdqK+GX4tyuo6Z0aLWpEBNjHp CJwkCQE/YRuajmAIMb6LeoqFDSjDI/vV6bJbS57+fdRhXjdE363Y+CNTyX4DD2MhQPIA ZtardThpVFXIPA5O41ynlhPb2RxOspzrCxlDmytSFCKY9okFiCJTH0CNu618GU66PAuS qBtA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YUNtcaKL; 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 o23-20020a17090aac1700b002631e44f48csi1020377pjq.179.2023.07.27.01.14.43; Thu, 27 Jul 2023 01:14:55 -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=YUNtcaKL; 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 S232473AbjG0HCu (ORCPT + 99 others); Thu, 27 Jul 2023 03:02:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232932AbjG0HC3 (ORCPT ); Thu, 27 Jul 2023 03:02:29 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B19E3592; Thu, 27 Jul 2023 00:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e9Ko/a1Xzq86tWXhh75VtVCOnUh268CpV92rTYVJMnRiXvL24iP+08Yz6Is01BCXoHBGHNsed0tM0v4Wei+cdczn6668WWqlyNAumDWa6tTszjuVkM/61eXaWaZz1FR8w92BtjqEQ9ermZ0j8yQL30qkTGziyYbE3ufZ1t4DUkcLn1BbAMVF7B4cYimztePBU8gPqOC/qhD3JNf8Myb+kbynfWDvZHXh4WunUGhvNpffHztUn9oS6nZx2iyIqJEa3VRc70IAHHqvTWMTIl2AwmPtw0DWLLrlZ7oKmDx7JtOpJ87+9xyWUNfWz3gG7RWAFC7L/9NLcSlc7mAbY2HJTw== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; b=Xnt/151wqkvC6/Jh++5/hxtruakhTRH9p0xtK7CMn9LjD+OWi937ql35eD7MYqQtaereSx+IHyWlLBXJOIYy91wfwnJjclwapgYosHy56Mu5EJc9PAi4zXWgU7GshUMWl4QK+78z/L3ujH8Pc+KraCByzIDru5S7u1JKydMizQS/5GKMvM8n+T0NCEpTlNsCyy54dyH6bUSSR/S303irzf2sc3w/IJy50DZsW+0IZGzPOgWIUKGePljq5u6FzqFo0E5SnMDriPWsaNJy/PG5DbLRePt2s40C/NPLhTR8g70OCvCbITyw1wkMMPe3LDnUU1NKdZW6uN5lXMbtpHKPwA== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; b=YUNtcaKLwv8/ZZuC6U/6lD7lFTqlpXVZsTrnxJlTyzfggXETkO82fJzLAUVV7YJN7yatuhTq3Gp9B015TYIpIbxPU+Vj14f/evPp6FGcjQv9PDIbQh6RQbvm6frfo3AROUFI0JEPKxrsnQI+hMxCi56ZbxPIwbZmr/jMa/GHrTbAA9nVlMV9ZkMrduwb+9NGpJtk6RI/Xwv+dx+Xwi3Q49VA1Jp+zUuE3AnOxIrI7wy3gXzb7pA2/zHWOE/WTnOVUy0oHG3xzwZSsyLg6ty5+KQKCTbYQjd3vlMgZGvELiFvOJIkzXspoTD/mrCwLdpMP5eShnyFT77zoKIWnd+oAw== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:24 +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:01:23 +0000 From: Yangtao Li To: Aaro Koskinen , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 13/62] mmc: omap: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:02 +0800 Message-Id: <20230727070051.17778-13-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: ccd3b512-4acf-469f-0e1c-08db8e6f4a09 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fzd4MR0jchwhJGrpDR7ai7lg5yVhvNXKpX1X1oTRqYUMJuQle8gZlZzAo9ihkKbgxaGf70QUbqtWDwR2IacvN+CzynYfGaNrTpD/UDoTUyfn0ARdxYjxlpfKx4cnafYxpJBzoa2saHJd/XXSuUbKx+MSKgPMWlrFIqjtnx3/QTazH6l5Rxz7Ap8wRSewk0zxV79Kkw+p9EjBnSjT8fFeU3SZ46zBwpIkrBMxtS8vm+6pfCCw/dcUEYNgccZP+OUSfNKqzaH5NEABi2g/CfoZ84xjOldVuOb+XKgPwl4e/5EDs4lvLpsXwtb+X2M/NXhdN/cBXofoFenA4Tu4HWEQzogR3ZZwsozfwFasxtHzuOzbdYd65F5XXNLDx+iuMUsW4r7Yz8a7WKnZN+80uroGAhtg/OgaX3l+FSq6hd/d5/Xa60BUnoqvHuvzK7FU3CdLIrWvfLG5nXeXSZHeA7AD6+AHnyak0e6rgMuJnI84T8oH6eLdjdNgbxtyTloYdPvo3WzlU6b5SpMaq54zqLwVY3CEcYk5SnR8GqKsiZvUpmOJ1iQjBqx69D1ri6XyANEmvszpTASLXRhDElsj1YzZu/KDr5BqaJgwI7KtykA3gWL7HVS7nJNhoKptvtbE9fnD 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?vrT/u+3HLWu53B/jWgJOzqndOiY+?= =?utf-8?q?rtfoSdD+yEA3dZ4zgqOyyHZjX1rP0i015gdD+gMkb6g8VF8mciUd1UV1dKKaoVjmU?= =?utf-8?q?ugq5vfRoMhZ47aHWFTRw4do0PFstgO7jIqjqsz+wrh8x2uNk+m+XD0KGgOpIRbQWW?= =?utf-8?q?vgIY6tHQhcLp1r32Axk0xNepyZ4582sKf+saQq2lKtwndInk9WA3X3ai9g0L0xvJm?= =?utf-8?q?ws8FK/mpiTluIcZ8J+aI3D+CTLcHXyki6Vcg8CtnOnD9+GC72GR4EJ25Tq1c7Ud4Y?= =?utf-8?q?PKqHzjPerKJTql0SdcEgfNRs6J9bpoZswKon+qydNxXHmzqnMqdHLorMm1+izUuXT?= =?utf-8?q?CYu3pVPhRAEqaQM8IeDM/4SGd3IoTourU2VGDU0lLnTMRE6C1c1UHcc9K0CNv0Wro?= =?utf-8?q?FTpGZQhqx9TzSkZwDa4SiuTaMIRSudSQONJbLSM+zwAGkrLhi71SHHtpNcBAp8zNu?= =?utf-8?q?MqeRBKKcv/huS/k41LtYQavT7n/xL9+iqAyw4AbK0MVGQUALyJVv3Lts5wzGSC7HM?= =?utf-8?q?BnlxfyzCfkaLvxNyon06rzOC2p+UemApuMkk9BHeoY0Q+O3rktQdNSxCuMKVNiiYS?= =?utf-8?q?rAjOwjrqjY2D7LssAwM9+JpWbq1CAnW5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LkzHFCjrwLfSfIL?= =?utf-8?q?Kn7wPs378Nnq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ccd3b512-4acf-469f-0e1c-08db8e6f4a09 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:01:23.9121 (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: qnifgsNW4mhDCHADTp3ThZiQqtwkSGzv5MOq6BUPYTA1vgX/iMt/TMEB8niwQdQDS3Rs3VcyIfdNC60DtgGPZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772560785975509472 X-GMAIL-MSGID: 1772560785975509472 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/omap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 6a259563690d..9fb8995b43a1 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1506,7 +1506,7 @@ static int mmc_omap_probe(struct platform_device *pdev) return ret; } -static int mmc_omap_remove(struct platform_device *pdev) +static void mmc_omap_remove(struct platform_device *pdev) { struct mmc_omap_host *host = platform_get_drvdata(pdev); int i; @@ -1532,8 +1532,6 @@ static int mmc_omap_remove(struct platform_device *pdev) dma_release_channel(host->dma_rx); destroy_workqueue(host->mmc_omap_wq); - - return 0; } #if IS_BUILTIN(CONFIG_OF) @@ -1546,7 +1544,7 @@ MODULE_DEVICE_TABLE(of, mmc_omap_match); static struct platform_driver mmc_omap_driver = { .probe = mmc_omap_probe, - .remove = mmc_omap_remove, + .remove_new = mmc_omap_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:03 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: 126707 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp909456vqo; Thu, 27 Jul 2023 00:10:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlFcM2oxVx17qmJTqjgHHkI4Xx6/m8pPBqJPUzrxaexay9yzDG30NpBmHi6Q8wxJp1A2sgjO X-Received: by 2002:a17:906:53cd:b0:988:71c8:9f3a with SMTP id p13-20020a17090653cd00b0098871c89f3amr1533267ejo.16.1690441846019; Thu, 27 Jul 2023 00:10:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441846; cv=pass; d=google.com; s=arc-20160816; b=QyT+wpLoywfZNL9qVfy/lr7PkJ4ZTWsnRIXOHNagVhn4dp2cRc3EJVUMMPe8syhuQ1 Fd5W4691Czv/217oTqT3j2ysy5ByF8CfBlDwVJCBJ9ibnFnz8FuutQ3FWPb31eNWwstt 9SKitqQhc9+uXACoFd2yTyIzCHbgLbo6L7yKI+nUyZ8W1W7Gq+LT7v0MdR+7Rbk1ItdR j2tBylN33OQL/rv/bBbQOAheeFqj2Cg/qVXtp4hWzmXOgUKRtKs9k2MER/z9o3zgaaGC v+TcwKBPKC7x9gf08lWltXo7JEAk3zxfVyrEXbBOS1eUX0z3qjIlCm8y9WPDBlx8W/o3 +Gtg== 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=gkUpr7l0pDttVGz3kqCsUAr3ho/CgWL/40WVT1faxUc=; fh=Fb6P30QbJmZZcgekLxd4O6Gwkug10RvmDkc4bghVWeM=; b=I43eogT7FvYQ3PmlijgYXT+rkoFX2hDN/PUHyHEdzO8PFj1NzKvUeipW3L7YGADaba V7WMl2n4CnYaiBC+yINKNXDLwl/ZFyWs1fEhaUjV4Kt6YCrp67IjR0/5z6YzLe6T+HDX OIRILnvxluf5HTfP7TQRrENbHNbsRkLJWIZWxFff/xms8dmvAfOOokAx4Vwmm8wck1ay tlRcuxYi1vHTzWzObLzn52jYgmINOj5HdquEJ+0ACEgbZkjeacymympZ2HDNOtOhIl5q OA2oR1QlO/eUb2MTqPZbszo7QIw6YkG2ANrGlUEGgzyNEDa59XKZ4vQo2R4sEk3DpRfe p9ow== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=jhQ6khd9; 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 oz15-20020a170906cd0f00b00988a0d78152si567178ejb.55.2023.07.27.00.10.22; Thu, 27 Jul 2023 00:10:45 -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=jhQ6khd9; 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 S232900AbjG0HDf (ORCPT + 99 others); Thu, 27 Jul 2023 03:03:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232733AbjG0HCh (ORCPT ); Thu, 27 Jul 2023 03:02:37 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BABE635BE; Thu, 27 Jul 2023 00:01:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BwLZKQjR+6Nv8usu67LsgfOu/8p7Imfm2FODupOMSbQVWcGr7chfaLpjc56mImZcrArb7eTxEASfhoWAtsOyrW2tBkcF/38YbdpbqVZTLMowHeE99d9Q4jRtwbNislhnIs9shslee658qmS0Qd9+jgUH0aMHHA5X5LuRV5K5abeggl/NDRt+mxdB4EO5eOkyRGemGzL43RBYcODVQrun7y41jTSEnHwmRq9l9BsP0PT8nKK+T20A6lxL2aVwYTsLFNxJL/0ELPIvx4bo/+kmzLwAjeHuSp5g513GZWioua39gXeHVqvRTkmx7X3X2z24Fwv3BcRpeNbd/551kN8xZg== 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=gkUpr7l0pDttVGz3kqCsUAr3ho/CgWL/40WVT1faxUc=; b=kJyV/MPUN1oRj2J1aW8eWPtnjG6O2punnaEGaa9Ma4ndWaxS7sf79FUWdK4qcdBp78YXzAXmrk+haAUFR/qcdVKewwdFEhXSEFt2ncJ+b9e6URiaynyiegxnIQtfNViSd5JAs1NOXp2FNh/cB51C2U6T+udZK0w5BZmHAD8Ox0wox5MpOdejtG1mpl0ZZAea+/OPo8QZ+pOoJ0vwWJpsAgW0urh3NUlbR7CnWj8nC6cqAiCfltIXqKpqL6HAug/bgw2r4uQFvZG4k/ixR/OQTXJrh/itsSHbXIaLOnj9NQHDM19kcCGS+HkSVR3GDse3zj4fZXwGL6sxiYWIt109zg== 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=gkUpr7l0pDttVGz3kqCsUAr3ho/CgWL/40WVT1faxUc=; b=jhQ6khd9k++xU90d7Vk+JEu88fdUUbVUnZNtyVRYN2iylhy0NFpAdBLdrZswsmkRU0KnCPDWBJp/ZMGCIqqviMgnyGltYBTvbw+nk3Hjqs7IkwsE6yG59jxV7c6YeZXd3gLTVyAlJRhTM1C/HGWGfRtSWBFR7QS4TI2NgwS51xvuSueJ1zvyOdBZo/lw4mS4+Cljj+dtxSDtEJEr/L7CjEf2KeZA3zkLFobCdcAL4hYfaevXQ83F0G2BZCZZUlcUZo76uY8XIZEbHVj+AsSqcpcOMfcVDjLN4XDJi5yJALdZShyok0K4ZQrgjj4zIeoa6bqAb/Q42DIu9tikm32xiQ== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:25 +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:01:25 +0000 From: Yangtao Li To: Jaehoon Chung , Ulf Hansson , Krzysztof Kozlowski , Alim Akhtar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 14/62] mmc: dw_mmc: exynos: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:03 +0800 Message-Id: <20230727070051.17778-14-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: e061deea-7ecb-4a3b-7d04-08db8e6f4b29 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q2v9sJvDmURFaue5Nsb6ti7tDfSOzAugC+0Yxbm17FvXukV2zvIKbHCJQ76LBhM06Jplw9Jc/lR/kG7SWF9CQRwdh9F2H/zW0b2BjiukJ7Y99g3bPVAFy5/vty6wbpH182NSJbdvOeLx9OfI6FYALTDQwL8wk+yaLYsHi4kVt9K4xRH29OkjvfxmBTCp8qo07c46dP/tFW/dhLLLOTUpdDYz9LD5WJlk/KblqnZGHk05USswFBjiMTacVKDhDPdTSlbDB5O6WdjhrOVhREFPIcThcY03Rc+yO/uD4wpZozq3RxBN85mTD9W95YF4N+UgPBeT/HkwY9nJWkUdj24Ueu/Gnk4zKFIDWTE5jaSdG4Zm7uXewh6+8/VRnGuxgRQ/oi9EVJAed7TZwUabHxSBEhAo/L8jOG3abdfHvvEk0t4eogAdYoHK1idLitiUydSs3oAPaQr+9Z7qq2oD6CwRrNAeY6wJl4D/7t09D+Fu06uNovAVqYTN+zxrdwH7IZ+S0I9upWS+mkLfN+nTolMpDU0CtGFNuCsb4jtUHXpO6VA5GCfMHUGJ4kenVmm1BJEkiuQ90b7W3DVu0kAPUQokRtkVfrqs6VMTTw7ovduvNDp85hHua/rkSCBrub6VFL0Y 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(66574015)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?rPCYp5XldUwPbwaUDxy52HOsAmN9?= =?utf-8?q?d2cTFcLuI/Aa/t6h2f4le8GXBGZZ+GG04za1K4FJKYSoYo8qr190cFaPsbNql//qc?= =?utf-8?q?Y2yyrtFBzBcMKX97QtiSqQYfJv9BHMgbWqtLzMvWzhDLYvQ3VLZ53TgrVMPgexUfF?= =?utf-8?q?eIqXGqI/1Zka/dvlddWCKydkY5d1zf/Egh03vs3QGjoiyQmcbtTdY5DnShsKSnFpP?= =?utf-8?q?yrMDfyHHdI81o4Z5lkbK3tXIyv+u8CUMqBdc9zcWj3KDTqKeq7j5ZisEFQUPgpuLc?= =?utf-8?q?rSROLZuDzjAU8hNb3iO6egIlTnsp05YQNnWxsqCO81Z/X+Qxvci1Kns8YYhQ6Q/Rm?= =?utf-8?q?EE7yCtRXFXEUPHtJAwj/PCJbyms3clZO4GwiQeUGAAjrhxhoHwReadSjCIO3UqVdR?= =?utf-8?q?Otk0YyLuyCysi6SAuRBi/K7p14CFt83Bns5T7qJizOIq6NmSi3B5PsLArxCBHXoue?= =?utf-8?q?wqCndAyj46mQa+rGwNdjV8pkTSJAPmLGyjlQyjrBMlWfJFEbKaZtMzMF9zsDO8Boa?= =?utf-8?q?QI4dH3ozBSIUr1kopOUD+2zv1WOj9wgz4XXdJR/J1Cvt9Rkp7nrrvDGLAGXaT6eNa?= =?utf-8?q?+BYU/x4RloL3YGxxuHMq2QOZP6noqWO5YoghY9/hyMnw1ytPBddtbtJh+4IUHvS4F?= =?utf-8?q?A3RDSmaxbkGHe1hoarSN+Hkzdb4JYv3C2n0palXcQQeyUGb5UATM1fy1RcOXV5i7d?= =?utf-8?q?2xoQwdVmMMkMbNaTQQ4ueEpKjXepHs0ZCiNv1y+IxIVLsX4ir+ysbgdwMr2odAKqw?= =?utf-8?q?eFb4V5zQ6YgkuNx6k3QIh9krilpGryLRYFowuL/OTp22dKm+iBlyNMJaTh/lqcM0y?= =?utf-8?q?HhrqhN3hggJw1yKbD2bSSJJjS+wKX8jlGipXONn0PIJjDhDeXc45mAt5PM8aApaEn?= =?utf-8?q?+3qz7Uy1ajHmsyWxDCndSQMEK5igfYbE97pjzdirwlwjKDAJKwCay7rBuPQ4KYWx8?= =?utf-8?q?EbkEEWhnd/yUulWzXGihAtRSI82B0yLEJ3UBHGeAunH9bWsdDDNFdokqlgGuvEr0l?= =?utf-8?q?3qIZlnjJ4RVi0W8HyvZVhJazxFRq44IX5WQ35tahVUoEg2Cy6IGkAShWQfItPWjRk?= =?utf-8?q?WfZTaACFJ5ZwZybi3DMIgTaf8BgXFOYK2EmTYhyUrk4uogDdaPX1qBYlCr6ed1fek?= =?utf-8?q?sNtoXOjDhytm69Ew4RU1ej4bd1WPe2VbyG+kZt9RW0O/GrNG0JtflEVagxLN3pVdm?= =?utf-8?q?bI8yKsdyu7W4LW5rEzqD/EJOCPT5lIsfsT1HO8C4QazsD9N7l2KbcnQ0ATYqd7CML?= =?utf-8?q?yVjkr6aoq1woimCjAzneX6yh10nvf9Q55QE+8P38ebKsqPy0HzmEO0KbToljUnexr?= =?utf-8?q?AdCgFn12o/xBMkiIaNcea9ETLdtgtBxejpm0jnc+rrPGxe/RnZGeppkDHw8kqwk7b?= =?utf-8?q?a1Ec1/defDiHZMAcl+EZzL2zeGmNrRduQrFLdjsvgGGRPzMNCX/bvjp22R5BEsIJo?= =?utf-8?q?PZJrwytOsrqPdIqoAGRwy80WIVap1nlB5ym9d465FGOX0fGsS1ajKgodFKJx+4eBR?= =?utf-8?q?SXaf0NtZ5XtI?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e061deea-7ecb-4a3b-7d04-08db8e6f4b29 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:01:25.7920 (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: 7NePyVc5xAxRTJ+tcQF0leY1lWNvcCLZU9Ad3Ckk1gBLGQ6wwkgb9udYr4uZkRtEvo7p74vlTy7VBleDKx05RQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772556748873202896 X-GMAIL-MSGID: 1772556748873202896 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/dw_mmc-exynos.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index 9f20ac524c8b..698408e8bad0 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -664,15 +664,13 @@ static int dw_mci_exynos_probe(struct platform_device *pdev) return 0; } -static int dw_mci_exynos_remove(struct platform_device *pdev) +static void dw_mci_exynos_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); pm_runtime_set_suspended(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct dev_pm_ops dw_mci_exynos_pmops = { @@ -685,7 +683,7 @@ static const struct dev_pm_ops dw_mci_exynos_pmops = { static struct platform_driver dw_mci_exynos_pltfm_driver = { .probe = dw_mci_exynos_probe, - .remove = dw_mci_exynos_remove, + .remove_new = dw_mci_exynos_remove, .driver = { .name = "dwmmc_exynos", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:04 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: 126790 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp940665vqo; Thu, 27 Jul 2023 01:20:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlEhplp/DFCOvCPlb3afjse1zCpjjARJCfsiBxp06AqWazUEnnNoyVthX3AmKlBDxl+XnSfb X-Received: by 2002:a05:6a00:23d3:b0:668:9bf9:fa70 with SMTP id g19-20020a056a0023d300b006689bf9fa70mr4328902pfc.34.1690446057950; Thu, 27 Jul 2023 01:20:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690446057; cv=pass; d=google.com; s=arc-20160816; b=WGjMLKvMJ2cf0DdOgbf/0MU6vaJiCn7+K7E0gMVf0bFBdFJfQcHcIr14N4a1nPoFND NmPGPxMCthzw51rSfwDTs78g1ETOaZBgL+Gpc0fMqSBzn4GmEty8I1y77KIp0wHeXmyc lf86+zXjNc4rupPwjqlyQYa8AgQa57PdQjh5r+MADXyW1kRXe1CGrou6wELXyj7wU30t itSAqXDSFUosRLnXw9+P5P7pdQIr5wa2PT68ZdL6lEVZtRZhCASNipCiBKXU0sw4PuOn ugde8K6HFMqohqPhUPd2UxwtzJtsH2cQIhhzjplAO+G4NZSN0EFIaIjL0jIHYJoVedoY WVfQ== 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=d4WNf4YdQgPLt01IdeoKmo0VQ8uGwhUq8MCThQTK3fA=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=adDQP77t8ffYMnYRs52doyG12W5d/1+pYaHddwyLiksLqJ8zfK4Ldvd0r4le7uugjn 2E3WqtTsZDRltp0cPFCbO5ND+WHSIGqvXt2RASb8ixJrYTfRp9dE0SywV3nVMgMnNsWe LvC0VI+M74RjBBDPi9qAieNsr156fHiA9xV4Hs2J7InYuj9+ia0ACdFU8WGYK+7muCVg ++lxzjGOdL1ZwEv32nRBWRKmxCjVDV3cysP+o6b0okLXrwvaOJwkY8T+qzR2/JuQBy5p NMwIOw9VZRK4V9wkDSP59xldA8RFSxQphAy7LTkkPYA1qHv5WgPoErgqAh/nvPmzwuVY hh0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=U1EUq1L2; 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 w67-20020a636246000000b00563f0338b03si941595pgb.113.2023.07.27.01.20.44; Thu, 27 Jul 2023 01:20:57 -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=U1EUq1L2; 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 S231772AbjG0HDY (ORCPT + 99 others); Thu, 27 Jul 2023 03:03:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231359AbjG0HCu (ORCPT ); Thu, 27 Jul 2023 03:02:50 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2094.outbound.protection.outlook.com [40.107.215.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4761B3ABE; Thu, 27 Jul 2023 00:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G9AzfFUttcn+qHrEEt9WGAWWvF1tflGVJXIlP3/UMrpuTTMkVUx7UWxaRi4h7Sro0GZ9Zh1xjpDzIT7lraPqu/eiEfzK/yydlIXE9j1RYBmlIpzMfCkQDsgbhmrq3+133LBmN+tXe6AgXTBdnMAwKEtKGvunW+2kfDlyehovcPC15LE3GojQ37jTjaVLRKVxK7ah/mmtvKbY+IyI/qQTHIikL8gy7VvmqRjfpwQgipj/iufaeE3OllpoGT6KbbJiPwTLl+uAYu46DB5DAmyypdWmIqK7z9J93A1ikxqpmCFNFZMbYeESFMXTG4hN9IiYnU799FPV+AMGAOqt8ZbxLA== 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=d4WNf4YdQgPLt01IdeoKmo0VQ8uGwhUq8MCThQTK3fA=; b=Cz/HwabeP498kwWVKSqAN/W+o0PXq10qiZ6soo5S49n6H83jqW3UR5qMx5HgbmbjSgjfdlqTUp+BEh5Usnn4jWr5JvXTb9fie5PcRJ23R1oFl2MjTgoyORBU5Y6TXWKUVSsLGDBDfHllu8kdtr5zdM4EYCd+4YIpfLIHeZSvqFmEB+DLfZeXarbpmdVkQ/8FwxJb6oi8cDC9nxDkc8mDm49p5xhzRrzXuDUx/pNW8lGEQW13XnZVxO6RqW+XvPfeVDOnDxQFjQCE8ldYEJpjhFxl7XvAj/KIB0hXiY9HvOyH2xheca9+f8TUMM8w1pTNNyb1OuW9prw2IDq9Vt6jgQ== 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=d4WNf4YdQgPLt01IdeoKmo0VQ8uGwhUq8MCThQTK3fA=; b=U1EUq1L2whdYL+lb40QA7K3uR/sKp/IVmUAeehZm0IpBEgTGrxFkwmt3IiZr0WvAEiyOinF4kfC3tHyK77fEJdfQB22T6/ZfWwGJ8SZOJDy5s21723/SFj7aLOPX/n5Vedy/wu1C5OdlZjpfyu/f6xjYbkm72Elv426M1Nsp3GgukLNY00G62bOfZ9Z5Sa/8zApVWkJzedXA1awYIVDwY9BCLQg3H9RLBa+aZVKHOFJ47tQTM4zRWX24HKoFpnb98ESsd2Aj52w2eRpqFBZpTkCyABF38XlRTMLVH2kEnLJv+20tgOn9ZZUOzDU9qplTO/JDtPv9Hr9KS6n8lbL3iA== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:27 +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:01:27 +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 v3 15/62] mmc: sdhci-pxav3: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:04 +0800 Message-Id: <20230727070051.17778-15-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b98ce56-cbc3-459b-cade-08db8e6f4c04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h02ss6hO0pivW5YabyHVw+4QxAONs1wDih0bDSDzHuBS8ii21daYyWOMMdBjpSF6v/jhgommdQ3l2xOGOp39uXX0scjhE1xfiYszEyNwr02dEPsxK3VQWf2laxTruZmYXaFbdcrjyJ1isBfrDjNsBJSF7K7JdefprVkPVm3gSpJBe0cOCxHTiFFTf32hAtF+EvKx6Tg812o0gP3dPvomH4gz/rglHByalwwFRTQ+2MleiyPiQPXgeSe65zCZLOJYlBKULd0u3q1HId1+45K1JqweaMmdVeB58J60ufU3BQXrZDeMfwyrQNQlsmXbB2ww0Pq2/TsiIidAxSU9tTHjXg1GOg87S8TRKhy5Mm1ZCj/TyAfls9FQUBs+k2Mwzafs4juz/9/4uT4Mzx2atGPuKw2tK9vsxCJJzE6Ka4S0WDtcNgajN+stAsIYyqcx7He8g4zVe3byhXm/OOG0sthI6LmcH1OwpRJz6GoBWBkdJknlp9Tt1wbO0LzAoSd2DQ1ThCC3MfuL4Z7cN9Q5EyIlAoqTe08rP8s1KCk/h5gD6PifnpcrLSeTbBpZhLhPS5/szDQlo31UQLzCgddmCzpSgPzHfyErTrGAxsa1YPqs4LHqHDstYXJZr3kTAmB6NsfN 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?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0QQJisCMcaEjpbj/R/iLiQQbs3pXfegVcqfx?= =?utf-8?q?UKxUWsay37eMPeHnsiL7wnQfeaPuTnIbBe0Dcwep1z2wzafn7zpA2eyJUhiFRqB0a?= =?utf-8?q?LLDlu1fNhOuHQn4B6QsyKvxZrEzjKpp7BYMxV2rO1V+jh9KMBusQLOfe/ZDBILPP1?= =?utf-8?q?uKAlSZm6TgH1NVFR8MR4gXNTptfhk6B+/1qgHgRZdwT7+NSYmVJNqXsj5J3bHdsJq?= =?utf-8?q?0vvGZPMSm7djWrVbQNA0E8FHaGMc9c2pMgi6Xcu+ofgMGr6qVaQQEQlwmNRoSMkDO?= =?utf-8?q?CtP66SDvr2f9Xh9QA6Be9+7kpQSdPjo78OIrx3X/DVcwB446QWnEGZCJJnEftNW1k?= =?utf-8?q?PbdJOCLZTnu6+agLmyGsr0tnWAfTRL3zeg41jVfb5Bu5+GncPBLUrtUTeHk5cRXZc?= =?utf-8?q?QjV2lfqdJCg3bttN1T3RbG9TbTlceOOZWZD9k/0c56r7mGPz9JU3tkFXeeDTstVEN?= =?utf-8?q?xRuVdiUxo6QVH1sU9KKkOLFmjPbluKw7VxlQ3BgLKETNRZ2vFIrW9gGNu6tAY/sti?= =?utf-8?q?Azj0EN4g/jhMR/TmNROAGbOMj96LdlBtfrX85den/FUSbe64+4bboeYc10nT13cc/?= =?utf-8?q?LukWgGDXw9gO/yd6YcmOXF8hM3ZZAwg3Irtk0TBb+w+ME3oIcuK1XFmyk1uEdmftp?= =?utf-8?q?KDKh8GXh8ywq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b98ce56-cbc3-459b-cade-08db8e6f4c04 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:01:27.2335 (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: pEKD/f9k5v5LirrsBbH7hX8+JYBdJmIca8Fu5fquWf+VQ0tcPcx+szRRqetmumIaJRMgr+aXfu2h2gCCTapk3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772561165205236413 X-GMAIL-MSGID: 1772561165205236413 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: Adrian Hunter --- drivers/mmc/host/sdhci-pxav3.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index e39dcc998772..3af43ac05825 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -470,7 +470,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) return ret; } -static int sdhci_pxav3_remove(struct platform_device *pdev) +static void sdhci_pxav3_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -486,8 +486,6 @@ static int sdhci_pxav3_remove(struct platform_device *pdev) clk_disable_unprepare(pxa->clk_core); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -570,7 +568,7 @@ static struct platform_driver sdhci_pxav3_driver = { .pm = &sdhci_pxav3_pmops, }, .probe = sdhci_pxav3_probe, - .remove = sdhci_pxav3_remove, + .remove_new = sdhci_pxav3_remove, }; module_platform_driver(sdhci_pxav3_driver); From patchwork Thu Jul 27 07:00:05 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: 126725 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920154vqo; Thu, 27 Jul 2023 00:34:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlGvQrCsbYtq65Db7kqFL/7rmdFpH5rOxHqxBM6R6I0eQ+vlzc4inW5S15HgI5+xFqR0hV9P X-Received: by 2002:a17:90a:fe85:b0:268:5e70:507c with SMTP id co5-20020a17090afe8500b002685e70507cmr2432699pjb.4.1690443297830; Thu, 27 Jul 2023 00:34:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443297; cv=pass; d=google.com; s=arc-20160816; b=rIjdTcd9XMhJXc4p/vi73oedTQH8YmxBX2zVeFem6A2gw8drcgQYH5yFOr/NAGmzu2 m2yCAtpSQOBZGeTDJsRnoGQS/Dj7ycDqY6BEvvYc6t6jYedFCZ/olTc7PDHbip/Gm9tq wtASdJmSmOao7p9nIFJd0suvCC19oPCkTLgeEXKHKUjnM8PXEDJKKxThkRVmA0I6KrJ7 jEhhKYZwyyV1uWOa8yaBJJL8MRfCgH80YZYopjx+k/YEifxWWSYjzgrSS4Px4zhDjTuo 1osdpy93jJEClqjhSdcdemB8sf+wCBBYK53uoCo2ieCVTA7us15gAOu0O/xel8fqqIYy BH0w== 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=ZpaS9jMDnrZmEK/1dIqDJ5lnbNq7D2TPsIcBR4aHSPU=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=GafgMJogAn+v2Fy/BPz8niieW230HDYsQxtBG4dFO7f7s8bfZVP7jt/MIxm1J0RhWi qtQEtfbx1JfTUpNt9lER94kXO1Hr/6Qu5v4Qd4pFgPPjqQ8Ok/tRVQyInvzENt4I6ecK 5GWUx8VeqW1IruGBdUrsGa12RMWCEPw6vHCXof5AU7fUcju2mygHus5wGHlyQnRS0D/u h56cXYIR/xJREvJwpFUD9FZnbKSQwna9I7LXMzPGiG6gcFif6tnyWILHxgF2YAl2tKka hVIMxjOQlYkl4iNR5K0/7mxGv4pyxzbftNEvZ+xcerTW9Jw/qbnmKVtwoNSGIWOyd0YY QSSg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="FvlGX/9U"; 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 g12-20020a17090a9b8c00b002636d222400si2538205pjp.14.2023.07.27.00.34.44; Thu, 27 Jul 2023 00:34:57 -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="FvlGX/9U"; 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 S232915AbjG0HDk (ORCPT + 99 others); Thu, 27 Jul 2023 03:03:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233015AbjG0HDD (ORCPT ); Thu, 27 Jul 2023 03:03:03 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79F463C06; Thu, 27 Jul 2023 00:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TKbvDA/PASz7Y0dq/Ff08FRrbcLF+qh1anGe7Ase314xidFL5iqABbGjZ/slz363OocoXr+uE59t4+0JoHAogs1jeL0qQxyjDKFHs27jfNKc0mb/6eo9YSOFmMYWABvX1SejB4YING4hkl84l9A9rCWs0bzpdX5Q3SAS9ys0+PX8KHDudrk6tEaII2CFjhmfMCU80RBuDFF1qCHM9nC+i2cmQdkx/L3M1xOS2D9sewadYwscH6wNbLBcRNo8JtyUoV6G4ACJIO08hjtsgcDjf+Wsu+603y1QG4s9e98Bzpt2p94sUCCj1KZmfjGF5VMVy3UUITqsV1c93DDukLS6ug== 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=ZpaS9jMDnrZmEK/1dIqDJ5lnbNq7D2TPsIcBR4aHSPU=; b=cv5FwLFVru0Ih7O8rvHQ41rU+ZLWcp1ekZOTLX4NHQ6IG7+jWrXxKz6OISTWiBc0y51FpQAUgtziElZBRrm6QjukB9CJEFWNl9weIrgYeG9rxrdFvu0UluA/aX8+AYpiSa5uvSdSHR7Lz75DO1PZo5Z0Z04WK8QEH4UE6JcwWDdtIjjmYmPH3vM8+BEW11XlSCUAJNpV1z1yGcvIUJFnOeAQo4sZ9USszp2Q+ptiTWTVnMo0416yg5oE3JI0FzirkbmdcIxGzwIKGuCgx7A/CZB4u2OU6XtXS6yc0Ccxwf9q9xxStEuBGlL8anoF9J4FgItn6ha1CjcUR3khMXyBEA== 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=ZpaS9jMDnrZmEK/1dIqDJ5lnbNq7D2TPsIcBR4aHSPU=; b=FvlGX/9UQ9ApPUkfQ88e/cGqLxxQzWKrGpQMpK5SpHov4BivZ0s4xnCQKkgl/wjfgtT9TIQY+Mm3bLMs5sTdPH40jvsPXL7St17Kr+1dqQiaz8MELz7WBnurK6GHUAY1m8uuvltk5HxdwzyGCZjzmagx+twp6s/QKDUyU4ea0R140WTyfNJGRlX2vFA0N5JK1NhZgX4PlKjn7FAKThHaAc/61SmhORslKNJs1ogWthnJcotsSrgwcMvC4PFqZ7HbElLNevi/hM7HAuaEgSiupgBO1Bc9qlAuXX5UVFGdEeqNt4WEYLt52EFZBVJ4X9ipLd0JsivDF5R8wdGHtwfVpA== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:28 +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:01:28 +0000 From: Yangtao Li To: 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 v3 16/62] mmc: rtsx_pci: Drop if block with always false condition Date: Thu, 27 Jul 2023 15:00:05 +0800 Message-Id: <20230727070051.17778-16-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: c7259d54-83dd-4c10-6941-08db8e6f4ccf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bjPs/eMftmPLsFRe9b5X0riBeCsEFxa896+SCuzFu/UpzqtkEjSDBDFW0UI6yCT9+vz4KCj+VzrkbQAL0fgSeQ7MAEhI87Ukiq4oGxrVqgyCKZ/NvGG8jUsJwUHgkVxv50UTUkRf67SwuZrX+wEUrCjrqS4Ps4Lx5ikKkmj6Qt6iaI0+J/k7Lsl0qTqtrNpuTJGkKsA8+z+TdA1C+bxipWI4Ynkr3sU4LO644Yj/ukV+p1DdMSvd5dQc6DpJLa7IMiGGPLaCqIVA3F2AoNzjZNdmNbxRPElrnbKcNbL/QgQYHB8+TSFkHvMZDrDs2z2PYZexXa1GexSyV9cBXM9yt3iCYHPSPvLzGT3ukPm9N0KX4Du87mJmuUwZ8Njr9q/uZa3PDHkaAgi9/s6I6F1W1mJc73EBb0XP6pD2ARmzgcCyY0A4R62jDY1EEbREzb25N7qPvno4Ms0ftTkXm+Z6sPanaLsqGPsWI0/IAaMK3pPiv1tk0bkEWJflidozfHPL+qZoU9LerLyUPt07LsN56uDqGS4+oBfqWT5fPgy3jnJC/Nsfl0BxqjEJwj7CyGs5/uUCCM6IrMVw8LJqBinjpkri/ljdDt4jLA+WAwOWnSFJS03+ZN61v4QyqBWoFUJM 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(6916009)(4326008)(316002)(54906003)(66476007)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(4744005)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?TdXSWoaDzlYJ/gWtr8Ul/pPqHcTX?= =?utf-8?q?lPM3Ea09jciUK6w7h0Ic+BmBDaCNtgtxaqJ3ZsGcLYa6zu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9fPguyIer?= =?utf-8?q?/TEVYkLpU5CDs/eCFq/H4v+pMgWoRtw6dyq/wOje5VtN0JhVUrYm8flA2ya77+qv7?= =?utf-8?q?Zn7krPvhAfFkvPSW0by4Ht2QR44qKqiWpBW3VnERCOEHg97icHaNZ05mVNm4cqzD4?= =?utf-8?q?EvjnN7EDN3tmNab7JCoi3Ilf61xUW+cwyQYeJTWeSUexPdRyqk2dd9qI6rF7F3q8O?= =?utf-8?q?Oj0eIack+lB31fUZW2kCQ24TaiRboSNX4HMCGLe5sO0DtXsz8eSGq+ZWuov4wPVML?= =?utf-8?q?MdbYFiD9wEjb7hQtMWYyh1j1aRi+pewYPbKdZQl7GIRA5bL5xtgSPvgMhRlOzZIIK?= =?utf-8?q?dLruFi49sC/bnRL+OyBycPUMpZ8+hv2NAbeWa3UsxVXkQYpdYnwrLSOwVKy7xZDir?= =?utf-8?q?Zfes2d0L7NQJdr3RBfajebd52XFU+vsL5CddBF7GW4NFlL3KOftpB9np/CZHqg+R5?= =?utf-8?q?qw9PUOYVjE6fsJhPGUGX+IssIunRgyq0l9BcTYLzqMa26NbkJef+sfNYuOJY8f9Ad?= =?utf-8?q?Xwk8sh3xzAAjqGeatx8sbRBGiCjidI0atqvy8/nfkesKWvcHQWokxGZ/ZAT95UKra?= =?utf-8?q?7qxU94CP5RC5?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7259d54-83dd-4c10-6941-08db8e6f4ccf 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:01:28.6381 (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: KKfHT+FjtTmjdswbMF4cXnEKhzoOYhaIqZdJM2OnpBjq3wTQ9e8bnEu0SDP+Pw/zVeRw4LtzQd6dBX61hhbFqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772558271649689060 X-GMAIL-MSGID: 1772558271649689060 rtsx_pci_sdmmc_drv_remove() is only called for a device after rtsx_pci_sdmmc_drv_probe() returned 0. In that case platform_set_drvdata() was called with a non-NULL value and so platform_get_drvdata() won't return NULL. Cc: Uwe Kleine-König Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König --- drivers/mmc/host/rtsx_pci_sdmmc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 8098726dcc0b..062d07c2ae5e 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -1529,9 +1529,6 @@ static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) struct rtsx_pcr *pcr; struct mmc_host *mmc; - if (!host) - return 0; - pcr = host->pcr; pcr->slots[RTSX_SD_CARD].p_dev = NULL; pcr->slots[RTSX_SD_CARD].card_event = NULL; From patchwork Thu Jul 27 07:00:06 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: 126754 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp923203vqo; Thu, 27 Jul 2023 00:41:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlFPJ13ESUI43YkR/AChssqSe5Z20b3gPbUkgkZ26terzWeqxuZNjPcbGkdal1ColFd9ucen X-Received: by 2002:a05:6a20:7351:b0:12c:2dc7:74bc with SMTP id v17-20020a056a20735100b0012c2dc774bcmr5850356pzc.46.1690443713546; Thu, 27 Jul 2023 00:41:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443713; cv=pass; d=google.com; s=arc-20160816; b=FrVMTADYax4WRHNheWBf6WyHTxGfRMDfXzUpvt0tLBNoMGW45wm6IiuG3za8rSqXa5 zzycbw9Tdiy9HYUVFGqKMaigxDCh21Un0mlxsZy16/O9Q8Lw5qbzChpOiYfHzgCcZADW UHOkhgd8t37zbvRiDIWKq2qSMC9huDoaMo9tgIKSjtv9UcqVjZ3nHUPPYXnnHSwv3N1I ACTNZKE5zBs/rUOlf/jnde6V9YZ+HudEdf1WaEW8soilFIfmcC4fbNK23cKv6nfRts7X Scz8P65L4ChO73PwZ+NJaICBX8w5cnVGciHza5cncDsxwdQblvth24IuJ+TOkJseFeJJ ZQLw== 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=LsBYm0syPr7thxBEbMPEsbcgZPueQUhwrbcvN2FuDVM=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=lOHTKWO47PT6+SzcTfYUmJhNCZRFMDxdN1x5N/fubLhYhT0eOK6r06QDK0hHtZxtnn qPtXq/CKK+cIRwwB8vIUubZ1PZTajgYjj6Wk5SjZBrHQGuM6dxP8HSR4rqPEan2xz43+ 0EJ4kcJuSKXRrKAR12UqSvwQyEhCK/iYfvTqRGSgoTAQJ6QPphmU01jZiBl4pYVjWIyS TI6GitMBRS/Ji2XnGpY/pwgnzK6EYj3/uFQkmu+00ZwJjhL1xMRWbfyetq0XRWJz0ra5 VIH6q9zyGyWH9lSRAM8nuQYX/oC7wpiyJiVl6iZWQ1R+RUdBKOe9XJ4VtYy8B8XfUnog aXnw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=G9l9ACKi; 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 c8-20020a170903234800b001bbbbb61c71si966498plh.399.2023.07.27.00.41.39; Thu, 27 Jul 2023 00:41:53 -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=G9l9ACKi; 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 S231347AbjG0HDr (ORCPT + 99 others); Thu, 27 Jul 2023 03:03:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233083AbjG0HDL (ORCPT ); Thu, 27 Jul 2023 03:03:11 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 342CF3C32; Thu, 27 Jul 2023 00:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bIUFxUoswohzQD8IyBKO0/M1vcoi+94kZtxt+6FZHCy892eOIdGseMj2rvHP7DB6/NpV7J+srNFrMAr+qZid0tx+cV6fF6QM9hfsWmQoUIrc1Yp+5K+oWHUMpPBAp7g7t9IGIWSCAFiSguyJ6rwHR8OSPRkdNgewjlKUyLEdlCaWobasU9On6/itM9f/aEjX6ZhEHCTHAgumVHjxQOiMlalhyo6/n4UNTp+ZKQpnNpq6F5tEaWQCvsxoeJuhNZRsUOTBtgTG6VSw6EAQsdluArj813n8HdvZPsvWrf4DUhCNR6AtO4stHT4nu9W6OLL6YhVSJwhCv7KswHZd4O5vDA== 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=LsBYm0syPr7thxBEbMPEsbcgZPueQUhwrbcvN2FuDVM=; b=n/N6FNsOXad65QvOBoT1qVycXYwNBBP5a3UN2BRYW7/oPsyL4wWYr3OndcGtcm0MkChiEWAWjUh7myqBNQXVhRpXDouLV1el42uON/Ymz1R3Iu/muRGYQ5PEdXzeGsqMl8SDci+6ammQ5BP3HKze4YwqiutYl5jhM7jnbxsvp2XE5SWsbCpRPgxR3H+2n5mmbXN+KCcffevsEKMaQ4/3tQjtMu7BCvIoJpDsSvppJne0nUh/keM8mb3hQw0x/fQRd3b3MJEBKtOng6mP8a5VNNg6BAi/Zg7DcGlwadFnCsauM5Be+7lKBYMVYxzgR/E8ktBWf6JRcNq3VqCGV1Ak4g== 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=LsBYm0syPr7thxBEbMPEsbcgZPueQUhwrbcvN2FuDVM=; b=G9l9ACKifca4p7xw1ME4pZtHKpyuu30S90kry/JhVpppWx7jvX0VHZT0zPLtvPiaks7Oy7QDRbtXm0bUbNHlq0BxVKvQe7yvSBanbiiAEHHEDVkt8mjNPoHzHgEMNOTcrfDWubbizvNdbxptIMOO1bocaxS3IPop6u0dErH3UuKd55W09VhMMfr0BE0wpuyklrxZA+6sRFd2RHwmivtYrM8tQeMq34Q/j+WQi2xjftBPaBrR61OzsKyoFTj6VMJRtvRyGTTjv/QwJR33HASiv1XG8SqdTZ46SZKyBHQepfjWa4pqGfi1tGUm3kWofn/+nf5ejTLBmWo0RcP79Swf2w== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:30 +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:01:30 +0000 From: Yangtao Li To: 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 v3 17/62] mmc: rtsx_pci: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:06 +0800 Message-Id: <20230727070051.17778-17-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 2582d20b-098d-4ba7-9048-08db8e6f4da3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Iu4qch+4ZUDdp5su2LbUgomBcKqSRmPyZ98p4vcYYHca75TGAJWVwJruzsK/INa9hepmA0q3uRDs2lcJVRsoBcAx0HgrxxVCLdJGuLY0b1ehEaVwWGrOJBayW7+1l5KFppXQf8zB7QRnRkD5ct9z9JgSaA3MnNb0naOrGSOfdpr+OiVGYUfpMmGhrqCObeGxwZI7ERXFIhnTvpqMRfxcHdWfyyH84MESG03eaRZpjNyB76fIEaaLHwtxm18hSr8GWCgkOaheWyd9VxS7N9hNX+iCC4ATf11GxSVsqrwWZzBTv653+xauFS+Khcnn2qtsH/29aSinWczYI3imcAe7nCNBFugx7PLJ8diFBfFWDJDSRoQq8gQaH3O6IrA6aoQbslkL0siTO+BNYfomzLYdJ6rKTnvW6OuGqOlcUzP71nV1NHz1BV8VrR7arH+L4d9ajwiQWDwUkN6M1tg3hKlH172R4uIKTEYJU4uo5sRXvWDkxUc05Ab1aK2+nWxmUXByKCiTd75U90vvyjxn5avd1lsP86JmR6cjrru8ckYp34kx1iLYK4KCueWFA0xkWyxM8OXZI6To8sAd7QFwwVHcbKOpej2zEP9BF95Ll180YfJ7tu0+p80TvZAN1vRKFzUN 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(6916009)(4326008)(316002)(54906003)(66476007)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Vyfz5d1Hpy0kBtGdMP9ur4cIDx/p?= =?utf-8?q?0kLoWTIz3Qpw7BYbcSdumur9AFTuDTl7d0vDCU2SwRAgIGIvx+kZxOhEf3/ObmlCu?= =?utf-8?q?hIeq2Tw7ntOmTAs5pudFQOSxaZaJ17zMVGM6X3dHkE9UgTd33OpHztTpmLo1NwbRu?= =?utf-8?q?bdHfZhfl3BYdE+k2P3GvfWAPO0Y7nErS2tbhx+YqQbGYEUY4FcrP9bo9Kc3X97CTu?= =?utf-8?q?zSToB9ma2o/7vV7SynMfFfNBvaaVlWR5D84tyc30lzHPc02bhjC0h0+TcfOf7aAWH?= =?utf-8?q?JHAhImicZfhttRlkZ7ak7GmEqloI+djMPhznqNrWWipMfCMu6Nujmac8zc4F+0CAD?= =?utf-8?q?sqOQd+rM6VAJpsnGoa/c8S54kzdArsltBTkQ3El/7VBjv/Hl2WsQwjCPDNcgSSpXM?= =?utf-8?q?5xU1i8dYSK8zhbFPGVjHvx+ny/QuiJSxNpv81k9PBRCx9ibbPXz0dKxrIpS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f-8?q?yk2NQ13AO7EEv9UH8YOYMqUwonJ1TAFWwNdD9M6E9l8h9uLTRDMducvAtvz3KCyJa?= =?utf-8?q?UY32OAFi0qMBd8bpnfn+1N2td7wjrOLDPWcJo2c9Ry2WwZ8VYoGov4q0miALEKh4q?= =?utf-8?q?T/xFR2to2J6AqRDnepGXyDXkt9BkS4xp+RlsqkpqBJ17wYO0OI1Ezgi3J3+it3H3v?= =?utf-8?q?Lhe7ogW80W4/?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2582d20b-098d-4ba7-9048-08db8e6f4da3 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:01:29.9480 (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: PvJY1y+8QKzUuRxVPI+QrmAhQ2seikZ5OEE8uNzh1XmEtCHR7eZ/qhkBnHj1yPe5YfiE8touer3yEVEvvrbXSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772558706946621763 X-GMAIL-MSGID: 1772558706946621763 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/rtsx_pci_sdmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 062d07c2ae5e..87d78432a1e0 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -1523,7 +1523,7 @@ static int rtsx_pci_sdmmc_drv_probe(struct platform_device *pdev) return 0; } -static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) +static void rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) { struct realtek_pci_sdmmc *host = platform_get_drvdata(pdev); struct rtsx_pcr *pcr; @@ -1563,8 +1563,6 @@ static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) dev_dbg(&(pdev->dev), ": Realtek PCI-E SDMMC controller has been removed\n"); - - return 0; } static const struct platform_device_id rtsx_pci_sdmmc_ids[] = { @@ -1578,7 +1576,7 @@ MODULE_DEVICE_TABLE(platform, rtsx_pci_sdmmc_ids); static struct platform_driver rtsx_pci_sdmmc_driver = { .probe = rtsx_pci_sdmmc_drv_probe, - .remove = rtsx_pci_sdmmc_drv_remove, + .remove_new = rtsx_pci_sdmmc_drv_remove, .id_table = rtsx_pci_sdmmc_ids, .driver = { .name = DRV_NAME_RTSX_PCI_SDMMC, From patchwork Thu Jul 27 07:00:07 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: 126729 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920223vqo; Thu, 27 Jul 2023 00:35:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlF5fHNpBA8WR9Uo6ajEQS0Y9Jej13mQN4p6troFt1zh30xRmYscg+5ljmPZIHZh/oj5Ebep X-Received: by 2002:a05:6a20:12ce:b0:12f:8755:96ba with SMTP id v14-20020a056a2012ce00b0012f875596bamr4412431pzg.28.1690443304957; Thu, 27 Jul 2023 00:35:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443304; cv=pass; d=google.com; s=arc-20160816; b=EP4iu3FA56Ui3yrPrlt1AsGODOIGtF1Z7tayADnaXjLoa4jG0oYTZwbodybZ9haNs3 6U70ODckPbm0RzLuFqyZpPN/IPE0MpxRXoM+RcQPMUXsY2wC/vSlxoYCiyT2dZu/XkpN N4tF+urXRGiNFdfdc2O0O3YSBJFii7ytZ/9Wab5ryLDOzLVLggP2wyorc/3BCkrBvWGt f7jPtNxEnMhiHTKb5LIHiZSE6OpAZt2B6CCguYEn28ohc07vte9f9wRSP9a0qy8laLZe puBTvfHp/hhY16qczPisweDNNIQ4MekgG/7PLnEWf+C6PzTGC04ew2nKlDeCmUP6zgz9 VLaQ== 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+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=g8OasbPQ2G54xjMhgileSi+DVuhOq79Cwtprw9Mk3DTTUGZ38lTQ34wrjftqc3PSbJ 9Mu7EOfKnLvDbqrfGsf95n9BJMFoojTAk5+RN1c1RzEHHdJwdLMhGEHobjUcjmih9jxR H/k2G4SHI8YXyqZVjhXg7mo/IqDooYgc+ZZYXoQHmJswbqcCsRFg2uZaMZq0Ez4I7H3n eYibbRbxYwtshr6mn/f07wo5PKcula517KRWTNGmF3/yeyvqKG7QtHEq2zTHSo1z2Jws vyfuRf5vbLGCs5tuBELZEjg+mQjPNAprm2FuoaP4Y0ohgrB44dXWjLWbnLw5VEOgnG9P nl+A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LHUi29VB; 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 a24-20020a637058000000b0054fe2dfaabcsi839336pgn.526.2023.07.27.00.34.51; Thu, 27 Jul 2023 00:35:04 -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=LHUi29VB; 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 S233019AbjG0HEK (ORCPT + 99 others); Thu, 27 Jul 2023 03:04:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231664AbjG0HDY (ORCPT ); Thu, 27 Jul 2023 03:03:24 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2094.outbound.protection.outlook.com [40.107.215.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB0352D6A; Thu, 27 Jul 2023 00:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UNcvX0mgVEt5/N4rV8GERdAzkKB8iX3K3GP4OtKhsvh3Lv2q3vsJXgYcCFkEHj3kjSr95sxMy/0WMNjpzQua6dryXVG5e/9O4Uo43zmkKVRZL4gagyYmEOyaJ84Y5m2PQT44qjk4z42YAfVEDajwWwQJDZ7Z9WWQsO/RK91/vDJXTmY+rLYB/NzH0nlw4gae4hwax/BiNySAvBOBkbEIJ1ODLabGo+qmQKrPoB6QqDw03RmKqDrHjeAMdA55zDM/vGSzQP4t8fzcFJfP6jETAQji1L3ZArKTPTENxPhBpToJHVBPCAb7VWmaptshqNWueq2z8zE6l+YPEAyJ8GOVSQ== 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+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; b=CxrAIiY6VWLLs6pbQ7YA5t338yj9hsSMLn0c1r1gZI77BMTb2sepH48D2tvYwMKZ5EYO0N2gffv8wc9yCpUrCV84Ev8u3qbbnyWG9TKbEdwl3O75sqd6s0RiKsaZaLtmB03rkN2vhzFS0JW2rX2sA71aCAOmRfkxhTN/6KdBOvckHq+AzCuAjWynUtj8+pJfd9UgPY/tnkhfgPcWOaWNfwQPGH4EehNW9VbMsUAIco+9y6muO+S72aNWx4JSjawF6VTnJsS3+nWtoX+fxTmAgk4w2MShg6UsT/UffsWsM8i2V5WMtKC/YuYzuj54wZlrbxM3O83tf4ptXcVeuYEalQ== 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+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; b=LHUi29VB7/HApOCl6GTXVIUa4PtG+aKZFbXAY4RXtSYdlE+RFOZTez196R6U/qJJa9YxE/H1jbx5qYmqvqsDSoAcTF6+RsQy7arwm1whzacT0sjRkbqUnTKoyLbrOw05aeYCZfSXe62vFnagvs8urbnCS61Wy6azMqZ4YqNaj7nBY6H4PvZK90GSZSuvcFelFR8qI28LaTEn6GqNOHjgGAHYEQlN9isFcbU5h5BW59JyqFcK6ij0Lo+GyrCnThS6H6zqg3cmVm5BSlCPeFvqgQ4kM/3UUOzIJ1V67TZiJNovk9YNOznq2fQ+TjPqTuBxThLKbo1X8cqKkVURnX8LoA== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01: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; Thu, 27 Jul 2023 07:01:31 +0000 From: Yangtao Li To: 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 v3 18/62] mmc: sh_mmcif: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:07 +0800 Message-Id: <20230727070051.17778-18-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 74071265-3901-4a77-f30d-08db8e6f4e72 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RbVKWs5pZ6IKrDe8aF+VH7uVXQKumDYIL3XA0ffTeIzxjmFsXEisHXsPF1MYGIr/jK4dQHGYMO6K93RQO3OQ17uPXwjiRZMT5IWTLNs636GYbW2vOuvZrYF1SIhHnXAUDVvybuQG92guaG5DM8DciNr7issKtJvj9pDibk8EUGuAlbHiNqmAFGargJmFDiUVYO4c6ETg2INogk4ElbkgE20BYZtrEPvnsN+otCYZ6qw6PzBRXuZhVuGmok7YeTdBkw8WBIvllAa/4F1Q1/PyBwuhCMfcaq3KBB+HdYdc951BZYSmMscWR1eGgyflHfeZySmaMEVNegC7zB2y/UQnpwYWiau8bc52GT3PpSHB9VN4MbGocG4yNVGzNlsBB1jYmrrW8vtFN6huKy5EI6rbtmmTt8kxnWNBvrclsdbAkmkNDesRRjl/M+8CtqO45r+SbWPeewlT6w8BBqjJwwG6JmDeQY5YfKvIoJpSshJmFFSs3/pQlJWCppd9fjknsVmMJg7vdm0i3bGe4SbO7bInGKuigYJkif93FhIeAwCXyo/trDsnVQ4F/3xd+jYYM25CRWm042h8RddpacnzLxr8VMYz2BRtk0BVN9pd7mqkidQDiaPFmnKlCw7vE9ZiLEiW 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(6916009)(4326008)(316002)(54906003)(66476007)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?AJ1KffNTZD7VznquOyZtQJbX5piu?= =?utf-8?q?bkhlZahEgugMa957GoZw6sJ6qlP6CgTjTTKyZ7GzBiIhpzcJINiKLgzsdXX0n3ozP?= =?utf-8?q?yM2VSvrWIM8qdmNrn1rJFT96z/JZlKFi7uoekpM3SrIA3gPpWIHAHudwed9HEWG/k?= =?utf-8?q?Wd3wKCNgrCX8VDjkRoA3Rv8WF+pEqL2cAIG5UMYGniJ6F2+XrF4k3hVF0eyz3kigh?= =?utf-8?q?jOrEr1bv0F28nbV4fOc1R7f2cUpmWwoqgv+Qxbz1WEqzzBITCQ3KdOpfBaUQ3fLVg?= =?utf-8?q?Xtppwl4XU+Vtky0vgFtrxaGfH8PLmIejVROaG6diyq5Sk09XgtxJugKQkg2kUMdgI?= =?utf-8?q?fVGAl2lhEEGe5IS2r+9q/LEN3GFbpd73Vp85E4/V7nWcPiI1mbmGmgNusHkaYItIg?= =?utf-8?q?lzij0RA0TnUetAJ9AZU3Yz8hWdab5BaNEvL9q4QRd9n3m8KpULxjXwhnw9A8s+DAN?= =?utf-8?q?TqSORZCd1qMjRze5xWZUUlq2a5lTfqqj6U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xSgNi1ajgO8zOBJF3WXN4W?= =?utf-8?q?iHiFrcq0WvI0WmggfQwmotI7V5RJGr+z8iT81cFJMwBVtKE+P9CRnbS8Zd0fPOqi1?= =?utf-8?q?2ofuabBRZKnHfJg+2H6Ee5VJz0P/Lhk8TPeI6JFrh9cpa1fTRbxdQ3Pv5jDKw8v3x?= =?utf-8?q?gSQFwWwfRglW?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74071265-3901-4a77-f30d-08db8e6f4e72 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:01:31.3011 (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: utOJFE2mYMHUXa5w7fl4/RhJGj3nEB5u2sXw0jZOqGF81Z9sxUAe3b+yDcyuenjrRM9JMorWD1MUUJZM4t/iXA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772558278931856939 X-GMAIL-MSGID: 1772558278931856939 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/sh_mmcif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 5cf53348372a..1066e0c2831b 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1509,7 +1509,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) return ret; } -static int sh_mmcif_remove(struct platform_device *pdev) +static void sh_mmcif_remove(struct platform_device *pdev) { struct sh_mmcif_host *host = platform_get_drvdata(pdev); @@ -1533,8 +1533,6 @@ static int sh_mmcif_remove(struct platform_device *pdev) mmc_free_host(host->mmc); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1561,7 +1559,7 @@ static const struct dev_pm_ops sh_mmcif_dev_pm_ops = { static struct platform_driver sh_mmcif_driver = { .probe = sh_mmcif_probe, - .remove = sh_mmcif_remove, + .remove_new = sh_mmcif_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:08 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: 126709 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp909531vqo; Thu, 27 Jul 2023 00:10:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlHUUJcI752l4PKJGOTzuwGnBpGvbiIkRvXBo+AgGqMSGVCzg29NCDxAfcNkiun+RhXWwMz5 X-Received: by 2002:a17:907:2588:b0:982:b224:2a5d with SMTP id ad8-20020a170907258800b00982b2242a5dmr896868ejc.37.1690441856845; Thu, 27 Jul 2023 00:10:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441856; cv=pass; d=google.com; s=arc-20160816; b=wfmtygoGFR7o0QEoN//QeOHEBF+7MBHXw/bv1rvLdUVuGBIi2RwgfM4/vUDSanXS45 sVk+L+Knzc2I31E/fp4+rL2T7xhHUJDOkjwbScuI1sJHZ7vjj9CSp6DVPajRQ+/8Ct5N fzjIINfaMpxIEhfLEebyvcDWduR94I9UDd1JPmZY0iA59N7PEdG1PY7/Bi4lM4Klqy4Y 9y0utjkeAtnGxBexptbmREKLKKRtW4Ql0rBlkpXKpZhgxbYAiQPCA+u1A9dzXznRSpNU anSRTKtotyOnovvMPPcq22IJotb0FvhZ0i6/YQZLbVqHUounwoAy4TlduhUkf/S2K0mG PrSw== 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=bTCEmJzZRC/a6SHh4C2nbpGEXcRFJ6SVNGbm/AwkaN0=; fh=sy30M9eLByds7Tlvf2H8U/dRo3J3gGi9Sy6vmtIbxfI=; b=f3EPtls3IuJyZ4JBJpbZbOVjTRhXJsuTUt1H9VhXuo6erb22wdJRW+hcvBJ08C37yj ZmHxXf90AkVCNYFoFaQBY+lFjDIBNpklNoFIeFVXZFuNnTKesES4iCyCUCkMwMhoE04T bOgcLCJCm2pA/BXz5pA3XQJj+PG2dqRrb0MmNNJx1aAN+7RDiJZ+VdhYHl2IkLx5gAcy 54HP9x6+AfdWH3XHg9tNJYUlVNnNavCsNMHgixqJ22UVWogf4Tm+d+ZKi+2cElMxM4Eb gm6sIStI2kSxikWlbmwKzFsbVKZIoKuhem5fxdUhJm8f6IqARpyVmduI/1C5NyFyjQOq E+zA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ReVjkWZj; 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 m15-20020a17090607cf00b0098d373fa9d9si573324ejc.149.2023.07.27.00.10.33; Thu, 27 Jul 2023 00:10:56 -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=ReVjkWZj; 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 S233025AbjG0HEQ (ORCPT + 99 others); Thu, 27 Jul 2023 03:04:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232680AbjG0HD1 (ORCPT ); Thu, 27 Jul 2023 03:03:27 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CA0D30CD; Thu, 27 Jul 2023 00:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NU9w8CswZOLv+NIayUbWeV+ITuVFJFuptpIi9EXQG4Iz1YjRXnGAf2alf80M3HudD9WciIK7IRmDtmjbY/PykgPq8JgF+eI9ne49Z7XgwcgF4D/Nd1COtyqpe5ehEdNXkeSCK2MQg+0cUY61pa8nIHTufXCt9ZgAsVK/MKm8mfUq7F3G9tszki/sP8+DMhwA3uJGfY0ZGH2qxuh2tPX6ircJvjwhaPaLIPpxbs0vx1ANrlWHrQrB3+06ZMnM67cXCQOWnnxsyYpBQp141O7nCsEVPlzIzPh4HgLKVim+zpoZr+UZii2zUZrDlEISbCFA4FTb0QxvDKqTBNqv4jWn+g== 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=bTCEmJzZRC/a6SHh4C2nbpGEXcRFJ6SVNGbm/AwkaN0=; b=Kfu9VKKUKUJQwFbvihCHRIej4xPqQ13yTsu11eDCFC7YItQTW5hqWEMlh//rdXWPso64I5xZY7duw0uT6EaPmLhIWMI6ad6xDXIhwnr3z0U5BswnPRAd7DBgkSk2TbKxpGT9lz+toX0OxufGJQtRXZNS9uohdpJYqHm5s19wmgl9XRROeWLgvCaRiE9wYUzoZiPnYnwYJPJk/uSKDQdptIRymks96bFEc3tJqPsZXWN8ukuykZgjaqQr+4xsA5MhFIKWKGvjsH/J6X+CezJ4TY3zGNDtYc2XPW2C/J1l1Bp4puH1DLzaXXF+TzV6ALEyQ0RlABdIXq3zgD8Nel7blQ== 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=bTCEmJzZRC/a6SHh4C2nbpGEXcRFJ6SVNGbm/AwkaN0=; b=ReVjkWZjMTv4Z0U0aR8zmGIyvSVu8jHc2V3POb/fhEX5fSpvkzaeemiZjLFUoR8aQ9uewQTBAQCqGiKaPHk6xvIUffzn3C6yPL6XJ5Mf0GH8TK9zuI4q09Tzfm0ANphzzwnZn+H2ar0dIeFnVQ/XFY/Z3a/aa3LMT7GKCyW+n76MnXDFZqGCH14+KSB048KJUm90vGBX7+hgl5Xkse+S32s5i5a/Lrr109EDYXhEQEdy91h58xUcy2j+UjSowotIT1VMnRoex0mvoAVWC2ZeXokQbTeGXT/Je4wrtBSUXgGrTKI1mfXQYs3ahz8quoBMGz5rjgsp6QpId9MTdD98Cw== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:33 +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:01:33 +0000 From: Yangtao Li To: Ulf Hansson , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 19/62] mmc: meson-gx: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:08 +0800 Message-Id: <20230727070051.17778-19-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: b45d1d8d-42b2-4a97-118a-08db8e6f4fa4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 85bdBFipXxlgLKe7q09VQn91rhXt1lWOFnHfKMqVc1RSWBz3v97ar4725j66zKIdoV+bs3oV+adS4g+rBHr3BI6Vto8vEBr3Z/29HpABVqxMAsQhl4GlprYQWPtpA9qbUHgG78u5y0cPpo0Bt+IPH1x4qG0lylXMspCJ15VGk0O6xF3+AiaJpqgvVAXR2YZE0kLvZ0Jlbj5PjFtswZwQqjzddIajcbzJlchbyhdUxcnh6QrXI+gAGeY4hmQ5NFfO/9IxUdO/91IDAQ0c+PWYoQ1C0aTp/Mu/hXpnUTHK8DDW0POv45mA05DdACy0f+IV41xLFBZA/B+c81BrK/qiKLp2gIma18kJvPL9UaqwJI2ze8bUOs9q3M089gzYHgUA//eCxb/JEO11EeiDWW2wZewd0qnpJ1bKDktg77khvyhk1o1dYKqtcf/A2m6VXEZuNzCDF0pvjGMeVeiXI4Hvolf+15DcASy/dZ+H2iXmq7MsJu4e6UiCO4S5OO/gl1r1gpH6FAzBhYYwLzZ2f75MrDeMn8+2D3CUS4r/7gF4me1QA4HpH7xgWn27HoFyOruDtxtRgZyDk8Ab2IjpDJboQxDf7xLGtnECsp3XqqHItAAWJ3udhzLhAziut+u8iMFZ 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(7416002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6zjPhJwM00eDrSntT649zGVDE8+e?= =?utf-8?q?hCQO+vDc2UTU/eTm0FR/JwWlJDW8xY3bGz+IbhuF6h1cVnOKRslHD+h3nTFSwe4/Z?= =?utf-8?q?fjW8L0AdU6jLU9+bxCF91ap4Py3RZLwry/Ty5GP4BIYD6T5jcV6HmUC12LvV+ieRw?= =?utf-8?q?0yvgOPWIA2ZWHU8R/kqJQUusiHskyO4QD1Ea4OYH7YTzzkRi1qvf/2FwnH0HWDSDH?= =?utf-8?q?QMITOULroFFgLE1ATULMjBqgHaTsojh3Q4+Tbkm8Whgg288MXkaMlohd/Vk11iR00?= =?utf-8?q?4CzJIcr3YpTOU48yznXR0QqZsijJxmA2CjnoKe50q1nXptn+yhsuQAKHFV/COWfwy?= =?utf-8?q?9HyFMezOQPNmkOhFLGVo9I2D8WuqXpPQsg8845R6CBTP9jYFd0spErrsT4U0yBLcB?= =?utf-8?q?uNVGw3fZDacIEfGwJrUsddu1RRFsYm723HAVWYzA4rXDrnaXivkUQth9zNnrboeL/?= =?utf-8?q?+/SzKifK4f96EyMLkn1AchIAaqXbptQWFw44VgHm16nJXs8PRY3fK+rh4rxkMcWWp?= =?utf-8?q?4a418ZHcIOJaMHEc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h1CPVx1JeqyhhQKtHZaBIvP1KRTPEbyIILeohV?= =?utf-8?q?KmdW01wcEkROQESeNc3niyEvRcbk9xPhFFklc7WAgOnOaELQOQ/7heUzSlUy2tuJr?= =?utf-8?q?V+26IQz1rf3s?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b45d1d8d-42b2-4a97-118a-08db8e6f4fa4 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:01:33.3174 (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: PrVm4GwDhCOIG/TevFu+MkR/Y4kSRrudbHSOqReu5P3Z8wicv/3fj9vWFgt5X3aggvdUcUNxOdQ24WTZyTkV6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772556760248851685 X-GMAIL-MSGID: 1772556760248851685 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: Martin Blumenstingl --- drivers/mmc/host/meson-gx-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index d652374f37b2..a2601d0ece71 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -1294,7 +1294,7 @@ static int meson_mmc_probe(struct platform_device *pdev) return ret; } -static int meson_mmc_remove(struct platform_device *pdev) +static void meson_mmc_remove(struct platform_device *pdev) { struct meson_host *host = dev_get_drvdata(&pdev->dev); @@ -1305,8 +1305,6 @@ static int meson_mmc_remove(struct platform_device *pdev) free_irq(host->irq, host); clk_disable_unprepare(host->mmc_clk); - - return 0; } static const struct meson_mmc_data meson_gx_data = { @@ -1337,7 +1335,7 @@ MODULE_DEVICE_TABLE(of, meson_mmc_of_match); static struct platform_driver meson_mmc_driver = { .probe = meson_mmc_probe, - .remove = meson_mmc_remove, + .remove_new = meson_mmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:09 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: 126753 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp923201vqo; Thu, 27 Jul 2023 00:41:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlH8auhwFut3jiWkfHtcOJ3JXKLuK+6qUePH12GSXIE1x4TCRipRLBTS7W7TICRqnu1hFsCM X-Received: by 2002:a17:90a:b28e:b0:268:c29:52ad with SMTP id c14-20020a17090ab28e00b002680c2952admr3295321pjr.13.1690443713416; Thu, 27 Jul 2023 00:41:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443713; cv=pass; d=google.com; s=arc-20160816; b=z21JSWEXwzXc96KQoCkfJOXZ2t6wHzkTcWoDV0P7S/CndY41aiEqM14/goUvL5fUMb WUoyE5+ILXffO/eHPlyx5Y9+BNQqOpB7Vzu9YSsIRUKseuTYpXHRzpmuFJcFMQSWIHq8 L301HFb0LFuTYaRexZQ139C5C5kKPIz9Ah7vnLbabPc2kvylpaO2FOojC9PuVtvxy3kv yLDoajS6Y283IGJ2GOKIyThMQP44GqfuF2P97DcaCqg9wnkplugeWx34RvWX+/MckPvw ppJxrdki3Tb0aPNB9YpDS59AFGtTrhFDuIjO+4e0iharsMi2hIXdCvYMDUnts6Lz+0Ie RAXA== 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=+10ydIUPO5ixnkrhznKc/nkVD1LxngV1Yz/wNMbmTJc=; fh=7lXvta9MJug4t8hoELf25h+M0URbitj3nFMpMJJfBcU=; b=WUi63We1CP/xZZQDXgJt0KcCXwxqJvjtQFDQM9/GTggl0gWKATo9Qoj/RgC9XwxYgF BjgxbpOQVzdoL8vmteeYGVidm0KuDjYK7aP9op4QhQuqeMk0QgIJ3B81qOQKZ+AZkR84 EQJ71qJHU1ZqRucgeQQCiHTcrsddkMZN3EKfZxI/gJsQZE2yjFIi3Vp7wzVV9eI2/aSE FRSGUpdRzKxbfj64WZkbpJMr5oqNy3E8nhddGqguRhgnKSyQO1RrtjCY2ZW/ntDobT8v EnYy0t0mpMrX7PaFL5Fwg2y3c2jQ01l5q7rol+jzCqfQYTNcTWLxeE2/HbNYGrP7yIMX R0nw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=pYvwPbyP; 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 j14-20020a170903028e00b001b81a112f9bsi886356plr.586.2023.07.27.00.41.40; Thu, 27 Jul 2023 00:41:53 -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=pYvwPbyP; 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 S231977AbjG0HFn (ORCPT + 99 others); Thu, 27 Jul 2023 03:05:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232990AbjG0HEj (ORCPT ); Thu, 27 Jul 2023 03:04:39 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20709.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::709]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D37813A8B; Thu, 27 Jul 2023 00:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cX9PqmCjPrUIUtGkrMqDWSN3SqmyxtHC34ny0Kqo3wrXWY5azf2kh9CX6vNdTNEtGR98BYA+7x/t66pykVAWoJ5ZyyKKQ0FY8zRuFJiomUdK00ryWgzl3xETyeYqWIb+ugEMeYifYn7zXRr3EzsDoxxGRq9ir3vEGujBScjj7MsldVDQU2RzJzv9RydJNAe0D1dkXtwVP/ZquVGsbAIEPCs0L4yTUzi98Wy1C5SeYXqRxU6ZL6raTgIhk5T/LXMU9CrUWTL+o1qMzK+vTCxwEKKi2uptz5JZ/CHjHpxtgADeaNe2fTTjeMSJJkE87UTWYodvuJdik9Goiqu38htSDg== 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=+10ydIUPO5ixnkrhznKc/nkVD1LxngV1Yz/wNMbmTJc=; b=dNYuZKxvb1ToFxAb0MW9pr3+O+20ZgiT5P94dI+BJ6Vp61IVEHmLw3W9ziYonNCzqQQ1aapmU/GHHqWt0jn6C6t2jkyhAqilp2kmkBcU2BH5Lo4nnFd+mikfYzsuQbMqYNn5gW82PpiReK0WENqmFFi7b1Re6BgOLsuo7uIuptud5bHQqA+RXCEVDeFSa9Lrw+Zhwt0mz8cK1znWrP0zptZbg4/Cvp//b7xGTOuoZQ4mlxln57GattCUXSxW2zelMSPHBqqAjvG4wNh9z8akhWg2tdrf+Dd35Mt75uCd/jfVqZqX95QLxV0Cj8y0HT3Mxk8mtXlCXDQyO2Mkh2VcJg== 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=+10ydIUPO5ixnkrhznKc/nkVD1LxngV1Yz/wNMbmTJc=; b=pYvwPbyPIqNG83Ro4tvg0I/eh4R+o0YMAZR1reAYzLvUDKgeSVbxQcdUjS4OfIoq6+wGjJ5k7lDKNxmIDq9RRYH7+YUGEUXim434tZwT0cG5VUAk6a2yZruQU8XoZp6O33fulbcIHKeztDDiuZ0pf1u/73byyLrtacgkzWe4T+NB/bWkpBg5VtEfiDzEkRyozd8Sn5Vyq755hAJ45Cm7zABwedLJr2OufR3XHKYL7LOPUR0VUKSb4x5lI+sWCM9JLbRRvE/6KLjEyoEMK38PDLGQpY7NZxLm9H/ldZG+/l2uFCWMua9b4EpS5lMQ1GNSUOUkYVaU5PdZM13c3k5zVQ== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:35 +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:01:34 +0000 From: Yangtao Li To: Hu Ziji , 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 v3 20/62] mmc: xenon: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:09 +0800 Message-Id: <20230727070051.17778-20-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ff12549-9538-403d-fa4c-08db8e6f509b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jjlesebFxVEvgi80YwEgVinyAMYDLi5I2Se+i6K0SD8lruWBgfSRkV6PjKyrgOZCrciMseaOuX6qkbN9bIfQ9/ivFgHlu+0Dd09vG1ogiEWVC7C3cI7tjMgSuewfJ0E0txFd85ZXIy71Tlzp6TfqoblSG/WRJPbientjufiHqDVCnka2SKD0VivhY2AOYZmR77ZfcPCHrGXsmRh7IffzdHYiJ68qqoZcm/nZk0E8/BNReqUI89EkWlLFnroFPj5ItMMuKKfAXkHZs0EQDpLdv9GlVBR1z76Fu2smI5MaOM9uiQrrGf91uC5nRJFovw6d/JFFWCB6z30g4UyFPOE13lG5IujSt2qxM9qzT68ToHYr+BbEt+xYlCfitl6ozcmjE+sP8oVttwpLJuIKt+EkU7bjUCU0f5j0uXzV/hUoJv/M/7nH6as3kynU7C+ldh60bcRqtcA9BzhA1C5ckngOdPzfDEGbeW0VfGn+cpPsRyeKLC1vvcBtCL9WMk5y44MO/jiH5mTSkiJM/OVyfltGJ5Z+jEiI/oTnIx7nPwQoLrx3NE5RK5/qaFOelGjCRtpeQ7YwXtClOyCCARZicqfaW7CKMho1Wz5mUhLjglxzQqRBbx5oIHzXGE29EIpGpL6B 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4+kCeYPBfEMV5jXXiBRezbgelZEl?= =?utf-8?q?APsUZ5cc5d9892NR4XV9taIaokRah6AGR3uq4Yw6ArMZN8/mm3ARsjYM57YXAYxTb?= =?utf-8?q?+RhX7wvnyM3ymAdHPkqozV2hbGEg9fcAlSQ+6KHNT6H+YY6mXfycRazGwMbAWabHG?= =?utf-8?q?BbD3QxG4mpdVo3DsNYhdB/wICzVzvvqyeZmBhgExBMgbJ2OmOlc7UYFr/da9UJcKX?= =?utf-8?q?sa06+pmnPPKZfTAtmT+nwtg6Ih5GMWXuesM5kn00H6Qze1T6o8X2Q87bugRXH+05X?= =?utf-8?q?QLF30BIPOp6Ho6EwF8BNwUfBTWTlJBEjOJRjW5d1Fdnwbyj4bHhg4XrPydlFXJMzv?= =?utf-8?q?18rhVg5fhdYNdcrJASx64wUWR1VKbylKzg0z+uFyU3IhmKU6P9DdM7MbeNJFbprjA?= =?utf-8?q?Rjyiw0W1MRAClUZq2p6lMLVVlRIbuIJYfjf6T1adOoeAZNapqnU7kItIB9sG+/Fbi?= =?utf-8?q?w2HraBvDxmpiuDsu85Nci+u1bw+xikwZBPpo4gn4nBaRx6l75UB2Rs2uc4r+BTY7e?= =?utf-8?q?x9bfWyIBtAzv2lnEG92ksVcnlhCN4WqChY1c5NkndRx1usiRvSLyfBluFkZh8qjUN?= =?utf-8?q?K7fC3HHTa4Omwmy/xZw5JNgPdccXRNUhsV/HuKp4mhZ3jQsG4RFQeGgkC9+98Zzse?= =?utf-8?q?ToXun28TB38StK4W/K/BY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: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ff12549-9538-403d-fa4c-08db8e6f509b 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:01:34.9366 (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: cev87AmiUCDQJyJCAHNsDhilt4/m9ShoONRAslXOlRGQ2zFQ4PH7kAbN4+k8hbHltXlo43mkuaeSPpJz7weH1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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 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: 1772558707047434116 X-GMAIL-MSGID: 1772558707047434116 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: Adrian Hunter --- drivers/mmc/host/sdhci-xenon.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c index 08e838400b52..25ba7aecc3be 100644 --- a/drivers/mmc/host/sdhci-xenon.c +++ b/drivers/mmc/host/sdhci-xenon.c @@ -578,7 +578,7 @@ static int xenon_probe(struct platform_device *pdev) return err; } -static int xenon_remove(struct platform_device *pdev) +static void xenon_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -595,8 +595,6 @@ static int xenon_remove(struct platform_device *pdev) clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -705,7 +703,7 @@ static struct platform_driver sdhci_xenon_driver = { .pm = &sdhci_xenon_dev_pm_ops, }, .probe = xenon_probe, - .remove = xenon_remove, + .remove_new = xenon_remove, }; module_platform_driver(sdhci_xenon_driver); From patchwork Thu Jul 27 07:00:10 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: 126791 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp940697vqo; Thu, 27 Jul 2023 01:21:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlFPhmUJQ9HFBk5pIZRNNcWhpT9NGTE4LxqTcKG34U7Xm63cyHlwjC8S4TEJE88UivCIXwcX X-Received: by 2002:a17:902:d2cd:b0:1b8:b564:b531 with SMTP id n13-20020a170902d2cd00b001b8b564b531mr4280725plc.60.1690446061721; Thu, 27 Jul 2023 01:21:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690446061; cv=pass; d=google.com; s=arc-20160816; b=Tk5X9vWfZI6XPUt6xVOwB0c7xLrly1iwQJzagWwxo1p+lEb5Gfvf81xp8L+xvIAVKX xOhNdQn8xPF1sx3gzW3qrH3QPaxw6ERnLUFzpCkQgC0hQ9Vk+auS4OCRd/mrlMo4lcYb wJ7o97NjOt+lo1qxenR/VIM9yW6dUPWz6qFQC2//XeflOFJyQdGdrjIwBaN/XDQr9ywF MXlRzGkrjBB+OOm15ZlQ42a/saUyMHnct3qlJrIArblgeIM9aHtHeQjcSADy0blmJA3u oYaDVYw0JAouBCZLT0IlFq2zpm3prIeXMxHpa12gsJX/GMvjE+2p0ramlrhy6Eyrl4CY /ofw== 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=NwbBGaxbfpdU7ahifnwy37RYBYAlU62pqhLf97cjF/M=; fh=asOA/2SFqtoNY+Q8P0womv0lDtiAw4HOrb9T11e0REQ=; b=MIS6x3k5oZvUAWYwacaHtlM6nBUS5x8DD9KGFEoZdU+uwBfxB9XhbtJA8e8Cy/88Sq Z4lsNcCmUQwRgLZZ2IjZPqPwwUWjRA5G7LIDLmWj+8XL424px8tVMVCqKvgsZV+wPoj5 pAlWHYxNGEeSGBprnGna5twon3ZL1jrIwyih25M6hEL8TvkWfd8fi6Fk+/jJrnBz+VUD X+5i622nUnpAcoqfoJGYyRECuhd2ODt5lT8goWCKbtT/vNJTj41v1AdET665buGhE0jv cAWgOQ9EXDUlY9YxDc4r3UhLeKwpFeEqqGtVlP2cGI8fB+ACIiVtxdmtejFuVZhC1qNh fRUg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="YnWL/TYB"; 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 d9-20020a170902f14900b001b554fbd66bsi886934plb.472.2023.07.27.01.20.48; Thu, 27 Jul 2023 01:21:01 -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="YnWL/TYB"; 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 S233046AbjG0HEa (ORCPT + 99 others); Thu, 27 Jul 2023 03:04:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232956AbjG0HDv (ORCPT ); Thu, 27 Jul 2023 03:03:51 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E18E30DF; Thu, 27 Jul 2023 00:02:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=El5GI/FID4kj13Lqs37Mvf8hdiXhowWrjHmbvK3ibwFnGHBsSETzZ3mRKqaYWknZwTnLRFkvMpCEko2ssU4+0qoyRIrh9f1FsjoBLfzyAjoxHjPTUMU2/j7Wp9geSCwZDcHfy4EHyvbnmKPDMZSXWIN8p/xpQR3BjnIBWESpY+kwr42csJNRkRtR8DB/XcdB9xV6M75XQkWWov1NXuRDPYUuuThOYvx0g4BSnslPGiiWBrwHuHZWKy/CClSlYdBB8sPbctZYDVgHTJhNlThIfH6PsVSs8MeLJNS6U4lBvx40uGZTIGxivkvgXxC0+GpyA69YjwATCiE0lF1Wu06Rvg== 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=NwbBGaxbfpdU7ahifnwy37RYBYAlU62pqhLf97cjF/M=; b=lzcELnG9he/7mNylmxp2wmDugoIjVtsrBZxVB7oERMnY0HBFI5zpPmZW7h4SkVhhicCBJDoVJb4X4rl38nD4kXForciv0MaShS6qf3wDRJQkIdxdINiNScHUHfRc1dCLiPbcMFbE2MvNgxBfRQYTBZvEv0i0Kewe3bXxbWue+SQ8vuwblr66SHHGLPcL/0T7quG8ufqAn6mExh5H4+7o9bAPG38unzY+uB4EP9AOxGS6iixJluPMXkMlKn2N8ouJOHjnWAI5jberrWy6gTMMeyyogO0u1nFuidiiXfXTGJD0eiEHD9eggEjJOpxVYc67AKn+xu8BEkYiVQTidOyucA== 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=NwbBGaxbfpdU7ahifnwy37RYBYAlU62pqhLf97cjF/M=; b=YnWL/TYB2On/rht9+tfrIsLdY/HiRqlOz8MbhgsWu5HQh89MfDLu+Gan8OYTstTOF8G2Ja4AZCO+jCqkn+HYqrTLb2seTsB2gKmTiBqH2mJYJKw4IUeBt5lqDPGK/FUPl9yyWVLE19lPEK1mr3ew/gA4imEXoyKDGWv3fNekHLemzrqi+fxCpubdHsdoIC2Z7hl2rldpxoIk4ZetCHg/b67h81eUcGJIEtnRRCClqqPyMC05HUp18yKR1JEbBJOXtwWx1nwZw0gE9vnXDx7JBmf53TPISsGvxUfa+iVWlVY5GrhHacHeWIQ8jLD0WGpnesMrpcX8ZjlWnRhBI56O2Q== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:36 +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:01:36 +0000 From: Yangtao Li To: Adrian Hunter , Ben Dooks , Jaehoon Chung , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Andi Shyti , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 21/62] mmc: sdhci-s3c: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:10 +0800 Message-Id: <20230727070051.17778-21-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a5957d9-1f5e-429f-7df9-08db8e6f51b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ya2dLncvJs0eWmm2AK7SbhpT93Vk23AZuvnI+BwuSloLOqxsGZpEbWiPYYcJDCRujU6gWCZvVsBq5A25sCP1ua+OWcvfUlLlOpLnmqUbDgMK/ZlXD7tJtpK2+VAHv9ENYLhRZ5ALdFpTwbl0uhCQK5HcIhVurMymrgPvFejyZdWtHMYbm7OfLfnwJeuH+OfU0hfghEcNAz9aEI7zPzoOxNtWIcQX9CTyl4BvT2s/TzzuxM2UiFwr250bxhB4jE668356m3HYKqvNgVb7+aOdxcTBoJIdVkt4uoc8D33WfkYm+TP+Jv/vnqBZLycXlbwSr4ibdZ9mtbdsuWCHJdiibhCu1hdOzTMtbLnzZDXltysvDQMjrF7NDiqwednK0F28560bU6d0E0tN6Ck16IRDCqfNwGa8jmNhNT7lnGBNHrL+ts/br7WQk+69YbdQXwq5stGbqRD/XFyYz/Si0NpI/4+cU0o0GWcx1bPbPahIGECKP0s/+Xz1OsDpv9R3fW6GePYlKSKg0bXXbWsrpwBMqknHTbEPuhKwU69Qi7RhFYikb5dfM6117WjlT8F0YjKcwccb781ErlGzg8FbkSXZeHAfQQRrTihRgqZeMKJ+9AlPG5KZuHObRg7GUlZl4/W4 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X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N1yiZC5mUQOtYdrvcjxK4d7QAMC369ctQHl+kYEylxBHeaKpvydEZom1dhCJYsH?= =?utf-8?q?QonFpOWN0+RgmhlldYTSa4BXmc4hWjBdtAy7wpLxT74sho2ynOKWN6diW9Tq7I62k?= =?utf-8?q?ZwrG+2uPBHp4ihoqdWfusKLFlprX2EyOrHqp+nA+k7kl+St07EFh0O7rnnOcRFGyh?= =?utf-8?q?JK95I5Dr/zw4xMDQKynBRNia8tEw8CJ77pG1BGnvwanRBIMRjGMRhIoeEPdVBCHGO?= =?utf-8?q?G6lXWBTkeYhxv3//nfmwiJpGDcznARPPvxa5EY+UEiNJ0twpFKNxDFG1B8ulHFqVy?= =?utf-8?q?Y2JPbqXMW5YMT0XRauzUkkzPzHGlkU7wfLjzgiwEefv/0w4gY45cdiSMvWdT0knTq?= =?utf-8?q?tTmJjDWPeb5oLgVN9Rb/ePcLxb8/8hVuJ8KPSyweoPhaNRDIBtL5PK/bRYTiGurew?= =?utf-8?q?3iixqSAp4a2z80wH/JiB6BEEniRL3rI1jvaHDsxs69sEBHhHyMSSeX5UduZynV2d0?= =?utf-8?q?maq6UUyaZvC8RahoozBay9ejNAxdguc4Zn9chLQIUz4LYCH0BJV1doFK0dDqY/Q4o?= =?utf-8?q?U+UvmRymm3IgYny/7UAmJVi4B7Of8lY4Tyzuz/2ZDMcObtro/mjASK5r8WmI2erEF?= =?utf-8?q?OrGZ8NL8K7PSY4GnvBodN3XTGYdJPW5ckkj0hgTfcZUmleD/W6LQ5fsh65ALHfhIT?= =?utf-8?q?lv/RWnerWmIW?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a5957d9-1f5e-429f-7df9-08db8e6f51b0 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:01:36.7446 (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: tteKqgKH7X7tIiNEa4vTYfbcyU83SIu+5k4JYYh4/KlWYxkB2z/kIwcCphXd57a7PZK5N0rMai/sLmMUBgvjBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772561169762208263 X-GMAIL-MSGID: 1772561169762208263 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: Adrian Hunter Reviewed-by: Andi Shyti --- drivers/mmc/host/sdhci-s3c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 504015e84308..b61f12d328e0 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -668,7 +668,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev) return ret; } -static int sdhci_s3c_remove(struct platform_device *pdev) +static void sdhci_s3c_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_s3c *sc = sdhci_priv(host); @@ -688,8 +688,6 @@ static int sdhci_s3c_remove(struct platform_device *pdev) clk_disable_unprepare(sc->clk_io); sdhci_free_host(host); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -776,7 +774,7 @@ MODULE_DEVICE_TABLE(of, sdhci_s3c_dt_match); static struct platform_driver sdhci_s3c_driver = { .probe = sdhci_s3c_probe, - .remove = sdhci_s3c_remove, + .remove_new = sdhci_s3c_remove, .id_table = sdhci_s3c_driver_ids, .driver = { .name = "s3c-sdhci", From patchwork Thu Jul 27 07:00:11 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: 126711 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp909965vqo; Thu, 27 Jul 2023 00:11:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlF7k0iSdZWKomssGcVLzyKbKWPsxGXUFf/QWl9ajaoXUowQIyg2RFoYm7DdZ3ifFVYWDHBj X-Received: by 2002:ac2:4c9b:0:b0:4f8:5e8b:5ec8 with SMTP id d27-20020ac24c9b000000b004f85e8b5ec8mr1052879lfl.9.1690441904794; Thu, 27 Jul 2023 00:11:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441904; cv=pass; d=google.com; s=arc-20160816; b=IigA2IBEZxhN2jAUXRz3GtWctlMudTVFFLvC0aIWaHskgRTcAZ2Hfu8wsfP2PrKLBK KMDfpf06nHtquqfynpRiamDNtC78pGhG+BFOv2RNanATMITIP1mlzx0baorFaRpGR1AN EbRHRA/HqffO4IBO4r0vvyqYeZJn17cOZKFm4Kzwr9oJxl743HWY19z14xUQqfqecAth JCvu3TYz1WH+7LZR6QUOgPgkSM7yOBYJnmmQ0io8y9RdlX1tRCnqmWbRwass6ATI9uLX 3PH3AL7jERryBqzF7MANYmBFXNlRU2XFV1n9nS5lIV+xOTtSWktUMYdvJ/IuNsFI7mKb T/dQ== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; fh=sy30M9eLByds7Tlvf2H8U/dRo3J3gGi9Sy6vmtIbxfI=; b=TjZQeIQnCc/ZW4IwEbdFXRTepezO07mlg6H9Fh6cLFOEqgVfcUXU+lBvLFl0GHQvD9 JB7NlYAYcFskHoNC8FYUHytAW9ycbJz/Ek7VCkzTSWryst00OnjIVKLYCvvw9/f2/rl/ DDzyG7nDUZDUEty033x8OoMiOJUTesuKinVbKUXiaTdu6d/hHDppmgaYnnI+dgcsmQlb BpjtB3ijyc6ZYpcdq0k8+wyUyE6pIPWevgncCzAy9YkS+Vdm53dh1Bd7dodrZCqkzajQ E2zKFvSeTorbScB6A6lX6O7emzn7F2f1Lcox1L1Tw/dCbxM7BtFSHwBV+J0b0JSEzOMA iCiw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aHKYzMMn; 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 rs26-20020a170907037a00b0098f34870d82si624014ejb.159.2023.07.27.00.11.21; Thu, 27 Jul 2023 00:11:44 -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=aHKYzMMn; 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 S231154AbjG0HFC (ORCPT + 99 others); Thu, 27 Jul 2023 03:05:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232771AbjG0HEP (ORCPT ); Thu, 27 Jul 2023 03:04:15 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2094.outbound.protection.outlook.com [40.107.215.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F6D53C33; Thu, 27 Jul 2023 00:02:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I0xuvlytLoXBy5w2zojFl4u50zLrLhFOBmwkqi2aOnUrYZwcbqIC+GtDENNB8HwHboYppRPddA5tDh6pWSx+Yrd1pNRqwwty1sWay462R2N3GCf/Sl5B2+lxBjfUa0aA3+M0oUibA29lTBdS6+Q4WyVbovArQ529VsjlA/BdpyjcYaTDoOWPv9BwPIIqEr55S90yIidrvxu0J/kEFK2BP6InApgZNSbu3FLU+A+a+OsjO1o/TrajQkwKXQI1zUihwUCEarMlKuBPJzBxPFo4On8SXSq3Plr5Xs0GOH/M76qIJhTgD+++3Qxqs7W5x1IVXgGVxAkzTHXvJK6BMIKNRQ== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; b=Ys3tBQsN/0r2lteBBV+pCXnp1rVS8kTFqESmFe92GvfRswoBY+3C4PmVVrS88Q3jERPA65915z/FGHlIOKCRTW/iR5bP0zEmEU00uJwjSFmGDXR0ZwRxZXNA0Ie1iiGgNq5hPRzFE8dpMoQ8jdbYe/owno/hJD2k4GVFf+LvCtDYtm7tsHyl/DTs+4b5Rr3o6h0Mz4Dek1Oa6id9aPncXpAzLyESHLiL85UV09DY9pGis0LAMix5QE+MVL0gZsm8dGj9xKhdXaefHaBTqMSKA+qfE9G6hLrKdsOgfZwqzxgqoPHgv34URQGy28LDG/JXfxwW9ATfuTlPypdVGmKfqg== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; b=aHKYzMMn8vsWRrcA02yqGmTqYYlFgUkGJtzFHCpu6wY8yfpFvjikrAO3dpK1a1HU0Ey+q9dDdIgcaZYcoSjrIMglx5UV4LUXIoPYCUjcZoVyQ2NR3UBRuK6F35hrqHTCNbAReXlHGjjm5olkFnjz1ZQi0rFTeGCWxlxnUBdtP4Sq9EomfI2T80uH8EmUMtAoAncGOHKVPErRJIy07cYaVINFIAhZiz2EF4K/SdbJC5ElblY05xksmS+eZB9ko53yazkQ3aBza2DTHU0qCfeoukcx82bCbVX+ZFfIHWfcfHTXc1moPtTC4k1AU2uNkZclZbx5WK+9o64dhgYPYHAERw== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:38 +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:01:38 +0000 From: Yangtao Li To: Ulf Hansson , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 22/62] mmc: meson-mx-sdhc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:11 +0800 Message-Id: <20230727070051.17778-22-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 975d2e4c-819f-427b-3a0a-08db8e6f52df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GVdGWq4akomqHsZBIIzsj3nEx+3qHjv0PJx2WHR3lUhDRAOhLcU6LTheaqNRLtUdEDq/+sPprimsyolBGXTX41pJblT3mk7dqLXm86f6FVqF3QY6MdVEnE59H2j85GKwOlzOEtL/s+QM130JHOoPu1ij6dy7NfWuMhkC3Jy2Ueeu5kGBTyVeMs1Jdn3Uf1LSGwny2r+hVR31azyFyYG8Krp+eOMHOn5HT00jRrUjZymmEJkem+xn9iOxsBhK+eSwjMLEUE2GePZVpVrtA2E1z15PyXXSu3R12qfZTdsCbEXiuLZAY31U0bbfZ9ZvitxBKPx3tfxJ5kgCoV2sT8oPffXgnvhK020nTQWN9Y3NTAU5OvmO+TvDVnBYW93BKBci9GEzPznytue6IzKrBH/jblNUy2QEM9hxdLEaJjvh9WHlcrKp8PNf/8GkYwiNpjFIcvYmpueGZjvDxTxcL2Y7ZYTBufMUl4dC1evOiLTe44o9eoGFARYVwc7dEuy2qm8DkIz3rHVmtvkxQXgQCbLqm2r1AqYlGyxixPzYDiHIb01Nl20Kr+QFkMkOJs9tVHE5e1usWOGaumnZefmDGYK0EokTvgu4m4D3ppo8fOxKR3use5w0535cDPTGpeaETHhf 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(7416002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?OW2a1tTeZ+X5N+esXy/T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4bZ2DyRNJMegvZ?= =?utf-8?q?xxs6p3Wjuh6ycOaEmfr1pQVn+kF7TaJsoFa9+OTA3FP6Rc3jwy4rD6tFxFOoB7vA0?= =?utf-8?q?fZ9vOtvBuiJqw8r8+YrN1mvPT51fjv7Z3YPOZcyErQ3zUQT8OmXpgRQYD+ucCz67r?= =?utf-8?q?VSBozU1KP9NQ32HqoWvsNoF6V+Im4hwanqwSUXVuuoLJoO9rnVKPnXT2oHbiDSa3Z?= =?utf-8?q?IyqnwOC6quq9NzzF+LcbZ8gCV1p3zBsCJTiqKFtDvio7aJNjvHFemZb46UFa8u9KM?= =?utf-8?q?kUtiw69edtnRuSIp4mq479hXq+6eGmweK5SfQTYhPEsqe7xVWaik8dUfLWbsGxsy3?= =?utf-8?q?BP0C9tH51ukCuiLmrOoDlJEAaFB7vZDXRWokY3yfRoksJL2VevoMcM0Ws5UQLddhS?= =?utf-8?q?t+FknJM1tHb/Lv4jwno57giWI6erdab3WcvvEC3phfDaFvkaY5wBc+9pYjKbIdG8q?= =?utf-8?q?V/gT/dkMCw2ZPhjofs3OELeloPfWCfm16hQsrfDykTruZzdURjVdcX6NHd0DU+1Lv?= =?utf-8?q?hC8vAarZLHA2PNcqJfXl4l9baMTNuJk8qnebMvGEQEZPrUxGB8+ZNmYYeQYRKhNIG?= =?utf-8?q?bYISMhDfmfOV/omsDQvxWRlnHu5j/aPle3gW27FQnXOE9QT/Kf9BvGsnaoWYm+ZJG?= =?utf-8?q?86r7rChCvbTn?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 975d2e4c-819f-427b-3a0a-08db8e6f52df 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:01:38.7482 (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: hwcuav/qDZvd6vKhbYhM1B09d1fLpRGw/FzzGuprUDTkoVcFzgak/WOohEIky1iJeQxcMEedZIuRNIEGpB5euQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772556810907617567 X-GMAIL-MSGID: 1772556810907617567 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 Reviewed-by: Martin Blumenstingl --- drivers/mmc/host/meson-mx-sdhc-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-mx-sdhc-mmc.c b/drivers/mmc/host/meson-mx-sdhc-mmc.c index 97168cdfa8e9..528ec8166e7c 100644 --- a/drivers/mmc/host/meson-mx-sdhc-mmc.c +++ b/drivers/mmc/host/meson-mx-sdhc-mmc.c @@ -880,7 +880,7 @@ static int meson_mx_sdhc_probe(struct platform_device *pdev) return ret; } -static int meson_mx_sdhc_remove(struct platform_device *pdev) +static void meson_mx_sdhc_remove(struct platform_device *pdev) { struct meson_mx_sdhc_host *host = platform_get_drvdata(pdev); @@ -889,8 +889,6 @@ static int meson_mx_sdhc_remove(struct platform_device *pdev) meson_mx_sdhc_disable_clks(host->mmc); clk_disable_unprepare(host->pclk); - - return 0; } static const struct meson_mx_sdhc_data meson_mx_sdhc_data_meson8 = { @@ -925,7 +923,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_sdhc_of_match); static struct platform_driver meson_mx_sdhc_driver = { .probe = meson_mx_sdhc_probe, - .remove = meson_mx_sdhc_remove, + .remove_new = meson_mx_sdhc_remove, .driver = { .name = "meson-mx-sdhc", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:12 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: 126756 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp924392vqo; Thu, 27 Jul 2023 00:44:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlHZlCERo47PZWmq9BCf8up3a7ZLlycwTpWRK97ytgvWEVStiAj19W/C/27VwVHWpIVCRGGC X-Received: by 2002:a17:906:74d8:b0:993:ffcb:ad4e with SMTP id z24-20020a17090674d800b00993ffcbad4emr1165441ejl.13.1690443876872; Thu, 27 Jul 2023 00:44:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443876; cv=pass; d=google.com; s=arc-20160816; b=paRWAlE6Ne89gIjvc0sUS5G5xpc23CBHyBaEM7xRo+7YpPKoeanXF5Js1iH1UJ1jLA RgmVhlqqQQ/nebx03C5cWzVEu2bwE8r6RN2DiirgdxbERhH6YUDjycDRco3FKPOY+8kz oCPLOHxofdOk6KpONhG94L0MNuDSb1ntV64iB0V94M/YtpGqetL3becyZfgHjMNbvYA8 hdGJxkPY50AunF8jYftQIq10cy7jJnVhwSN0p4z8/l6FznfaocNUhwnVd8mwXeJ/a1aw BSAfpWcM8jTfDbURNT/HvoTCN/5ik62PH0ghoUpd9s7KLVTFYONwnpJ7EXuBNsOgaXkn 7hwA== 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=9QwyjiAPoUwvuuL+fTQzivWNofmwHauOj0YWTiKbAgA=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=EBVf9CxlUUB7r0TBx7PULXSk3WxjKoL/xbyPosTsW30DbGfFYnr67sfj4E743MRupv 6kp/eLv+vKTY171p05o3QJIQcr3GzfPldPJwR06HRc6L5PB1KX/4Aqd/SFVuZy52YQJv UN02ioEvdq7ibELTCrQmMahaUxTNNdBQPw/rXtVCLD5wCVVppincpY5naeuslc43iAMM n309lZcEqZQAl0fxVl/tnrdILWKzgenIrIpfIMDWvLXJLlwbxCh44hYjoV8VtDPRsqkD Otimvly0cfMIPaEmZsrGxULo0k519ore01XFHhOv8OfjY8ARp/jwp/PcEt/wFLOSQKzV nFsw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=D+VHVwbc; 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 f5-20020a1709064dc500b00993150e5327si686548ejw.341.2023.07.27.00.44.13; Thu, 27 Jul 2023 00:44:36 -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=D+VHVwbc; 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 S231912AbjG0HFN (ORCPT + 99 others); Thu, 27 Jul 2023 03:05:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232943AbjG0HE0 (ORCPT ); Thu, 27 Jul 2023 03:04:26 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A8074227; Thu, 27 Jul 2023 00:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Er2pkWvyyNl5O0Vg/oCrK4vszjaUj0YoSOPO/FAqlYu0PkWk2N6tbSBBQti3XYuWE0N6q3iWLkimCjGtkfmCWmXjHvouvDunR4thctfmEqUHYmqht/OP2qL7FT/bJtRKZyr6WBWwE+5rDxv4Lbm2BFz5SOEWN8luHEctGsHLzPtcGXaKVYF+9PEHHaw0NvQZFDHIuNn9fNRYOuopmUHqkcDpO1QDNjj+z+sPconNzBSpk3LGlRrcSnhvCXPG8epj4Gi5AekIeuiEmTGfi67qM3AwBplnac5PUCuASnCTFZ039Z61tYQ1Uu3S2A/FAF/qOlvIAVqi5ySb68SuSSLwtQ== 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=9QwyjiAPoUwvuuL+fTQzivWNofmwHauOj0YWTiKbAgA=; b=XR1KpeLS4YZdohXuq51yjE+SBihI1T/u+a3vigBgNPrNqIyzx5lX3QxhvC/Za6QUpK1CcKqGum7STXXYOXhgr0xE+a9rGm7gD+P0iaRbnOrySzmlab45rF+kxN4EuveWH84Hf35lMKPj5Ub3SeAlWVe5cW2CxES02hyNk508Ay632O40ycjrHZAP/smP/ux70PHM2UIfUk7Wig5UD/Ff95NnuRzI0+T4VkBqHJpRVcN+2wSpVj5JwgDjwDO11k9D69UC3xmHjRvmVZWULhEYh1ZI4Ie7ZJbsJMhQONHjrCvrhS0qkpQ2r0QmofyKfe9sT3L36LgBv5AdLMsIjYAgvA== 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=9QwyjiAPoUwvuuL+fTQzivWNofmwHauOj0YWTiKbAgA=; b=D+VHVwbcUVqOTEDns0WD0y3Ctc/8j/Q0qp6dN86OXlAIEV4/Hk7Y4jUE+FjbV6UF8vOnwO3k97dzy8OTgGyoQyNH2xyXtYfB94ECgNjiN0rFShdfCCO528YPwstZGgP9gAmz8HkEMBeXbKOYj560Jo3q2iDBY/4Ek6spQrFWQZkewMsB4cXDbi3Z+W2DZhYTSG+ygPvsziAuzIhP9zk03xd9cOqClqqC3FJmEtCDbVxEJAIBOM3s0fYHIfoEQ9UbePsHzGJPt2JWPYTXjC+H1zOdPxixQ9ZF9N3WfETCAEkPFRSgLbMH7eDqCISSgS+QKVCn8ovye2z2vyzb6TDwJg== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:40 +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:01:40 +0000 From: Yangtao Li To: 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 v3 23/62] mmc: rtsx_usb_sdmmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:12 +0800 Message-Id: <20230727070051.17778-23-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 45f18f68-91d1-475b-9ccf-08db8e6f53ae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e1QtqH342EY1voCqd5z8NAuF1zRdX+T2AsgDtx2YG1gmgwo+zvNlGsPIDza1CEU7vo00DfBNKGaZ1SxhID8Enu9dZl9EXMrR7+XLYeIoPLSAcjUPLVOXba5IZECNxbBGWkNhRwh4R1jNBQvNZzp/3mnlS4Oea+CdCHAEAbAuwQjG4eojuMKNITlGVZotfCty61AT1jSmy3qM+W7KiPXnDNXMIkzSRoki/2rMhiv7u/TofGGOaT0Cp8f0L72DBpIERsgIjNtjqott4SXBjG+GRJwiUnD2AXVYtFA5EgMm55K8selj2aVfeiLJkCPhLAfQNRazycEmf77iiaE7YUUeJ/5RtiJyDYCoqnPM9k2soIlZbub3H/urxq38mjgyt7u3l5ISap+QOkzCRZZW91lU8FA9Rr6H47IGub7iCU4asVFILp9lRq/eo5FooVFhoPqbQdNUI8RsJZz/IbZYh466f7+BGh2Z7/9B2rOk3USsX1m6t8xZhafLlrIauqIjzAjlgxwcN1+Nrkur85s1W313CMIIrEmpNAykuZpLxlsR8j6dyRi2uCqooGum+BSLr6kzScNPpP7eGgvjlb1IMoj+CEFw9E1HMnXhCbGnAzC1sWWjkygaJaqHvdUq6ZrxBnuJ 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(6916009)(4326008)(316002)(54906003)(66476007)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6y4e4Jys/rdoTHmXBNEDJ7FjNm5f?= =?utf-8?q?4YiNdXI01h+Cc6nPwuGZgVZ9lhDVzHjHRbgcIa9SsRytwMZHvpX+ZQ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v73aVTCD?= =?utf-8?q?HZcIln72+zs/czrt/Iu/JhpdfYRPxnhIPv+iQ4u6mvWsWEfh/vNYP14EpP7dTCWdR?= =?utf-8?q?hW2cNRHBA0MpJW2sR/sWCYBvy+FD2/BBNj3eKWOKzyGRGimDK0ERabLLgHBi32db/?= =?utf-8?q?r2YixTpIyZ7vdyCuYurzYjBBlE1g9zBCKWurf2BnqX5A3cQQX+L52yB4ZM10Hf1kv?= =?utf-8?q?+5Z1M+dbBsdkp3x7DH+sBeAwnQPv2oFPMG3/tTkwE2EYkpH+/6+mnqA2bkhLqvSno?= =?utf-8?q?bTdus7hqqUGIKqYKhTe1dDu5Gdh8S1oU85cXTmjOcLS8PmVCIoOjJQqgVgR09IzbW?= =?utf-8?q?hrZR+6c84mT0P4RpVLT65eWCxkVGHVDHzJZxse+6tIZyk7u1WrAHCCXINKVH73cFR?= =?utf-8?q?mHXWtzXQvc5oRAIx2hwQ5yI+bRJVopVDcaoBlU15VFmnrW6fFPTUik60OJeStVNWA?= =?utf-8?q?mha5LFbdo6B2X6oQuqezClQrv6Ts0yOGSGucyNdgUbbjlarI9zLqXxlrrA3zM3w9t?= =?utf-8?q?m1LwKOhd+5/urPNYOvd14rlA5DY0sHzv2AUbKf8LY/AHyQ88H3hiDALeqN9EhNR3L?= =?utf-8?q?5knzj4k3SfJw?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45f18f68-91d1-475b-9ccf-08db8e6f53ae 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:01:40.0808 (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: 4BQgd8QTNMo8wxlXvKMbIXRsty+jiW1CR2Xq0erRSJIoYWY6MW8BJPjUKrwMEnOgnxfyD3oIF1HCamifcyB1/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772558878211454226 X-GMAIL-MSGID: 1772558878211454226 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/rtsx_usb_sdmmc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c index 2c650cd58693..ded9b6849e35 100644 --- a/drivers/mmc/host/rtsx_usb_sdmmc.c +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c @@ -1379,13 +1379,13 @@ static int rtsx_usb_sdmmc_drv_probe(struct platform_device *pdev) return 0; } -static int rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) +static void rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) { struct rtsx_usb_sdmmc *host = platform_get_drvdata(pdev); struct mmc_host *mmc; if (!host) - return 0; + return; mmc = host->mmc; host->host_removal = true; @@ -1415,8 +1415,6 @@ static int rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) dev_dbg(&(pdev->dev), ": Realtek USB SD/MMC module has been removed\n"); - - return 0; } #ifdef CONFIG_PM @@ -1455,7 +1453,7 @@ MODULE_DEVICE_TABLE(platform, rtsx_usb_sdmmc_ids); static struct platform_driver rtsx_usb_sdmmc_driver = { .probe = rtsx_usb_sdmmc_drv_probe, - .remove = rtsx_usb_sdmmc_drv_remove, + .remove_new = rtsx_usb_sdmmc_drv_remove, .id_table = rtsx_usb_sdmmc_ids, .driver = { .name = "rtsx_usb_sdmmc", From patchwork Thu Jul 27 07:00:13 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: 126710 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp909694vqo; Thu, 27 Jul 2023 00:11:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlEA7fAjnJwOXruEo20kLFVDw7aRtz9Oed7F2b1/J+Xw3BK0ovM7Zeiuj4eeuE5oXG/kxcNg X-Received: by 2002:a17:906:77d8:b0:994:1fee:3065 with SMTP id m24-20020a17090677d800b009941fee3065mr1290547ejn.15.1690441874712; Thu, 27 Jul 2023 00:11:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441874; cv=pass; d=google.com; s=arc-20160816; b=fk4bPFalAVUU/+hGGXjIJzLXAOpv5cROm0p3cflJHClfSR+NKt7ZpxewuPR0Gw4ERh qVj9HwVnq/Zl4umDtDa0HX8dSV5WBf8S55BgnAJoy2EisdIehZ4B///wJlvYNFahgmiE aUGUN7aBD9N5+I4A1MdIUFaliUd/7efBTWNHlbbiP8aWer3MA45e1JIAg+Em+Fp9VAgk hvxXd878LA1096ueDR2goUCN1CFa0kKdZ3n1m1ZOR39dED2AefqsOHwsNun8bOEnn/ZU w9xA2LzJc+rzEn2JpjBQmr+aH/LuV9wjUXi7y6UA0VGA2siSslyCsV4Vc3lWvrk5VzCV L1PA== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; fh=wkz2ovt44M2hf1vcx/1C2T6B0OZQr2IK+YjLz7QXoPI=; b=kiWDsLaGHhv3TEXvg0ZvLvEtyjxg/ljspqHWAQ1XApG2zKWBdR7kZVAvEbeGBEAEaO xPGwjD8akOK/2Og8L8/7tHurfkzgw8JbhHz94g53/U0v5u4vGfMaa5xmt8LMDU9nKJsm dZpf0fwV4xoQNBx6xk0col2o/H294XX83FfP4li2LtdaLaX2sbqqcPvGq/DzmbR9V4/3 /pHNLFXLYlCNWDoYnRP6MFFvMEXJUH+Bcs3p0wwnMWeUxkV2wzDf59MyBoYi7gEbtOyS 3E5WHwzzm//ToslZwIeGyrNZugTJKYyOLdtak2M7CR0gto/WtjvnF+kveG3i7h8//jN/ shSA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UQ8EgVz7; 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 sb2-20020a170906edc200b0099bbc75eb36si607766ejb.47.2023.07.27.00.10.50; Thu, 27 Jul 2023 00:11:14 -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=UQ8EgVz7; 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 S232984AbjG0HFb (ORCPT + 99 others); Thu, 27 Jul 2023 03:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232909AbjG0HEi (ORCPT ); Thu, 27 Jul 2023 03:04:38 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE2FD3A85; Thu, 27 Jul 2023 00:03:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gHBSGuWwsvKHN+7rJoOrILYLu5wcaxzXM40jxJpzCtWdS1wFgS0ODfwfehPrGipSCRKnXnoxxCJASyn0As2MWXNzYFBsNGB4YJV8LyqME0m/BMsfnBtJmjwR7lKuFwljM1CpF6n/4jGddkbila2x09qZNmGmiQCdZyiS23HX2JYqkHlyZNhEZhpVdyrZwc/tQ32q7u/KZOndbFP8jlkPw5vKmrH/gtM0FeIpMcA6HA8qpZdreQS8Y8wsas/OIOq566FONVQ3mvRDnyGdxhxCKGA6ebwBi6s1XT9Gevg+3c8pJlx5Fc9hFMR2L1/c2lvD7x5BJ7RDeTPt7mAq8jjvbA== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=Ik+DbOF05FHOv/qke+mj24r1ssqdQ8CmsFEBPhObqhDSjZghwBan8qOiSA4WrHCk7C/rzmKya8RL8z3yKOegrjxzfl+l6NKZYRsxDt6RtfW21yHwi8myMSqgce73IoSL64kfpPK5MVzhne8YBYuXHeXgqGYvSQjcMBZMTFpH3/f0KX6NRnDBMz52ipOoYDq88xsjQP9SIqyhhxbeHxSOsZ6CM3sUzvXY7xsaixdaxaA78vMsh/kp30QBqwoa+8HfO2YJNAasDQp0qaHB28tH2rI7U6HOHCn2JeTI1ssWruiSi9zLtlQ/MvBXnd97WKmD4SWOcyuO0F6N9IcyFQ8vMQ== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=UQ8EgVz7Wx+8m5qzwTJ43XDYw31X8/SklE95zD+eZJ1ICCxluoCUVhlSAHHNUZfRdY217TRKxAYfFbMsF0AloZQEb/dNubIWek0WSmoq3tdwwN4M8G/+nyg5biIi5WcGNE4+uVzlmfvdr8rxb9k9JNw5YuRKulHmHiRXhQQG2EAUlqhO7CgLW0apcWdoNKCYjq4zyeeuVIgdYFbHHjpJwSn4RXrp9pIsugkySFXlM/+LPP3gcc6Br0WKh2tp0D1LRLxBks2cl45JaLmjwr+XsTAAJEmYrOrMj4nteRk95ukc6Z9XWu0w8vDRg31+KBJlnrWuFjvMA56DY2XvyUQtxA== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:42 +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:01:42 +0000 From: Yangtao Li To: Ulf Hansson , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 24/62] mmc: mxs-mmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:13 +0800 Message-Id: <20230727070051.17778-24-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: ddc2938e-9556-4c51-df1f-08db8e6f5505 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 45K9sinYp2fD/GfRcK/Gy3TNPXxwuBsTtWu+p970jYiqP+xQHQrg0juL5LQFsSMzyuAG82CsQyrs3LfArXhlkAlTRxEV40raC+jzgo9faPVMmLfVUa/mnTaVQP3pfFi3ThPw/3Es8bzwAInR+QgBs7fBDORnDVgsdhl0hP1nQaY8cedIobzDiMHbCagEusoihlOAmmyqMrj40VLYhikvjlZab20zkKUZax/ESP+95SzeRy6UhvzsXI2XLHPW3uRkz6amj+weScwLsTll2nyTWvg8DOiiwOgDajn6Xpn7jbwa1eJJxng+n/yLHAsNnZk3wG3lM34bHLHd1lKVPd2gQcr4iphwRFhUakd1rO7+GOc9R3hKmMdl0MlWo3EjpYCX+yhy0xyKgAeCmt3P2AYLp7EayKn6MSsQ941sEaHp4HZuPfsk+QtLU4fnUYpIf4N6J0u0qQj+MhfpooUVAhM1b4atTH/LOM+E9chVEtfy8Q6qlcGTKrGGuM5NAKgHP43F6b8GQK11Fsn4VK5XRJOmuAXLeJgbOyUKbVNq36KnrONdDLROy7eTPrKIfNVO23HukQ7KDt9MG22UABxXWTEgJ+v2IjozIQBgrIOjZPRO46k+00rso5I5nFSWwyjj6RNV 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(66574015)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(7416002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ZUQzpHTAzQS2B++nPM8r9WoLvFky?= =?utf-8?q?+5lx4269TeM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=?utf-8?q?FTYlNpXR1rGCbdhrcuJ0zCvdL1/TBXrqUGSRThv6FuHIhWsJ4nxnziZCv14l+qSqV?= =?utf-8?q?xKwSgVi0B/FK7RuoYkThnOGHM/DGExkegJxzGlZtV7etW5swVdsmheFivZE9wftxv?= =?utf-8?q?avMadDhzENAMfiZJSpdYrDbNJl8LmKn+nNLHxXElOsgFjuJPJABU9BrkG5HMBld66?= =?utf-8?q?TjFjr+BUm4syn2wdCasqAlrXg8e/WcecygR39N3w2PGJCzu7Uw5m/QMeUdKQblDUM?= =?utf-8?q?OrKPXZDp67Q8AnJR1cYJ2Yn55EZS+vB5GGHyUo+z3ecFGTUn5ywlib+b2SgTJyfqd?= =?utf-8?q?U1niAQ3Olnty2qYgUukGvp207no6FQD1pt3FAy7w1GsuJQaPPEHnlcameb3TN6fi5?= =?utf-8?q?zHSEaUcihmSPMqchQo4Cd/nOIeoMQbtn5AoXyOBLsU4rHIzYvucwjxzs2GKlJZt9W?= =?utf-8?q?Rf9CbgSBUf1k+hylWMbVJNXn6T5guI4SS9GlNYu1sVoRT8aEB2f4FlmX2wpzkBi84?= =?utf-8?q?nMICStd35rJNui/kBv2KDag/SuJstukgTn/Q8KcWiV2ufy+/CaAmYeBfwRFxsXBs3?= =?utf-8?q?sFKb0LsYmayVs4mOSvqoOuboexC08iXUTMCno+MqblYHiqWIVyM9IGEPxq9e2fUIg?= =?utf-8?q?/lmRc4FRbSnY?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ddc2938e-9556-4c51-df1f-08db8e6f5505 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:01:42.3343 (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: Nk3IKa3ftWMV6/+2ZEuIOGE8VkgkW1IbZrLMSHkhsTJ75SUeGUJcuybJoSZNlPN3uaeS8IOy6IPGksr6Re9vJg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772556779006075976 X-GMAIL-MSGID: 1772556779006075976 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/mxs-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 8c3655d3be96..9abfb169464b 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -674,7 +674,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) return ret; } -static int mxs_mmc_remove(struct platform_device *pdev) +static void mxs_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct mxs_mmc_host *host = mmc_priv(mmc); @@ -688,8 +688,6 @@ static int mxs_mmc_remove(struct platform_device *pdev) clk_disable_unprepare(ssp->clk); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -717,7 +715,7 @@ static SIMPLE_DEV_PM_OPS(mxs_mmc_pm_ops, mxs_mmc_suspend, mxs_mmc_resume); static struct platform_driver mxs_mmc_driver = { .probe = mxs_mmc_probe, - .remove = mxs_mmc_remove, + .remove_new = mxs_mmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:14 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: 126747 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp922038vqo; Thu, 27 Jul 2023 00:39:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlHQn7XOvUWqkenDbeSrltNQvBnst8zTMoKIYrEcM9rU+FFPNXls590/uE4KITHLKPOzzsNG X-Received: by 2002:a17:902:d4cc:b0:1b8:656f:76e7 with SMTP id o12-20020a170902d4cc00b001b8656f76e7mr2445062plg.23.1690443549502; Thu, 27 Jul 2023 00:39:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443549; cv=pass; d=google.com; s=arc-20160816; b=V88NJHulmnAodivU+CMe+ri0K9D/VoZyvEuahrmcn2e4nl7JanlmATnSfNxfVADWkG PPEIOSOVhdvFt/D08Jupr8FDGBVBXRn952LbD/2T/XSqYN7Hy7ZqtgKoIEwlvIxE9Tag HdFd9Si/70w91xKuVTHEdZ8z8W6KTzxeEnqD1LE2mSyY7ya9+IcUYYAHprWVUs9VQ7Tq VyDsJ/xldQbw8T5Gsfl7C0uTY2CoxelVZbA6E/3dP9c4I725/njoWDTE58swOFp7p1IB jMlHq920669fLQqtcYC9oVtlOkWk9YU2Z8qDJTHo7ne+oMiC1NDSPSas8ci4Pe5gL820 i7lw== 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=FMRuHPjs0o6JxnjzMmw3FowzCDPmxFhkE7AH+JRAepU=; fh=41DTsVqCa+DzVSgRDHYYCCHP/wDCwqtmKUUIYGSBh5U=; b=tSo6S4KeJCkolgKeIAq2FyQIITBf/8u6hwdYYDImAgY/Ah+xO0n3UDoWCHI6CJjJD5 u7q9aD+bBX1L1MqYOVPa8SNC66nul1FehYcqyXH9RX39raGQdQGknZMDX0ZmFezGxjS4 fl8TeX1Ci22A8x8Ob7OrwWBrk4H9+KGHBAlcjVHyqHRBzaOrB+tzRzzAI5/hKSN7MMnz iPspdjuGaSod4NonNH8uwS7d7HeET5lmdBCPKnAVcPNA1fMWQo22bgk/8Mm2lgDkXlym 18UpOmdkPR7cldw+GMqMLdJ8wq9a3e6Alc4K6fbNv/hxciJNp0R8lkbqq/sVm7jKPl8o P4NA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Ss0llbHE; 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.38.56; Thu, 27 Jul 2023 00:39:09 -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=Ss0llbHE; 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 S232745AbjG0HGQ (ORCPT + 99 others); Thu, 27 Jul 2023 03:06:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232934AbjG0HFI (ORCPT ); Thu, 27 Jul 2023 03:05:08 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2094.outbound.protection.outlook.com [40.107.215.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B883B3C0A; Thu, 27 Jul 2023 00:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cJJ9/NGixKu1zeaBE7TbTZqzJ5HzjdMxhgtinVeKo9NkXIBqUTCSjbwUglvbrE9GWjvdI804yMdenz/luOLoGJw/gR/6lDeloqYdafPWutEGrdk6qbktA2lGxbtLTrsAM6FgRSjaxtr3hUjxWJNxNbJauzs/KA6M2bxtyH4ZpHETUq4deH9V1mm1WfneX5+yE446Qxi0Z71sEE6DO1irCTOziLM74e7MnnXgGYxrX0s4x8sc5T8vxq2zHz1kEbgFpKbPYrF9+nF5lyXd+QOg/Hh3G98rmIZdIIaTVM2sUUZoUdAGHt0VfQE7O++WaPRLy8aATP0upR84qdol+JKL3w== 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=FMRuHPjs0o6JxnjzMmw3FowzCDPmxFhkE7AH+JRAepU=; b=fFsmTXS7HbqAEyF72Wgvba4e/xbwG5ZHqps5KkvtjxmjaBTzXJqNQMI6GgcPRnPN+bMZsizc8jPYn6Gf8YL9mNweoV9ZXFI2T5S5i6euAvy68BqhcbeUkyMdKPRbd5sXx3gPehY4K6T3fSuHag0HJGD0CNqCjqwFXYk7IXIQcLUpLX4WihQS2D3Z6efARVbSMhmNPDtjdeXMcAIUOP3qpQSkj9kuD7MjIzrbrimshwbLXc/o8lrd9BWcJEjkGFHBtQzGlj0MiST0k696vVButJWjKBZL5foPuzVyVm7RKxn1/QGJJQKA++qN5sWORwYceLnwPhe5ZUXX4cQ0e2AzZA== 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=FMRuHPjs0o6JxnjzMmw3FowzCDPmxFhkE7AH+JRAepU=; b=Ss0llbHEWZnFJzJ93ECoZPVCyBb3yqoHlu2ZMQehKPmABM1lnVE+vdmHubXw4mVnmSzFT6RhmG0Rx/kUIn8/bvXkMLn2Ya0iheh7hJqf4BzZUM/c1v7CjLZLIHmKW0hZ8TZXsE437Z2aNKiR9iflQnCRO2wjz2QX2yMcOzmS7ouzoEmYYw7mRlLyNlIdEKqKM6o4r08Dbh6zGYTwmDmhpM4RuYW20CZT2uUhBU0Ydfb3YhZXBnV2wMVloH+6OwKk53/pgJ5aFVvE7VXdLNIFHsi+VFnPnGGfLOYor3Ny7rrukqNka5blRgP5nLD2vJUyBy8QOIN/hYPkxXoBGBU2Gg== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01: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:01:44 +0000 From: Yangtao Li To: Adrian Hunter , Michal Simek , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 25/62] mmc: sdhci-of-arasan: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:14 +0800 Message-Id: <20230727070051.17778-25-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 504479c5-62bd-4fad-ee8f-08db8e6f5604 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +Gr+shy+NKnUVYIGb4eitby7zNb7MyoAFTLpQ+IjztEQZXYMlDBRbsp40XGFR8lY/sNHoNnnuD3w84bsuRIZdnGEZ/CwtCJEl5MZWEnvp0BK2K5TQx4leRGfkVlApcm7qMtIdYYnEM4jqrxW/GME4591j7KuHGmiVJRk4VNl+tVe6WYtZOHM+Hzp3J/RBRnpurrDPItuY2wsT8XcwIQ8tzVHubQECB+NiyRp1MY29KoOq7WWIqiS7d0ihQ6JqY4HKTjnYvQLeyp1qabS2uNGU7jAKb7UuEjGPxVd8Knb41MkQkWx5wNo8kP8IMdKy3lEyyfBcst9gQmJ4xmbsCAQ1kaWNgOyU7dnLhOmYKmLW1l+O82+3j3Ur1MtAtQrDfR/FJsvbqoeLu25WbcrtWbH2X8XUGmFRkJHLbS2qb245OJuHRyqgLQHn5wPzdfITRIdFLplwxGSB003XvipJsPGPEvs1Utj3XHtrnvLEx57/vmSmvqzkapOTVK7Q0LLHTfCKhVr4AxfM0/9M1wRox1WDGoCxXOlcFUcPr7hKp9AlCAiL9FE+JgYBXKlnBk1U5Ihf+kxp2/EwhatRp3B2i9QPo2gT/fOLadb3EOckWQxD0rhpdC4R9yptdok5LYTpWIj 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?7nO0esCHFdTfEJzr4ggrnZanP+UD?= =?utf-8?q?nHkkOrEZ/4enXRzrjh3aYQu3jMoRNMj/BKHnZFWiQUi4wkGZGYS61zuMGBhXOKdTY?= =?utf-8?q?/261orn+WgUK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hczO9cmEw2i043W7lBWtf+9jcmkW0Q1cztPkeFJ4QZnuLmdEhCNFbTmhQ?= =?utf-8?q?xGqmI2GpaYCPsO0xzngeRdLaUoHCXNC+bvRSUEZludQeKyEUvT+4jchiaTi+apuJT?= =?utf-8?q?7rPdM9xfziLRyVyotJRpU4WLF2tNuMg8QcvPl0Jyp6xbzk2Qx63s5kHAXSYMnF1bb?= =?utf-8?q?LHiJKpvRn4Psz/vub9ckENlQu76dNwvnEnsd5XYMsyjLeM7inil5MW593gYg6gFBx?= =?utf-8?q?luioJk//BGRDwuZLI3+wU9IjQT8cYqBr8vPqWT9sXUJOdpvedydVIVNsTTIzfzPBi?= =?utf-8?q?j/t5qht/E8aRUx1JCgXf/Yx8nf2xAc6soxPlUAY38f5iAT1xIwO+2R4OuDEC7fePp?= =?utf-8?q?xmhp8TmPqE30laX12hzK5zXyOb0ALf8YAPUwj6caW8lHK4Xwmcl8sGi/wLZi/xsuv?= =?utf-8?q?BmF17eXBIJ7FLKJdVUH7fMpDvtU9cGgMOXCAeBYGwqoTbhriGrcXcuPRvn8nzL+Ks?= =?utf-8?q?8hayRXTr1JIdehY0A0GLX2MPDO9khox1c4/HDn7Ui6rQVlfHVyxSr4cmLs3bVJKXS?= =?utf-8?q?X7J748GWIVfl?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 504479c5-62bd-4fad-ee8f-08db8e6f5604 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:01:43.9712 (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: sP0v8KgV8pKs9FuGCjSp2uXlfa/oStMREQ0JsWegP2Gi1g4nVHf0mnWE6HNpsjU9SsnzqmHjAclSe7RfaUD63Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772558535345195818 X-GMAIL-MSGID: 1772558535345195818 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: Adrian Hunter Acked-by: Michal Simek --- drivers/mmc/host/sdhci-of-arasan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index 294dd605fd2b..160bab0c437c 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -2016,7 +2016,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev) return ret; } -static int sdhci_arasan_remove(struct platform_device *pdev) +static void sdhci_arasan_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -2034,8 +2034,6 @@ static int sdhci_arasan_remove(struct platform_device *pdev) sdhci_pltfm_unregister(pdev); clk_disable_unprepare(clk_ahb); - - return 0; } static struct platform_driver sdhci_arasan_driver = { @@ -2046,7 +2044,7 @@ static struct platform_driver sdhci_arasan_driver = { .pm = &sdhci_arasan_dev_pm_ops, }, .probe = sdhci_arasan_probe, - .remove = sdhci_arasan_remove, + .remove_new = sdhci_arasan_remove, }; module_platform_driver(sdhci_arasan_driver); From patchwork Thu Jul 27 07:00:15 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: 126788 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp940579vqo; Thu, 27 Jul 2023 01:20:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlGiVIMvP1aGAUy1c+ziI4AzgG4LdtfOmc/9kMFZtiMNFPbnQf/x2r8EB8vjn9GgfpLSursD X-Received: by 2002:a17:90b:790:b0:268:1b62:2f6c with SMTP id l16-20020a17090b079000b002681b622f6cmr4307812pjz.2.1690446046090; Thu, 27 Jul 2023 01:20:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690446046; cv=pass; d=google.com; s=arc-20160816; b=wgMlywJxQzAtlHvQ3OsIS+eiAWUbnRxDK1YUV+YP0Mt++8sSGQxGBHRwvnI6jg3ng1 uXoVfo+PlMh+lFds9Xr1wAJNh7bTEzN94QehoD88WiGf+oFNAlIjsQK/i/iWoIQN6BO+ KdljC29rP+B6oBORxvMINaBMq1KOg5JNzmTmv340h2C1s8rJN9YQhONTrtm/p3uehFnR KahIDl7Ib+qeQA13FaBbcCTonU0DC68UD1IAHn6u9jjTOMHXOEi5bZhMH/6Ff1CRXtfZ NYNB3sMlDenwIg/1qRmWAQldDdgvy1IQFpGMr07TfmxpaF+t2uSjz6YNk6xYuvCR2kTc A1bg== 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=gVMhDTzlw8do8am9acRTwjuR6yvB0w4OzOuapIYozcA=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=DbQq1X1hzixfkCZCj6JId5IMh1iH5X1AAkR/vYzDb8yCG7E88nnoLIsO1nhh4TowpY 85B0ns3X7A3PSm2tfW6J8nDM05z7A5sPRnR5Jo13Ih4eoFOdyTmyLGTUcccWjCVYMyfc kFtVOr+8mwGY/ms3GpDWRm1olxJGnUN4uq5XqUk3kKt8OitHvotXHc/KZEJRt2TeryKb hkOOnGQGrskNKAk4I5hl7iRWiRpUQp+/FXKBIDjN/j7lqMU/avRqEcIbiIFTmoAkVMyD BIEeFNzmAXsbzHHfu2aiPBZNT4qRaapm7SMsbVGKdFsSRJo03JxWDaahokz81VEDI3op 2s7Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=B8yI5ylb; 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 ne7-20020a17090b374700b00263d1729212si2568061pjb.85.2023.07.27.01.20.32; Thu, 27 Jul 2023 01:20:46 -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=B8yI5ylb; 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 S232541AbjG0HGb (ORCPT + 99 others); Thu, 27 Jul 2023 03:06:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232376AbjG0HFY (ORCPT ); Thu, 27 Jul 2023 03:05:24 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B391D3C2F; Thu, 27 Jul 2023 00:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YdDHWSG6YRO43uTks7FZH5nHueubXgXxOqSXkximsa/9QWywiWgRh4z6NfyckEHMBcZWl4nJsl6uNsik5z9SJsZIt8edE83LfqKQM3+29IyUfRj40hU23BjsWWZixBE6EciUq1iIH2Mc9dTH7ivNRVnCGtlIE9ikuK5/M0p/G+nl3DNubJ60E2athKB1Q8oyXqRv94xhVPGJ1rLAWPGrPMmtJt9VNVKCWZV+1gZQuS8wjMN5hwyZVONjJkwE6dIctNAOAJ7/3CZczuINvzYxEq1i2VyCIoN2K82heAPU/4o9G0+90Vyiw4VaCWSLymYlsvOhO0DNZt0uxt1pCPuLZA== 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=gVMhDTzlw8do8am9acRTwjuR6yvB0w4OzOuapIYozcA=; b=Z8omnq+2FnQKcvEbZXJgXocjSNmyGdsg+Y4GiU+YajsWJehsxftqebvfLnw7Y2/C94o+mNAhnGP1sQxFWt8ff1AgSIyrMneDZXN+e/HtUHXXcmFR1Uox2v6XWPlOusjCAyyP19+5uWcSLxJX5sorUnWYJ78RqoZIWfRM8A15/w5kAtCqpUDFmPw0CLJ+I2RHw/pFF+TnMV0AjWRzuwsMhomCnCgcHVUvB1bY/98hcog6RxpbPrWrX2L4ZZoQsmP9Fp3btNYIPSwqV2lvjJsDaDyE41tWbfdMPH2/IIcDbtWZGqjWo2YqS33UatdS0mcjxrfrwtfc+8Po8FxsyrkTOQ== 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=gVMhDTzlw8do8am9acRTwjuR6yvB0w4OzOuapIYozcA=; b=B8yI5ylbwSDF3/4lXV1sM3DRWrYCA1EP7K2S514WPE1MG3F1kNiVSyGmcZ8MlkwfJXtZnChiLPzb8wC3TbcKY2kCj3vKM2sFfNhJHr+qjJZe3es3aRTMkIb4etMetiu1U4nSqQFwKMJogYMVqmQvuvWa26arnbxjSgLlCFlGvqfQIUM90tZxcU5dlFqc9oW/noSMtPMQoV2a04g4oAZjmCceb2W/Z2nVsjDMv3LVBnLFrAq609Lw09WWZjhSEeAKGA69QqQLXgxgEjhd/WApkBKUGFh0mA4RiH/xJqP8HRmLpoR+kyjC+xqrTm/EuVeJ8SZ/Sme6OPrOoiXEDOBEwg== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:45 +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:01:45 +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 v3 26/62] mmc: sdhci-of-dwcmshc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:15 +0800 Message-Id: <20230727070051.17778-26-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: b7eb1858-cfc0-41fb-15cd-08db8e6f56d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: teUdjnIdMCCJlnugWyPb6g2scXO76FPhiH5VlLtZmN96J7D92Ed4hznBjJCMMoFTpNXJ+sdtph33oHl4qkoSLx7vPaOafDq0tMsn+M8HNCLUcHOOV0m3aP4FJX9D8UMStiNBquvG7iE4hA1kjDHEC8TtzT29hx/P8W6ft+c6n8xp8BIMLYx7fVZ9o/okuZ0SmoslBr1hHwVE7iu59HlCiJokDkDyH9c8t4jZH22Sto0xZmRaVyGgz5CatdejjuYY6GfMXMn3XwtGrUo+j6fbGsImmvUYPBAPA1gieedLnl6EHHU9RN/Oj7QaO01juVbW0uDpTCJl/cwfyx2soKuXKS8SSFii3jYEs2leg/BXDzYXN/tNrG4iSL9/Ip5aWOw1UXOBCFRzo8dGjfpfjeSpNwQXOmthC/uMgGgl+e9kbwmymRKqlBWHRUashyItzdPa8sDxzves87JcurzMAaVmoivIZ4fTw85ZEncfIwstGupvDfcemxspEEKn7zURrgz2wKno1+9ej4ObZPK5afJxJpUAPK7DAEw1ctJo5+5ZO7O1gETTLBtwbcMY8hxNp+veSQWCfy5K/hJwShojsSNdiZ32s8Bqc8e/9eh1tGrPttRvYaIHa8TN13yhst7HH5BPY+LZraAn8LfJIbHOWBmaiQ== 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001)(133343001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?MEuKZc19TVijVaki//+Vrww7pW9L?= =?utf-8?q?wyUpoRevLvo7rZp3C4QRkRkGhVekvcz3DcHaL5ZKgEf5XPE8VZKBsgvymF/4D8OUQ?= =?utf-8?q?8PRnTltLluX2/NkOFmlmnjdpdyMWQaaki5xllG4Bp/Xt8NYeHdnH1XWaa0Df5+4Jl?= =?utf-8?q?ED5CkT3iBS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?q?RidmJ9K/PDx5Y+zNXlq4WjjhlUIgA+kaL5nwRGYdPs9up7CLoApZt4JpPEnIirTZ1?= =?utf-8?q?ncL4PC3pfP5R4fhdNiTjn13m/CbBVgOw1cU74iMW8hjiIhCwGgjMooGz5FKSenGLi?= =?utf-8?q?5fmoT9+3+DO5BLEtBXdjvWGYYAuO88cGYEu7T18rq1ym1Mz0sIucxV5zDM8jfVCfT?= =?utf-8?q?WEv5+OJOG2GLQObt3bnYrYWPy2G9Y+SkxgtjSMMtwLFpYyCSjqo8MTXh7TSuIlhnV?= =?utf-8?q?jK5Z52ZlM0Vv4YPcxvVhZIXRXpZEyXnFkh5680aSffgn88HtSJEh3jaQCg9Kv20zD?= =?utf-8?q?0Lg0FE+5jGvDUN4Ms7M7OX7cLvTDzuscvluYhmZmYH75Ucvf1eIm2OjaDLYGHK+tM?= =?utf-8?q?eoDExp3OyfL6Rd7WS2eAefZuu+3If5St5VElpvFTPO294SSMn0QTLczJ+w9XbbbYP?= =?utf-8?q?s9kBQp6fSXRsERZvFFtWJAAuRl1hIFj9jVhlEoFABcYH20r4fr369ul2fYu5PtdVk?= =?utf-8?q?FZyA4ZMuH8KX?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b7eb1858-cfc0-41fb-15cd-08db8e6f56d9 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:01:45.6226 (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: oMZkv9z/rHskG2kwKoij5rZu7xNLykAKZK6H2KykM3AMTDIfRQizi9vN00af4wSENnaa7zYlyAuBqM1oaui5lA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772561153093019223 X-GMAIL-MSGID: 1772561153093019223 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: Adrian Hunter --- 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); From patchwork Thu Jul 27 07:00:16 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: 126750 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp922315vqo; Thu, 27 Jul 2023 00:39:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlF2hUr9LGysrFaqchLQKvylv+vOwUY5txM95AWCpVSRaI1ITeTZh7q1P1nH1ObbhgHODuj8 X-Received: by 2002:a05:6358:9219:b0:135:4003:784a with SMTP id d25-20020a056358921900b001354003784amr1829999rwb.19.1690443584649; Thu, 27 Jul 2023 00:39:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443584; cv=pass; d=google.com; s=arc-20160816; b=jLLIMszO/DNG5icefUbY5YZ1rqbcxNVN07XIaDww7GbO+g5xmk6Tq8slwKNNtA/bEe 4HmOcctIN/o+LbJlPDOfWk/fqdnCkSMddX44r0luI/DJRqxU7edzLtCEoMD9+Osgr53r lAe2l+Ztcqu1yHUCmMfHRwHuTBeMXqIkk9aKLGRjoBPI906T6xXU2Q3wOgk6JXZUHpFJ Wz0cL7CH5/E1q4tm59RhqkEQ4b7rW2xlSjR453penMEQHjMEwFqa6aNDZUvpF6g7L57O oWsgXboDBkoqAX+7ioUmxEUDbOmwvt7KPnAWBi2xdKzj8sl6xQEAgX4MSRF2bxAK40Tt QO8A== 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=YnEm4eeaXUww5eDuPQKSh3EIaMee7cr4msQcxUd2bqk=; fh=KaHw6wvoY0nORQNloGxgAdG9EQoKCtLTTxL7ZTkIt8Q=; b=smtesYu2ie4/zYlgs2qLT7IRvMnUhoeVbuXJFo4zmgD+Ok62pqxD+TXGiPBcmKXzzN yY0uInpZddLv1ksyFM9mbqwrFjfmv9f/pdRhX+aCkI3pAzwj54nn0gt9OB16q9MoLB2V z4VF0jYoj3ZVQiEncicjGtI3Hv+vlZMDDxU3+AMGej424mBGJuceVkSgW/LwSBSofEWs 2YTud5wZ7IfgeK9arCGVnjA55osae7kqy3uncCiXtACDo//Zsn1BCyn8j3S9p7/nVRyf F/5isLAijuyrTewNW8dCIPOCbPtBRf9qmFFpKbJk7C5toOCCcnLo6iFpHN2aL4Tl0O9I 0Edw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=WD5kf8K1; 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 w4-20020a656944000000b00563d4e61773si834064pgq.812.2023.07.27.00.39.30; Thu, 27 Jul 2023 00:39:44 -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=WD5kf8K1; 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 S232787AbjG0HD2 (ORCPT + 99 others); Thu, 27 Jul 2023 03:03:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232133AbjG0HCv (ORCPT ); Thu, 27 Jul 2023 03:02:51 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82CA426AE; Thu, 27 Jul 2023 00:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Maf8scFMRz58zsHamLKIVJ1UHN7aAfec4z7+lCdxfNAoYK5ceYF4c6W3//mP+eR6INrPK8WxnOpreC0eZXoSDFdLVJ8cE74cxiN+SBSJ+heIAGhplFezBlM07gHwFDYMOU14x6hbgE5il1590KzDUAf5ywo1KeDndOo392xTCPCk2ZKN9x34QLNuihaQ3B/Iu8V3ilz5znP99ThnXGPcnbJqZhWTOLcygmNX5Lhw304AH4XiV7TT8kK7gVvx+vYBIdlNrz9xajTNw+rn0Yvw1bVQltHkhl0lx6p0w+p/z91f23GDeIJf1ryuFeXcurz2CWiYtY5fBISeNmuxR1dv4Q== 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=YnEm4eeaXUww5eDuPQKSh3EIaMee7cr4msQcxUd2bqk=; b=mCBl3vwlixRtymJsJAGNcylwF66NTobmJEtffE4OQWnHBLr1tHmgf2aY1WkaTn9BhO+46AZfYEb2PDA1kw160N/azZtCoq3l5CRm+d47olVvtvbRAfMGYNGIsmDJkRufBwdIiWIvXclkO3F7IGzxzqARo1WylINNM/PcHrazoZvoT5BvihSs5Zw0hka6kxa1GNg8o60y3Me6ZsbZE/MY7WGdw7HxYG/+5aN61LTnt75z5lwG4YBigArNCnfK0RSjD7IoC8ALxNFTscRFMVTeWqbMorPBVNcCqL7Xdj0TqRHPj774VtFaklog/hAqNIXnWJpvOkz6mvRRkezb4aEvyw== 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=YnEm4eeaXUww5eDuPQKSh3EIaMee7cr4msQcxUd2bqk=; b=WD5kf8K13FJaMws5FU7HZ5YfNmRj658WPEtPVif/AyB74R8nk3+l5Rce92yhiepQ98fNib2lmwgKZIz1YOcuGCvTR6T/tlMrSXtkw2Q5K7sNaJ6BVRr1pZGuCDPzPoQzOxQ51VayIKGGmyvsDW1e761wgKEAP1Qs07HR5wGdmdgVPcu8NqH+L6fdc3VC+0vsG0ZzkSDoRrQCYbFg/0SL56jkr4wbEsksoVVvIP4BJQHuscSvApv3mpbmTg3ZCG0iDq3mYygXEDWamA4Dwi8v8VFiDwi8dtX9R+18cXks5RIUv1ctU36o2e0dFziQInc+WIXQx13tqqJhBXvLd6ANTg== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:47 +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:01:47 +0000 From: Yangtao Li To: Manuel Lauss , 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 v3 27/62] mmc: au1xmmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:16 +0800 Message-Id: <20230727070051.17778-27-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 5e47b5ab-dcd2-46ca-2537-08db8e6f57d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 23zHms9rPzA/krfBl5bpxKzIMgYbE6zRgrxK/WASAddevcYdp087pvdQo6B8EncpA1WmTU1DSE+sRfnOElAxiJ0bBOZtyW8/3SL7EN1TGqLKUCJP+iyMfeGjYBWAlX2MC7OhO+e/VdeFSwlILOZbV87fvXyPlqpZOxJ5j1nt5zBu2k45HHrUNh15yYxd1ZGcygJQjl2iXNJu6wX8GLK+ldQj60eCaC1J2nt6fyC8/14VpAus54EThZxtOByrrIniGTYaVFDlFpcFTqm9mbLBc/jUjTqaROI0m2HktaD+oz8qs4kosmLUatDfW6Te+qYEsYbJ2Fj+gdcrXl1HsOLLZ57OVbz3GNZgTMbHXBp1tDg43wCsJ6I4GubSm8jwKlWfc85HkXBPjaLdf82BQ/4GHCSGX3WPBwE1XbzuVdgQLiaSCT3UPX7U4pxMj8lHWCctzjhLuMf1VTS0hQU/iaIk5jdgyT1lH4oCbPn51Dl/KP0vLJlqLxrikqty+/o0QURMvtYmGviIrjvydSnhokYwV+qgBtomG4/8eIfgi32weGD3NiWDX9FF17bDV3EOAieWRuoGGMU5v7Jq195qXZZ9n/qheg0RQ+ffJzJiJ/AwuWWpLJ74usZifWnt7FgSmLf3g87hKynhtLu2x4RnXgRvCQ== 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(66574015)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?MXCgiP8zuicrmU4VCBWxken18kcE?= =?utf-8?q?43/rqdRw41gYe7KDDvvG2R+x3MEyirD/f+oGDWnQxkU40oRl/s01JvFxQEw1Gb/R1?= =?utf-8?q?nAgI6gWGDDdQbnaKujgT3hA78tmBwR0+BeW5TYnXQ3NEiYzR+WldA3kmbn0o4Fltv?= =?utf-8?q?1f/SRAo503rL2086b9d3tscxFnVrIUHncYutag243HYixYCg00UMgCdD06gVfRK9f?= =?utf-8?q?hiRxR8awcJy3SiPi6mwqAly9+ywrXx2wV7Df8krPJ310GDeGECy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ahAJp/Aw3l0?= =?utf-8?q?f7RLnnEOBpk58iAVPCR5qu7LyvjvLBuuz0x2x7sPy7Ql5tKlnZwjipkQumq1RhfXI?= =?utf-8?q?8SDemwBs7dNh6Qs7XVW8TBWLPSsLClOeRPHNTY1Nx2DYMQDVDJKOxKXmy4BQ/0vVT?= =?utf-8?q?fYoPDIf3kioj5w/gkh3kg/eMx175zKwPhRdxLX29pVE3/J/I8K08HAWPUG0lrz4gv?= =?utf-8?q?+9qrwlG68Ossz+uA5setjy7DI+ApfjF9Y/bQZ3/J+QmTllEBZHglEIcTKTwbr7Ke7?= =?utf-8?q?4YqWsYRw89jTcJmZ+sWkMbBTowE8Hw/FqQLX5VMgdMLFlnzwGtd6PgFS0xwyqDF0k?= =?utf-8?q?Gt0EfPXscAF1dJ+bzZdqosJrTlCc9Cbt/ntORxvo/20ObxYDpoCf2lRp5Gb+kuGPI?= =?utf-8?q?2wbmEEApYo1A?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e47b5ab-dcd2-46ca-2537-08db8e6f57d8 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:01:47.0576 (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: e3zkVkISmWyteOi2ZjdkfAqAL7oVwhEpHmFVv8GlBs9UEcKPCeeCEUwbDiAA1PH44JuinlS5VhsOi4LEw0C/zQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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: 1772558572233622661 X-GMAIL-MSGID: 1772558572233622661 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/au1xmmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index 82dd0ae40305..b5a5c6a2fe8b 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -1114,7 +1114,7 @@ static int au1xmmc_probe(struct platform_device *pdev) return ret; } -static int au1xmmc_remove(struct platform_device *pdev) +static void au1xmmc_remove(struct platform_device *pdev) { struct au1xmmc_host *host = platform_get_drvdata(pdev); @@ -1153,7 +1153,6 @@ static int au1xmmc_remove(struct platform_device *pdev) mmc_free_host(host->mmc); } - return 0; } #ifdef CONFIG_PM @@ -1185,7 +1184,7 @@ static int au1xmmc_resume(struct platform_device *pdev) static struct platform_driver au1xmmc_driver = { .probe = au1xmmc_probe, - .remove = au1xmmc_remove, + .remove_new = au1xmmc_remove, .suspend = au1xmmc_suspend, .resume = au1xmmc_resume, .driver = { From patchwork Thu Jul 27 07:00:17 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: 126744 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp921541vqo; Thu, 27 Jul 2023 00:37:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlFvFZk+zEUiyrhb/2OAm4a7Dp52ykeJZuUhQJbz/bP5wOuY5Id/OlGDplvN2mKdbA6hMoNN X-Received: by 2002:a05:6358:7252:b0:133:b3b:ceb8 with SMTP id i18-20020a056358725200b001330b3bceb8mr2322326rwa.20.1690443478978; Thu, 27 Jul 2023 00:37:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443478; cv=pass; d=google.com; s=arc-20160816; b=ILwBDCwVWTv8LTm4Ds+6AfJ94Q1RMFinlnciyo2TtjMYei5T6T+oEUdscw7Tb5NPJK RV++nH+eiUnG8OiXr05J9CdhFy9Ho3YfxlPInKsHi3FsmYRDsyLa5gBwzpaRluJ9ebYC CmdO1wb11iuj/FuqtRcm0txv4PnkiIXB1T9G3pB4AzP6L/Q9U9X8nWMNMIEj34qvKguZ s5ODDPEPsplXPi4GIYA851mpqFuZmphXALBVE5R3t3yGQQmYVuIz4pdXujxTDo0q/SkJ tmTr6ohI9nk5jKE2tN/m1jwOdZJIlFnKop6eIBAkmKvjECJDjX75pPV8qrWIes2nyRfo uESg== 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=Aw4Pv13PwJyGo9i5NmSf9Iol6jil3qv/WJ4az+CnkgE=; fh=9CpPSVh0SzFo0KnH3YRmW2WZmdBNCBKVHGYrAagGn1g=; b=Y9IUV7J/kFE9MFDrsyanvrQH/s5FD7OGx03vZc2HdSTTnmXZ9of8vjsfhnSqbMwlcw M8X+EXgsA/JoJlbhhiZU1uoQ8v08FQvGi6b+zfpIJlx2RzvwAv096hideM0U+1fr4QHg 1Ab4+Yx9FrF1YFA5hSAEA34OSiU/w5saxw2Ft8wNSDX4OwHjsPbRiF6egIyivXt8UIbC ENp+WFpa3Dt2a3YYGaeL4aFlgVK/v4ZXWXt6RtgCovyxjqwTAUOQWcraPTbRxNp+jqyR ZSwmZGdzzwQRhLu7brSgxhlBEqaHNdEUBXntCQCV5b5EROU6oGWRgBK+R+R2e5cm3J9p sjew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=TRtFk93s; 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 x63-20020a638642000000b0056387def1d0si834183pgd.396.2023.07.27.00.37.45; Thu, 27 Jul 2023 00:37:58 -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=TRtFk93s; 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 S233049AbjG0HEu (ORCPT + 99 others); Thu, 27 Jul 2023 03:04:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230480AbjG0HEG (ORCPT ); Thu, 27 Jul 2023 03:04:06 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2116.outbound.protection.outlook.com [40.107.117.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CFB53596; Thu, 27 Jul 2023 00:02:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L0YusM+X0ZlKkSISB+77eg1N4e+jpbdhPvlKfFGMpEusXNVvDb8QHE0jAU6fiW5HN4+Q8L51xBkvWLRCFWBjGCOPUWe7BaKyQuXOzxK+BtJDezm1xSe653NuNsBGWWwtZCR+i1cbo5U0MgBRCBgArYp3SHRngxbMBewFxq8pOBaU0P/sxlnmtkf1j35NGnrpf5FpWRoI9a2p7VmndWCJiHNk4sreHwP5VMLKImf+LmpWokDkYS/J2kVI5uTqyShafJLyhdsDKboFM4FPmtnU+eTHi9h039lwV12n8w167MS/lrE1Wrrwi6B/GVPHeqnRQR0yjnGg0D9bwZz6Uxx7KQ== 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=Aw4Pv13PwJyGo9i5NmSf9Iol6jil3qv/WJ4az+CnkgE=; b=UNdp/U06KWGz82ss8T2gCX17DsxxqLkGp1+RtKnvCKrb3QKWPSEoZh9FrBA0cpeQOxbzdjV67b5ZUWw1BvPRccY/OS19l2zhfKV/v2dNhxMcRlwVx9qrD5j3+GLd5IWGsXtwH9NiKBQyK0sPpaLGBwIrU9VS92QGIkF8bykpkPLRy3XcJTYMH9lCcnV8jnIo2iqzwD8MtJq0E/jvY7AeL/F2/DPBrgwHFDlNXomwCTCokbVeVQC5rjJT04RrXbOLsPRqLRj8petQO+UdGd/qbfzVz71mRjdEuYRvisI6PH6/MxsLpWxxEaGFBgf2wWz1iPO4bRF7pF5+kit57aua2g== 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=Aw4Pv13PwJyGo9i5NmSf9Iol6jil3qv/WJ4az+CnkgE=; b=TRtFk93sr8BUc9QyPUpgB3yTouZh00XHqPdCKKfKHR5w+h1I+NJKzXkKEpwQj+SM/x9U3e5oXA7C8KT0NqJWIc7OeT0wjt+ahhkkt30lJSHXqL5d27Eem63PQkkh52GcoTQ2BbJ8EXgBz5hZA8O3osL0dPb8c+6BZreqoqYk1TdZ1bzsQ/XnYleTVRw4Z0kSd/+QVaHKObGqoUHgvc7eWqoebpOZnwaKXZ/0RTQyyY/hwI4cr7Z0zuFetGHu1n6asZECfd/VLQMk6ggh406F9kepxz9I0s47x/IkCAfTK5LnQrfhiHAKKmD56QLAC8n8cxFfltq0IXWVI8hGM6nRrg== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:48 +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:01:48 +0000 From: Yangtao Li To: Robert Richter , 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 v3 28/62] mmc: cavium-octeon: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:17 +0800 Message-Id: <20230727070051.17778-28-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: f5b5364a-6833-47a1-d558-08db8e6f58b5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UtYvURrR1STnu4+/9sZaVcelMh7s/S1dbM2ivwJu7AnsXJOS/3caGtAsHMrmcSaoTcvVjaqO4K5UTejydt5C5lKTjqRGFgGnyu+C0PcDIiEu3UdQwjTg5Tmwhi0pkudWrZaylLNmY59AQ3HwtoFlt5wx9lryO8PRchQNbhD+GOFOvKlaSUxpgPGCFf8Esg9cYBfVtpwQc6J+fbpON8JYxXlD5HUf5+yNqAV+kLYNgkC5gcgrfL5LDO9nwLT5HwOnQD+yL0SrDOgLCQ4WrH5kDYl6IyUpuf6K3+tX732x3GIRs0TXsWaHravIYf0peHWuXiNXtqzmjv7DRUOTmddjyuuaRyoRY413/3PgHyEfkvGVfiaSmH5fL4SwR1XFYXSVUiSQlLMp1zOkGTlfBWB3s527AdXdIlx6O1nyhrnhcaeyhbVCZ2CFIQDNlON66fnJW5ELauqW+o2pLEIMldWwVvYn/HwchUNdiyQXNNE067PQuCkKaTtHrLValpZ+9UnSqfvT6OWnxtujkVW5tWE0tou82lTuWDvtGJk1AFj+1Nx5CXjCM/ZrwBkq2G85lhvnhcZ0riiwLLZCK/FTubFTDJqerkSQHQyyHiJxHE9YUsEn2AS5ws64lc78d8LW0Oxb 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?kAbi+L0f+IbZZjcE8XIHx9PQu7/2?= =?utf-8?q?aRAqHICZz6VoB94nvFRvPSyvJ2Dllo8wylx99FKNppTWH2+eIkjjIN91zvUV91vap?= =?utf-8?q?+vySoCSrDBvgyWQmoowyKnUKTvrvPDCYtQwn4yQJR6kY5yFACIhF2CPvmY9VnF+Y5?= =?utf-8?q?Y5P88utJF1ugLvZuTw14BBfBVMOV9hwQIayf3F3D28NGcJNgsiWWrjruGRxWIQZ4N?= =?utf-8?q?99Od5G8QhSL2O/icVB7K5B5zk3yKh4P7u5pBAGeWDFNiqn5p9fJNDmouGiIQsqhGt?= =?utf-8?q?DNU8CEoFuGhsZFLw4xOsB69MInFDNacIB3RnW1RgaEhf2j020KEqQQB7XsCWj6FJX?= =?utf-8?q?w6x6252S7plTHyApdnfkJ3bDKZjcAKLeeajqmQeMw8Y8+tkTDl/Im2F1QOHZ7cBtG?= =?utf-8?q?hKlnKgkrUhG1iIMY+S4s+mgEmnYCW1Fk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6gx/mznAF/2?= =?utf-8?q?ruOj//gezaWmHkmj7/p5aZq6rM6rfXbGGz9cBm7FmxvjrSRGpp5vkK5E0HEVKmTZh?= =?utf-8?q?ImeyPQCwhj1FX73usQzOrWdVeWUUP68xkWfJL/aXpR94vDAuN6XGrsnL/DVPkC+Ar?= =?utf-8?q?E3U7VGy6SKyzH3rvJW+vjVEOY6OrSYDlAaUQ/iPDPMWSRVVDE5B/0mp4pftmhIxU+?= =?utf-8?q?aSYwZa2c7i+j?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5b5364a-6833-47a1-d558-08db8e6f58b5 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:01:48.5703 (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: jbVJ7C09d3xje6lJP+GR2m+XsMAFlp9QX+npoXhVY8IcrPFKrMq4WK/bW7/PSyOdop9+Z7c1RoTIjNQj8v4EOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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: 1772558461034294946 X-GMAIL-MSGID: 1772558461034294946 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/cavium-octeon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c index 12dca91a8ef6..d526868b30f6 100644 --- a/drivers/mmc/host/cavium-octeon.c +++ b/drivers/mmc/host/cavium-octeon.c @@ -294,7 +294,7 @@ static int octeon_mmc_probe(struct platform_device *pdev) return ret; } -static int octeon_mmc_remove(struct platform_device *pdev) +static void octeon_mmc_remove(struct platform_device *pdev) { struct cvm_mmc_host *host = platform_get_drvdata(pdev); u64 dma_cfg; @@ -309,7 +309,6 @@ static int octeon_mmc_remove(struct platform_device *pdev) writeq(dma_cfg, host->dma_base + MIO_EMM_DMA_CFG(host)); octeon_mmc_set_shared_power(host, 0); - return 0; } static const struct of_device_id octeon_mmc_match[] = { @@ -325,7 +324,7 @@ MODULE_DEVICE_TABLE(of, octeon_mmc_match); static struct platform_driver octeon_mmc_driver = { .probe = octeon_mmc_probe, - .remove = octeon_mmc_remove, + .remove_new = octeon_mmc_remove, .driver = { .name = KBUILD_MODNAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:18 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: 126708 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp909472vqo; Thu, 27 Jul 2023 00:10:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlFN1rJ/6KeWXhhTZv/AVDdBEEU86uLV1cMqvkpr7ZH3MPah2JNESbn9IJ1wLiWM35B5N9v3 X-Received: by 2002:a17:907:9881:b0:997:e7ce:1e8e with SMTP id ja1-20020a170907988100b00997e7ce1e8emr1243413ejc.55.1690441847705; Thu, 27 Jul 2023 00:10:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441847; cv=pass; d=google.com; s=arc-20160816; b=VLd3u2j0dKIoKc5zmJxVflrepuv8bLZHg4O2vBVHerSxikdMkhw+4GElhPpFOh3i71 EYBqe+H/8MYwAXdcTdXgrlCj9CwOFUnunan1LCc3dXrhFxOxLCat98CY0iDIYtt9wffz lypYRWWmITeejPcGr3QVhQDZZZKwmMmXHoYBn/tFzmNEtsbY/5E4x2Bi4YSYEIpWh8xv RMXvtPeTvJjfBydQ8dR/dfC3zF7EnXwkcZ/EOjkquzwDEnezVpBglJHYRDOR+PnO25Bb 7gila9CIoDhcPQM8HR25AcEMBxE+CsFb+cMWhmN9C817NrXtQM+FhDeQcKc68YwiZOsb QGzQ== 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=5dtSozXRpKhBSknQ+s8s/18Y8o9VbBvC6Adg572ej9s=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=T6PBrn9rg4VTP2lcj8po9HFbSSE2WELlh216FVzQKcL3POOs3V4YYYWhz+4W56ZWm3 pI9V80OU67uF5Dnsw/8AxkGEFI9yD2wEwRC8bXhaD4Dl+4BPyIIqfz1DTcbI2MAGkS2w zlBpxT9kWHqobTcGheiJe4s+6VUoNjLJ2pWFoTAccysPOIwMqh6/aIGwZHI+YxckCjOI kuDfbKMyh8ePuqljz6hDtueM65Cx1H7jJn2QnEPgVTTRtYNAw+x/wmYpbunrGdbSeotW RgjNV7nCcYvq+Ce/Uv9sWHeWYPiQ942WYaRBn3atNAjLwJHTG8Acl+qQv6YP+gGupZtf SLAg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="o4ww/8id"; 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 u20-20020a1709060b1400b0099bd5a646c2si602368ejg.271.2023.07.27.00.10.24; Thu, 27 Jul 2023 00:10:47 -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="o4ww/8id"; 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 S231664AbjG0HE7 (ORCPT + 99 others); Thu, 27 Jul 2023 03:04:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233023AbjG0HEL (ORCPT ); Thu, 27 Jul 2023 03:04:11 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20700.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::700]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0263435A9; Thu, 27 Jul 2023 00:02:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VKaFGLFwzVmtpL6ek/Z1GEoNnP1dytgJ4yYWk38GmwoPlNlaD+Y3dBp/Xt/5ND+TA+3rAWlegGeBGISmIKpY/qjA/zVZuWeWb6jIKCQmSvqIZXz3qVdEj2924qQxqULT0dXelt2gCLIPeYR/vaOaa2gQkGMNJKDmYn1jyfNQ1+HarhkPjf+4dIf5qAvuv7YYvI/yqFypfTjPlt0tLOzskmVRYFpC5F0J7mmmlWIeqCdiJMXtBPb0wxTQQU3vU56U5XNRKiVy9++Lg2KFJA++yOAloVnZEYPYo+FQ/fbnPnwmoX2wfqbPMKbneFGc6Ki8ipP30AkERkIgH2nKEMHuJQ== 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=5dtSozXRpKhBSknQ+s8s/18Y8o9VbBvC6Adg572ej9s=; b=Ze8s9YTJDVAcT9F8S3lKLvFlN4BD1uQDqmLvaJirXroB5ZToviLE3pCnVSucdnRFjWBxkMZoloe8sReBxngleLbJAfn5GKmObzk6IzT2QlMUZRdtkqi2x/hMLI8/t3FQXDEvOTaTCYhtsSE8kV9arcK0u81+xMEFrkFbgFPAFZEyIuHXgIyYnOZZ7jH3+J842FX3x0NM8HL65gQty8KoA8Fafl3JUEmHZS8gN/pLjv2x3HlEgKEY85ASzL6qS2CWK/RbfQOoh8cy8aWREi2c3DkOVDEyfzRAiMXG8xhCQkHKVMZ4PGLn2MmPCr2/uexqDh69h6GBk/rayJ0k6GTvmw== 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=5dtSozXRpKhBSknQ+s8s/18Y8o9VbBvC6Adg572ej9s=; b=o4ww/8idn4fZeNcS6w2D1nrVz3mZzQxkNKFxNZTd/5snV66QFD2LoXf4WvFPafCzpnkkHyZdXMl5ZZ2rPvdMkaw1ozdExYoSec/mmerwxRJdWt21bWykOtV64e2WhaD1QAFWPTMieqPcJ7H4TRCsz54KTO6WPGJbSfcSIPgXzQtn7Prh9kL5L/NDan2zWc8YUKltNeki7Ig4m4+JJ8DxHutBJ7MfKy8OTUsXeY8KTphWwI0E3oVmgiORvPvTunkuxJSSvxYWesqvIW4CYUDsb8MAqXd0c1F9Ea+oyWrK/KOe+HP4LpN+++yEmWZvG/Cy6UQHrt0kSJrui2rh6h/yIA== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:50 +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:01:49 +0000 From: Yangtao Li To: 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 v3 29/62] mmc: pxamci: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:18 +0800 Message-Id: <20230727070051.17778-29-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 2172ce7f-8f20-4e83-3818-08db8e6f5985 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uR0C6So0XWwJZCrHKyer+wHkY86vKSNfCC4iGtu5gFDGqyvc+DdOHhphBJFivqsfjggE1x4pMaHj3+A+7/0b/fgNVzMqa0XiFZ+Isrbjew0Y0YM0bSLxOdYgknc00anXklGeYdOUDsEFuPBwFFSRSZPgJfBtZoRVlu+5vqf8uP+HDORluFPl2vg+VgcTdZ9lOB2NdGLzTqesTtToA2bqKXIMHKJvC6D+3FORhaSeydcN1AZTkMMl1wL89GiHR0dAoxVQ3jONNZyVejIuWUMV6bbps8C6bN1a7zvxapIJ5c7oAusi/G3V4yg5puBvnYxcArYojSbATX5bueQp4gcICPjwU2d8jldk54XIxfzdg3Sh3gC0oibp2mEsqQ6IZfaC4dcCSbBH4oPvqvEZwm8L7kkgiKQt9tKRESK7iIbQ7AWbfaWSvD2wos/QC2zW5kfzYpNLjP6yHP+Q1xirEKqSVU19LKxALmSIqyaQwvc6kxoLn7shpyCHBebg2jtz+05uSasZz5ZMHBudYPALcJv08PAZADT1o3xXklQM6Tiv5N/3BF1B2F7JZL+JxQQuHjoQIvF6M+2WgaOpums7SsNxXy/JMzMW82C7b096urpqYyapsppaOjTDAIt5Eqw7CLgY 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(6916009)(8936002)(52116002)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xPmdsasOhFeCRmzQanteeWia/llx?= =?utf-8?q?zCe9c1mFEl38x64TpxGUdrpW4yCSXc4r38aDVuchPv0s0o1pB7AZmopTtaqvGm5gi?= =?utf-8?q?/7i2MPN9TXt9l487srk0NvZUryx5r/VHrDMwwC7qZblglJcSEdKRT/r2xbAMXsm2w?= =?utf-8?q?LqTogiT8PmfGos4B2QViMZ77Vh0l66d1htiP1OpJ9S9zgE/rGRl+elzisT9hpgbx3?= =?utf-8?q?R0W8Z9qgRJy1eSJN3bV+fOdIZF8tSZzWdEfXhHP/Vl1qEmpZ+0oANBTOUxNcoQJv0?= =?utf-8?q?6N3qBl2BGf2fX663L5UN0j2bpRvLZjovhM9z+5fwLxSi8gI4fwMD9WEEl9F9Mb0u9?= =?utf-8?q?NQpVtMMnaYBG2KvJMQgikh0nS4Y9b3FRwsfLrSEBv6Z9QC47exzrEoQpjSFkVRe8J?= =?utf-8?q?sZWxmSdd5qnqeTZ/s7MDLHkUQfqPyXmQgtL8F0Oyxe78PaqEPWJegTpAQ1/onuaSM?= =?utf-8?q?EuGkIJL52jzesQeOmD+vn9H7vq7MaCCxndsfRdSTQDUponKJ+jST++Svw8TDyLEkw?= =?utf-8?q?O6WnlN4NxiH6jej7DGjhbzb182xCtYl4c/Golqu+h7Xm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KpmWsrEJTF9kAwes0hi?= =?utf-8?q?ETv2pwnWg37OJ5RNXPpRpVGm9S6BNY+4Z7VUW1k76etOgNSCcTxdqY4TasD4qmyB5?= =?utf-8?q?wucwQvWj697G?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2172ce7f-8f20-4e83-3818-08db8e6f5985 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:01:49.8747 (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: qlkYbRHWb9hdqYaoU0HGrz7Rwxq7ug5pMiMAthsESv9E0NoKW4cBFiPUx9bkF6FInmqX+OYfgVnxGWl/TJCuVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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_BLOCKED, 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: 1772556750793639338 X-GMAIL-MSGID: 1772556750793639338 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/pxamci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 1142cd2368f6..e44c8ff6b303 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -783,7 +783,7 @@ static int pxamci_probe(struct platform_device *pdev) return ret; } -static int pxamci_remove(struct platform_device *pdev) +static void pxamci_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); @@ -807,13 +807,11 @@ static int pxamci_remove(struct platform_device *pdev) mmc_free_host(mmc); } - - return 0; } static struct platform_driver pxamci_driver = { .probe = pxamci_probe, - .remove = pxamci_remove, + .remove_new = pxamci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:19 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: 126706 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp909296vqo; Thu, 27 Jul 2023 00:10:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlEZwSRzYNvSJDBbnHqmXNJ9GXyWbSqTVsHMlB55rexCjSnDT4ykUGb722H/oqprD4KCxPWc X-Received: by 2002:a17:906:5356:b0:997:eab5:f1c3 with SMTP id j22-20020a170906535600b00997eab5f1c3mr1126011ejo.73.1690441828571; Thu, 27 Jul 2023 00:10:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441828; cv=pass; d=google.com; s=arc-20160816; b=kZ2El7D8ajFDhAuGP8W+4CNso8pV0ZWDmUZy6fV/armFxlbX5szPjVmSlQcxf9o3FY moJE7KEH94piSvG1XzqJh0hwFEUDYvbVXz0Uj6LE/SodGXACgEN1Rd8eRMk7F6tAoy3o F13EJrFsBP45k1e8UXguDxjduG2DmdBstyW7bRklJx0NG35jxyTWZe4cp7Gkqhle6nDs /gkAKw4DtTH7LgIH/SgnFLLr3SpdmT8D5h9THoztXGSeGYcDrcB7Qbdc3aeWAaW9VhIo 2oWPrgHki6acWE0Mwp+f6NdgWdvj7EG8VS7TL89X7yf+LVJQcpUvRZYEoZZg1U4IzfLF f2KQ== 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=H2uAnlw9We4maa9XEpusc3P6C5nlTy+13sm4GqQjPDA=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=YkUX/txJi6j3A/sj8Cwk2wsv25RcaDi2LxWSAsLP2+A+6Mom2VBAz85CXDKDQKB3hj rWgfyoOd3Y+ZEM0ObLWrsHI5bDPI71ECWmVyOLYXq2ov1f8Ns43rKrYyxqMaM8SRKeHW XWQBTsiV9QETjekOOt4y7jPfttNH//9/AnVr4ub59iTvWttt+P83YSAR589+unbP9Lc0 2UZFh2WvxOQvTzWNjnVmOGXNj/BDe8DimlBc0+29jrHXTOoK7Im7gKuFZmTF/vrzJkyK piGAJCMGo9FnfPz1asOIEWfF/a3E4IIF0mdkgbsH52/cjwhDILGM4IBF9iUSgCegozIc WqQg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=pAjFH8+P; 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 lv14-20020a170906bc8e00b00992f309c359si592475ejb.430.2023.07.27.00.10.05; Thu, 27 Jul 2023 00:10:28 -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=pAjFH8+P; 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 S231320AbjG0HES (ORCPT + 99 others); Thu, 27 Jul 2023 03:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232876AbjG0HD2 (ORCPT ); Thu, 27 Jul 2023 03:03:28 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D9F830C7; Thu, 27 Jul 2023 00:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IuC1FO0Ret9lOmqVwQXOko5Y6k3KxhOYrKE6SYFi6A9SKu6FVCZuv5sWHHbN2WgFetgpBBZR5PxzwulzC8DsEFsaVGemhgE7RnbAm/RoTjgp04FcepQ4xqPmr4bB7iOQNfHmHQV/N6dgyuezvHbth0SBKe99dJrdx3FvdW1Qs1qEeX2jhZ8nKlRyhFy0tBJ2pumE9b97GrgX+z+qj+iqcDwZCmMuZIQSBAM2kspo4HhlxLeLYlp8I9VszaIe6kchaiOz35+dMoPXJvHVFARYTI591ueON8kjrpK76IPW4DK11/hAIiOMVVwrWc7WTFIi0n28Ksc/G+pY5vqWTxjuYw== 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=H2uAnlw9We4maa9XEpusc3P6C5nlTy+13sm4GqQjPDA=; b=k1W6bnWpXQdXaviw8799zfMxI0KaNfXZTLJpcTUzOw9AbthCQT2n7nvI3aq0gGSjhkQczq0PJLCwF0QdYwrgqxiScB147VD8C8PPr+6G7XtZo0BXX/e4an8EahoekJ9hEn/b8XoGlRDlBxA+h+rPmuopJGFEkEpPz2q+UDMNMTnJb5Xzj4HAIwljMrBF9w6I+D3IF070t5zpip4Rc3J8UHIhqoZFo8hDd6JPzEzx3JqYbV5cBz9xVbRKPJtP5MnlG8Hq8ZYw3GJWe/pe+XdQxoKAqzztVdu1iJ3lwOif3GJWpTqjQyehDvZhHgyUW1OxMQ60p/gdRbOErAvJpAdiAA== 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=H2uAnlw9We4maa9XEpusc3P6C5nlTy+13sm4GqQjPDA=; b=pAjFH8+P3/oel6NZ8kTQSD9NE2XeXcaUZLTAIT91doTyo/1ExFnsWUZXCnEBwFDpc1kM9Xz3btcMJKHJAvgBvl7Ukg29eC6U9lZ4Cpl1zPVWHRRksFizAYA+pbUfsrzKOEyfwkRcFpajGyHTAotQw/yRvJohgX0zEDGPp/587f0l9bdzBvquqErf9gaBJhp7ZN685HhS3e4ISTi5BlQm7W5+FN3SWP/J8rhheVxEdnb81TQmD9mZ9GQdnTKEginuPSeSNXUlCBgLmJnKD7DwivPJeKFWoG9YqqDQB5wsZcWSPwD/3gyHyyiVWs2a4vJfSEwu6U8cIFOjQI0JkMBldQ== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:51 +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:01:51 +0000 From: Yangtao Li To: 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 v3 30/62] mmc: moxart: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:19 +0800 Message-Id: <20230727070051.17778-30-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 001d4c8f-e187-491a-5979-08db8e6f5a97 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gz/mbKN+zvSuz1zJS0Fb+W1NYsciMQQuEWuF3HkxnY6PYuOJlS8IRW8YVjSS/vX+zHjC5BzK2E6WtqcGng5NYPG+RcKV14mJ5NsgrGYYXJOwmqXV7yh3md3sL/3EIfNs5i4Gk4efmgGbXYjnu6DFysh2rbLB0Glr8Dy5XnbiKqZLae5pF/vd7WO/HHnmaVdMKhNCBb1YFsSLIXJCc1tdWKLWWRU4mIQdDzyS4z9RsHYUr4ymEPzRPOF8xMwX+VgFagFmsT+99nAy5qZNWVYzAQVvC59ioGsBombN/obKGH5sXcgWYtb+DjQ/4CED+avhQuyTRXbSZF1PLZ6J3X8ifhbSPlX5towFH27A4OosVVbgeeWBZH2QHSoVVXxjxtsCxz1cM1+mKPJiVbD+ldF1BH97TO8A1M4b4zxRdJei4mqOLDhjVJEyWq2y6qq7tgzz9IAOxuIZRaZYgvGKEbOA4ypBchSqCdMzUDqs6HzwVDXc5NZiQQFdHyN+lYvf74JCQeOASszqosJ3D4NtoNn2XEBJdEI6PLpYf72LsyLCq7GkTPiJ/cT5q6JuiYJS0kMoANHyfgAzWOjJi5etDePma2NwLHJSiuujTz7l5gqe1xRYBCfHloFtiqKC5lsbTWlG 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(6916009)(8936002)(52116002)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-Chunk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q?5zqMqQ0oXDVvv658DWOwlOe900LTcv+M/sPxEICqy6uoeAF4we5dwxDfDmU/F6OGb?= =?utf-8?q?F9PO84TaA0NyFHcJLx/idKxJ3ARXeQAO3pmISj3Jmt7EhnbQDVPy+G3Gik1xXItJZ?= =?utf-8?q?JTtVO8VQZa+tmlmu6O4rDoLs1jEvoPypz/lHyQjiDA1SkCAopnNUJRIQm4Fo/gTbQ?= =?utf-8?q?unseygxj/3sSqBZeJKVRXc8o1Xj4er6JZC7Z2BjU0zyEA1myl/5O5F2TAfzjA3mvq?= =?utf-8?q?BqpZC/6rH30lqETXEzEyktsCiVXFug81zE+eY8pOvGPj9YBgHmPxvpn8BHsQnCt/m?= =?utf-8?q?88MgWQCZIkOF6JFQJGLALCwLqZBCuhNrLGemovhZV31Jx8BQPq+hDtmhu35FIoEw0?= =?utf-8?q?ghN5qZPmIbyxelss22zFCySs3ZcADJxPVO+vxADK0jAtehw38TCvqcpuJw1nIzQm/?= =?utf-8?q?EB9oDZ5YSPc5JpXNubJ5+TLlXje2XS/lFSOrLEDxQtjE+xY0+6hl0BVSmuABHbAF6?= =?utf-8?q?y6wpgoXYrPg99XI8oOut3mrCIQHziLoXAk77tte2deH3kcVZlFsSswbiV8R3YSUzL?= =?utf-8?q?CxxjmWCTyclOm/MJ7haFShgLBaGM6kcZMKhI564T/Qgenks+BuNNNsZDsjvdr5PKW?= =?utf-8?q?w+fbD3QRVxe8+tijHlb7P3yOIMjKypjyncKy1SF5DG/Xjzr2M1RuUOjQicfYAX7E3?= =?utf-8?q?TnWrbeW4esw6?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 001d4c8f-e187-491a-5979-08db8e6f5a97 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:01:51.6428 (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: vt6FO/RlOuij37/JjV9biHkM/1iYUqm/MJMpzPOm5by+55pn7rfg6IupYkJ7bIb9u0fPCpak7e/cpUgc+ZtxeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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: 1772556730817076238 X-GMAIL-MSGID: 1772556730817076238 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/moxart-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c index d0d6ffcf78d4..6673b95747cd 100644 --- a/drivers/mmc/host/moxart-mmc.c +++ b/drivers/mmc/host/moxart-mmc.c @@ -687,7 +687,7 @@ static int moxart_probe(struct platform_device *pdev) return ret; } -static int moxart_remove(struct platform_device *pdev) +static void moxart_remove(struct platform_device *pdev) { struct mmc_host *mmc = dev_get_drvdata(&pdev->dev); struct moxart_host *host = mmc_priv(mmc); @@ -705,8 +705,6 @@ static int moxart_remove(struct platform_device *pdev) writel(readl(host->base + REG_CLOCK_CONTROL) | CLK_OFF, host->base + REG_CLOCK_CONTROL); mmc_free_host(mmc); - - return 0; } static const struct of_device_id moxart_mmc_match[] = { @@ -718,7 +716,7 @@ MODULE_DEVICE_TABLE(of, moxart_mmc_match); static struct platform_driver moxart_mmc_driver = { .probe = moxart_probe, - .remove = moxart_remove, + .remove_new = moxart_remove, .driver = { .name = "mmc-moxart", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:20 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: 126746 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp921970vqo; Thu, 27 Jul 2023 00:39:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlH9htNVYXVuyZSXl8GT1kzAZIbNdUvT4q78eJ6Y3zLEPkhJEOZn3wAghQFASzSl5/Xq9xWG X-Received: by 2002:a05:6a20:139a:b0:133:215e:746d with SMTP id hn26-20020a056a20139a00b00133215e746dmr4359835pzc.41.1690443540632; Thu, 27 Jul 2023 00:39:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443540; cv=pass; d=google.com; s=arc-20160816; b=BA4LiuQ7y6wuqaY3YnGiHiKfa0tPvngBFvMVrZtq/B4O9SR3dFOLrnm+PAew2bACgU 2NZc7Sr31OXyvEG0rLSpInpPnIZb701lciQ12a/BqkLCjKlsgQ4uK4tCJznoH/zRPE9v 6/EJVckR3AdCqkCSzAt3L1Sx5rxwpcSSJnA90fG70qBqTBoMc/fanJB2VWhtF1KVsZDJ QgQ+Zatl1uJ1REFoN5aptz3AWHGfgqx3HWLQxSzjx3sMgcHaV5wAKpg3UH4tqzhEBaD+ 9haDuSo3+7t5+19sU2PGR1zsqYVXYMIsSNlbPU1CdNT3d3vrdsgHM0oSeKdzzXiRcGso Xtng== 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=ZHeI4VADTP325Q2WM85PJChNJujdvQV/fU1uFiPIvKM=; fh=m57JEiI2nA4Ac6xsvVbwnYCRCX9O68E28ZTLeMZC4F8=; b=bt0BlGPGKqEq94VlLuGe29G/yrmVYD9j7atgsCmplz7Ho0zdE/OT1dwSj8EvZITHns 7yD2yqkxSwKnb34Y6Z38Z9mnqBxDbEZB/5za9SOYHaaRo9P/llPAORm6agxBgkgAz+oP YNeQO/mHLtTFBpZy4VXfc/vOonMK2EYGZU7ZNUVNWW0yFvOuJ6XgC8EEMeLHlXwK+4qP TFXD6BsFxcIN9PS+IzKUdNUvq6SKjwlmY/YVZk+BLvplnVkfKR9ORpykXGibdTBsVsYO Nvbl3Txo7Hh+3TKPLp68SgnrfD425EbIXY4s+HloQVAl9HfumJYafZeqStL1yJh9zwGI ZOTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="gTt7/Xli"; 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 16-20020a631950000000b005634fdd0979si863146pgz.496.2023.07.27.00.38.47; Thu, 27 Jul 2023 00:39:00 -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="gTt7/Xli"; 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 S232941AbjG0HFI (ORCPT + 99 others); Thu, 27 Jul 2023 03:05:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232938AbjG0HE0 (ORCPT ); Thu, 27 Jul 2023 03:04:26 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2990A4226; Thu, 27 Jul 2023 00:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OsDZ53fe1/Uvctacb+IdXGaC4bF0q8ox8SfJjyavJYo/aMPgg+rN0e/LZqsYn/axPlC3oJ2rILGhi6r4HOzM22cAC7+nycs9old97TQWBQW/DRj3n9PMe9LMQZwqlNqHj1/BaO04scFbiRdJIyp7ITO1y+NT/y5fhahE5pJOAuSavWbmHvaQb1SG7Mf8SCBJlaVcuHgSKQ0TFqIJdwcO0jHpxNgJElHUYULR87+QdIHOOBK2pKq3gVt2GuH8xa/XuhgLyPt0aXASNsjpRFwexcZJDzkM0aBzbxE49wvJA/C3JF09O2Akln2x40dvfvGvpQRcoYDmUOW/GANNU7sXoQ== 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=ZHeI4VADTP325Q2WM85PJChNJujdvQV/fU1uFiPIvKM=; b=du9zBbEpRGlS0KRA1mOZvDh5GNGc0dgRlKfQ3bGfycQ209oQl8BHoBB5GG/IU88ceVlJ1cXrMqyGRTfUO8SfFO1R/9kpU5tYPcywXMNLyQvQdPAzrEQR9U//uEAPgVX3nsD1gfprsKtaLsVqzqjQumA9HsLLau+QbaIsYjNWljakhD/BQwt54iVyO0dsC/BNMVNmgOkeSyY5YThduDq/jJoB8hID17Bf8ep732JX+tWAAlFwNYM3EV69EdpYWmlshfTv9IABj9m94vGxwLhsBuIKJ/GqA3RYbYJXq1elmLToVf49xNLBx7wYvIRkFVK2UDeeOZFkwlFfW28SbJ1R1g== 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=ZHeI4VADTP325Q2WM85PJChNJujdvQV/fU1uFiPIvKM=; b=gTt7/XliYlPZBfoJHccG2VVfgTatatCrtpPXKm0UL9YRpbn8cOzjiEUWzJTHrgdMH5JavqzsvmeYYVxfA+xh9jL7KrqTALJu7l4KbOeaaYaFeFZJVNAh7qqctsqX5MIx2nGZpTo8CIdNHn9R0KBTJyxR1JT8w9n7fZe4e3OlU4/GC0QKS6JQqWs6d0Xd8YlzpQw+9Fh/XDCDljmmnT/La+Fb0gzU7EEAPCaYxY5ehOfcL9PNzUvG8b8Pc89a6DzFboddrfjra+Wi36uSldt+YYze9uDG8Mni/ww3bDF/zowF73WceAwStq4F04A2ewFUZgN0wygS/bAz9xjUId/jCg== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:53 +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:01:53 +0000 From: Yangtao Li To: Adrian Hunter , Vignesh Raghavendra , 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 v3 31/62] mmc: sdhci-omap: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:20 +0800 Message-Id: <20230727070051.17778-31-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: ac22902d-f09f-4094-b92e-08db8e6f5b85 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s8hlRJCG66UWq1xuffSu8RcapNknrYaMW8cF1ybFzF1sRDTyleL8QkjMGQebCsk7HgKAD/ke/W2uhV2obWs3PlOvIEXt1JnUnoj+YwdLEwLIfHZG8NIUoNAdvxPPIe/j59BRaA/qhzBNzdReVQxUnULV6+ftJTpQxM2QU7sdkyfQC80UxlIO3kpKvQ1MHtQOMAtWeaHJgZtToqIqhGbzYsEl8tyRSZPv3HO5+7vDQwpZP9cWcYme+Fl+vXllaghYMJA/llFuj8A3wHX6kQvYN2xvWR29PWijoex8XCdBB4krbL+2DDotKOVJIMwCqL1KBUokNLcO/GuvEjgEJ/4/4gV4VY8TZrdueNfGjKTQ3Wf/4zxB9TW5/EWTBQaROW4Vuw92UK0pMuyzcQ5BKYuqzWbTCHgxLYpS5TP30s8dyDWrs0b0lKYBKnx63O2JlauUmS1QqFQgU2W5o3i2INj+QsoB2IO3RmWKjNRi9B5IDQy4+t4wMo3d35xQz5i7Dccg61lrvl0BQoeAWv5BQ/toqHCSNnAPKCdjNiv0Fw95gWxdPFUI75DAlj03sTO7uT+Qh9Dy/N28laepzH6Bj1g0H9F9QtFAWBrsTVpI7j+lH4JeABWHnrbNCr70xeMOTwH2 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(66574015)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?YElxQCGnsRaJtgSo/22O2i9mzOBB?= =?utf-8?q?IPbYunaXvy+qimw8FIC+Xj+igJp9dO5QdK8NIWhaXK6BEPGiIu9D0aTFplc8Q262i?= =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8?q?e/lCi1F6mgFRCu8cS0B8eTwQGTmxoNbp9XHGmB0owf6Tzn7Z+mOOgFDE/qNH22jOT?= =?utf-8?q?X0I3oqT6R6BVkLjY19loCY+FMuML6kDLLZZVqmqPRixQ1cc/AQeQFqF2fh3DArn0k?= =?utf-8?q?wag58oInIaMIgQKehliOr+w5gB8Zpk5j5F3RED0Xj+ghO2XKIomSP+0hBHknzXb6l?= =?utf-8?q?LwOxbi0zsVaGPbjNv8o1tkqHCQO9Ui2OEKkc4lxeFXSP9Pzamt4qopz2iEkLY3v4K?= =?utf-8?q?DV/Pi5Kpz9Q/i9pUqi8D1gJ+oK9yQG31q41wp5TT+QoPi5rrdHU9FbZuohJpKo6+1?= =?utf-8?q?o7/36xAHsEzm+6pzkBS1eP0Ba5aDzOD+ZH3OoyQsVmCRU5sZbHrI7Xm+xnIyUjWXW?= =?utf-8?q?n1Pw9Tl9Afru0yKzmBDRLWXCaMBCZtZ4rTJwjzp4ZjTXPem6M18m2K7Eu2f5CIZK4?= =?utf-8?q?Ay3kNrU3EtnodBOLV+8MNpXGsi09EpF5XNGd8Aq/cW34BA/0f7VcwAaQXNngZKd5r?= =?utf-8?q?kixfDV+HxP0bzvgOnjwQwALSBxMIFw26smo5hg7qLaC0GtGOyQikt1VcV3IMR/f3C?= =?utf-8?q?tCBStTnnmBrj?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac22902d-f09f-4094-b92e-08db8e6f5b85 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:01:53.2385 (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: AmgXOYqfA4fLru8d+dPhCENLGGSGx1TzibUQQwiWeylr9ulQXap0wm0qFkjB7d7Gcx20CKcjMj1zSOBN+mCOxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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: 1772558525940139968 X-GMAIL-MSGID: 1772558525940139968 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: Adrian Hunter --- drivers/mmc/host/sdhci-omap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 8ed9256b83da..6aa77eb4a3fb 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -1394,7 +1394,7 @@ static int sdhci_omap_probe(struct platform_device *pdev) return ret; } -static int sdhci_omap_remove(struct platform_device *pdev) +static void sdhci_omap_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct sdhci_host *host = platform_get_drvdata(pdev); @@ -1408,8 +1408,6 @@ static int sdhci_omap_remove(struct platform_device *pdev) /* Ensure device gets disabled despite userspace sysfs config */ pm_runtime_force_suspend(dev); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM @@ -1478,7 +1476,7 @@ static const struct dev_pm_ops sdhci_omap_dev_pm_ops = { static struct platform_driver sdhci_omap_driver = { .probe = sdhci_omap_probe, - .remove = sdhci_omap_remove, + .remove_new = sdhci_omap_remove, .driver = { .name = "sdhci-omap", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:21 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: 126742 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp921273vqo; Thu, 27 Jul 2023 00:37:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlGzn/ksm44ZTATn7uDURU2nq4KwuTe1RCSULW1DDm7wtNMFzC//egr0vCOhAxFlHtRy0lGB X-Received: by 2002:a05:6358:98a0:b0:139:688e:c73e with SMTP id q32-20020a05635898a000b00139688ec73emr1665055rwa.32.1690443440313; Thu, 27 Jul 2023 00:37:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443440; cv=pass; d=google.com; s=arc-20160816; b=wDlf+jgqV8eK02wXnYETJJ7KjmdWCSDKfGinRN8VHypQ91cSLZmIdH6ltIHBL1h3N7 DMzjlXQEHs0RkGhOAMcC76cizxQtAK+yVUV0udER280yIPT2oENiNY2tEys6M2oGTimn PwdoU7O1yMOylvXOiLnx/AWiFMvpAoXWMrSU9LBA1A22vuOGOxiOCfsilBbl9mfpw80K Y+Up4FHPQ1mfFN+2kkpOJYJYm4NtWJPBZBjq/31REAQJNhrNRvcUwI3MRxtsPESh3l14 O6UE4aOhEFkn4+otnW1gJS1+jeOGFwgFcq7jY8iZA2e6Lo3GJapsDZ6j5ryzF4Elql1F IQ6g== 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=A3SD+E/n9s8sf/g0RFwOgCc5gSVCSgDJcPQDwPUCPDE=; fh=dXBeKtuGJUVnSVXh+swQ0VJRTjNtJUAEpoonoNsQzGo=; b=FCkL5vOGizrsL46WyhuBEB9YKckIqFV7FETr0HpBbiSrAI+1GkUwd6VQD+sRkee+4f DC+PB9oCTGAHnPEDKfTtEOFCjWeUXQrgwHRqBYz4u9UM4nhHoYkvPckKBPolu3eSFrtM s6BYrITEgz5yD6UAWFcTtACU7gdraUldZW8PeDVCexj0jryoi175fu0zSkU1HpRpQA+X ykl8chHOIbikLPx2kl0BkZgV5QqJpnrpoGAnnPy48axIfcWr8EIV+z77Ygv3EVm6GpWo 3hj091lZnxK4vKR0i3l8DQ5FaafeR/U68zUwOhbhzQ+hnCJXbAoZyMAj99IKVNp1+JNg ULIA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Vh8FaxLL; 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 16-20020a631950000000b005634fdd0979si863146pgz.496.2023.07.27.00.37.06; Thu, 27 Jul 2023 00:37:20 -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=Vh8FaxLL; 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 S233073AbjG0HGJ (ORCPT + 99 others); Thu, 27 Jul 2023 03:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233064AbjG0HFB (ORCPT ); Thu, 27 Jul 2023 03:05:01 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2116.outbound.protection.outlook.com [40.107.117.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD7DD3AB7; Thu, 27 Jul 2023 00:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bIepKKW5ffVg2+rjDWZRDCIMjlajBrxFkZbA3aPzDUyeyY1sGEQkRQ4yccYhdfyWHDj0vE1x+4ODU4H6kA+RnUQu6o2Q+NP2eG6a6U9DjQ8xiYaLzTDrT0j49gWNOO+XC/HN8CKZ51nFa2FzSLVrIGir9taMhlUBnHEeA0eQGFSNZdl6iaeY8n8Cdgr5a2hvrP8uuvWh3ASIP2mQxODN9mDradL/HjVpTRn6hHURospG0MuRk9ZZqICV2E5skX0Bv66AdfsejwZ/oRuwC4bMEAwhMg5n6lAD/AE1ZtAEvRHVhBpNvgHwPpxG6YpSj3uHsI4Rn4/98OKCUTHtvQsNWQ== 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=A3SD+E/n9s8sf/g0RFwOgCc5gSVCSgDJcPQDwPUCPDE=; b=WybfvHKUgY3/dM8oKSdzMBgzZzsUZFc9bXX4LKustqcV0cddRKfhaiPcCsYeSwVDquCq1y5x23PEAEqtapz5msa5bZwgwi0Tonb8yl5cbwqKSFoWmIvrvM77ua8mBcUCMtxoAom0xwH08pBr8UY+O2wr4PkRXFU7C1Sdr9iUYpqYzwkSx0BWnYQi/sX9pP3d+5MXHgY5nvkBUPJN2hBvjonzPgZKRjlqK52ToXl3rc/vYJg0B4IhCu7S1CD5fviWjyu4uGaiLyFEgtGNOAbCAuBudUP5R3c5CVTuXy50HHWcCdIeT2LDuOhJ23kOT0Afdq+2fKoqRRXrdflPEFG5AQ== 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=A3SD+E/n9s8sf/g0RFwOgCc5gSVCSgDJcPQDwPUCPDE=; b=Vh8FaxLLmXx0omhy9WsMcjGQpZ4yOb9iMEDqh2K0yqpVG7Joka3etm4FFSGv5WQigdROTJDtokuSrT4M69It8L4ObfjJ2fwOKfpq106UbGU+YZiaefJ1lH2i7ZmbfI7gaC9GmdUMSGVfO95anTlz69D1vp5BP+MOy8I4g9k4uxkpL6/ciBUISf9MvjxLXT1rOaDFMpMtpsnKPHm4w2HLYzxADo2TmIyA3mcJ8oG265BPBbfXX+I9cpw4hj2rGmYKqTueCQXKmSpKqkWKnddICwXeN3A/j5LEYMFakDAI4s2aJCEeETS/ln9YOw+3iR/uBdw25mxGDQCvx/waeC3f6A== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:55 +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:01:55 +0000 From: Yangtao Li To: Andrew Jeffery , Adrian Hunter , Ulf Hansson , Joel Stanley Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 32/62] mmc: sdhci-of-aspeed: remove unneeded variables Date: Thu, 27 Jul 2023 15:00:21 +0800 Message-Id: <20230727070051.17778-32-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: e71f6839-8742-445a-019b-08db8e6f5cbe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i2qcdyt+7+uDuRoRHKe0bl1DKPxmgQ0GLcc587BOjIsazpDPKfFWRvP7GPjQzUMDpCfa9U9is5XabFGGRTHhnn1jNNyGr3x7OGcqEYirZz71/syvYt230QjzedZnzX08QReHUF/+UWs6K0sn7sper5dQUHxxcj+2PgdnhXnZmB2LSb1DQrIOw1kXS1GpXFcKYBE79oBhsvdDFgGs6Jy3H+s0NlKeUDbnthum8rmungHQEQ7xvonSuu4lYOXXjHsR5Hg31EM+vutnP8d3J2G6OynIQZTnQfXIKlN7swBzMu9GoFo/gbCNOB2sa6fh9oMmS/pVOxvl8QEfJ73Rx8Tzr6syGOcTXXKTk7oDbHySD8fUgopM+TxQEmFPNtZRQiACrAtSKrqAuDPkqzb5gtlV/cOrYC846eVCCYdZVZaXZn0VDufhbU8YRGW/wrD87w5TekHeYxBvpGonWLXaDNEL08fkBD7BTrjpq12OAowQPkwrnU7brwqcREFAWAWckw77EES64VkZvGMTzs2Vc4FG9dYRXrsh4eE9+BP3EGr4KAMMNhCUNS0rXUvlAuA+4WhD38VLzwCdJSsj0iH/tTHfdKVAGf1/Oa80hze6df2O5azSeDIlRjNWwG2ziTFkefvW 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(4744005)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(7416002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6wt0D8zBk1YanXMBOIqNV8G8OGC0?= =?utf-8?q?CNCK8vNUhGZj9R0jN6WmbuWLrHeRZvJ+BZznU65RMTv4x2yDQXxHjBfG5c8SimiUi?= =?utf-8?q?YvSK5OOGBbm3rIJYbKGbfCDiJMjg9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KkMB5TFmhMKDtghkoNn4g?= =?utf-8?q?I+pKOUMQz1HCt/q8gb4+6lGNLpxL9GCcMhjaSGb6buFCH3IVzEjsUXB+irZCBlpF2?= =?utf-8?q?YJ6vNtm4mI9vO1kbkUJDeN54fkGy+A8NEIb3fR9t+OHQ0D0w2uHOBHH/9bD3JBSbO?= =?utf-8?q?E+TTjYSCp4dr6hHP2DUExdOrQszct4VPRu63Iv7KizPjRnWs7K8bQn/FuMCVX4ERZ?= =?utf-8?q?RLZuRB1PcOwzfudM9TZZnok4PB2l7/I2yt3oOhWC0thG9N8YK9gr44KptZ5lZnc7s?= =?utf-8?q?EATPd9ml/pnztDJ3QqpNvx/pjfdKyDnpbJrM38S8+Jg6TRqVKEpRyYE5t0loXHYsC?= =?utf-8?q?lE5UVZBbZ78C4564MQ2ySue3S2+nmrhTbQL1W7idGGd7IrJy5nFpyUmdHuNZA7Trn?= =?utf-8?q?M06R7e7ONWNhwIaJW2VFXQGgrK+ZdwYj9di7RRhdiXfojOUQ3C/w9H6W9Ex3JcNuQ?= =?utf-8?q?6wlQuhf2t6+mHyLMoIzyshlIXAeTZR0YADOaHWJSgq9UU8JP9cJoLaH1sreGouOp4?= =?utf-8?q?PiJwTrre9Fqj?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e71f6839-8742-445a-019b-08db8e6f5cbe 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:01:55.3464 (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: HY71Aw5OcZfZvwInE9Icw1LX2f7E51TUpmeQgS7GNysTKxtZwzBEr4LcW7Dj8DlBKIIsRhC2QmCu9kiCS79T2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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: 1772558421101012493 X-GMAIL-MSGID: 1772558421101012493 The variable 'dead' is redundant, let's remove it. Signed-off-by: Yangtao Li Acked-by: Adrian Hunter Acked-by: Uwe Kleine-König --- drivers/mmc/host/sdhci-of-aspeed.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c index 25b4073f698b..b4867bb4a564 100644 --- a/drivers/mmc/host/sdhci-of-aspeed.c +++ b/drivers/mmc/host/sdhci-of-aspeed.c @@ -454,12 +454,11 @@ static int aspeed_sdhci_remove(struct platform_device *pdev) { struct sdhci_pltfm_host *pltfm_host; struct sdhci_host *host; - int dead = 0; host = platform_get_drvdata(pdev); pltfm_host = sdhci_priv(host); - sdhci_remove_host(host, dead); + sdhci_remove_host(host, 0); clk_disable_unprepare(pltfm_host->clk); From patchwork Thu Jul 27 07:00:22 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: 126712 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp910040vqo; Thu, 27 Jul 2023 00:11:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlEE6NnxXyocQrZ87uuOdOTYeHUDl16Amx/2WWYO92RQBRFQyVPcfN/q/cfqd2kLClv7D6y/ X-Received: by 2002:a17:906:74de:b0:997:e836:6bb with SMTP id z30-20020a17090674de00b00997e83606bbmr1469403ejl.14.1690441912645; Thu, 27 Jul 2023 00:11:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441912; cv=pass; d=google.com; s=arc-20160816; b=lLVPhl0TXVtZEMmzBwAR9X/iXtYFyAmZXJ6UMYhuJCw9FPpOhiGeiZFuZWf3hruxPI Aa1yTmph6HGqp/MtYl93gE+Yddzq1aFajDuDru0e+TPdL8wQmGQXmrQN36e6DUyXxjeb VNU56PbDN4l4BvItt1ivIWzUxsi2yJIHrTmcfB4m7Yz5pIvH+0zp389zonJtV4kDfz+Q yY/U/kAdCEbNafLY13Sc1taAwthyS6g/G9afGIDyspVQI99hf06BykRueDmnfrrjWoKf NX25gucoWhgzl2IYSnEh5SrCJ6yyeIUyI1zvC3lJ4iFwVWVsYD4SeEzw2fE2egjqaTEF S+9A== 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=Ky6VZARD/+JhPhEudXHQb/Xqz7DgERGqgfv+ZV13owc=; fh=Fr/deOztmOQctDBpTaSaXkRsYUOXrO8CEYa9gC+nNgI=; b=rghWiBk3a2Al/ll3uhZw02ZiblmCXX9mwPUlPe/9U1SjYFdCwcIC3Kr6uoXbkX9ZZF wBYm/oEu5JpV0aCn+jBkEa6wQCtb/28PQfAnegbXUHULxXbph2beNz1cGoXwqQbV9ak/ iGAW+SaWgZEIb7kpuAiP+6hLnRLxgOw605G6Wiphvlt6w+4RRIRL/M3jnIJszUF5abon apAZoOd3WYQwJTeKZ2z7ysc0MyKL7XB0+T1BsZEVTTGrTtaiDgNjxxc3bDLeXRVi7PmO I9E28gdEPcUpOg885EYQBN5jz8/21Jn07dPqi7DnK5UnvkEcbHzQXa6PE+z+jDkrLy7g JrIw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=N5lBB5hC; 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 i9-20020a17090685c900b0099b422f9c93si566910ejy.524.2023.07.27.00.11.28; Thu, 27 Jul 2023 00:11:52 -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=N5lBB5hC; 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 S232954AbjG0HGN (ORCPT + 99 others); Thu, 27 Jul 2023 03:06:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232882AbjG0HFB (ORCPT ); Thu, 27 Jul 2023 03:05:01 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20700.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::700]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64A093ABD; Thu, 27 Jul 2023 00:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GF1y6zdQxyWutIiU3x+EildjwOF4AeBz+YPS7G9hNB8ni9Mv3yMXNECO3B5Y5SEL6QqRX81Rw+BYqb4tZkDsBWLugmJoWVq/XoYaDCr6MrvsfMkZd8gmWFAF/2Rp3I5zAimnwxLgKlkpLSZ1Z4a+a2yJ4SnSIVY14c6c6tQPAGM4Vp2UTZANb0duF6qY6qS1hdHnUU3zy2JGeHblXN75hiOqJw1RcDlFnre/027j+tNbqsIVCYsbPiyjYlDBn3kGBDtWPsjDCG89499P0PFHelPu6NRWk045moWQ7UGV/rICTH6mfJTWbytBn870GNdNk9wLgn7dm2MN/aYZw0TXdg== 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=Ky6VZARD/+JhPhEudXHQb/Xqz7DgERGqgfv+ZV13owc=; b=jURD9EmBdSOX67XQCqiI52jxulKiuIkKVG+igE2OfT9VlXiG+agbXR+QOVvjORqUbam9ivTc0JlqKbj9IR1mGABtlo5fetw663rPjX1lSwybwJIG/I3sV+T34b54NreHvjgzuDaJ+vFoHvmWIQ/L2N1Kd1tG7fMAG4RgajnYuSm5AYv6gM9WU6mG0sefKZFcOMy0W/gxrslPo7U5twPzTg7odDXvHktxqMDsolBvGFh+SpJAapXtrV/ndLVPFGTkFdPlUULqiaJifGZ4bN3ftwPXDwUS9RTGfbtNVn3/W4eSzIVs591OpsaXKGBN0K9PBw+NEFnLaacNRD0viaizvQ== 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=Ky6VZARD/+JhPhEudXHQb/Xqz7DgERGqgfv+ZV13owc=; b=N5lBB5hCooH5YyLMTlmX3XrlKIOmRRi9yPoIeCmzwlm6R/JnTTWFQwlq2Yn7NpKVmm8J9nIdU1FJnejKQGjJN1SkM9N5Bja4Tp6LVFbCe1JneawVB+vRbHtFoF/D3p1cnDBW6kuwaWBqWFuTExH37C8/Zhc0l/tG1KsbwDDYeQjlMwEduhD6M+mIwjBh28hZiJLsXWocvfe9MWLDtr8vPfb53+4cE8p3p7DaDTEFE5rQySZJDYFA1X8tl+GSVlDGdf4kdBcSO9F09AbIr0t/qEg4ICuk7hSqL38jcpxJDEAScoaMcMy5ur01pQ6vdlkfniJiqE7Vdk7W83+FPYn4BA== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:57 +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:01:57 +0000 From: Yangtao Li To: Adrian Hunter , Andrew Jeffery , Ulf Hansson , Joel Stanley Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 33/62] mmc: sdhci-of-aspeed: Convert to platform remove Date: Thu, 27 Jul 2023 15:00:22 +0800 Message-Id: <20230727070051.17778-33-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: a24d2538-caee-4288-e14b-08db8e6f5df3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jEldcW3C4DL4Ne1aYPGoF6kK/pcTDSQqE4JOFGTmpVt13r679qt4OjiWicWYIqUzvJq8JKBOtdmT0r20+wCVLj9VRjdibK8UaEmRRqeYwkCd+6XA6iFTfaDuRhncLa7fEkXUV71mxshcnpgQqq0ymMSjrYTchgKd/E9oviQJDTcaded6D8EosLsCUI/k29OsIPF8cqCebE++pt0Qv6ypCIy+gEL5/1oBqNtu32G1BIwyQGwD1gKi+phr6550h2I6Lh4WsYSkvRSuhuHRtf8KGkSHrnk6dQzyM1koNQA8qrhh3s+2S3Kr69jyDJeZBAiSerGOOVCd+V8R0lEeCc9EMUHKef3bliYIgeftBFLQ15K5PFBpuVfseUxvvSEzcNMxnv14kOFWeM6k61WlF+ZwJ3g+r+zXsyAMuiaGfI4c8Sxa7OWA5vZYrTRwY7DFugVwCH2saI0/vogF+9CXXrb7/P7DiNIt2khGhwOKqLz4BfR8BhUf2NzBZWVwQDmn3qIDn9qP0Zx3C6evX9GaxE/h5FxZY05GEeN3MbTHzpM3E9OIqIlDtjGIIzSHVHip2NrouEaMHiYeJqA95ibQHQWqggKDrpjNU/4V7eSIvRJ+Hcz+SYNZcKgUXr7cvJiH4PxV 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(7416002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?tA5L5hWN3Wy2Kt6dlGtl72XvHvWj?= =?utf-8?q?3HrYxyOPAkgmiO6zaJsBQq6GlDJkxU5FJF0ES5lMyUqsHb0cLCE/uGoPs10rUdnbX?= =?utf-8?q?3Z2D/yanQHOii+31UoEiYfq+o47fPgbiKKcIJ8GRlF6qA7SHAZXKz8VGqT3Ox8n97?= =?utf-8?q?GJgkALgQifiZxnVWVP6n5Y7lvM5DPauyEO8mPgs9fEIkmtTdBEP4+vUrciDe3ahSc?= =?utf-8?q?xBtN5/AVySxk0QRE3C15oqcZvjaEIBXH5mTZgZBwIcyHhlbP6HXH6JkqfpuFHVqOD?= =?utf-8?q?5fVTHmH/gkz0mQcSND9aXG0CehPLx9CA3jDRJX7cbOvwfZjYEfN7KcDufjpe4351Z?= =?utf-8?q?4Zb+UhtGUXzCCnCjXsy9SIDvcfcU+gyM0EYAnjarmAbER1etF3WHnlRez+IO/BDOg?= =?utf-8?q?2mKNgV2eVjrsCg5Sq2YGVtwFinxRCvLg6nxae67ljnAnRrib9DkaEWyoqO99BLiEz?= =?utf-8?q?T/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xczQDl6c3IexhiKjCIk8VLq1j8y0ZzCcpZ/6kZdKFFpd2c03ADdp?= =?utf-8?q?GYnS3TgNhwmyCJYdy184LpqyZ343cE5oLI53MKOLud3WL9VLDoX55q7FgFVub1IIn?= =?utf-8?q?i11EQhLIUsZAifckpg7VluSegyc2isJul2xuy2WFyrtiWxWBOkkdnlHJhbNXQ59YS?= =?utf-8?q?ozILcxH1pxa8?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a24d2538-caee-4288-e14b-08db8e6f5df3 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:01:57.3128 (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: XQrPUbk+4XE1Esq4cjs3HG4fCUhRQe1m+ffc55Vfhw2oGgf4ImVhDcHCESo1s+sAqbMQszaCEJ7OVJAr75dG9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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_BLOCKED, 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: 1772556818715112822 X-GMAIL-MSGID: 1772556818715112822 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: Adrian Hunter --- drivers/mmc/host/sdhci-of-aspeed.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c index b4867bb4a564..42d54532cabe 100644 --- a/drivers/mmc/host/sdhci-of-aspeed.c +++ b/drivers/mmc/host/sdhci-of-aspeed.c @@ -450,7 +450,7 @@ static int aspeed_sdhci_probe(struct platform_device *pdev) return ret; } -static int aspeed_sdhci_remove(struct platform_device *pdev) +static void aspeed_sdhci_remove(struct platform_device *pdev) { struct sdhci_pltfm_host *pltfm_host; struct sdhci_host *host; @@ -463,8 +463,6 @@ static int aspeed_sdhci_remove(struct platform_device *pdev) clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } static const struct aspeed_sdhci_pdata ast2400_sdhci_pdata = { @@ -520,7 +518,7 @@ static struct platform_driver aspeed_sdhci_driver = { .of_match_table = aspeed_sdhci_of_match, }, .probe = aspeed_sdhci_probe, - .remove = aspeed_sdhci_remove, + .remove_new = aspeed_sdhci_remove, }; static int aspeed_sdc_probe(struct platform_device *pdev) @@ -573,13 +571,11 @@ static int aspeed_sdc_probe(struct platform_device *pdev) return ret; } -static int aspeed_sdc_remove(struct platform_device *pdev) +static void aspeed_sdc_remove(struct platform_device *pdev) { struct aspeed_sdc *sdc = dev_get_drvdata(&pdev->dev); clk_disable_unprepare(sdc->clk); - - return 0; } static const struct of_device_id aspeed_sdc_of_match[] = { @@ -599,7 +595,7 @@ static struct platform_driver aspeed_sdc_driver = { .of_match_table = aspeed_sdc_of_match, }, .probe = aspeed_sdc_probe, - .remove = aspeed_sdc_remove, + .remove_new = aspeed_sdc_remove, }; #if defined(CONFIG_MMC_SDHCI_OF_ASPEED_TEST) From patchwork Thu Jul 27 07:00:23 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: 126769 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp936473vqo; Thu, 27 Jul 2023 01:11:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlG16ayurYUpVInKq09DX/J/BwZWPwsZbpSf/Eag7nbW/BmyS8+BtcyosbHSNEKlYiTOdeh1 X-Received: by 2002:a17:903:22c7:b0:1b9:e23b:bb6a with SMTP id y7-20020a17090322c700b001b9e23bbb6amr2676548plg.11.1690445503730; Thu, 27 Jul 2023 01:11:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690445503; cv=pass; d=google.com; s=arc-20160816; b=VBuPbZwKJLD+k4ysUNtCKNvZPSLQD7J8cnoW0XMEQ7KjO2eghFoX95Cq+FK9Yhz+dP 5uJ8t9QTkJnsLW4nFcMNvp1xKQaUldrCB13gCRqMwNqxeFFEAbkQ+snI4u+Wm8MGphXI c6qw/LsgK4ArdMixmoFN4MGn3TjQc/nYvJiS+gSFjNow0eZKfhbZyis8UmDa1OXeAuaT iUmr6eBJvfnofwCAyxMxiohCBmB6DtO12zQ8iDkdN0LYpetiEiNcYHvSF1PaCkTlVpcD 5SiljB4Figwm8adVicKKU3wywmOqyrSLu62hS+6VQbMrWNVHnmSELg1g69Ln0UgkBncA kcBA== 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=uMtEtYh4yggL3P4Ktr/c7Zr9RRKQR6LhGA6gTsORCp0=; fh=sy30M9eLByds7Tlvf2H8U/dRo3J3gGi9Sy6vmtIbxfI=; b=M/0EO2kf2Q49lRe2VCBObcoL3KXt+PNTo3hlLkqulQp6jzh2xRDlKVn3uH/jCrhE/t jSxt4g9OBRN1nEJjkVR5KVdBxv5h/Na2rlXOc5/Y3fnYDTEl2CdGeW9gAaEf3VkVcLzH 60Iv/j25bccoTRqgBXduT/LRNXrU4zkDxjPSduRqsV8Ke9JMTuHkfPO30RBn5ziB3HjO ZHJBNcV0o7YgV9zfuoKN0nqibFvkeOqZ9+gfAf1R24AjE81RFLVJXytwb/Vjq925vB98 1Mj3L5JIWeJoI4ZKT8YvLZO++C4C8pNEwX/dMxzEgCXycgyXnvCoNVJW/b708DDFkp6m RKcA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=RFNIOrLd; 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 jz13-20020a170903430d00b001b8920564cesi911703plb.17.2023.07.27.01.11.29; Thu, 27 Jul 2023 01:11:43 -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=RFNIOrLd; 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 S232974AbjG0HG2 (ORCPT + 99 others); Thu, 27 Jul 2023 03:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231896AbjG0HFW (ORCPT ); Thu, 27 Jul 2023 03:05:22 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDE223C1D; Thu, 27 Jul 2023 00:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kiy8fpqcp+uNTV8EGISWkzfm6FYRJqrhdHDdxc6Uoc0RfOXCUKsdJzeZox4RV9pED9gWhv/VW0R22qGhNVOImeFd83pxs+Th2eyfxSxSn4vBWq97f7FrzoaMveQgTxTOJRFpL4QSI4rK7cKqjN5g8SuRorDbSB7RpKnybnjVIpy+AxHIj5s7OIGPBadMGWcF4B0KxAAKki/H0eZaTvOZ9iUd3MC2HhwwSbtub15MQPCVZ7tZmdlhJ3ORxZykJ5igfC9zOSeUep7xcL8WwEyf3aBSPpqDRwGq5gBFOYrDX8KzBqWwX5swem3nmG+pfmdsZD8tx6b3YgIe3vXTs9LDbw== 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=uMtEtYh4yggL3P4Ktr/c7Zr9RRKQR6LhGA6gTsORCp0=; b=C/8wYarhD0g763S+2R0YVLoA8YWma4oSOAa6lSGF3wZ3Jdil/S7vy2epA05lHEiRIgiVYsMUAoz0Kv1K2vslF/g5+k3TyQT0xqjuQjDRtO3pLd9K2suSlG6TLK0vnyryuQ+h+RRxkZxNTr75M1cS0r6YNj6qlVSU2cmgFArm31tikDSOv9Vvy9CswROhAuPZjdQiXy48Nr0hh0ddQHRbL7SAx8SZApWCcrEk0dbQi9ZiYsfF6kQg5ObPzfBy4KKiIB5cf+3u8Kg3XcU31lmxiB4ulgeNH7xITCZl8jVM+iOQabBDt5RxNmV/ES5v0iCRfB75fuFhAAkNLSYS2NhjLA== 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=uMtEtYh4yggL3P4Ktr/c7Zr9RRKQR6LhGA6gTsORCp0=; b=RFNIOrLd7nMRu6PF734qYE16QISHRovR/ECDUObPbc6D7CEGfg8T2OzknJdxboJa1X5M+B8rdCQMnSw2Dc+Y5SZUqz7k5CoXZE8Hvck9utSiO4S8u2IoJ/CNlZ1yMuQGUQ17ejRP1G7+0VqCyB7OFPvh/4stiag+9lx3MSrQvM4k4jr+2x3sOqTfHdsLOH3cG9ZYnehqcrfJor+c2OA4p50GzJMpBrCD4a3205HuYHI1XRzcB6jJgjVd/Ra2O3ykJWCJPzS59bbBGIow2HV9uW6aDh2wv350V+4mDU2xvQMYPUZhEtR+G0pIXfwZIQlYgDm7wtxM0hwTT00H0KXncQ== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:59 +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:01:59 +0000 From: Yangtao Li To: Ulf Hansson , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 34/62] mmc: meson-mx-sdio: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:23 +0800 Message-Id: <20230727070051.17778-34-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 01ec279a-c658-4fbd-3b46-08db8e6f5f20 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o6XoQrqFprSoK1KdhqPVLq7ymr3BXLNLLfQzFhp0fsXsQH3EjQp/hSaibvYZEwaEzTekM5eqHdrDotP9CK5S3S5miiIc2Au7jnRsmV7D4SUodym8TQW6/wBCc05bj2TTF51fXga60ze6k0J9q3ubgkujUmRTcwaFDiojbvke3sr+wPOGHjhSWn3Htjla1nal8MQ+dwBvQuabmOY80BIOpwbzXlF77FpNeEzibbLAPTP1KACCc07hsVLLKJzwUJxrRPRg4y+WE32jxnE9OpE5n/c8oowxvqQZtLu/J1i3DKNy8oatYfzmJRx25xGjBEfcjSzZg7RRjc9YNcMVG+xlLQCHLI/4zeuW0lshxfmXAebUbRfgtZhVByKzotu47qk5+HOnMCL47ILsjjLVozLBnwuEbqVnfXAX4YqS0rPVDobqIbO7ZZOyxL6QuKnsg8FvRG0Da8ogu7evhcJKKTJbQYJiEely7TjOpFNTXeoJF/tUsTKT9gosawC8+rlvLEllKaVLaJwESpZhxKj7vqtdqV76sE3j3EfiuRfnMGIbD1JyedgdZMirzByawLRIsIy3z9K0fOuf75wrEc+Y4VSRL8yZLqk5y7M30lC8Uxk+B9MVUB9G8M7A6VjSu/O5c5Ze 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(7416002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?+Nn6h5iXTLuKFFmRnKVFXfZJfJrt?= =?utf-8?q?09+uKovAqVp+GoHS+sc6xdoOmdIHkLl0rB6KRiV4gX+kA8be5yLCcTEn/4cp4IkaX?= =?utf-8?q?z+1ahoVC30MHgBPge1FGa0WT4uCd1EZ5kLtfVe65Ev01nWA+GjFiYtOgjR0eXS9UF?= =?utf-8?q?l4MT2wZkP0y+vheG5FQp/Tr0nD1TZBD2eNRWwudwwA4P5zLH1ZpWQivlnZSvJOZ8b?= =?utf-8?q?AD99L5YT6cMp45HtNzFMzyg3DeMCvfWhiAJ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CwMU5BI7vJK6J?= =?utf-8?q?sgsF2miaxSEcx6MCNiBOUMyPybcLWne7DRaY9kbTh8xGmLrj3o90u11z9txnSiiOz?= =?utf-8?q?M4cb8jD8q4Tysu7Egr6gPH/tkuZX90ZVNmpTmJMKuyBPjkS6clyfl0oK8AuX0TSvq?= =?utf-8?q?y/gz0NTQQ8SBteP3p0ZQmbcOkThce1T4P3IiYhk4vlNSRY71GTwncam9qCdpU5c70?= =?utf-8?q?hVYbrSM8H7iJXV6k8LKSMa+IufL5nwofZBezWFeyPwhLKiG1Z7H2UdArZMzvDPLoZ?= =?utf-8?q?AcGWjvkOBlnWhdccoNJSgGS4ncBxAXsSDkpVXJ57Lq1yx/aI9pmsSNCustAKmhxG3?= =?utf-8?q?F4t0EyObQuAut0WkSkWca+muInp9n3Ua+lNqqvPJNbK+hQf5jX6+0KHY1zVQmN+CI?= =?utf-8?q?itJyMhSOs99D?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01ec279a-c658-4fbd-3b46-08db8e6f5f20 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:01:59.3414 (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: 3hzrNXyFfTDAKTY4M9mihnw0CU/7Yx41Mu+vb0rLBSrLEStUm2fN15U9PUijxzFSsbiM0rabtqPgDoODjTrJZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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: 1772560584697588450 X-GMAIL-MSGID: 1772560584697588450 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 Reviewed-by: Martin Blumenstingl --- drivers/mmc/host/meson-mx-sdio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c index 3a19a05ef55a..a11577f2ee69 100644 --- a/drivers/mmc/host/meson-mx-sdio.c +++ b/drivers/mmc/host/meson-mx-sdio.c @@ -728,7 +728,7 @@ static int meson_mx_mmc_probe(struct platform_device *pdev) return ret; } -static int meson_mx_mmc_remove(struct platform_device *pdev) +static void meson_mx_mmc_remove(struct platform_device *pdev) { struct meson_mx_mmc_host *host = platform_get_drvdata(pdev); struct device *slot_dev = mmc_dev(host->mmc); @@ -743,8 +743,6 @@ static int meson_mx_mmc_remove(struct platform_device *pdev) clk_disable_unprepare(host->core_clk); mmc_free_host(host->mmc); - - return 0; } static const struct of_device_id meson_mx_mmc_of_match[] = { @@ -756,7 +754,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_mmc_of_match); static struct platform_driver meson_mx_mmc_driver = { .probe = meson_mx_mmc_probe, - .remove = meson_mx_mmc_remove, + .remove_new = meson_mx_mmc_remove, .driver = { .name = "meson-mx-sdio", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:24 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: 126743 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp921335vqo; Thu, 27 Jul 2023 00:37:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlFsH6H3X6c0Z4cibDnvsY6UGlXbqgcwUI3Shmzsv7HqbOplXi26iZ0m/iHXiCpAHwbxiGWb X-Received: by 2002:a05:6a20:551:b0:135:9b84:cf43 with SMTP id 17-20020a056a20055100b001359b84cf43mr3797703pzq.28.1690443448545; Thu, 27 Jul 2023 00:37:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443448; cv=pass; d=google.com; s=arc-20160816; b=lI+c0twJb/7PECAbR1daLcuh/WQDRQs4mDsaFqNUp7I9hS3g6f191qgN7dGr47nHic gJ3J0Wc7EqM8d5RxpobWIOD1067OAhb157Gf7DpOm1LMh9JCqbirECZyQ4QRYCOM/JK1 Ey+ar6KQl+lsQ49pBrSNtnH9JziENJgIBYNbTmfRBEgj+eJaghj1cQpgGQyuB5rg99Kf GHKPWlONIA2TqoyidrNc0LnFQTI6tm/O8LLPD2o7N2bZRRN3Qcd9rsqncLDbfZ0LfJsG bNOlXxvXKKXHubmjLKfA1wvRHnnKjKZR1rsBIRR8VLcbpf84HtZsxhvHNusqSyd4mwMx iqqA== 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=Ds1a60oaC5v+9oM6ou+xAQphrPqkP3uRTm0nyn/ukQE=; fh=0b1WHgzFaKa3wEZ+TH0lsKqGVNqDKrTFnhkKsch2fbM=; b=ReYckfNqypI5djpdCuYJIstDr+O4xNXtASsBxloTCCTCLB+Ht8B9oJAWaZaa5zOBd9 51u1iPwu5kZ9KFslpjSSXwm9O4M0E4mZH8Lf4T9E0o6fCjALev1Q6tBe4r/24ZQ0sGPr 5arlpz6mGs//OAcIpGHE3CqLiGaeePeOnH02IS/shqVDADXB2a+GCCBwVPZF2ltb/Ubu XUSW5iYvAeNyM7Cu3loycMfj7FGtK6R4R+zAKJBLkdCOuVruM3JrSjusT7b4fkNJNhOi 3bMi8HdlBTX2kKBaNthG5JXMJpNMZznK35qmgvouK6oOicmJNH+iLPeXZj5z82IRup87 Krig== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aRXeThsR; 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 bv188-20020a632ec5000000b00563ddd55c6csi864543pgb.115.2023.07.27.00.37.09; Thu, 27 Jul 2023 00:37:28 -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=aRXeThsR; 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 S231755AbjG0HHQ (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232306AbjG0HGM (ORCPT ); Thu, 27 Jul 2023 03:06:12 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2116.outbound.protection.outlook.com [40.107.117.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C859944B8; Thu, 27 Jul 2023 00:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BG8HdyImjNNEhkLXVK/kPMQVxcGFgh2OqAkvRTHd5tAAiVNDfdnmGnu5zAlRVvKbx8e/hszbK03pUXRH5agi8O7JPychybFEdKndLAhwjt7wNnTMVGNX0vA9k2JvxX26R2+EwUEeYaZUX+ng4ZwX7b8yfNnUNhHm14xVWSbb2cO2DF37tTqiP3+PQDmb5MKZKKyf0mhO3+5R1wMyDCKySWj8v0w5fmIomoE9N0yNwrKNVal/UH9gJ64mbpN/qlkM10KJ86KIX6rGo2tDKtTJkc3Ko+84fboInTvDk5RbZKlecx0Dxsjo12RecHJmbiSJQK9Z+9DS79daFrEO8+eiIw== 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=Ds1a60oaC5v+9oM6ou+xAQphrPqkP3uRTm0nyn/ukQE=; b=FqAbsVjezv969l7BRLtEAaElOhSwFT75HJGpZ2mwlY+6SDRug64d8N+7zolTujx5GEcQvZOdJj1hiiCuq3+OuVTJFApHVJX08+pYCZfLPA2I77LC5JvQ7amqiYYk+PGVVAwuYpJG81Av3GcumoAf7Lxz5dwKhzRmscRU4c5mrdXWI41mitkouAVU+cPp8Y008Pb7yy99EOFFAoGPPOgzcsJAhLJfwtJK2RSrwdqyYkZ782UWVOtSGSWkpY21Ff7ny6DMqa0ZxIIdEw+ajp/mZ+zzOY2r7l/0vCs7hd+d7INL2bQtSf8rFmboWyIL2Y3QchyMjXaZ0Vj1j6YadwPiUA== 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=Ds1a60oaC5v+9oM6ou+xAQphrPqkP3uRTm0nyn/ukQE=; b=aRXeThsRgFEwXG+4G69yKWRrTEfdqz6MaLpRO5urKzEXm2/zFgJhIvNtKWQCbxBbvFzLUV0iB+qElOZgEahmhEstpShFOF+ijxslsDbDb7Zy8AELcGn1Je77RgsXtqMD9T0nH1wk+YOMMks8IUAUgcGAKSYOt04HmoDvPUQ5jRWtEBQynYFT9TpQfIlTBy4S5aVgclHIfEMNXFD2gG6WYRBDws2Lskw4+IcH+w59glZ0LUXKIiNgEyNVZPPLCzfyHqyF8Y9GYhGM1CWJkxaA7ytq3smFffOgvI9GGR+ZHQcMc0PbUxsgEckSmuUs2B+2g97fWhRUyFK0q2kMXGy+7Q== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:01 +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:01 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Orson Zhai , Baolin Wang , Chunyan Zhang Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 35/62] mmc: sdhci-sprd: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:24 +0800 Message-Id: <20230727070051.17778-35-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 871047a0-c260-4daf-211a-08db8e6f6037 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t7hR1tpvQWjPqc1xJ+qhIwu9YW0/5KI1Xia/6B5HIExbM0Pc5Y4P4suhGNV1Mz7nHVx382Z90/s4qdY/lhpPx08F2Uwa57Z/3PWdlw2tfKPPMCSYumw6uB0LG7mgU0VdO+bBxQs6gt5uBrlTMFbP5gdZGX7J+8LQTB8pztUs3b1Lj2ANf9uh097k/J2PxEY8F95s3JeQaES3AS4OaQpzVxQN9yzQyJv1G7W4XqHc7XtWxn2AaaWaVurl7IXM9nhhVbuEY265tl3adqDphvIHvQiIpecp2hhQyQaz/kxOs75M0q1MfaCnioFkb3b+Hud+hN6GGzyKPLxB7AYgSpwBRTQsMYOkPrJRKp4yNWC+Fnfdwe2X79VD6eYO/YAQewg8uaNfHSmRh+xJomAHgCzfKzg2zFSyP1Zj+9PO5imhoini+bY2Y59S/XtpcpJdx6rmkZwHciIphV45cgqWWCqQqCPEtXS6ig4WTtvncNjy5oOpQW5mx+hnrSBAfxPwT9WN7SrefWYC/Cpy81O4om7mfQKmb+NopJI1TScut9vyCvjJo04XRUSp9gEKyF0KD06+gUcVqO2CMXZex6vdf2B2iNiG+ntE04EoS/zjdHdHA/aChB8q/kVFZit982OLv/jt 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?qbUEstK3g0M03u3VZME+0R/mYLx5?= =?utf-8?q?mwh9bxVeAcrbnAHzicWfcB3JY/ODPUk5kUpC0VBUt7CtFgFMNo/l8wI1yv87m879D?= =?utf-8?q?A6SX//0A7kZA9TnHVyP+If9LPaTayxvGD1+VcpAohcQ08zukuxoYxfFZm+lGsNCO2?= =?utf-8?q?ghaZsS8psEVZxZLLhXdMYn8DyL41FNVUHaVnd5hLFETfwtQ6phwIQa2r04Z/E2bZA?= =?utf-8?q?AN3fMYkj3fv8V26Nuq11L3H0N615P5JS4QgoJrFhaiE+lKB8D2Nw2auhs38c2ELtR?= =?utf-8?q?pSzvFJEcKJL2GP3YxVNmmJ53Vz6mkLLP295DFJXDkxwEWRDMxlcmG1bt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3?= =?utf-8?q?TLzBqxRZHK5y6pNS6ZOd88wbi/BDJR9LSwoMKUopQ3Si7bTUZuhsecAdP9kRONDHh?= =?utf-8?q?k84cd5Cs6iVaTgOmnxpqvL7I+fpHIsbw+v7W7pEM/hb9fA9VKe/m5b/xuwArSM81y?= =?utf-8?q?VOx4br3rrVSSo1SMJA7OGZKXXQqxpZL363dAye6dAC+UQspwX/Yrf5E+77ZMYEb3y?= =?utf-8?q?iamOKSAa8/+YZn+gmNUh9r0+wXAVKRA7us1wESVxsknPVSqJYARhZVKOQJ54/MCXY?= =?utf-8?q?VqJgLfxPeb+fHM9jy5403q3AGhmDljM1x91zZJeAJs1L0g+3swmTyBH57JlyHwabV?= =?utf-8?q?FruRcGAXKxk8?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 871047a0-c260-4daf-211a-08db8e6f6037 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:01.1150 (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: OBEGAPt8I4uNL20YaK2TfZNDPiFCmCC0yASEpV5MxDsQL1q5nU+01XTZpNk9lxIQ9Ppkm0Qzzwh5ipJr8DQpYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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: 1772558429405776758 X-GMAIL-MSGID: 1772558429405776758 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: Adrian Hunter Acked-by: Chunyan Zhang --- drivers/mmc/host/sdhci-sprd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 7f4ee2e12735..379cb3892757 100644 --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -720,7 +720,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev) return ret; } -static int sdhci_sprd_remove(struct platform_device *pdev) +static void sdhci_sprd_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); @@ -732,8 +732,6 @@ static int sdhci_sprd_remove(struct platform_device *pdev) clk_disable_unprepare(sprd_host->clk_2x_enable); sdhci_pltfm_free(pdev); - - return 0; } static const struct of_device_id sdhci_sprd_of_match[] = { @@ -800,7 +798,7 @@ static const struct dev_pm_ops sdhci_sprd_pm_ops = { static struct platform_driver sdhci_sprd_driver = { .probe = sdhci_sprd_probe, - .remove = sdhci_sprd_remove, + .remove_new = sdhci_sprd_remove, .driver = { .name = "sdhci_sprd_r11", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:25 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: 126772 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp936836vqo; Thu, 27 Jul 2023 01:12:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlGzShbg+JrmbeQBuwxEGxcrjz+8n0pUwFGdx9cy7kS6onU0RzSGepJarUJRv2/waOphM17g X-Received: by 2002:a05:6a00:1794:b0:666:ae6b:c484 with SMTP id s20-20020a056a00179400b00666ae6bc484mr6299803pfg.13.1690445557152; Thu, 27 Jul 2023 01:12:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690445557; cv=pass; d=google.com; s=arc-20160816; b=EIsXcXYd4E1tkkJ6gCmSXvhbHpRj8+W8rcUNteWnZbJraOxoF8N+SuWJHagn0rdwXj AK/UtnugvnH+qDsKomDuuBK2RGFLlJi7rW90aAHS0CJGnqbsclv2yzxq2fk/uVPSYjFB 9IbZq1OGJirJ3FmtWfrN6XA0XbjA0SIv3zxVCuz44Cm4cPISECtQiIB3PnmcQ2AwEDvT 8Fpwe5Y6QrM1XwgLiWZeOjYLaOEOvBT6M9gXJsWKnxJLLEVsCTUUUUKqg81c1OZb/+gW skQJNW6Hoxys0Oh5TU1mEO4SWssggtofWAsN5RSdm3EuSOx5EHpCvD1iVcQdgW4xq91t Uz4g== 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=mTZCoxTOibIiO72DCM0N13jMV2Q6b9NpBszadCYFgzM=; fh=wZYlUM3eR9DzHU7b0SBT2HXVkVx6ajD54pczVSribH0=; b=YpdgDyfN8wTT7Sir00fPNMKVbxH5A5i4+Unmk30TOa5lPIhE/yWywbu7ZUf4JqgAF7 E4UAtd6Rs5YJiOjGjDekHJDm1Nu2ann9LtIoxVKS2vwEOfYpjTig9wX5shc668PxkpA0 EkH7DvjXA+isDoWQOTyAz//P9WqT35dvVqDRfG9AGSIp/cgnCvclvCS5TkV3jp2W1pBM qUEcpN8TltY02NGPkxW3ZGBXBZOZQwt7/DTvOVIUf2WUwWHyDQ7MZGRVn2GJRgoqUpn5 HIKkmkdnTqbUg/tNapgiiwFS0U91PF2v9PH5GQSEjdRDh1wvlrxF2zrZhJ1yojwetKmD sF2g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZpDL65tl; 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 ca11-20020a056a00418b00b0064d5e926241si1037631pfb.149.2023.07.27.01.12.24; Thu, 27 Jul 2023 01:12:37 -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=ZpDL65tl; 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 S231167AbjG0HHT (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231818AbjG0HGX (ORCPT ); Thu, 27 Jul 2023 03:06:23 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20700.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::700]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 574AB44BC; Thu, 27 Jul 2023 00:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E/sxdv6EOk19F9Hf/8AWI9Aiz3hYNydAcR8VdwvslG+mIxlhs0mVNDrP1eGjAL9aQljfTr0oZoPlLSVKxEdUMN5XwjnIB3y2ySoaTk7LLrzWcFBhtKHr6s5afEJAZ42BgfhKnKsCVJ7fibQBcuYPJ+zmRSMxptn3B9AjQLolcCJcg40dYUyV9bimwuKU8Vhes6DFBZQVhc3djqfTLbm6+5H+ABhQCeuFeVjTe1QLLddITzoaFEbK83GiYYnDmcfuTyDAwMfmtz2rYpsxyJhl+HOOxiiEN1crEwec5tpfK2TKzdrhxxAj83iDQv/3Uvpq87+bXUb68WfU2y/ssqcrWA== 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=mTZCoxTOibIiO72DCM0N13jMV2Q6b9NpBszadCYFgzM=; b=LHeGOOTVNGoUGCtMb4hoeGWF20M0ZPn/LwuuhOKBmGkIBElDEqX0SstwoztUunvF6IDXn3aZXCdefBX7tX2s8xLUzDlNVdmv7q80w/cHpJ9/6e9xDgRsfLRK0DpSz2JYinp8rmZarYBPvj1Kkvmx00GOSQfC7/4v6Z4/iZVVzRlPOTwrI0BmFIS4c1Kk3KU7L3nc8f1oS6cqIf89AqZO4RZn2ndW87Og1c7U6/iQAdBrQXLiHVFPP8KKL6B/cBEBjtteEAweDGnemz213i+odqWq3cPBB3I0+BAN8MjnUbn0UqCIQ6kLRIAPNizK2KP6IYg9SGAlk71ayJGeqqYliQ== 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=mTZCoxTOibIiO72DCM0N13jMV2Q6b9NpBszadCYFgzM=; b=ZpDL65tl22II+WkehmGiONo1cMm0RQWLGn75fKKAzzN67cjIm7lB6RFaS/o/PrmLLuSbg3DS7rrtcKetaHEYiunHC8I12dPZ5xzcKxIGgUVVmso+L8qB289IF9XZlddVktGfjguu4EW5FriYuW570mluSpsyAy2Au85S0oo7zNfklodl04PISNt4dzxwo7kznQReMwqiojVTpV98fZlWg0o8Nw8UH/zrwz+cp5AQPcLUcpkbCddHnooXiKpeJRaddbylxF3QezchAK9tkTpIE3ccR1lJRbCKH5AzgOn9lgHGk5y/u3ShZpybNJAgZfzITi6wUB3LIzpiyTdOGy2ZMw== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:03 +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:02 +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 v3 36/62] mmc: sdhci-tegra: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:25 +0800 Message-Id: <20230727070051.17778-36-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: de7f1df7-c05b-4224-7dfb-08db8e6f6144 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AqWoVqebPJQB7wCuBPETBB5aeqaQEPcEnB5MBepM0eTrdqSMBxreuZ29VQy0xZjV6/H7v7OxiZKL7XDYE6cUmsHOQt7M0V/iHBRTXQgkxOv+Nnn3lLDFmV8dueLwmRflZuc9tUR+qC+jX0AO/vvB/0Y3vqt/0KUxJEzu+UecO9O9XrvaEUBnPJ/g7Cqz+eW35TDiywxzvrW2XNYrDxo01EL+a8oY3f7agtqq47tmR2mxnfcz/8a2U9ma6T1LV8IKafyfRYd0tkE17hhTDaQTyIk0o//w5nhwinw4/iouBBKo5+GCGeCTwdJudF8uOkGiMFYYe1Kymn9VW91CzouDtV2kxk0bNe8sJ/gvYSOOTsVPJUCDA+et7cPywmppVmU6unUUbKlwMcdw6yNwinnB8kYcT73l6WuysvwYSLDnNmCgGP4VfJJ/yM86MMAtDdk281l7dKszl2HHRplLJhPeXThZZ1l32q2cqHptAu6bo0ymDhiMX1UGIXgmZX4CVNym9RLjHItLacdaElSkYj27VY0IwuMyFvHxsAUv6+0RYyrbEyIhhBAjTX+soySH49wvyx7Sa4kRZGP7H5+OmSpJohusk1+F51nZgOhuL8e8w5lLAaR/KttfNp0osxknozpx 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(66574015)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?UU6k61qCv9LlmB9rgNcU7kW9gbTB?= =?utf-8?q?eWIKAaDo+FNGZwCTqGd+/WHrddd+hqImv/hTpfRPv3OB4CQgy7ROvcZfRu3UiG6yv?= =?utf-8?q?OjABbUvCEN2gH9dl18mYhVqLSFJUv30PwguGoPq580gsWORP+Uk6j6FdDV+7sF8JX?= =?utf-8?q?3WvysecFysYfRz5L7686y5HjgkQ4JuFbBCTZykIPoOBQUeYrOrKCtOsAvjtH4DDMz?= =?utf-8?q?ehFiE1dyDumDZPRo3M/w1rOaBa1o7yXOcn6lGN/o0e7uUQz4Fh30zLPHnOfJLZbx1?= =?utf-8?q?nzldYZkvT+rCc5DNkPco37zUzVuEmJM07gZqtLf24PTwMh0F+Ca2SIuJSzJV5m75f?= =?utf-8?q?Wo+nKoPZVLhWjLbM9ix18os8eGDfzfrwiBTR0ot8vd61rY/ZWT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8jAsDZxPVAsaQ8Xku1Npi?= =?utf-8?q?M+t0+Anrz1nK2GHF99gIJ6/YJFbRE6QA2S1sNGa3OOChNNIXyq6A4cHh/dz6J0Aib?= =?utf-8?q?CPjsRngrM03FnllS+oQCcTxkd5XzMlqj7lTAQYerDdxCqE/t5Cz1Ei96ZdlM553+b?= =?utf-8?q?JxA92pfimLCAhhP3eRhNFm7TYsD+eRwMzpPtaqYhT/fyfVMF0La+sxkDWItrbRgnx?= =?utf-8?q?WLcc7vqOKXmgUuHYC7xbdcujRR0uPExA/JL85FnS3ZsWxZ2MiJIGtHIejcZ+kGh57?= =?utf-8?q?EVeJCwFHWaLP?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: de7f1df7-c05b-4224-7dfb-08db8e6f6144 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:02.8863 (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: s79wE6s/KGV622dy+b5JffZVZeyXRv+179F5TND3m8+ZBKy42nlkCUCHnldr+HOsAbafUJdkPF82BW3Gln0Gkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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_BLOCKED, 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: 1772560640420631098 X-GMAIL-MSGID: 1772560640420631098 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: Adrian Hunter --- 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); From patchwork Thu Jul 27 07:00:26 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: 126749 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp922241vqo; Thu, 27 Jul 2023 00:39:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlGbPJMhbPOERncKP9kA4Xg8DWeFGBDKn6hjEBPEITnyL5NCTvRfCGOHAr36dtz+C+NwgCGv X-Received: by 2002:a17:906:30c9:b0:99b:ddbd:5e7b with SMTP id b9-20020a17090630c900b0099bddbd5e7bmr373404ejb.51.1690443576391; Thu, 27 Jul 2023 00:39:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443576; cv=pass; d=google.com; s=arc-20160816; b=idgdGv76ViMREK2XEzsahsYFI8m+lw/AI3By/6/TYoj/bySocGwSLEuMNyl1LPNlDQ jSLHbYywaDIokoJ8gRNdkFb4VbmP8QITMp5n/oIiTtTlof0MEkrhK+cQTcpPvEAh4t2u aC4KCtIhujiOstFSP6tiaVFNVaABys+VQ1Mt0jEWL5Mmz/oRHneXwZgmng4p4Wetcfvk 7u2Y3L5nFg073Z5+DHpmhyhCtNPLuU8iN5DuOoSGOho+Tr6LWnh98iTVwuNF2yInW7vu 6XgU28O06rTTun7BKrINkKI7qGmcvdTN3PJXRHA2B3F6HW2LFVXgGiaGTy0gFCIZw7ZG 7fBw== 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=LBSf/9i3zQclFjwDcshyOLYHhhekMTdzc9fBvxv+964=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=LGcdsqbP0hulIT51tlhvTmWKNRg3ozUPZn252L5GkvJ6A6VlndfRq/qFvMPWLBUK/C 5sh2/XHxFim3CK6EPDF9exabk2S6q5FCDHSx9AlU8T9Ga5MT5Sz2+M1zvCrU9C1nppHO cgoEWBlGJxoaL5PqFVfGQxIk4LFtzf9/qcH8NCrtYKx9Uvv+/jN5NoRXsqwvpLaEc95V zvsAmCrJkX6xIvhgTT4n58sqF0iFjU1pezph7wZC5b63wty5c6aHX0o2lFHq3T+pXoGi 9F83dqEEOQE5cMbmXki6zbacjcfbDQB82PKqmnICEa3oey/ctS0ihGWIrKTOma2LXroM avsQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=E0A45lEI; 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 gy19-20020a170906f25300b0099307f52a2esi609052ejb.1003.2023.07.27.00.39.12; Thu, 27 Jul 2023 00:39:36 -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=E0A45lEI; 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 S232537AbjG0HH1 (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233082AbjG0HGg (ORCPT ); Thu, 27 Jul 2023 03:06:36 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D23DC2D59; Thu, 27 Jul 2023 00:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gbOyQ+VUu2t0/Os8BuLYWWbB6tlsGoiAIDji9HyGtW+BDZ/FgAtCvVz95nu0S+l6Ibsad0BCA8OFG/WX0S+VY1pw1a/EFSuBQ3+RNAl8jPKHyPzxa/i5mL+wIrskP6vmUUMNKMZixz0AnCf2BPQhLtB3Qhke2DcsIuY9B179RZgtwrUVVTME6YqoRQYpCe8ncEMD7hapEUxHdlrSNZYneEKJKbNS69hE/yKNM6iNI+ZR12Jl7a6aTEYHnyqo1kuKgMekn0nUWpD+nKNgjh+UMC6jTwvSz2OtmsXTGnyN3vSo4L+AIhla6+CL8atLsyG5STA9/JV3LHgwIUEOyB264Q== 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=LBSf/9i3zQclFjwDcshyOLYHhhekMTdzc9fBvxv+964=; b=Fwwpr0+nOEXHMJWoRAhTg9SFe3nz/ERDz5apA2PuR7vVutpZCSX2/J37UWx8dMeHZalcpJcRpV3Sh06+8umjzI+SYvXKlo8nqQjAuUjbnmmAWw1Wnz48rRMqQlqw9GdTbHvMHEsQa2yiEwmgcI+SF+C0FQeBqMh2+AE7vd+cXzJN8u7G1V/mFxvaldyHKm7D+SDgu966hOEOUCUIava65KBDftm75WzAWnv6mdkbLWbnDruV5q+GiMV8n647ed03UPWYiU5sDLD/2gMlD05ieBHSLyfpu50uHAz3IUl9W0SJLBbRjbkF1hvOz53sYhBoxUrn+1UZDnun1Q9myDuApQ== 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=LBSf/9i3zQclFjwDcshyOLYHhhekMTdzc9fBvxv+964=; b=E0A45lEIhWL3WS0w31B7u5Tjqbqc0Uylr5OKJBmv+4EV3W9LYxuEnE30xAqBfZJT+3LM9iuXM25SYFCXCsRKd1Cck/L5v4IwESnLldfU3F2w6PFxxh3TrTRJNhGODVv0CdDO/R00r4H48AUrckAa+J5MCbplHSkbTpgO5H42vEZrX6anl5XFCm8FfXSzztmdpM+pYspiH6Po1mXGyQN1fRY4YM5NaBVeid1wu++FGhaPQig4EZArsivx8uXznxognmOIu9mtev+daX84/81/p6oO0FEa14cC0Fzql3Vgr6lPiJ2W4h/O8/4IpujkWCiKgabstJ1kZA79qtFTLax/Gw== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:04 +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:04 +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 v3 37/62] mmc: sdhci-acpi: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:26 +0800 Message-Id: <20230727070051.17778-37-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 0b0508ce-8815-4f5f-9058-08db8e6f6224 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F7+9hD/nJRmruY7gioIpTxgwUpMaxfpH2x9SBI4rE/7jJJB1rfRCCsCpAF3n3hIWkHX4mtZ+aHwHYC8uGMnsRbQQ2nFspX1Jjpd7F90BhoRlGqHjJG0CJmXpu+ec1QDMU8WyAMO0VUJw3vW6Zy8PfzRTfiRAFuGVcVVZbwLNO7IdMHcq8L28gC+wUK8PlILI9fZVevndxZhrpw15s0X/F488G5Ufje2ODQiyvb1nuPU8ndPLbLtaf12o0rgxY7C7X4pv6Xy4CDK7jXV31Y7NP1bUacWoYjuvRpOLkhnbziGRNTQQZK+AmprL/72WtHQKbwO/MQMTYVBgpp8rQVw8aeN2VTyHG66+r7veZguIip7MBD9i0x5FrPW5AhWGBVau4UL0pIiGK5Y/HenIf0mm0RyBvB3Pzy9ehnWRD12UwG5yLFI4cYXANRCqOkmrGi/PwX5bT8qWe+ZRigt0G8x1L/dYO8+FH3Hykc99N+nD2mcPgPVZRZNn327+GVwq81napJu88+PVzbyBEwo/BZ18+JgRyM1b3jGtAUaDnPxHe0KEwoGK0fsmgYbWo/K5s2MXH0cEzkYiWGCy8S0fgTLfTy4p4ipo9tsEugsLnNUdwqbSepEECvPrQUbPJudhDAj0 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?DXuzFSgz2b2sKEK3zAyvP2r1+r58?= =?utf-8?q?hm+XkNzYPVE8tO5IaGYnVhgGNNBIXgct8gYDvxwxJafrvDWrra6ok/g1aiQh9Fx3e?= =?utf-8?q?sxRwCpmy/3zP7WVDn3oc+uzLGkmslVy7u/kUmN0rJbUdPDBOMsZstQxA9ptZtFpvL?= =?utf-8?q?DMpY0od2goC6RxYXIl1Wh+lJuav4m3jhlrFVOf1e127XzHXg3mAK7mbQb4U1K6nSN?= =?utf-8?q?pbMRMK0fI6diIeYhXpbwdyxX4QKNba/eIVB3F/QYrDbD1a+OmnlUMkjfOoDKi/OTQ?= =?utf-8?q?gQ2B2rT7iQnkJo4UxEQV7yNVlvl4G4TR8+O0e4t1CO5bfNzfK11BozQEddcJBPyvQ?= =?utf-8?q?gT5k2SXso7T/OLycuqF+gasrOQwhIJ5l7Pk9/rPk6KqA77e2qBrFWlJ9rXAf4eq7x?= =?utf-8?q?d+Trv7NDsWOF3iT7FNWH++8JHFok5mAWk95zx6KKumd9XcVggGgDwle+DK0TPx2+Z?= =?utf-8?q?xYZXP2X5vrX/1x1yL47FlR+P91fxsDPC2r9Nm48/LK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DNXtgcuJmrex?= =?utf-8?q?6ut37dsIXL3OihXp1w9pLhEkbuEWQ4eUQ+aluU/6MosCOShtd3r3/OmhYY1ML8wGi?= =?utf-8?q?8J4UHR7ppZLwP7ZpGbOiWYc9b9IuSqW6dvq0azm7vn/F/ldU47UoVuvUDpYJpDb8/?= =?utf-8?q?0bOIIpDabm8n?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b0508ce-8815-4f5f-9058-08db8e6f6224 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:04.3422 (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: t3gWQHulfwxG5uPOEFU2t5fkPE0isoZz0tjeVFCN7dtH+ywAmXtm0UD2W8hy+fNaE66fs2Yuzd8RDri1N7QPCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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: 1772558563597143645 X-GMAIL-MSGID: 1772558563597143645 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: Adrian Hunter --- drivers/mmc/host/sdhci-acpi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index edf2e6c14dc6..acf5fc3ad7e4 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -917,7 +917,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev) return err; } -static int sdhci_acpi_remove(struct platform_device *pdev) +static void sdhci_acpi_remove(struct platform_device *pdev) { struct sdhci_acpi_host *c = platform_get_drvdata(pdev); struct device *dev = &pdev->dev; @@ -939,8 +939,6 @@ static int sdhci_acpi_remove(struct platform_device *pdev) c->slot->free_slot(pdev); sdhci_free_host(c->host); - - return 0; } static void __maybe_unused sdhci_acpi_reset_signal_voltage_if_needed( @@ -1033,7 +1031,7 @@ static struct platform_driver sdhci_acpi_driver = { .pm = &sdhci_acpi_pm_ops, }, .probe = sdhci_acpi_probe, - .remove = sdhci_acpi_remove, + .remove_new = sdhci_acpi_remove, }; module_platform_driver(sdhci_acpi_driver); From patchwork Thu Jul 27 07: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: 126713 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp911717vqo; Thu, 27 Jul 2023 00:15:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlFemmVp9HTdfAT3wbbeBB0KJW3iWgqM+rdPYzLviPSsrDhG++qG9uAR15pFsOOcFBc7uDb1 X-Received: by 2002:a05:6808:1920:b0:39a:bd0e:449 with SMTP id bf32-20020a056808192000b0039abd0e0449mr2937133oib.26.1690442127060; Thu, 27 Jul 2023 00:15:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690442127; cv=pass; d=google.com; s=arc-20160816; b=SGn8zIkAp4BOApLItbpOkygLaujz/Zyp1F6V9e+xfSM9UTtvZDRspfjfT2bsYQz8Uo qYBah5ryx18v1C+gMjNxkFZjmd1Or9c93sBj7BJxrJI5eK19/Ww74e15qAFy0ZQ9IR7o fp5bV27aq9hZNLzqzN3it9JQZ7SAh8WGfrQ+Ano8Lfygj9EGTgwqy+pbOa2pARMRlJOC luTaIfXZ2lwxC+emLz6ruJNTf6oMlwBOx4KY/yoQbLar8Bnybgyve+3J1cbwtTulxY5u KToXK0oY1WN7Alexvj6mY231AfiCJxEqZF9GoQQ0pY5LYW6HECCEDrLRuewgl8EH+oj6 sZlA== 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=OPSNTeLXONTEaPi57VHL+ynklrh9VhUEOFx1sXYVmls=; fh=jUa5ltqUT7Iy0+ACrj0uM9WLh8iVR6Av8BrXSxp8zzQ=; b=tC0nZVSouN3GJgF/oEiYfE+0cKMv7k4iDWVSSgfjT17sNJHT1/LndxMrqmC5FNisNx viDTeSKhAJGhb8W2cKvlTj27hP8nYa0qoRI2tcu3rERWyVrElpH7CGn5WFFwpJIE55nn xBFaYdLuLVea8sFK78xVUy2z1HKPhHhTEO3yPWqYFytXr1o9kdiB5RthsngXZ+6Kho8u LAs7Edhqis9MmdnzNy2ti8OaOpQuq3ucUStslI1rppPb6AvXqMYf51+hpqwk8jsfWoR1 nYGrJjuxmMtwdcYor5ywUPCFL4HZjvpcRYBW1kWxHjX9xN0bCvMzhdeWo7qAZsU0wNj5 PWhw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LdEFq3I2; 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 o24-20020a17090ac71800b00256d7cc5b67si969799pjt.133.2023.07.27.00.15.09; Thu, 27 Jul 2023 00:15:27 -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=LdEFq3I2; 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 S233004AbjG0HGt (ORCPT + 99 others); Thu, 27 Jul 2023 03:06:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230060AbjG0HF4 (ORCPT ); Thu, 27 Jul 2023 03:05:56 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56F38449F; Thu, 27 Jul 2023 00:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kk4yMts3YIBZc0JbunUycCnqV/qq3KFhyc+MPdEw6y8r4FzPuuBOcEU+6XpV6Iv5LZ1lnPVpx9PTKM66AhxMKS59pLOfZuAqoNswoQjrEGEH30m6uwP4qNIzPv/FcINH4Ivv6+OhtqPO2ZdSaGEPKl9y0ZYiSocSvRLng9RLgFPpka77zrXUdDwx8ff5iEHfXvm6LfcShEVdff3xwBB7Wa8AB13Th0IUTYDs7MbHp4Gu8CA8LjJQtUVW9N9DIO+u4gc7vgG1toCMik6NHuqPuWOzrts9g1b8DrjmCqO9cj5YM5PxFNggLJur+Z53mci89ggIQ8VxQBksA9DIRs0N/A== 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=OPSNTeLXONTEaPi57VHL+ynklrh9VhUEOFx1sXYVmls=; b=gKCWw4ZWnLA0z7BDvyV/jZnwe8r8bIGRjoK5PNmKxnB9wAUnv3YH7MpFYanVLbhrYwwan5HowfUH5A7bEhnUJAXHfRicPgYEiHav9mxpUbxSs8+u8GR0QrDJj3NiOGgBcz/40UIxFMzFdr4/SFibeuyeHHV2UPrw5F+9gPpE4x0Eq18L1qCfcX12cCSZFnqH1otfZlFgXbi64sjaypn82reqQs7tWJMPKB62oPqxETF20fOJN3E3fofwyadTxeyQaov8rZKpixKDgzRrliNAKv0bpuFuC5S16uUNHrN5LoL/k1eOz1UmxCzPd5Uf4VrvamY1/NirlCg9S6r8X5ULLg== 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=OPSNTeLXONTEaPi57VHL+ynklrh9VhUEOFx1sXYVmls=; b=LdEFq3I2t+yiRRqbfKyQvW6vXgITdpxgoEvX3GPTdd9T0saTIvH49Tjp8Ba8ss19cHU+tiEvBpoagnvWj+SCpFBWH52c7hZR6mW2zDNO0ScQX+C28HDs2UzMYhQmseTEDihRZkHC7vnA6YDFm8QfeaeJvCFshGBqIFNBYAWDrVqNC2wS4qTWtHRGP+QT5vp+7TTMZLgQrNiSbvBDoinFt9ITxBjBDJTPpZg44h3aOQaqWbF/ecEG+HPNaW9NwDVyyTvFkcv5KBHJlnTpGk9dzp+SGQBbFdoZtIBDv1UccIBlYKqllqhl8tfFG1YXcw4h0d4XbWzYa7WuAcNYZU48Zg== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:37 +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:37 +0000 From: Yangtao Li To: Haibo Chen , Adrian Hunter , Ulf Hansson , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 38/62] mmc: sdhci-esdhc-imx: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:27 +0800 Message-Id: <20230727070051.17778-38-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: ee10a6ab-ae4e-449a-a610-08db8e6f63b2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uob9SX7imQAdPQD/G2QEkdGOg2mH+jdz7EQONmVVS1w838kjlr29i89xV4zSPq7T+jJDzkipDSSJ8x77kbJ6ySv7LV/HaQ0a9EhhQYFMUxBkYW+sQLjpcNTfzwDVfQrzbqXfpUbowU3Dozm3173pvGHnIPH3aZxxZmiNA3e4FyEIxJNTmfKxoFleSniLNgiSMuGPr2w+ihMc9Qs+4TCgxs+GkSZ5uYaeM3UC3RTuM1DEyvZH/tj1gCC7MXqUapll17WSxk6BR6jDruJfnpf8KuFr8biGfwxHWRYf8VMzwh71jPKMxrWx2CPZq928RKvVeXCFr8qwYPftd855kZXZEmfBy6wBmM3G+0tCW02W9Of5bBOtNap/7Oe+OPBYbchJ3udhlZs9a0UFKI7swFe4DQGUC908QCm7aYaVwhk09nIejjuh5bvZPsJA34HuyuOBqTr5phXnPxQrWjYcFR2JGBMFKkUiz1JOUPPG8CNqH0Z5f+ElKdSEuQwpOn/Ysl6a1vJ2UWjDULMZmY3ohOU3JIhRiijI4TzLO6DEc0G191oeqCwr1PiKNCM5kVrShvv1XKbmym5+XF6b6X42/zXjvOvstRECp/LQ1zAMJe5uVgz0xc6JuCbOoSR1ULkjSxXr 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(66574015)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(7416002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?nSzLBHppU7xeudi08F9IENiCxHz9?= =?utf-8?q?9S1Hwvp/DEC/kIgYgMpO4wyiJIup4u+R215yjnn00Ei5ty5x8METP53ksSWqX9WpD?= =?utf-8?q?0cYxjO0Zop+TH4IoCaBY8CfT7lLvictNpQrREMreRro/37jz7xADUAAK5EIqm/BJM?= =?utf-8?q?a2nFr5z1sU59vHECHQCDMxhFPK4ibliz9aBFQqXaxXJEWvN3/CgfL4amBiH36HzBy?= =?utf-8?q?JcwlxxhCVVeu3sA/6zYzXDujyGBXVQKNl0MC+Q2AizHEbiCb3AZuXjLydpyPCr/+d?= =?utf-8?q?gVa5Xs8W6bWhxCz2G8WwY/x4KklV1DrJp4pQMMiNsCAxQFYTCKfRdsf7/5LzwXVMj?= =?utf-8?q?69JZl10De7WMBUOnJAYMtvg12pVKgryMU4BGst58mNtZq/1+10AzUI9oQL0MeQkyQ?= =?utf-8?q?MLuqodiFPB9ALqxjtsuCEEl0TJQnI39pgRXCll7EbdMGLcYRaFDSLTKCpqTjJ77Vs?= =?utf-8?q?EWoPsSgTKomasEeiEdNT9IQSgrhL5NOgz3XhYKfuPBlyclDkdgVXKx18CALlybjn8?= =?utf-8?q?hH1gkHhUMSjeWo+2dOzSXHe++T86dHybFIxV9sNcY7byuUCctwDoStdx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?= =?utf-8?q?2Hd2FQZH6PkMRn/sUJC85MOPS1Atf6/X0VnGfLzpj9oeBsmAfyRzT5ma4I73FsQky?= =?utf-8?q?XPk2vuiDu5dP?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee10a6ab-ae4e-449a-a610-08db8e6f63b2 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:06.9647 (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: HkKM38RbTZJ399X2+EDPjZfd4j84cM+tgkTg/E/86ZTNB5Zxe+QVEtFzr2tl5221htEPRQ+LpBEZ+TA6anmAyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772557043891950392 X-GMAIL-MSGID: 1772557043891950392 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: Adrian Hunter --- drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index eebf94604a7f..e882067366da 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1802,7 +1802,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) return err; } -static int sdhci_esdhc_imx_remove(struct platform_device *pdev) +static void sdhci_esdhc_imx_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -1824,8 +1824,6 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev) cpu_latency_qos_remove_request(&imx_data->pm_qos_req); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1986,7 +1984,7 @@ static struct platform_driver sdhci_esdhc_imx_driver = { .pm = &sdhci_esdhc_pmops, }, .probe = sdhci_esdhc_imx_probe, - .remove = sdhci_esdhc_imx_remove, + .remove_new = sdhci_esdhc_imx_remove, }; module_platform_driver(sdhci_esdhc_imx_driver); From patchwork Thu Jul 27 07:00:28 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: 126818 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp960408vqo; Thu, 27 Jul 2023 02:07:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlEmViRU93jKDRxicz/7ohQ4N6ijSwKgeBB4QO+ba6ysvLmGnYA4xZ807tufHo3ayHuE6aTM X-Received: by 2002:a05:6808:2a53:b0:39e:a1b0:ed79 with SMTP id fa19-20020a0568082a5300b0039ea1b0ed79mr2286992oib.19.1690448820033; Thu, 27 Jul 2023 02:07:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690448819; cv=pass; d=google.com; s=arc-20160816; b=YlBbGbjPpAkWv/DuPJvQeUrKA4HycH7jJJM/DwAVBCU2honr0mLcQMZVJfxiXSL0jz FcFO73N1uYQewdzvkJGO8IBiEWfq1RAx+LOls4H3WczUwekODChCevk7eOW5HnwDE5uC W2vJDnuPsoA33qrz/A9evwCl0mr78mSmPSTQN8/nXLrEQ6FaT9VxUTKh8sLBD7sEYqwP ThJBI5MYRSBWZ4i/I8I86s9DtlSgmmKx0ayznZtnALjVIgbJeOLBv0PVNxP05vQ4QEEY nEpCFgBW0Io1qG0ymfos4jcr1TG/c85vVHpBysWs/svcKIINH0YqyoG0fw/VobB8vxfi MpFw== 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=Km5SLI9CwGIZCQi+0pIE2z3vwwmcgtBqTHQpN6fP90g=; fh=t4PwngncljtkaYLD3j6JPIaND43qk3sIhXuab3Wg+o8=; b=L+7QYH1q6SxSuHDSkQWBbayIRndFWmGAX0NE+OATLoZ1u5cio8aVQI9Tt6VmP2gmiG 0Eefck/+T4EZHTvqUP5kMN8ykyvlS+1elaF50Pu6Ly16blOoN21ra7hZVn0OMTbhhUR2 Mh0XRJOzJCd1iBYx3/xzyH6p2+QtDs4EMG0FSHmNzv0j3WlhiUawB/2Bs7x76CAEB7CN dOaFv4WfZsZFnTPhvmZc0Y+1ieN+zdkGxCfWdlCxi844qSxVwWSR7vkmJRAQKBDffNmU Aq6YZ4bfNORNlvRTmc8KJLU6EdpSBfmMSylsqMHki/Pt17bG3Ru0jzHSQYxYmpqEYNEL Ujlg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LG0fl5uW; 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 hg16-20020a17090b301000b0026404467b7dsi2569240pjb.110.2023.07.27.02.06.47; Thu, 27 Jul 2023 02:06:59 -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=LG0fl5uW; 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 S231569AbjG0HGy (ORCPT + 99 others); Thu, 27 Jul 2023 03:06:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233006AbjG0HF6 (ORCPT ); Thu, 27 Jul 2023 03:05:58 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20709.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::709]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7726844A0; Thu, 27 Jul 2023 00:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IrRkVKHEoxamx9QXYM5DjP7JvZYT6rylLnkwqbCe62vIUzy7qVxQ5p0pVeiQoCOsXDtSsfFmivbn/h8uGpZn7L2Kr8tFuwTYeZ1C1bgpjnMHLlTwXss7PjT7h1SiUQEZRgnbTWL1SvS0l6uNz85jMXuUtiFK7qkbFyzRw4LZVuB++ZItgAZp9BoNbf92cEQcVjQTVGudycJ/KkZFH3ZMF2xo9pHtWecZZ1iWvV6s3KXLj4xZ2ljFciHebPzzC11TdXqLrxQHYkq38oQglQHiKbqt8gbpJ+ulk+AH1NM6mgDFyNW9rbcE9jZ9lHD0TEC9TRQAiqQp6txefYFp06RhSQ== 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=Km5SLI9CwGIZCQi+0pIE2z3vwwmcgtBqTHQpN6fP90g=; b=ePTjRbphOzp1xBq4Ik4JgqYyTq/Zoos3pemFweUIr7gqKHmxECDqwdFILrLNmmVSO7Wmqpsn2ubosBoMvngE7bkdNs0w4SVxUSUi1RRRq/pwwETZKRFxxf8GfpzNZOWdm91A8NL7uWBsg/AEpI3mH8g6CxQpkp6knl5X+RGYcKp4ir6FOmdB9IoxMsH48BNjHBDuz48ZquZj6CmTtiLGxenAg4bu83J2J7Kx+Nw8GotArMD/zzhzO4j1jdZIAcSK/2JQVQZkN0sNTRwmX0HsmmK+6NTu13X8TFQJ16iBy3Blj3TFmb61r19+l0j6+p4uc3/JB4FhZVCGY3dwq2KW3w== 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=Km5SLI9CwGIZCQi+0pIE2z3vwwmcgtBqTHQpN6fP90g=; b=LG0fl5uWqI07gVDrSSsxev8xPeFsLo0BoI5OP8IrW7wMdTgRhKfzWYy5dSv9HTmoDTqI2QwwQ6r8EmdW24PV2Wlhcsu9yq2lBQW4vCzPsBkj9bKcE5TT/k1bq7vtdTSgPNFBjpE6+TJgpf10xfiUankEWdL/GcVGjQfx8Jhpxz5N7D45uE6YvspTVm6YhrGvMRMt6UHRShvown2EquvSekOWGIykKGaHwW+/azW8+hgjYWuU6wLA31RpdXYc+wliKCTsHS/1OWLShFYJ8wXSYybsx/FsjtMiJD2xgOqjAv8IWXpMIHzfFvuRsfxIfAZFz6+hyWP2W9XwEDyjVIHBSw== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:37 +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:37 +0000 From: Yangtao Li To: Adrian Hunter , Andy Gross , Bjorn Andersson , Konrad Dybcio , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 39/62] mmc: sdhci-msm: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:28 +0800 Message-Id: <20230727070051.17778-39-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: ebd6aef8-6ee5-4147-b2a0-08db8e6f64d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yKtsxXqBGSe7s8f9/ibhccb3492unw8jK/arkaEKvkJqfizEsMavQ2GWHCmtfYY9/ugTNTKE81k7hP5GY459OQwtyg3FU96hwSf0KPET4yG8zCDdZNAvGwrTpctuBFabDTw8n3e9QzmgK9Pb9loeLAqIHfqOW2fLahVNq9nHtS2BnjeSL4vyVVSviZ/+0HB0uHoK0GpRu3t+T2gMHrEGXS3//OUF/XSHyW48s0qPKrCoxQPp8HKJZ6y3kjgAIoRpsYySW+3snOhd36UM7187iLbgFZmTp0u1QnmT1+aGFNhvQUpgXv5rTGhIe/pF5mads7Lz9BrIBY3cOYJL/IJA/5ByvGmLqC/Qx5f4vm4mJA3NQ5QexBcA07vaUjhP2P5+o48EmrulMFsZ+xqUzBd1mDmrJdrr8oOhNqV0mpDoXu5b30T4LL3UcXMNpZmwvzMpLdT9bv9zbmeJjN0RRJTago0JLMddT8c2LxDQt9Kai5Muj1XalIiiBKfSILuu8jLLe4bCpFuBS0GHKL7x1h70Vh5zaEI+kPzLYL1Y/dmRFESKFPgTKAetvq6B+zKax39sMrCv4fosHZCQs5gdwoDuEtUSmnqXU2gjdVbJZl+uclPjLWHvBoAyBE8OsCGeROQP 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(66574015)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?AembRaAXxOoLT7AcmECZhRtqgfke?= =?utf-8?q?soZG+oPzrFhrYbIysoLqHxktTvzqqRwBIFh/Z9h143MR/k7Evi5mGcWF4Sj3A7cCW?= =?utf-8?q?zAPFRSW3OYQ7EHqkU+ItQLEj8daSQhm4rWd2trtYFwQyq4Y9Mnc9haiY8SOC1Iemd?= =?utf-8?q?m2+uACpD+4BZQgzNLl91ZzohVqEtlfj+zY3olG4/34aNoMRs2ht6CB1qpDFolU0Pk?= =?utf-8?q?uzSahJjN69iE3+48rnnlouTaR0ZW7diZc5x1HLMCsFIdY3w683VOijeIWfmW1hZQP?= =?utf-8?q?//a9fUk0MXvjsCbG4t1ZsGLeBMm0/F9SUiVhJT5eWBcV9yIO1Jbb6CuFmcCV5I9qV?= =?utf-8?q?k3e9PCi6Wq2ZbkDTwauTLHzFxKNS4n9nlMG6c4ehYAg5ilU35eKAEt22gcaHuueH0?= =?utf-8?q?VXX8pApskDv14Q48isgGMCTJz4xthr1a7tPQjRXcY2mxcxG3P5rX5XgXjytq/ZW0F?= =?utf-8?q?MXfL8JcEBhGUcL3kXhjvKnS+6wrRoedvZNL/uE58nX8pVRMwPmEqukpNFs8ypF/G9?= =?utf-8?q?PCC2h0s9eM6rt9ew2Scrhh9YWJRU/NJRqWmtTkNnEDzRRcaymFFHmANbOiKe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?8oRGykacqolJsTNxS4g6CNzA5UUm8wlxUEk8mSu07mYBis+7u98/qQaHgoCq/Xqjy?= =?utf-8?q?NCI5K77XxNG2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebd6aef8-6ee5-4147-b2a0-08db8e6f64d0 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:08.9240 (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: U/v5oBPRnWDVpQKHQi87fnp2GlnSk69uvAjuYbxSIcA1XZUTPFTsPcy7T3lJPgXubBccH6cTRvMTpPt6M8urjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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 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: 1772564061694203278 X-GMAIL-MSGID: 1772564061694203278 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: Konrad Dybcio Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-msm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 1c935b5bafe1..80e376802ee0 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -2668,7 +2668,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) return ret; } -static int sdhci_msm_remove(struct platform_device *pdev) +static void sdhci_msm_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -2687,7 +2687,6 @@ static int sdhci_msm_remove(struct platform_device *pdev) if (!IS_ERR(msm_host->bus_clk)) clk_disable_unprepare(msm_host->bus_clk); sdhci_pltfm_free(pdev); - return 0; } static __maybe_unused int sdhci_msm_runtime_suspend(struct device *dev) @@ -2740,7 +2739,7 @@ static const struct dev_pm_ops sdhci_msm_pm_ops = { static struct platform_driver sdhci_msm_driver = { .probe = sdhci_msm_probe, - .remove = sdhci_msm_remove, + .remove_new = sdhci_msm_remove, .driver = { .name = "sdhci_msm", .of_match_table = sdhci_msm_dt_match, From patchwork Thu Jul 27 07:00:29 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: 126714 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp912633vqo; Thu, 27 Jul 2023 00:17:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlGB4GNZ8fnoBlybLcl7mQnDTqx8LG0G5sFDKXF4DI4tiyQnSqqwd5u2R46PVgOlOMT+eqL9 X-Received: by 2002:a05:6a20:914b:b0:137:3c67:85d7 with SMTP id x11-20020a056a20914b00b001373c6785d7mr3759927pzc.16.1690442250641; Thu, 27 Jul 2023 00:17:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690442250; cv=pass; d=google.com; s=arc-20160816; b=Gn7AgSysHxewFrfbtk6Xxx1my35d42kZIuuNOv20Fn/ix3BWDWgcEfNCuWbHPJVwHT C1JaiyfORwIjWAPMxPJfX7CVIUlEbd3uRDowGs6Tcoa4xBjjx003d10clpt//XI3uqMi /YeqHrHF6xlj07qL7kPsmAS9yB6DkEnvC+WDwOJeMReNTP7CrcGpm5hf4SzuiRl35nKu TXIHbfVGZ+tVMufXUFcLoparmm95j2FGjhZ/tjWpT+7u4CfveyYz51MeaeNU3cS8aoGt r/mip0xUrQmavuhM3VrOtG3mydGA1HUcxZnNZDNk16o2XhAQ1oSH1lVWpNXOBXvdh7QX cX4Q== 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=WVnebS5xmKX74dwA/QiihEaSwS42iXdHIK6TKi1CgBE=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=JUIZPpS7fOM+48W8MfUlGEUjV3frxsOMP7TdD+DQ/G6Xxj4260lCxKKxUUeW28CJ8R Gh56Sg5SdfyALXIwEvszjS0Qdcs3vxJf9gM0b6lMdNEWpwaLJe7yb/7mqk0Ssia4WEtp lHEYQhCnqLpbvg3Xx1m6Yf+Q90aKhZkv3/d4DyeWVI9Dyv7XcQEUecVFtuyOk1VqUHyd QYgyaJBrsHSyOwDcgKJLMUJo9eYKIXz+7vwSYeMATWaG/iU7ZFZCbRS9hyJuf6J4B3E4 1IhkTcbow9u2hGTVXR+nL3bxzaIcWskSoGqRnk+H/e/zrMbG4TVC3muiKLnci0hf1D1U kEYw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YC3CwH6x; 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 cu6-20020a056a00448600b00682399fa4f9si950004pfb.300.2023.07.27.00.17.17; Thu, 27 Jul 2023 00:17:30 -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=YC3CwH6x; 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 S232708AbjG0HHX (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232943AbjG0HG0 (ORCPT ); Thu, 27 Jul 2023 03:06:26 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2094.outbound.protection.outlook.com [40.107.215.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17AFE44BF; Thu, 27 Jul 2023 00:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CASQwrGoY9Uvcb9CyqlGcLdazCIyLTrBvOM6TyMxuFrgPnY+x1PPK9x+mEe1fq+kdGWVmLYcISSumbTjBsKRrTWSpsdxPPP30z/KfF/W0bEDCmT11+TYUM+7v6kpFhfAXXF8z1/VmtzF6TjuhWFBT2+sFvsky+tAMefQFYL8vkoikHDYfoMtZyej/X21bSoyw7dq3TyWd2Kgm3CGjLcsgpYlnLAky9osQ5MilGouh4O12ABEvz6xB32JaGtttjZ5aXzjkVcFkzNNTQnTpG5pNt4rjFNH596isIqlXFx6gov1lwnmhX4OTWfn+9/4QAHARCNoOTycZyXdXyyBoh7Weg== 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=WVnebS5xmKX74dwA/QiihEaSwS42iXdHIK6TKi1CgBE=; b=BfJ6tPEVKXYp9MQIcVE/j+9Eehcf5lkK/B9IyGnHdVmb8FPk1WWLShfIcXj3YjbTpNkoVIIvIxgKRoJ8qkv5hChrEakq/dveoRemDMdyjNB6oGvnQIVSo7OIiTijy5sTBwIxbPjWbycNE0QSxNH2BluCnw0LBS2k67RBe5j+5SVe0IXmnuokIULB/fsdPPr7IBRCdNjG+5vt2d4n9/6QDy7aGhS1NHGjlnjLVcI+BA2ZgLWtzcrvqUMgFcjE9rUwTjpMn/lAQpJ5O4vYLD7ZBH6fx1JG6gXZMheGakfNcUGcAy7R/Af6zFghZBaCJ9TA44ZhHITianx3D9rC7ATQPA== 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=WVnebS5xmKX74dwA/QiihEaSwS42iXdHIK6TKi1CgBE=; b=YC3CwH6xulM/fLRG1ffnb6n2dbavKoIe6n2BiAxnc1m3Z44/TJaxU0gRcedvBZWy5abVcd8L//7mXA4I5tv/YKsEh3elSfLunIn8ZxS3zgzm6s6Vhjzx3uvn0DDcXI3WHb7Km3dks94OZCRRwJ0O6d9KXzkdPZejKuUwd1y/dx4H7Q38cdO/6R7CV28roWB3dspMbsuI+cxVhlvDV4A1sO9W4a610DDNPT5RFFGsBM9kKqzglbLHJhYS+6HjAlo5WYK4L/byhELzf2iGGdtFwN+YwkcGpK1WFXZw4c3+VApN1qeuvb/gSm82S2rvA8bKyy//f04++CDfs6vaxlkrQg== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:38 +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:38 +0000 From: Yangtao Li To: 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 v3 40/62] mmc: alcor: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:29 +0800 Message-Id: <20230727070051.17778-40-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: eb3bd1b4-99e6-482b-9e42-08db8e6f65a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Gaykgs1wB4z3hjEFhgQk+TUUbRfMU2QBEO5TUTvPe7BE4uha9n1ajIM8nThmT5cS2Y4cMA/BUz36gcI93ZG9raOXbp8A9HvQ3RkKNEPCu8B41PW2iZWKNjJpcrWpwtQe90klv8uOyDQ+tieH4e5wG8npZ4KHczmCNlJp7x7KUM2qXGUA7XHclp6loJRNUwCeakNdxUsyyMK9wI9rvhSilN1WvDofsLkXJmiLZOJFtlcFMcYKQDMl4kRj6nQVbnPYRcwdnKnS6tgpNoupXrk2pBdhP6SRBg98SVxNETdmfFk/msAcoQdBe6K2GQpJOJ76nZ1Rks1l0YF4ogD+XMz/+2ADrwwnNVHVKWu9EhAn+Q8kTH+IvXyrr8orQ0hCw3NS1TyT6NlMn1pU3q2NRqSDcqi99wRKIxp6mAH0W4BjeOZkrg/9VIrJaRJLDABmG7RHTcQedbOUWZ426jqAuAf/iPhEbH/6xvNcNE2xyWOrSkFyQqIjKWP6APZEQCB+77jDac8BtpRJbxDroxPs1eYsy5Gu7F784MRml2hn2z8dXOZ8orQGo5UnYytX4oimRvF7ON7pkhoCJQMLqf2jF6Uw5sSa5EYC3Zj6fg/FqqjpiVzet1HI9R6ZQ387qY71DDRs 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(6916009)(4326008)(316002)(54906003)(66476007)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Fd8ux2dxPC0AOkY+QTOjd5s35+Hs?= =?utf-8?q?KP+Q02K/osmudykLw9SsXGoe4NQtt95S+r2GkZBAUqXjZACXZtM4BqEsSn432eqbw?= =?utf-8?q?5Rgf+X2yBP1vA6j2Cp3QCPCVREODK0WrHX84wXAdpv5gOAkO0894O3ZHF3bN0m3k8?= =?utf-8?q?8366baAqVclYHyFDNdfocFk04G2YtvbYj8G82r6zW3v/1TGdTkVBx3btDk3KkmMZd?= =?utf-8?q?/GAGPQ8/9KdQ2Ovpw/4viNa8TetNcKCRsPH4lqCEMl4Ht1N1TDJNTOENYCg07SYVq?= =?utf-8?q?rWpkEbSncbhl3JVQFOyPZ2lTw0Z5D3kewKX/b8p5mguE0Is9Hi0fxL1Pe9PtVEeIN?= =?utf-8?q?MwZXoEYzvajl31FnIdEqEVupcWem5vNyhP6dFXH9QPTAg7RDEgfe5cU+5Pg85GsxR?= =?utf-8?q?Q8KgWdQ6zREh/zb03/DmHJ9ARIGN5Gx+fyWIkRu1Sd8durx2rLdDbrEQug9wTP1LB?= =?utf-8?q?SdKUewG06Y+nbzSBCP8NTAmS8kvAZTE7vWyIKAavUpdLLYIkM14q2N4P3Aa24EZuM?= =?utf-8?q?TbbLFoOXBMXBMBTmpK5Zfuy2u31Q4ykTQbJxW6KLpbWd6snII96m4fTSPs/HHAE9h?= =?utf-8?q?GoyDCuJCDvk64ImHQZB1jwT1YP8Jmy+Xwh33rtMStCYtIbhXdBo1r3TSukzQbzZrL?= =?utf-8?q?aBWGe06+DAFaN5GNOE/yTOSofIfkr95rj/+4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CrossTenant-Network-Message-Id: eb3bd1b4-99e6-482b-9e42-08db8e6f65a9 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:10.2669 (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: 0RnKQO+q05Eky2lBYtR+QyVPSWdLtIRNtwQ8yXUP+y5zuOFqgWslZmKEBzwRNHSku3+mmF3zTk/VEK7x6Y5q3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772557173040038843 X-GMAIL-MSGID: 1772557173040038843 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/alcor.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/alcor.c b/drivers/mmc/host/alcor.c index d01df01d4b4d..42aa43740ba8 100644 --- a/drivers/mmc/host/alcor.c +++ b/drivers/mmc/host/alcor.c @@ -1125,7 +1125,7 @@ static int alcor_pci_sdmmc_drv_probe(struct platform_device *pdev) return ret; } -static int alcor_pci_sdmmc_drv_remove(struct platform_device *pdev) +static void alcor_pci_sdmmc_drv_remove(struct platform_device *pdev) { struct alcor_sdmmc_host *host = dev_get_drvdata(&pdev->dev); struct mmc_host *mmc = mmc_from_priv(host); @@ -1136,8 +1136,6 @@ static int alcor_pci_sdmmc_drv_remove(struct platform_device *pdev) alcor_hw_uninit(host); mmc_remove_host(mmc); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1177,7 +1175,7 @@ MODULE_DEVICE_TABLE(platform, alcor_pci_sdmmc_ids); static struct platform_driver alcor_pci_sdmmc_driver = { .probe = alcor_pci_sdmmc_drv_probe, - .remove = alcor_pci_sdmmc_drv_remove, + .remove_new = alcor_pci_sdmmc_drv_remove, .id_table = alcor_pci_sdmmc_ids, .driver = { .name = DRV_NAME_ALCOR_PCI_SDMMC, From patchwork Thu Jul 27 07:00:30 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: 126741 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp921215vqo; Thu, 27 Jul 2023 00:37:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlFY+m+mh9nWl1LSQHS2Y0DDWLAyHG0ZzJXevu+OevPy0FZZ7daUOI+FzztkdnF4+06GT2fe X-Received: by 2002:a05:6808:2085:b0:3a3:7245:d36c with SMTP id s5-20020a056808208500b003a37245d36cmr2332717oiw.43.1690443432491; Thu, 27 Jul 2023 00:37:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443432; cv=pass; d=google.com; s=arc-20160816; b=la+8qNgpizacz+pxfbYgGd9iyDs2C4tGsHuTHpWS/9AxYkOTRmOT+aLBbql0sV2WhR qlC6qcD+ae3ZC9pY6hPM+WMSLN5yQxLHf8v6FMzJgMFOEP4yWdsRis5WDsYo2lOwCvOW ZeC06VFhBktO9hk1d+UrdDrCt4qErd9daKUq+ROAMp6uGdGBaHwSEpgWgn9vpF8ej2J8 Y3hcQMWsyGGM2+coXeQlihgrrAdtsVbIku9Kb721O7y//oI2A2A0YfIyVyCeNjL1b6lU aUmW+jwVOOlwyvgXd4WqyeeDoxCzIF0kC9yktBodfSNpTxobiVKZO/Ei3wmUxo4xnLoJ jqCw== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; fh=zja0ga6cdYzjxoJoO6ODJpxhr+hlxRWJt2ziNAHhkao=; b=T8fuS72Kx9wcRiM2EWTVXrAJLb9NQjdHI64ZvqIrulRtC1Stow+8YGmKGfS48dcUaa WMbHL50tOHmM5tiOWy8Ecmu/3KbPAxdYHnYlin9qgZPK7pocTaJ9yhaWFgR8G4jNNYFu TzMMM2+YEY75zPX3THP2eLn8DEzHJmr89bLAQDdbjlTvjHm9jFkQg5gwB3IgJZvwzQ4y uW7PzFLp2NCk4eRh6PpI/uIONVI3OUfVlFDKdw7AOJorkwmCmc4PmT3iidpE4g//sxTQ kkZe7qLZsWFHC4gQOKV1GHQoT48w7PCbSFkNng++eD4le4D0HwhWyDD3GS99joOWURhP Km1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=I7+NvsVg; 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 o16-20020a17090aac1000b00262ebe643a2si983791pjq.186.2023.07.27.00.36.59; Thu, 27 Jul 2023 00:37:12 -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=I7+NvsVg; 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 S233102AbjG0HHb (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231361AbjG0HGg (ORCPT ); Thu, 27 Jul 2023 03:06:36 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA1792D4F; Thu, 27 Jul 2023 00:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DNkbUR3uw/2zGpNwd51ncm6P9uPRLCwOHPDWGN26V/CiEYjp01VV5qg4bt2uh91Jz2F5GXQ1Idx2X2o/ID0jKqcQQAvmDkslkBuMGTcpKT6jn5/XoNKPW2zhAmn8eblZMy6d8OFe8UoY+u7jMtGYMLwNJFI3hi5JgcipfOJHmIPbD0QC3Rkz6440agXiVa5r6hp9TvexsvERyR9fcoVCvQ8utK8caIM22Lr5hhhhmOUEOXjEClj9xKtsiGvyCZ26rv6pt5/QVT8CKkiXNuAdVQOxgZXcX86lotGX9qJVpLZ9bG7CCFj1YObUMgewLT9SU68qpaFhn7r8FmjA7doFPA== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; b=mwJC9EWYS9DoS3f7h6J8kRSoplv9gjBtU/yVdgF0D/KpEnRpM0sWum0ENdStELoPlnLc3qsXEduOvN16Balz1ucLw+Z7fLTPctPDJdthxmbc3ypB/P8HQ4JgIefFJ2rIbSZXY9VYYJ10o1+4uiMeymvkALY4GRAPlbV/lOKVRYDRr6ViCU7fbBB8r+GIHyHhIYHSY/u8dOx+QtKm/kjddle+i23YLQeVOU+OnPRDv5Y59vf363/z056bQ5tcTzBPLb2TbFqAxbsugAqN4Ux7NarhsbJIU76j8cfBlPLtjYhnvV97MDbwUZ8PU5wjBLwK+MK7k6ErxBDpZtZ/GuoOIA== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; b=I7+NvsVgIIfF0xhp3teWQOmx2AqrwEgMHt6jK5sXHMLqRh2O4nAARXqGy/yOi/ScmaFkjVJlk6AZaO4dHTySz4VWIikbdDaCue0qSSguWbpIvV22ePqbcOLCjjmUYu7p+oNSlFmxpUHuelUkDu66blBTsMcFxwUEP66DQSC+7V8L3upvhqu1YbMlcdAwfSRcCwRVELmhmtoBs0xlclC8E8DJsVHXOQSmfOZdqjQ62DKPwXpvjQ3f0y8W2csZMY4lD17ncTu+4l2bge2BUvSe54NLF6FD5CTjdG4sCc2V0JwJpgtVBGU/phWaWStQ8XRKp9Pc3xXt2YiQipr+FtD2yg== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:39 +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:39 +0000 From: Yangtao Li To: Jaehoon Chung , Ulf Hansson , Heiko Stuebner Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 41/62] mmc: dw_mmc: rockchip: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:30 +0800 Message-Id: <20230727070051.17778-41-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: e8723842-9120-46da-fb2b-08db8e6f66b6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wLinV5srOpqqZU33Ugr6J3sfa0fs1o06ehwMPHlAs5KMFkFQH4OenGd2Eno2hj44vcQq72vg8xYGHPdiAAGxeub2nXkeILYNr/ARg0k7LkBs9zEBN2mIIzCJlsdH5lm+l8uhosnkZwoRQRw9P51DW1CQMvSK5hi0W7jeFp2pQNRuUJQ5Jp9VOeXaORUn/jG6nernblykjHPZdK7YD4E3pYV25wK0rNl/7d8HtZVBNQycaL532Q56uWj2L0nEl2RaWTZ/Ob5/lshd8A4md9Jk7WMg38Dk69yqyb9IX3Hv5OPsYy0CZ06f5JrWbVq098c8YTIGC0+Vz0Kff6hEkwXCOysZjo3v6KDTv5II4q4a8D9vxHPt83ar7gBZs0/5B545p4mVe96ti7T1AEXSmsXKPea8j2nrAMYH4uUj4eSFp9dZSS0xFFQK8YX5ik9vjxHJmo6ErrIAqyH2hnVMFQlsGyfi+/zaTlHYaSLlE5o3D3Wf1z09PO6HLNDS82z/a/1xPoD91H7T/XTnD0HQ+/2VpMNixNeGpAAYWgUu+AI2eXeVwef+HdCVMon5bbQz6HC2PFaHNelDSRrgFYgsb5mjF1dFGD5fkmtFkHPbMjL8crR9fJVGOtzZUIwhMFPKMq7x 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Cy4PfJDsuAy5IPxWV34CMm161ffd?= =?utf-8?q?85Spr7Dg29h7W3Y8+z9yqEtg9I+Jbfg3UVAt/WYnRZGwjcIiA4HGHYgz4Y1GmqWJB?= =?utf-8?q?Wp0PjSIzCwIKorS1YIpZHa7B1BCjX5l+b/w76ZX1+pXY4UWQygUoPIcd1PesWLWlJ?= =?utf-8?q?Q1qEGjDSnALks8l0m1yKfzcnPkvaUSIiHj8PylYa2/ydlmhtiIYkFyAzQP3X5yB5K?= =?utf-8?q?Th1A44AC9pmTg59Ilqga1S4x0+eirC+nhTe8dVQvWE95Yx9YqfS1Umpw5FGj1mKf6?= =?utf-8?q?2mzCkppXFyqdExpr3zxIHpdZouHSrSUDWrnClDFqYmdCcp/sHsXNn9hNPhbApFjpv?= =?utf-8?q?KapXWmn3L8cUtkNNmyHnfMc/dpbRK9Ztq32i2ay19Uh87QGVW5nKAVZr3T+Fqy2Lh?= =?utf-8?q?0vqzptATyBvmD/wmZAEMVS9fAoDJ8Fz4437Okahy8MJDcWLjyNHlyrGo6RxaaNQe4?= =?utf-8?q?2pOWd4B/h1IggEQOFo9TqxjqjIxrlDyoLm5awSbTMjh87/31ILX2GsC2SKSeXR3RH?= =?utf-8?q?ph9JG6CpIxShaTv5XBMERT3BqTf5SvyK91VIALckqlaUkLrvLAOQLHcQoi7zYEO23?= =?utf-8?q?8THYgDdSUmTWrk9SzGMVUZfGNEIcpw8CTRQZn8X0vPew3Tw+K3N2C5sq8ejQzSNEU?= =?utf-8?q?59EMZbZUreMROB1rGJUC3bqB4mWsmzXHl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X-MS-Exchange-CrossTenant-Network-Message-Id: e8723842-9120-46da-fb2b-08db8e6f66b6 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:12.0229 (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: 26g4anAd+SAAekuvTVHAtv4vm6BwI9JrDj2W2abY28EzKuQARV81fVAcfI01Kr+rVSk5NeqWGRsZ0Pj7vSarQw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772558412890674323 X-GMAIL-MSGID: 1772558412890674323 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: Heiko Stuebner --- drivers/mmc/host/dw_mmc-rockchip.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c index 2a99f15f527f..b07190ba4b7a 100644 --- a/drivers/mmc/host/dw_mmc-rockchip.c +++ b/drivers/mmc/host/dw_mmc-rockchip.c @@ -371,15 +371,13 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev) return 0; } -static int dw_mci_rockchip_remove(struct platform_device *pdev) +static void dw_mci_rockchip_remove(struct platform_device *pdev) { pm_runtime_get_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = { @@ -392,7 +390,7 @@ static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = { static struct platform_driver dw_mci_rockchip_pltfm_driver = { .probe = dw_mci_rockchip_probe, - .remove = dw_mci_rockchip_remove, + .remove_new = dw_mci_rockchip_remove, .driver = { .name = "dwmmc_rockchip", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:31 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: 126730 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920232vqo; Thu, 27 Jul 2023 00:35:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlFpt11+k3NAFH7QrysIlAWwOpwImAzb2QnrRsQNH7UJwNeiWvPw1HR7Ay3FY+y02MY9kl8j X-Received: by 2002:a05:6a00:1794:b0:666:ae6b:c484 with SMTP id s20-20020a056a00179400b00666ae6bc484mr6207531pfg.13.1690443307120; Thu, 27 Jul 2023 00:35:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443307; cv=pass; d=google.com; s=arc-20160816; b=Rr51uHw8LYvhK4mBMgCMFem9NSrLalxg153FQ/HABaA4SVo3oz5avmmfgoGA/TX5/a /lSUDpxD7ylAJwGCIBTv2ToVfGuUFxUfIkyKOBfJ6+dMylLeyZi3nCvG2RgSWsJKtQJG fIVDZrRsBlVz2kRmlprjow8eAnA2bnMdcaofYgMWL4TMFkD1ySYKVbn/x/3/kwir37BL v9IFm5mjjzC1jmNZIq8hJqmgjsKdy9674OyBoI02cDIo709/Lt2vzPHUApUEgbqE2xJ0 4MTabw9InoBt9rH7nzEHqqBs71eG9d5WfWfObnUHtCuD/AyyQHv8ngVTdPQhTz7paBr/ PfEQ== 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=nsecs0FraqEkVI69yYtZuIhcDu7CE/3dvX42vrGL9bQ=; fh=5tlb3WzwAtkLE5eDOyUXCz3z4PbNopcGbo7qPwjRx68=; b=bkUDAs1zstcqw95nlsyi4w0ZFmup7yQrIEBsgj0Njy7Oxs4cjTWMfsZO6KkBV6aZgt qVCciM2im46ZjZueQVmy3KzbyI1VfDOS5a9LHM+0h+Lt/7TmbwDHnHm+Grh5D1MTq7L3 oDmdVwrLHZ+WaE7+LcG9+vcHqzGzBx9kOz1ywvh80vFZGI9rRU4FRPQ3hoTSV6kph5+j Vi2+YAGmHhDALRP9ru6943U/2/HzvUDIZLUm3oayjg+++f0PuNnEkZrSsKKfsfjiPv1+ pzcN0r1k2p+duLPeDaMitKquk1TqUNRVvyuEOesDjv//fr1YydVoMQ7W4svf/tJtI0aM 5Qdg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=SJpDNSsc; 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 e8-20020a056a001a8800b0064d28b68d8fsi1021385pfv.94.2023.07.27.00.34.53; Thu, 27 Jul 2023 00:35:07 -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=SJpDNSsc; 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 S232151AbjG0HHu (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbjG0HGu (ORCPT ); Thu, 27 Jul 2023 03:06:50 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20709.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::709]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 928C32D6A; Thu, 27 Jul 2023 00:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l+W4wOaOFY4QV8ha/H5a2OUlTE7kyIh7BvPo8NyR53FBuAJh7Y3L8oSrfmOTIs7XdmUjjEXgIvaoG6jbi3t7xRvnjN57Pm15AbA2F/IRIpW0w3MuAOJxN9IndEVntbtK0Cr93Dl0YO2iVt3XwKAjLTHRCfpZlreQ+BAH4Y58lljNfYjRkDm4yOTgtW34DhCR8mx4xoyiXNrp1qHSKESazJIO8EpG6D6I5lA8/PvQYexpdKBxLhdp6s3XZLwm7xFYKGUnLhtVVtt+BU+GGgC6kHGlLlEr8g9p3kRzshW8Zn6DrYI1Za8Udj16A+hNZRyBfzXSkosQmVMmCfJThMbYTg== 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=nsecs0FraqEkVI69yYtZuIhcDu7CE/3dvX42vrGL9bQ=; b=KAREA+U05B+5tyqhT/DKSe++TGW841uVniTQML3FeMLVRlSM887Oqi6SNp8I43qu9yPmUM8o0Ajhq6cI+vE8ltrxOHe/b/OsbvCcgahYASF+xOoc3Pv0IV+baXqIY4XZObsWMyEARxbQqWz4hAAU06dw8G5wE0jrTow1fSlm/bcQRLAQSVDDAErqIh29F8ScVNFxzxn5sP5wQjrH3G12s05uOB22Tg2bPemndlvDRw4d3BZKigw6NKO+VmluGw1UOd+V+XZGeSJxx0o+APrkXP1vEt+i3JxzUPTfVFyw8aZ/DtKHa1jWR3SCjehUK1otAW/pz9E5h0WwNVgoMWSn0w== 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=nsecs0FraqEkVI69yYtZuIhcDu7CE/3dvX42vrGL9bQ=; b=SJpDNSscgGn6PWwzjTwpLGqUeko3tEesz9Tf2LoaUv8mg8Giz2D/E3EYvEFFu+u/aaMWSTPrdUa1E0e8SnjNuTUV0MUQNmrM4jIckug6BsxQxW/37WJGwauQyxTK7h0jJgpHqhL6Qzun2AIfRllvqeeltTrJ9iRqaAwBpAFBkAu49QLHE5mpX6jZuTYHG588u6RcNzgvyceHt7Dq3oWDDyVF7YTqfqIF6bocV/2+uN9YcrfZy3pG2MzJ3Fwgh41eO7gP+bQN7Wr1glAsG9hZdmABHFUGTSWuhJOaAnEIsNrlqScqMbk51WmVp5D2CBhogfDRB2Hg9BZAdw8cqkYKZA== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:39 +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:39 +0000 From: Yangtao Li To: Ulf Hansson , =?utf-8?q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 42/62] mmc: owl: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:31 +0800 Message-Id: <20230727070051.17778-42-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 28c76e50-e26f-4ca5-580a-08db8e6f67c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YfB1AJc0MPP5MHwuycoyEHR+iDQEkWI+v5vUws3LjMQJeFc1FJmVCem2IprfvB4ApFl1O4vOtq1aDJ1HNjZL0sAbyimpNgWMB67MxfEKq/B9yewMzAoDm+Wu5xg5oNjYgpYOWAN2w4daJkjjxVNqOegknDn6BNidLrJoQTl49QEFQLwE9VJyAM5fcnJ5j+FTIGeLsAlIYjnKtx+md432flEySwVd2UZuRmTookQTMdxleLjjONohAHmYDvkOdKWGWe2W/XY9aE8nXLStGYTC2KTnmml0AeOt0afz2pVwW4DQzkTg6M5J6/6pJG9/Jh+CDfaq+erZKMhvMCneDmpyz7rX3BUse4lQEqZTMLqaREGVhWuS2fzci8f/gfjNJdVt+aL4GaNk/vczEChfbUQgHgs86SjNrDGmAWfH56RpHE/AUUl1Sf00L2vrNn2pD0uQOVv5iaBDPtu3CY7Q0Jq/m+YsDTRdJ4duYNGIwTDo5K6KjF8sFxsqELlrwiizm+/gg7l8jkZykuYq+qimBVgUWuHdJxg5JmiRXWvdwCHPpiSt//6jHWFJMbVO6PQCR1QylO5Zg/o1x+FIdJq2iCqKHihl11au4pHgERJFBxHAEzOerMEu+fG+UZGnvJAVVyOG 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ZbEDTkyqX6eqAwmChevxXRwx6OwH?= =?utf-8?q?/xDtfltAjYMhal8YYFqBH0rtQbN7a1bDcr9KByinDep4Z+giUyY1PaBqhr8sTsY9I?= =?utf-8?q?VgckDVQAKy9eQ5jDpOLEKneQmc1+G/2xo3MJvP50VLjAMMDF7QPkfufUh6L9tS9at?= =?utf-8?q?HunCix8ymXt+kXUUDXqNc5y9icjbFlxGzi1pYX9l65Qb78gwYfx8Li/lTF7CzU3U6?= =?utf-8?q?m/PNb3/apFS8Y/T41KdbmyFjO4IcU53NPheXhCyrufnpcYZHvDpWxwzhPhMr3wccn?= =?utf-8?q?lzuPDBrIDs+SP42CCWs9ob/zPaTD12QjgLVyRFEC84sbFW4wqq3O2sd+FYsADEMOb?= =?utf-8?q?eMEZpqIDIyiDq5LweOR9WbcLbtX2dvQ2Gt9fZgSBeFQsv6vfBXIiSnkwa0yvQONFk?= =?utf-8?q?+wcPhD8wMVZz2QvfHdYchlJytdv2NNGia3bNLvMlKizPj3TxLHHWqaHiMKs21g+KG?= =?utf-8?q?VGRAm7AVYXRx6g4AduogiVv2KmL3s416bs0pEzmzLq3gjsB7aCLHrUC0pPFHr3DN7?= =?utf-8?q?xd326TFOf+6QsBUDkjOV9HWbnEVrHN6p5JYS/GplfT9ZP9T1MSRl4ILD34ipd+XdZ?= =?utf-8?q?wivCjaKKs/znuxsrSHRl2wMbhtn3EMCsZglWbZYn3BGFbKGy+lcisPrnzTrqxfyl5?= =?utf-8?q?Ty88rZ/ouYIXAfVYiskSOlAllAjO6EEVToN9WAYfewHXpzaq18dVEfm6qPSeKzUZD?= =?utf-8?q?JdFClz6i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67c4 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:13.8041 (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: z0Ppk7iH/bTRIwn6RdZ8PFRkpk6rwICObsKp/QHpB/wqXB1KNt3fxTFGN/iJlaMfQmMgYOGruTtDr592va7Zgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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 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: 1772558281590916601 X-GMAIL-MSGID: 1772558281590916601 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/owl-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c index 1bf22b08b373..a13bec42554a 100644 --- a/drivers/mmc/host/owl-mmc.c +++ b/drivers/mmc/host/owl-mmc.c @@ -667,7 +667,7 @@ static int owl_mmc_probe(struct platform_device *pdev) return ret; } -static int owl_mmc_remove(struct platform_device *pdev) +static void owl_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct owl_mmc_host *owl_host = mmc_priv(mmc); @@ -676,8 +676,6 @@ static int owl_mmc_remove(struct platform_device *pdev) disable_irq(owl_host->irq); dma_release_channel(owl_host->dma); mmc_free_host(mmc); - - return 0; } static const struct of_device_id owl_mmc_of_match[] = { @@ -693,7 +691,7 @@ static struct platform_driver owl_mmc_driver = { .of_match_table = owl_mmc_of_match, }, .probe = owl_mmc_probe, - .remove = owl_mmc_remove, + .remove_new = owl_mmc_remove, }; module_platform_driver(owl_mmc_driver); From patchwork Thu Jul 27 07:00:32 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: 126726 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920169vqo; Thu, 27 Jul 2023 00:34:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlGBEMzHUnA4489NIAEVy7dq/fR4rzWNZopt/yJMtiVo0+EuPvgkCIdMXJnlu3UfsLLN67tx X-Received: by 2002:a05:6358:5922:b0:135:62de:ff7d with SMTP id g34-20020a056358592200b0013562deff7dmr1925183rwf.8.1690443298952; Thu, 27 Jul 2023 00:34:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443298; cv=pass; d=google.com; s=arc-20160816; b=MKQSPx+UyI0Xc8j6Qjo3ycD4Q8xYYAFIFSO8K4hYJgMEdG4LOnPu2Ja2kOlsE4gN4R 5PXkAiUcowV30l1k1NNisjXgccO2vT2j2lD55abTQ4wYV6YeXT3GzoIYPwEJe2tLkmO4 Unc4ZkiZ+GIWvpAkRfnPbLZoc1+FHFeWdZZztJtBPovwLwM1pbo9mcyWGFXD8NY/BWNY pJu+0mr4oY+Ug+X6qb0f6QVfPmwX+xkL+av94ZES4gJSnYSuv9j1n8OZF/HDOWhfNVbO GRHFtl8IvUQw1XxMsHuUIQP6wqlvHqn5J1GkWE21jkiZRN3DRoGcZGCp+JPEhIIRSpfy aN0A== 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=Sc43eVj8D+jXjv+UOKZmNNsyrS57jCHl9PeQXr9Ahyc=; fh=6cdLzAmRtuylSKIxaYw9sY9DAq4BCLf68zkyCZCuc9k=; b=VwM8dVL+JmKGBTinsvWlacMBFRyAMpfrNBwIUuI80QIsEUCmVui8Pky6N3KZY/Irsv +zYvfEtfQHQNtKVcMejuTSR2ddJzE/F0DPMsldKhRw3TNWppPM5msP2kaxqGvPYBRAX1 XKl/bIIcNcge1fHNltobgUBfhTelK9lZ7cG37oKT83WtVzsbEJ+EReZtJTwdxiDHkyyV jfHwvTgbS046zGzJAKmMM6aLOiufX/l9MSPj6jxZDgtZmTLJhWvGqYC/ADyShJNCpHys 4/BhIzDqhb71w+eMvkbdnVJIQHKXO6EBaqtydK5KbxfKzgH/FWizUUBk4cL/rQtmpNwz TuWg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=S3kXDDXN; 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 127-20020a630285000000b0055798b90375si869872pgc.709.2023.07.27.00.34.45; Thu, 27 Jul 2023 00:34:58 -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=S3kXDDXN; 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 S233152AbjG0HHz (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230497AbjG0HGv (ORCPT ); Thu, 27 Jul 2023 03:06:51 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 929FA4216; Thu, 27 Jul 2023 00:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BJtNqUind90S16XBXmX5DsM88OebyBK3UkTgXugCG/NyXrClNDnALRjslaV9Sh/221/i8M3hvzMJ0VE5CZGYiSba2q2MLnCtnbifrJpw64EalIWjJwO8QXVOcS95hvBg0D9MxYjgrdgw92YD+cj+lz7xGhduCQajlpJgjHe679PKd0F0YX0Cl7Dwv0fvFvodsyXre62s7SLVmbKUb2GtpakDUtuCs7eIQEcJMWHtuDUofsdIm3aqGnmUjyZMe6p7JdnGatImZwcnFBT040QjpxTiZUbp2mrCd1eXtJzCgFjoAwP6vE2AgdDCHMWB8H4CAW/vGdqMWERxV8eP8z/4LQ== 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=Sc43eVj8D+jXjv+UOKZmNNsyrS57jCHl9PeQXr9Ahyc=; b=HcaVCda5kOjsTYdmxEO31kkNRrQ8MrBQHyn/kt6f33tgBSjZANQX04swiZQ45BQhAT5K7W69BXBHxDahM7GRF9gun0RnyOgJiGdpjJLTNpRap4+0KqIu0vndIbQ8Ygjpbhujac0VDfPR3uAm3Z5KzMRJKbCDAApIYgc20TSkdSCFqUu6fJhLqF+tuo8XtiOJrhJz6G5UWjCoq0gpCf1XeBZ6x0/jSery1PVwpn584pqaRx6K2TPR8h7iS8hLFuQ6I3etkoFQfHO1s1gC1aLcHyB0p+bpBPetCfxPyJAk6uE0R0PTpLzsKIf3gzfdolRK+doSbxMWekBD7+cq3wrr/g== 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=Sc43eVj8D+jXjv+UOKZmNNsyrS57jCHl9PeQXr9Ahyc=; b=S3kXDDXNkqsSUL79sO70cZxKvaSy+d1+OxhWnn5hmeIz2Wl0AF1bxE/B/IcUC+YdA69X54xzuBVOGPuNIWtVjpaOgvtlcbyfNSrO64yp/mZ1Yi/PoX5qp1gjVk4WlZ0qtF0SuDPz1Xn8+60lcqu6k6prhOF0TAyMH4glSiHxulIlXi+JazF8eTS46pJuES60TyDF/VZ7qFp+ycXU3uIy2K0m14X6YWLPHskk4Zw8usfOvwb1S3UIwIOosyWzmmndtXw6SHWB08o7uRSlI1uKeGEnEWmzwsnqScdXfjkoUzm6bxP2xWDOq83YioQ6+BWU90+JzM8zoXQNvPT12Dt+Pw== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:40 +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:40 +0000 From: Yangtao Li To: Pierre Ossman , 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 v3 43/62] mmc: wbsd: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:32 +0800 Message-Id: <20230727070051.17778-43-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 49d1e544-941d-4c83-a5dc-08db8e6f689f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0k4UTof/FV7/J4v8u27VAPpxLVC+g8+ExehW/Nu9xK3nL10yvey9e/i2gncg3eP3d1L1l7FJv5hJEsJ6OUlGLoUvg659pw5MwLwCIWFRSWJ/OZbeJSVGkwRVa06j3ubtD8bnepU5zWNfAQwrlv2vLDARIm8I8du3jAlo38Kf95KrFpHtdQrNMcb9+bD/jpvJjrbWGwgvpt8oTlOjDFU+r+yQeWwrdkPdPCNNxjMyV7CzgRoHVg4HjPvKEubUzrfR8ot6ruaUjMphYP+7QG8FIoL5DZjhA9LjLyAaa/ohK+SJH0rvQ++qpBoL5ZfmoHDUuM3nJ+TLNQccuE8eiFw4y5aiS0bH6DWLHDdem+lySZWHHRZhuLjqqermgipuIIHoHI1qzyJxcRne5Z+eeqe/GJ6c3gM3t3KPQxmVcz9nnLHq5UhrC4P8Pv4yFES4GvrtWbxTWhWy+n8nwKPI068vI1yIPPkVAMdSUrvDkSPdHSTMKD4Kjeqzi3vwa1gUblo9kSBmJrwj+s8uRT1Iq5cBMSAdz37c5eT5FQ31HQZXTpHdkxf64g5npXauqU1fiz8cBZEZqkZEMhFYn4PtEwuo5xtyL1/BYQ46ZpXuOkapoLqQpFO9pxJ5aenq/uxKY3Wg 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(66574015)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?WwK8P82w1uB97lTo7AEGxWwNlI1O?= =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sK0bX8O?= =?utf-8?q?agqaJmP+EfYWnryeIctWo6Pww8mYkszFE+XXzMtex+WwofY6iqmaR0h8NPofaCKEE?= =?utf-8?q?yJFduu7FG4bKYqrv6HXOj5daGYTV9FJKMNXoEj0qdGqg6AuZiurs2tU8RH5vNZYMW?= =?utf-8?q?8LGE6lMKB9WWxbtji6H3iiLKCvap7DCfa05f01/WaLpx/XrBgdCxIpWgQ36MDJDZ6?= =?utf-8?q?ievqKLXD/Cl5ywfpqPf6s1XidFVRQw3tFrzNgc1bqMz02p39VsflvSYd1FZgGxf7i?= =?utf-8?q?LmI+eC1hpcNVjYMcRtviR+NsVqoh6SpKGnZlCTskATFj0HuBk5OkYwo+hd97usH1c?= =?utf-8?q?4wUEwH+VQZ1z1Yz5dls/iU3T8ERvPlnEnefeadhyo1IH7bL0+03koZC/c/ax8MSGU?= =?utf-8?q?oF6/hxErc1dexzcfope95paAijAcvDPfd9+zPJb6eIh+MVEh9Y6Siy5BwIkSxF963?= =?utf-8?q?/iHBr7g1/2+U2Ewdbk6Eert1U0V9AzK5GQBUmvcmvHC+nPN0l/+esKkwgaH4UzNJA?= =?utf-8?q?SOndRld5u+mHWZiwMBqOu7HYi/w79iNlh67JZxiVqsnyUdRcHi8Sib/LCzcJMLkI0?= =?utf-8?q?uW0mg67a+9XkRjPh2w/jeQ+RUfjo+5V09mE+F/U+cj+GQpYZBpiitAlp7eqqIlSkL?= =?utf-8?q?HurTdmU+rEcS?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49d1e544-941d-4c83-a5dc-08db8e6f689f 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:15.2309 (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: kbU8b6XzLNNYzcCd99/8B9sO5CvMZOE6gSop6bxSVMelOckqbob1R1tVYnhwtzq0azby8N7bueZDjZrWBgkndQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772558272751187913 X-GMAIL-MSGID: 1772558272751187913 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/wbsd.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index 521af9251f33..f361cefcee01 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c @@ -1758,11 +1758,9 @@ static int wbsd_probe(struct platform_device *dev) return wbsd_init(&dev->dev, param_io, param_irq, param_dma, 0); } -static int wbsd_remove(struct platform_device *dev) +static void wbsd_remove(struct platform_device *dev) { wbsd_shutdown(&dev->dev, 0); - - return 0; } /* @@ -1904,8 +1902,7 @@ static struct platform_device *wbsd_device; static struct platform_driver wbsd_driver = { .probe = wbsd_probe, - .remove = wbsd_remove, - + .remove_new = wbsd_remove, .suspend = wbsd_platform_suspend, .resume = wbsd_platform_resume, .driver = { From patchwork Thu Jul 27 07:00:33 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: 126758 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp924640vqo; Thu, 27 Jul 2023 00:45:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlFHJ4YTIh5umkk9XpLCq0zaYrAGBU6N+1FUtesBX5M0TB8hv4riYzq0sV+l9NZoYUwPAbfV X-Received: by 2002:a17:907:2be4:b0:993:e691:6dd5 with SMTP id gv36-20020a1709072be400b00993e6916dd5mr1407533ejc.7.1690443914070; Thu, 27 Jul 2023 00:45:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443914; cv=pass; d=google.com; s=arc-20160816; b=jt4GOYMscuo9kmcbVJSSWi5eNDH0ttfa1//2fzYk7Isdsw33rFCvBXawPm0mapSKhS +wAKYpC3Nl0ExFdDgGIKtYWPTqulU+3H1GKs+teP8ISLprphHJA4EEC0TL76nEqdERvq EP57RFU+XYbxZyZI/ZF5gMmldWz7Q+bCvjRvE8VzL5josVvjL7VnWqPGUgBS1LeXCVsz whH3Xu2vQKoe9XHHTwiNPS9yRE7KC3VlyLVyz54IvLyNqAHSP6Qj1Eo29gb1JbP2492X 3BOwL8Z8INqsANLhkGtBuVGBigbj5g34cyoSVOfcthN+VFG9IK1MPCkT4XLtY94QPTGV zfrQ== 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=lZwO81R7bbiuI82gPcvzCcJYy8CKX1m7kW4A8ZR89No=; fh=S1ctsIWWA+NJBIV7CTL5lMZDVPIetpuI0q+HVSpGaEg=; b=weJnxMO/JvNscSDdbbvAdOBAtsAd87igE4GlO/+VsjOwsj7R2YigtMc8DljcxvGn2B /GjZ6iY1wgqrTO4DvnSvlc9vqe3pyZ8Pwt67wVpS7PhRs+/AAJHf5/KojRYCaUiPpoAA 6bmcfqZ7jDWZc3n3beOBy71tRCPNsoCE7zNn/lEo6M6RQHPG8EGIaHZkW6OQVxIaQDnF ScScGmlYlT3i3cbQbgGdXSH01NRQKnMP4S1Ev6gH6uSyYpPpZPHMitRB5Ahnhd3Bs7Dm 3IXDbXYeyQHl3KP/tVPVHZT9eevBdL9LhKQYAE1EYtcQpjyz9j4wck+PnaqVWbTFghTD lm9Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=FD8UFZ5z; 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 m17-20020a170906849100b0099bd73cbd7dsi618594ejx.429.2023.07.27.00.44.50; Thu, 27 Jul 2023 00:45:14 -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=FD8UFZ5z; 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 S232344AbjG0HIf (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232977AbjG0HHX (ORCPT ); Thu, 27 Jul 2023 03:07:23 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2094.outbound.protection.outlook.com [40.107.215.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D274D46B5; Thu, 27 Jul 2023 00:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iSo21CR5AlwULRAEZqEqRvnWqYN/jjVIrz1EC4bkQ9LX9IumEkEZe9gqfjIm//oXpbYz25u94rSHyQHmOd49vg1ApmS7zJyhj89N7xif26qGzeix+OmybkAqs+F8NPBx9UrGnBUF40F47f44HxNz7t0VF1VZ6y1iqRhZLGBGTyAzB/iIrQK4xem0IDJBXcNkIyA7fKs5FKrYavN7LF5hEY4o8m9zn5zdy8hda4bMWxc1fROMAikunX9m7Kn2pogptIj5Ec3LtuWOeSZc1Q5XylMHOZd04EQZiI/wcl2e8oghy8KiqRi5San+JLe7AEI10pnfsMPw+KgbRAYw/WmzJQ== 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=lZwO81R7bbiuI82gPcvzCcJYy8CKX1m7kW4A8ZR89No=; b=f+UPPuPXa5j5gpzH7qOC03G9I9TmtPnpIBRtWfBcLZ1XWg8r8JRT3Nkr1DpLELRJb1Tg5IMouNUr6U/qdKcagmI25SouqyUYhJMh7WfpO4Iv5w4aeaj5TRSskagSQimONNfoglB88hl6Eg1iTRImGm8QgBj7xsuDQicBwsWGmCKEYr6bW+yjJtlDNbv245knJY9sp0VQPliQr1HchAFSP+5+wsxT90XbEMn0wpTeFvZH1Ge9qn4RwO3PM36LuBqoktn3cZHtAVJui4SRIkQiJtBMAjzBofEGVuIHv3mMpSTMstGr+SHITRprQLn0hVITRYrahRxqGmZ/guHnGJhJTA== 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=lZwO81R7bbiuI82gPcvzCcJYy8CKX1m7kW4A8ZR89No=; b=FD8UFZ5zDBlXxHNCtRjSnJ+gwjt5dBMhdBWvqFTd2HddBiYl07qsxEK41Xhg94RS6aMyTX1uvVvZkAa8A5cVywFxe+UR7AzhAX4qr4KoAcvvkEg1t92EbRF//a6tBrFPYDAAPJ6DesePz2/aT9/MNzhk2k75qZlZaDJMxg8z3aYLiVvto2sCbrSikNDFVYTkRuAWpxXZHFN/6Au1u/zCtalNEhzVxUptZFNHDkn8fQkautjTsCF2Gk6Lo+QLZrHyH3eSiRBVfp6IDa9DDfEdOa7IpS0hsTk2SdJo0bz4QmWkRF3+NfJZ6wOOwcV86wsuYMqoAvAuvXJq4fcjLDvGHQ== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:41 +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:41 +0000 From: Yangtao Li To: Jesper Nilsson , Lars Persson , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@axis.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 44/62] mmc: usdhi60rol0: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:33 +0800 Message-Id: <20230727070051.17778-44-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: c3406dac-92c7-4466-d930-08db8e6f69c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9KmkX6ocoWZ/CZmsyss8aWNQuFyKgjbUpQ/KgCwIpHhVVUIcvsYN+lHSKSWmIIqWmb3bu7WoxEJ48jtjSMlGXGpTAGQx3cJVkYbMlglCVmwewyqOdKW9nwlPyGnSr2eVHGS1mDcl3F7aPFg0c9MvGeBUYsuaF5FE0+5UNsgwtmQ7NXa4egIrCrhlaRuYkTdcLPudMVin4Pijh0G/1WoO2WGYqZ12x7s6+JI1M/7Q9K0cN4Bd11H8276YbAWUzgnJA+jc9HJy9PTIjbzIfZ1mTLu4M5CDq2uQ+5IHYX1jVIJCa74YQ2qKzJqtsi+1otMFmLM3/rIN4DEnx4RtFwsMW1KX2+LZkYfDIHXZguI8diHbb7vUAnSqAxxlsXquWcnMqbcLWk45ZI8r/vrbav5vHCil+G9Qz7OqqP6VGzxutvpmEWpunkBdh4GC/wpOV9dAURG26wqaKBjJpeL9Tq/fjiLrSLEHWqZ+VY70syeZxxKEVLjMTKpFWyNzfSCbNeApgYM6LrorwWqChPnpYvCNTihW3kFhgLjYxObmkdGZE7kWB5mDkLlFhELXsX64xJibWSctgbLbzeNOMMwVhv6kZPaJ55MaRAdpQn89xohx9kI3VrUX9fNRGBaQ78neSoke 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?POr/tz4M/aR1FX6bavBFeWcIpUOI?= =?utf-8?q?K9DMhXg8vltMngIkq2x/uuduz/ePtmkCfZxcCUNpty11QwYhL3FdY76nuFbnSQpzl?= =?utf-8?q?MSpuwfE/T2REPPZ/6oSS0QaegEa6LUwtBx8Vy7BMJqHplX+Kv/vo9c7MmI74IGvwi?= =?utf-8?q?G93siq316D/JPpkAvVWa/10OQ4HQy6U6eEOc/Q5aZYpVLPJKTaGe5sP64vJ3/KVJj?= =?utf-8?q?aPuF0/GPjta9yoFZb3Zq+h56nuBpXMaBlKqrsGM0HV6Fy2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9IDUeqXd1sZ8N2mZ6ie0c?= =?utf-8?q?0bWZOo1DbD/lpN/SLpHiVpp+IzsMqhbJ6d8uhNCScyg/4bIXDGTsJell/O+SZxqv5?= =?utf-8?q?nrIktLg0Z2V2N0vGkl+XKcWwr/hLD6VJyweWzcFZXn0yqjMiwkhJ1Q05U7wTAsrfP?= =?utf-8?q?UrQNGQuwsnc4TzHGEge/In9B0m5nE+b9sX2CIa+a3j5iKdydEPAW7dOTyMU4toD+z?= =?utf-8?q?lL7xeSS6I2AW9wRwIeA6+i3pIaMQ8KSXzEHVuKybKUCoxdWSQyqgWVL+eLZOBYp5i?= =?utf-8?q?wWczSNMdFzdRaqaiveT6276biqIZiMEUmMlcqEEOsAnGN73DVJXeRSGwLdxLWWu0b?= =?utf-8?q?RYMw4gJ0yF4NdecPvZZ9aG40RFINj3PNaQReugWHh3/fc0OV3tVshW7n50mY6HsvH?= =?utf-8?q?REu6mNJ+7QU+?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3406dac-92c7-4466-d930-08db8e6f69c4 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:17.1458 (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: gPQB0WRFxiwTMHpy8f3oOjINW/ue11XvsYRtbKFOc0ISuDQaaJWSI58tN4gcsAZx3fH0Tz5r0AyhG/HNH79BSA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772558917649561680 X-GMAIL-MSGID: 1772558917649561680 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: Jesper Nilsson --- drivers/mmc/host/usdhi6rol0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c index 2e17903658fc..6e421445d56c 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/drivers/mmc/host/usdhi6rol0.c @@ -1884,7 +1884,7 @@ static int usdhi6_probe(struct platform_device *pdev) return ret; } -static int usdhi6_remove(struct platform_device *pdev) +static void usdhi6_remove(struct platform_device *pdev) { struct usdhi6_host *host = platform_get_drvdata(pdev); @@ -1895,13 +1895,11 @@ static int usdhi6_remove(struct platform_device *pdev) usdhi6_dma_release(host); clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); - - return 0; } static struct platform_driver usdhi6_driver = { .probe = usdhi6_probe, - .remove = usdhi6_remove, + .remove_new = usdhi6_remove, .driver = { .name = "usdhi6rol0", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:34 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: 126824 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp961205vqo; Thu, 27 Jul 2023 02:08:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlGOWJ6ms70pEyGMUSyYrtAzUvxXowDoobuajjMvhjmRDxRYVxEUpSw7E3+Qk3WdPggIm77l X-Received: by 2002:a05:6808:302a:b0:39b:a87f:91e8 with SMTP id ay42-20020a056808302a00b0039ba87f91e8mr2763790oib.45.1690448920297; Thu, 27 Jul 2023 02:08:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690448920; cv=pass; d=google.com; s=arc-20160816; b=zm8GObtv59hUedI0E1ZYygu0YAp5rVq5t+8n+HNy/lZgj2S2UpxuxcJXvKhUvl9OFa FK1PtfDw86m3bQNhadoj6rtJMekQA6CVmeV5YwHUvnrvWidaSslLYEe8ipiB8YZUDHml rG8d80Oq2RAy5ETN//I4o4kGQPVXfthiXY4rgt+EWYpDQTQGYYqF5DuvnXTG3FhBUlVg an37Ks9clIYl4o3ZPuZ2PGP+Dhv/66GBP768a5BWmrpw875shtnp/3qTWJTqC9hVq1Bb kpRtXWd8lBTMyGtr8WTkPmbgcOr6bsIvmFDg8EJFBsyEQhz3WIgK9qAiFfkJBWZLFEBN dVGw== 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=rSWnsNd35kiXhc7HW4zXFBezZKYWnpvDY+cv2Mi5G1U=; fh=oM1Zd0ktKl5FNilAel4zgra9YhN+SYjIN4vt5uDnwJo=; b=vlVUX6M2iPQhBAXEkHRfCcQA6O2Kc2c7FRT3PR4ixN1Fagh+ZdI8ERqwE7rAznMX+c UvsAQx1MZYo9MRFR+6GVnd17ZCvItXhl1br2Hqxsgpk0aIo7Y6WHCqpNeZ8+r5oDjmDk LP1vyA9eSt0skSGFWcengM06RyJbhDVXiSR/p2nQ1PR/chD1pGZuCKNOaiwqMyivoeGq 6I49++iSHnS7Z8Wlpx7Aoq0dObBV5AAoSVJggmnyWR3z1XDBOK9qIV2D3aXaTVBK+r5s 64H0oYxf3KoWVHnxST5p2ykC+c7bsM4ICOnLCoB9ow1hTHFEBA64T/CcBw+MIRI9X0+y m6Tw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=PcNHUFsd; 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 y191-20020a638ac8000000b00563e13802e8si941964pgd.753.2023.07.27.02.08.26; Thu, 27 Jul 2023 02:08:40 -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=PcNHUFsd; 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 S232480AbjG0HIj (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233007AbjG0HHp (ORCPT ); Thu, 27 Jul 2023 03:07:45 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD91D421F; Thu, 27 Jul 2023 00:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cdMpu7/1Vo3J2bet4cJKHrcaLz00BozX2r+vUTbDZ2WTjZh1nPYAqZsn4SJLfYvv+iXnkyBcr/dr7M5B1UYDfUkfPkItmKt7WeQdaoWv3k+OhaxggND8KIJ1aEdxLfWzBuusw5W+xFNEbW3Oe6bM7mqmWeuw0XDuzIvGLW5bgYrWapl+LIsiz+3MSXVVapSssrBi0c1flxKn7VZLooDs6PQ+3prDO+2RVsaNGged0fQb4yizDQAaaYgzPHJJBq1vyGAQTpQAwhYmdPizPth8UBoCgq+mguBnb20q7dkaPNP3Xl3NsmMHZVEh31cxQuz2OnK0SmS/S3dyMjFKoc+UBg== 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=rSWnsNd35kiXhc7HW4zXFBezZKYWnpvDY+cv2Mi5G1U=; b=RBPpy8YPSKIOy+lZsxBvGHoztLCSaKqst38YYodkE7wgPbMC+E3x16SYqQmA4p7itmQWHqLeeGzGpPc+T4Jzt/m0Bbd01doYQCGejgxVvDXxnVe6EYzLwFTDwmXebMfNsER5CwgzZ7TgJ+in9eLUInvw2zu5PsGWJ3rvlvOXOi7gVtueEiXMzfDJC5ENEuqsbUGkxp84+4qkn2bxI2IwpLCyQFOZB2ouhhDu07xooNUtJJ+SLbgZF7pMmWbXtkrFGcuHCZ+gqQlhqhAdpebr3POecDlvb64jzJJbY2OhOGH7Jikcp/4AoJFqldcqgjDxHWNxTVMHoIiD8/3gelghYQ== 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=rSWnsNd35kiXhc7HW4zXFBezZKYWnpvDY+cv2Mi5G1U=; b=PcNHUFsdriGLO2L9WjhTQrSrdnLUKa9JhqOZqB9+srnTrL26io50Dqlrh7+7oUrzC0mdfA+5LewTyzKY2W1SuRVcoa4vzxWRNJWrtOfDOK5QJ+A5yl6xPNwGQJ8htDXJDuFidO1BlXUSPYFNp/ag6M514Nqfn1PAlFmuCizUPIuZEX/VcS8CPXGLhHLjpSeyNiYzazJDAxMK8BnumcNof0jtsiN81NlJwZYtgBQUw6yaUqQcR8U9oYPGOjkpPQngL5skXnS/ytccEkkJaCR1STlFh48wjjdQdzi83HVfKIbU1hIfWqIdUx0fN3ExHIWr6ixn20rIJVX1GBbFpt6J/Q== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:41 +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:41 +0000 From: Yangtao Li To: Ludovic Desroches , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Claudiu Beznea , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 45/62] mmc: atmel-mci: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:34 +0800 Message-Id: <20230727070051.17778-45-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: b105bba4-5434-418c-9566-08db8e6f6af3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8Y/vM+abh0U6LcXQosZ+/PIZmt70CaZiVtG23gssbaDqsvFu9ZmSDtcnIJ6EQVlQiwinbLbZAxbiMLjSoLrzoZGKsI4nXkT40W+6pBzl6IaNFwfez0MjJ0gzGrH186vjWm9ybJ4LmGO9zohTAbkNun8vynfJDJd37jRAK8YhDJhdU44k9+DPF7hWwKIb638HO13Z6LAkw7E+bbf/Tel65pMNqHh6S11i33WfBmHr+pLh9DVHaZKhjjDvLrRJmONia9t9cpKqUFIz+qy0VKZDkdlAM2X9n4mCbg8fbSCg//hpanD6fYF3DrXaxOYLfZ3vans0VgisFj8rKCPt7u61k10710vgOtvbpKL/usII3PFipPoZ7aoPg891aREfx0L5+gLoP+IeaV0eriJOreHXVD9Y/g+ktNX0LZ4Ry7ZbVKCpoJJBbteGQ7HfhZlPIRw6OIxYRJ3ZdZoQXLkWC61CYh1S46USWKc5yOfuLNnCMC3eQ/IwPEjmchCBPJCWfir6ppYFSxOA/IEOdYszm9OHYi4uFHIC2wf+IjLEA1KW6YNHFu/WLYNSLkJR9ajQxsG315xZOAHQT1H5/KN8k3iTwMQZHX5f96iK04vjLT90lx6EVo49Kj8/OINduStv90s+ 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(7416002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ZIPtq/f08B9rgRJ/ZOy6IDypVxPS?= =?utf-8?q?Zw9Zry9W5HygXbrpXdcOZoVP9CF54s04hhZBuvxrjH/A3yECWSrhaYxgaofOXIFIu?= =?utf-8?q?eLi5JcpiAZMzv/H583gM+NA5cu9JV04VXpIPzCq27+zHYRJuJ5Tv8+xrkgFLN1JeC?= =?utf-8?q?ZN0QFaTY+UV7KPGcOSEkpx2AA7eR/YmtWqM3gFjUUN411o55Sdxgfkzwd43708gFP?= =?utf-8?q?dl6csi1+FhR0+HHo6InGara+kZFgqjpwBE7RJJ8x80ZksPr5bVMyxBMXSHaTqC/fv?= =?utf-8?q?NJ5idjcpk/Riq0dehOjMPNwf1SLME/geIRXWnEIFG1UiDYibvJ4uXJm7JIKYpVYZ8?= =?utf-8?q?PxoQKWH8pQAKtfOa6sl5Q4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rCx6AZ7YIAHjwczuEE1+32oEmrNukroug?= =?utf-8?q?HlF2wyOM9iTw+svv0KU7rABXLeIMYc8i8GZD3nd2ub4CK3bukWYvFHSSTT+IqFUfB?= =?utf-8?q?M45Ws4U0Dbz6ztctRCt30oUvqSCCIfKulsgaojnHYIGXHNGUSau9DGYQOy6J3i6YK?= =?utf-8?q?N7I7q10y+e9FcKqYX7RoHWn5Jv0l6htgh+ubwVReFBstmXhCulXbNmssAuEvPuCc2?= =?utf-8?q?sT+kK+6OAbMKwWuaGVyBiAoIc9fj0ouuqaqoIFS5O5hqNVSOcMYFlrh7bAbpxawUe?= =?utf-8?q?37bXZs4er66K?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b105bba4-5434-418c-9566-08db8e6f6af3 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:19.1168 (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: lxRkLBY7cG/FuHd1Uw5ri5T9PQXV6whYh43faoL7Xm8bPG7No7GvAn3eaETHzd8fWgRalAhFtmjywiCHASIKsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772564167137465196 X-GMAIL-MSGID: 1772564167137465196 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 Reviewed-by: Claudiu Beznea --- drivers/mmc/host/atmel-mci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index dd18440a90c5..b4ae9aa939a5 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2600,7 +2600,7 @@ static int atmci_probe(struct platform_device *pdev) return ret; } -static int atmci_remove(struct platform_device *pdev) +static void atmci_remove(struct platform_device *pdev) { struct atmel_mci *host = platform_get_drvdata(pdev); unsigned int i; @@ -2630,8 +2630,6 @@ static int atmci_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); - - return 0; } #ifdef CONFIG_PM @@ -2664,7 +2662,7 @@ static const struct dev_pm_ops atmci_dev_pm_ops = { static struct platform_driver atmci_driver = { .probe = atmci_probe, - .remove = atmci_remove, + .remove_new = atmci_remove, .driver = { .name = "atmel_mci", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:35 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: 126717 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp915118vqo; Thu, 27 Jul 2023 00:23:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlG9GUdlYRRW3YNgq42zn4O1H4H3cGlpe4AdhCwm3veAIjNY06ezF8vwqR1ZJ+ZXqlvX+d43 X-Received: by 2002:a17:907:3c1e:b0:994:5396:e32c with SMTP id gh30-20020a1709073c1e00b009945396e32cmr970374ejc.3.1690442584926; Thu, 27 Jul 2023 00:23:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690442584; cv=pass; d=google.com; s=arc-20160816; b=zCQx5shtmd98jXvQJEPDoCcdk6APdo9r0HnT1S3eDgeTVa1DBVBJ2Ey3HP8dSrrLBh cRxsTWyiM4IgnYsgSVYzAg51ZWV9q9nVYsgMOZE9kHPEgG5kNBrDlEN5YQY4tGUTZAGd V26PqMnVXdrYCWUP2ExEBYwVgh+0vHkxEdCF3+RTqn6U0p3T3LbpG1d7NjkAYPZGDAho nTb6NRozQ3aR5wLiavbOO0eFByCdFCbyG48VnIIEgqeZiVQLGzaUVVIRJ7zCRa0jrC5O nOOT/B+BxtwGOIO2S3iaAskHKXrktvwNZ5D0UUuJ1nGQcxDOw46VT74QIgB3hnqiGq5m MK/A== 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=1xLwqq0e9Ue8vmkwjT7LOOQK2kVdeTE1Pd0css584r8=; fh=qYKcpxoW+O+dL/lpX5ppS70VDzcSQglRrCk51gd2vYk=; b=ybNp9heGBsGNJAfXC7s9Pn8emEZGAOMEYrH0TsK+eggGv5RIIApu2hffFaZ/NrJccD 7t4qMhy2RoTtwhmvyJwcmXBwMOTL7m0qWMFslsPhoGGA31T5WYYvI+fWFeTAia8efZdZ xLKk7q1x+J17WHnDq9EzeSOKwiKmyFts7/Yf/pWurnCgCQELdJxh3LIsHqjr4KHb3W1s jQlUUYA3kqOZEdFBu54PHHHn76CybVQMa54VqPkSTQBTz4NmsX+Bo9LssW6j+2c3oaR4 3OzlZfenZLz5h1/ym4l8vbCQPR81AiulwOOn8hjLrpOIhxXPnhQmykt80saQUi/xys2N Hnrg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=cqzJjbv4; 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 u22-20020a170906951600b00992e0e54464si643555ejx.254.2023.07.27.00.22.40; Thu, 27 Jul 2023 00:23:04 -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=cqzJjbv4; 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 S232943AbjG0HIs (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233134AbjG0HHx (ORCPT ); Thu, 27 Jul 2023 03:07:53 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20709.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::709]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E323730DF; Thu, 27 Jul 2023 00:04:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Enp1XhEDlYrkv/h3QE5DaUeIayhoJZ/pQvjvbuOdH+x3VWHjkmIsr6Xz7EAbasn6Dnhwsv5Q07bF300lKnH0xwPGS2TRZRJrZ/1K5Mu6Vmx1/GYRB0A3DyyjIYZ2x/l61RFexYpP68lwiceyzdAFXgVRdeIPtPpMl/ZXWxuvWLQ3Yy+JHGswe7N+XyHgPaA8MIaKV1+qLxWf3cMOhJ0Jge+xk7Xq1HbJHklsHG2HzktyAMx6kuFWT0DUpRSuoDgEqvEz/9SKe603CNvcEzbZGasvpNdiNktn2edE+6+Wp3TgVLDuBUDKBsjcmqcTOd1kSqQDK5D9vL7sCFNvNdwS5A== 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=1xLwqq0e9Ue8vmkwjT7LOOQK2kVdeTE1Pd0css584r8=; b=DuDsIm0cFvOfSzoe7fj7MTsBXlGdFXD93kVkDJ0WuGYK7OmyXal717SIG0fz6jVrvLDp1V7WL+soNLAbfSqLkPuyHnhDfrAa7UcnnYstLz/VUaf25xUfKcNVnW+QWHUDD+JPKQE0uY6I0LGTslM/RIO46OgqLA591SOtKSfdNV+SdkvNkWtqgwf+3KCrg4dJEoZBfRszcRZZRt4kGpyrZ3pDM5aTRkW2pn4r/ve+XR1N+SgcJHgrvdOv/FXVSvFdwyGBO1DLXAYHl+VMcGp5spe5eqnO9S1gB9Xh/8d48YgBfzUP3Yf4Pdqz2M/PT9wJrEFuff5Y1Sj3I9LVL24nAA== 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=1xLwqq0e9Ue8vmkwjT7LOOQK2kVdeTE1Pd0css584r8=; b=cqzJjbv4y1ZY5wjIy8bC7lOrzwiAJTh0gPJiRcKwzWoGFstlwExrMTC9KIPCU6oMmX1CPpob0OUeBhWWaZUMyxKxlYfp6exevVK8LkJqezAoWBtFCphtmbbn0QF+MyAgYLXz1JxQO4dGqayoH14344rELMhpjjRmnh1SaoymGwxT7XqeRoP72BtqdE8G5NiKpYMIhggTyhdcHDfBt07tJfo5cZe6JTUweS8+oNH7+6QGzV7JGMukV7CX7h3DGTYVFNItlOA9X/8oQRmwZhJq6x1d14xJLWr2eAvgUyICB8thCSlLSdnSwg7Lun+x9QI5BqjuFkA+RxtdB7iIXDcfgg== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:42 +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:42 +0000 From: Yangtao Li To: Patrice Chotard , Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 46/62] mmc: sdhci-st: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:35 +0800 Message-Id: <20230727070051.17778-46-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 4beb5dea-850b-4ba7-4283-08db8e6f6bf0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rPWFDHrokiGbubHqfRoK7qx2Wi93VrWk1jp9wzcbR/m+huN79EA/ZcZYT27LivEdRimQkxC8bBOTeTu5hNYBtLcGIuN7tixLgjLDPE8xn7UnNfmYriOnzdVktvlBaFKyIjmvl9BDSQ6Gx2Glf8IU/linERj3yDrhCoLX2LImDA9rh75pdZ1K1gIIWXqdcZdqVlwPH12tEYf+APZhOfWVcJBcKB1f4Hkf2mzPmiyvZj+Sy7M2XaojIr9oN48I4ULomGmzSPVhXtEHOzUzi83ssejZV6nJbflmmH6gEzQRqVwBrWapEfkfD+e+2o3eXYIXksIDmTejsxsToSE4gpvPn0y7Y4PAZTBmsVzGeqgzrBLJUGXdf4sci/XL8+s6vOP+vYdYcVI0jey9wMB/syBkhbsnvOw2f6qvNGP49tICPOv5iKz32kOQ2nEj9X9qxYsZ2uiuuwBNx/PLuljqiJvRhcNdyvrgtXn3Iz/GFsbOzELRVOqC/+EnkYieSr5HeZ9xGEPQIweXs+FANs8q+j2sHB+IlC2xLRmTdqTD7aXzDxuonC95FdbbU8Vg0vrzHuDd3LdK1EXNtqYEdeBjarbQO79GMSNrQCZ/kHJgtrBaSAEW33xMQjk2igMaEnmoNloJ 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Q9Et+HKlU/prCEfRyCwzI+v2ymPJ?= =?utf-8?q?+NafUr9l1cWjg6gvRpi46a3rFFaGb3YuFwIOw/7bWbpNKMKEfrNDaJqkMSOhK7XC9?= =?utf-8?q?FdGJ5B5Y2i/G7d7N44dX/yAFfubvUeP6UUEHmHCW1wSiTn9aJunbiIO8E7AgX2mUa?= =?utf-8?q?5jga+kS7OGtlYEGdmQWK2YY7cvTvF+Gbw8ze30Rxbdmrje3eNgSXaAogc5PTGab1Z?= =?utf-8?q?qWFoIMdd3K6CiQfd3bhBFAhaG1siwsJq3v33pZGpnPfLuSLuwbaLq9Fkf1V4Lzj2o?= =?utf-8?q?q1RCTQ9x+C8CLEozR9o9FRAVNcpC3+hfTTWU/A71Hf1lTlQIITeMwoyDJsbe/DYO0?= =?utf-8?q?1K8svTg2FRp61hbMbELsb/plnOeA+KAoRhrkeb64pgBbWmjanSbTBNDdyjdSNenfk?= =?utf-8?q?UuBVs795BQZptC9clyasDdAgTMEj1ieN4P3dMVKPE8UygvZeUBNSncRw8uuaYJhe0?= =?utf-8?q?xeBRq7ipnJHobdxQej9bgu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edF7RAkRHQBr9XCZE7g0KzTfpiXlgQEMbmSrOO5MxvRY?= =?utf-8?q?n5FgSW+b9jxDF8O7P6kZpHgSe6uw8Yaj+Fn2p2TojMZZQZdqNS+ydvgapu5j4pcmZ?= =?utf-8?q?UXhDoFi/OCkX6MiMDVvn/MJocmPs8zRKkARtpNAcVULYVaLEy9c/OtYcCh/LageHH?= =?utf-8?q?xt2HwTTWZO+D?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4beb5dea-850b-4ba7-4283-08db8e6f6bf0 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:20.7916 (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: R7PTYPZXEejbzdJHsIIrQ2mL4wimfWybK7lHLv69lw0YbKyi5ktvtwijLBCNA82d7grSZyVPc/RPybC1FnnXWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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 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: 1772557523691889361 X-GMAIL-MSGID: 1772557523691889361 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: Adrian Hunter --- 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, From patchwork Thu Jul 27 07:00:36 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: 126736 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920835vqo; Thu, 27 Jul 2023 00:36:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlHpqFoYrEb3S99JH9t5zvhUuMY3osQiCUPeP2r/NYYwKqBBOGaBiS7TVSNy4EHFh2PRwySB X-Received: by 2002:a17:902:b483:b0:1b3:f5c3:7682 with SMTP id y3-20020a170902b48300b001b3f5c37682mr3050235plr.68.1690443385151; Thu, 27 Jul 2023 00:36:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443385; cv=pass; d=google.com; s=arc-20160816; b=A1AztFvYGfTrtL2CcOmSRDcRPnbRQ3QGs8nQNr1/+zaSWUFJoSE2vgBwMAJuxEB7B+ +VRHgdk7sNH3MD5tVx47mWgb3Kg5aicOCN3TH5MFIoq2fvKHUi63VcRDOZKM5U9SOFyg /HQNltClCaHYeL2KrekLB4UFgibXo2X7Ie3MV8k/0OSQ7AEatQZDMJXrYuaTNIwGZxcg p19VPLtpKA38loed6VLLetPA+IibKl/2o/2bFB3hJKJ2tV8wzp1otNDdvgTGiune9jnS mY77ARd82hqndqCG329YbvUDrEV9r6ATtUzyf8KlMNAnGO4PTIlh49VvswCxKkGnBZaI 11gg== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; fh=VgrQwm1O7S562Nu0EHXj1yIoeXgypBRfDN0sIz9nJ0s=; b=HnVnv4ydQyspm4rmGWpjvG/R7d3jPUwkYVSj13XVMRHpoDHy8K6ycBO9y48JDrMSSo BMpdDE3vxIwk5c6dkOcpWGnpILwt39CJnmfxXlSg8bn7JD6NZ5Y+bzF5j1lPMMUG8TpC lkBd+AYY6MYs4IYOdbUL+TyeY3YNMxXl3YdSYkRdMUc5gulg71ObA0bMN86hqM2jBacU syf2gyNvx6qFX90pi4zO3m65cMfFHFERaDymyhyvjrcfhb8q6NWogzrSVespMK0hmhoD JJL82w7hIrb6csFaVV9fpW+vZc06SktuH5DtyfHnfUJ/G3GsIuNV30D1d3sbxkcl8cVW u0yw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="fMMh/8dW"; 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 e15-20020a17090301cf00b001b81a9aa3d1si934609plh.223.2023.07.27.00.36.11; Thu, 27 Jul 2023 00:36:25 -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="fMMh/8dW"; 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 S231586AbjG0HHF (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232493AbjG0HGG (ORCPT ); Thu, 27 Jul 2023 03:06:06 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20725.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::725]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C33FE44B3; Thu, 27 Jul 2023 00:03:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SIv3VZgrOEvUZg6KYHvJOioL9zbIlCbryYXvRstH45R7ovpxqy/A1OVy4H6OXfXU11VKNTH1LlJYExaYaMUvWpvOtmf1EfqU5sS83zLJmNaewjlqIUsnJbMskfdYmSWdb1B47+DXB73sDZI7sDsGYoft1DkDD//MnGMip4A60BdKNTOKr2B21WeI94QGKd93bz0WBx3siCgoEM/XZPxcXricvP5+L8aQaUeokCtUQlS+XlM6nZ0HqnxVISxzA3OF1kLKSMf5fKch0jkm1P5jYnLadtpZCpZ3G9kb/cOCL2YDdpoWDlF7AfwHjGAjcCSKDF8FSf4AEGg8k2D7/brrzA== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; b=B0UV7JTyB8xaZOKhrMVWbYJCSAnVu3MWCmjQvPp6mGL0/ZFJphhAO09KzBSBh65JDXCYER9IXZXM5i5TaHTIef16MREr/dIobAa/mXEAGbHsZjN4nFor+FU0IaWUzv+JEfrMRPjgpiVirrxzKG5+rq44VH+11k5ebIrBFt13rB3lhw53WVQmB2qKfivONPpDAprIHokZ+xzN/ZzuMirT1rOE2v+jMIu6QIcFz+m+UPDJnp301cMmOXKLN5SC/b+ExZeZYo1srlm7JSilsCS8kqlDKoqBvZWr+Plb1xSVmsGki2KMJahwH8tMKTkjwJYN8zKVdeecqmr5v0lmkV7Ypg== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; b=fMMh/8dW1RSXQBPsjhYwA5legf64bx17XUQWKt+KqCbme/QIqY5/hmYf91fnK2ll13oczYJY0TBqzqiDIAmcMGoW7sEbFq160szHxNgUfsmBv5Qea0rg2HaeolzlI6WLfazWMEfWCvetHCJfEb+83Ipa9sdM/XjGKySkVcN4RPIr/JIW6RKmzPSh4RlTaqXpvgXXoenHJqXa4TNe2pSRc8MNcBiux0o6UDxHmwYIoPAyMGDI6bxpMO9JGN5xdOcZNDU3TlYjaj9k8rCDwDwF9Jtn4n+wHCPCz0yY4dokNOEoFKZbs1H3vbp/DdF3eN7JuCPDGhEEF2UkF0gJ+tEDnQ== 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:43 +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:43 +0000 From: Yangtao Li To: 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 v3 47/62] mmc: wmt-sdmmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:36 +0800 Message-Id: <20230727070051.17778-47-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: f71a7c0d-ba85-40c9-9066-08db8e6f6ccb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x1eWJu1UibBBRRZjg0Q9wiHipteNm64q09G01cufsxd0EUj4AHlHiQ35T0TWa8fc/xzMkUCyFxlmJ3ZwHwccoPxvx7R/z8Qvv9JaNu1s6bv9rosbLsLZVm0iVb0Xar5cb6tM7Dh/S67VCGrQ5hbI+Y2GsQT+93wcNl7QH+d8Y2r/c97lT2SuuThg/VRNhEFcBnG+wKZ9cVH2gJMzlOKDHKrRO9ZCb5gnUQu54cNZcuRtiuJu5UTdKGloxwwwcbRjvZhxGhuKM2VVqNwoPTx+VUHMdijX4J0h8/Ncr/WyycFpbZqLTlywRjMpNReu7zQAYcOV8JulHC4tzq32JQUQBPr4SyQB+JikSw1WZs+z+wKjmExgLg6V9aWCPfdbKtX9WUCGioDtxolzKjleBlCufsQe22dn7EXHyyYfk2fWrl5pl+9MZEgRVuTpUhyo3AYOmqfuggWyEoZJWRnqYdenpYvcAsnQVJIQk1hrF+EnI0TmNra9MqThX7VyyVvCNau1SG3nP8D6/VsyVeKHFki1auDdw3oXLKpepv4S0nSipexK1EVrcuAEuhllzmmReQjW5xPoCMWKEXa66QnX0Cr7NAYnPnbMQlygS1m08hCCAQ/4lAaV33eJj0To84st2m+e 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)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66946007)(8676002)(6916009)(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?DOHlRSQau6yJYoeTrwccD1ZAs1LI?= =?utf-8?q?JUeo49QMrxD7Juoz5h3xYBhXtWTZ/VjvvhVMLn7POMzYl34gnq0lHPq74T198tp/p?= =?utf-8?q?6tj+QxGPmbyq6Jds6tOGZ9Ihfl/ORphSBFUbv60MiJu/EY0BvJ1Ck8Xg2LunjNzmr?= =?utf-8?q?OXYKCLI2zp6N446v+cxAy3pIi3njW9RZMwjS/bDOSegBlql6rVAG1YY623O2B50Gm?= =?utf-8?q?RWV4Vj1hwpdGBD0HvaKU26DpupOStMTG9eGHVGP3MS3Y335bnoQun5gt9d2IuoNyB?= =?utf-8?q?5tX8bkKu3TSQegVPi33PILBL3CCe9HyvKIZY0P/NU3e2r1HWJ4DWMTlCqCdBM1PQP?= =?utf-8?q?KZIQbA36y+DZFzQT9tfPBeL2TAmd/LdVzQRbIeUnCqg7Q3XgdZXsV7DoaPTuHyXUT?= =?utf-8?q?8j5Y8FoVK8ZfnMuCmzG+tbVeaU9V9rA7ozAicC5zUFvvf4i7UP4hq/t/8yv5EwjCG?= =?utf-8?q?MiHlCeXnD2E2S+L1yW3ol7S41Qnk2MtJqg5T5DgXm30363Rab+qB9qiiOUsjRiSsJ?= =?utf-8?q?2+BMdc//LT0C0Tni9CflToxnljXh/+buYtCBPgP3lSf74QH6okM4EQjJYnrrEGHnr?= =?utf-8?q?qsJIPhXEkSsn//R/e6bhSA5rQ2ER15OHwY9CBSV6ntDj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pubcoPB2PGJBXA?= =?utf-8?q?OqrX5cRMZk/B?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f71a7c0d-ba85-40c9-9066-08db8e6f6ccb 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:22.2034 (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: lYt1kRh0/WdbLuYibW5FEi2QbE0BZSCIy1kP0bfiw+zV2gAf5lkC2edrf1xS2/fQQu427h5cJdmlk9/j9PTXtg== 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_BLOCKED, 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: 1772558363088862648 X-GMAIL-MSGID: 1772558363088862648 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/wmt-sdmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index 68525d900046..74c475d071b7 100644 --- a/drivers/mmc/host/wmt-sdmmc.c +++ b/drivers/mmc/host/wmt-sdmmc.c @@ -880,7 +880,7 @@ static int wmt_mci_probe(struct platform_device *pdev) return ret; } -static int wmt_mci_remove(struct platform_device *pdev) +static void wmt_mci_remove(struct platform_device *pdev) { struct mmc_host *mmc; struct wmt_mci_priv *priv; @@ -918,8 +918,6 @@ static int wmt_mci_remove(struct platform_device *pdev) mmc_free_host(mmc); dev_info(&pdev->dev, "WMT MCI device removed\n"); - - return 0; } #ifdef CONFIG_PM @@ -989,7 +987,7 @@ static const struct dev_pm_ops wmt_mci_pm = { static struct platform_driver wmt_mci_driver = { .probe = wmt_mci_probe, - .remove = wmt_mci_remove, + .remove_new = wmt_mci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00: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: 126737 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920877vqo; Thu, 27 Jul 2023 00:36:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlFxo+qEbaTLJ1rff98JBtWFaAm3WPnP2XHOM0OKUEtgRh8h11tj0k3AdIb+89Dnh96hkCJY X-Received: by 2002:a05:6358:921d:b0:134:f326:e819 with SMTP id d29-20020a056358921d00b00134f326e819mr2121772rwb.29.1690443390658; Thu, 27 Jul 2023 00:36:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443390; cv=pass; d=google.com; s=arc-20160816; b=hqAFEiquNz/OWlQ+p2WZ40rigapdAEAHcLNbit4UCNjGaJSmJLfOw/1v+VSci9f+Jt V6Ok3z0oBn+SuDhixYWTjDEtKcVFoV2udKiKGlbKNzsdb5/2N6KJW/m2pvr6oR4zX7yG L0fCFmmLeQa9fkDwIn1EoQjkkpNo45JNZFGeRBXdm7vRWHkkAtjr8oA0DNG4iqtVkBRA p7zDK4n5wdHJu9jfavXTWOaHRh/m7XUS7dzDoYgEKDTlGtW6Cbz84EAqJI+nrO/phVLj iKw20oHKcM2fEDc6vJ41EYHvA5knyXY0HuzhuuS7st7ixRrclr37LKThop3oaXFwRnwV 9xGQ== 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=Qi3BsQ5K6HMVxVVaKmclXYMikJ6itGQu0ZOMQX+rjdE=; fh=z+i/Quk4ABo07Efd9YkyIGotDWZtW/0CaSdwwBXCkbQ=; b=CjWun2gYUb//oX8/maJ2BAe9UHk6cF/1A3R4RhOeOjtq09LHwHg0CrfrRfLZuSrkf7 hOeDMPLRqnf1QYwK6NKgjSDZ8ym0zAqFPLSnnLYkAlgUhA+uUOMjjFxc5PGcx0iZMS8v y/21o7bELbEqEEwAtHjcrZR1IYWkSV0ciUtjFtMrTSxjONLmkX1Mh6dbilrSfat/37v0 KAZLP/Z7D3CnJ4aZgB69pkldYP02+x0AJ5qADYf+AOo3/nxgipWgzuZkHXq4nEpM8nvy hZrn283/vgpFxkTlfG3XbSQJbcS/qgJSv+6tw4eUnymP0NGn3oMJKf46ywrUheIdb6cx 97rw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=S+kUvWkg; 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 m67-20020a632646000000b00553d7157e86si901025pgm.338.2023.07.27.00.36.17; Thu, 27 Jul 2023 00:36:30 -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=S+kUvWkg; 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 S230294AbjG0HI3 (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231661AbjG0HHN (ORCPT ); Thu, 27 Jul 2023 03:07:13 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20725.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::725]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC37C468B; Thu, 27 Jul 2023 00:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P0VC2JSKZMuMeKx/F6NU++nG214tV5/zro1CnIm7dL2OU8/kdJq/wIs9J5vafHVTw4VU5bwH7CnNfiLXCAmcHMnYSZOX72zmYYOFoMZZg+TcyP1DD7rJSAeg8L9iXuUUtXwn9PmEMaHk+ITCT+bUZZPZ0Nrk2OORv5dcp51cLseSjM2wa0b25nn6HUJQ6kLWuuoQVk91jCW16JXZe+z0/RvZGEWjCo8jZ240pzBvF6z/T3Feng8t3JU+uwQa+9YLajB4bwS0h1BpwCKfTxlApwFqvPdFuSGoXvzgKIDJWbo+9l/bj83WlnI+lPVxkVhQcbxzPaE1vc72l2Ch+TgBNw== 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=Qi3BsQ5K6HMVxVVaKmclXYMikJ6itGQu0ZOMQX+rjdE=; b=aQIKWjyznAFrZJ1F1kavvTH4qrOpRnjskoRk42lUdiRovGiHSYIuDpAtBItewX870b0Jc4PSXQo3o/hDayEqlQluneYQ7P3yeImH1dnQOACMz3fJIN9BhbKK4XtNQeBM/5keLu7WNuPCLoP0RJwF+oZRzItpmSDbcuORKxXrCzwsBoietxBttyXzG9/YBS/8phAdlHOXz5I2G5h0EZdIIXRqxd6Yr0mbtYH8tndQCxCg0JU2UtBTejzuIzvA/0q+StLyH071lN5z93S8WWRfXbmTUYecICfdoS6QXWD53KooUtbwI0v+7SUrA55nJhlc4u64ueKkQ82TwctrkjsC9w== 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=Qi3BsQ5K6HMVxVVaKmclXYMikJ6itGQu0ZOMQX+rjdE=; b=S+kUvWkgsUcfQBimio+7thiVFGCBtNRZaJvKOZFFTxzv+Nh3sHDnOs3+EQlY3CHL9NrGjWvAVz1Y5/b6sLcmWAlCsgzId5vN+LRR8JaSwYRoPq5fLgmAdaE9WkrxK5CiTl5rW+jx/gWsIv4Pa1Ed0xZwff8J1uUP67IG0BMR+KMc6qr2ftQNv5opMHWUWgGg1K07kZRmwMewZDQ5QkpVQC4kG4je5kuvAGtxBw0/XnoFGcQcjaOM9DnFPuWDg9aZMrevBvzEwsr7btDag01H7neSkKiMYLjCzKsEZL0e4NavNIoGbVmnwf653ikLp6vZ0HcFfRzn/DGFU3ACgWvB1Q== 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:43 +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:43 +0000 From: Yangtao Li To: Angelo Dureghello , 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 v3 48/62] mmc: sdhci-esdhc-mcf: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:37 +0800 Message-Id: <20230727070051.17778-48-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: 89a6310f-b0f6-482f-c96a-08db8e6f6db2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zZJNecrEJYWQ+v0H+c9ZEG3vuaV60lIPxCfPe9DwVgox4nHSpDu3cQdgqWV9BFTCIQgkpHGVyxj3eNf3/7IQsIAkLdjQB5aLC8qcxhTD15bRAwDvojbEwFFkGrvfpAEoGuJI5XxfP/3H8dQw3bp42iBuGKBLKbwL+GjCkqUiqnkVZsi9rdqPy4NPJih6VVIWyIuI6/WHtHzcrFFzBSFB1qqfxgau0dyxfnPrfzkDhAx/BecEMXRStyQxTcW+pTj5+wKC/385xsgzXdZklvMuEPNcujxvSqVmkqbxgVu41Qakh1XuWPiDB9npmiIRY9Z0GCJa9ZiUk2It0BE3G5TkvDgm4GKSypxRV5XgimIB9OsCGqR/b+wXU+qKW1uDZ11EtqwIHPYgtrCtA0rYhOUrWWOq9epIGzb6Acw2saG4gUHqEJRvmOFNrbr/5TvdO1TnK9HIN+au8ZMrVzrldX0oZzh2wWzgrI0V2W8Omq5FmwLxAEZpSLe+xrkAEoR8ObPvfTjcDLRKS0SsrLSmgvsOM+rUs1zbYXG1lPeKxEc0HPNo9+ruyGqaQAsf8sAXR/3xJEQ4u0A3T6pJxhO9eVzjnspVtBnz1flq18y0JxamUxEq2Pqr40WZzSj42je8SSBs 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?qgKeD3fWpswqh0ivv895aXysTgUM?= =?utf-8?q?nY78tuLDDlquwcd7uTRIkfA641xiz0DQxj37o5cc5NYM87wVfwx1bDlVllNQfyslH?= =?utf-8?q?hFt3P4h4KnTwQNdBJ/bVXjM/k0ZBfshDUxArm9ilj+UYUV1tyRncIEOANuOPV2fhm?= =?utf-8?q?q2LPfCCqjGEnb7mMsvoklVtTU3d6gfWY1aUvwpKmqR60sKy1rSDlSPnBo1e/59aRR?= =?utf-8?q?gEfTpuRj7/d7KywLmiQmo56Ty1jBYUdVrD4gZ1oaXXM043dmLT6nvuwrhA3ijan5g?= =?utf-8?q?H+JPUxc4sjAqhA1xfVlLw6kcuUX/thc2/AGIz+9JEOO4fX7TjHQAShqh9VdYteVFZ?= =?utf-8?q?G6a/LLq1rKAFoRcDhdxFnhRJtFWFqHos6z1rsktE7NgAT7B98UyWNojnv8dUbhqkD?= =?utf-8?q?rVZavQmjg2psVr9YJP6EoHjbvJ+spP16G0GWAFkErgKNnojSadAoIZ6chxmdxDVc/?= =?utf-8?q?vVpP2KYOHkOjb4aoSNXuMJZMJdSXXwwDnzsss/HVJpP8+KGG+KL745YOCFNlire3y?= =?utf-8?q?QDVTk8sdg7jtquUTIBahn+o3jz4NTS8YeQnkth7j4BRK1DXdhWDbzVCrnFO5sUi8D?= =?utf-8?q?RvY7qv2IGzEOG1IeskDhwucGmHHT9RrRfHO6YjhIwqoPIVmy4ioD6lagwR1k/oBXJ?= =?utf-8?q?ms+JTqpFTsNbk/y3/v7035n1J2cgpH5lP3PyKWFXGbUBaypJC9kws8dBVl0KnGFJ6?= =?utf-8?q?mdkKD/uSg81PQBOLo+jGJasG2m9MMbyH+tcDK97+XOFVlbP1NYoZ/QaaMea7HJ3qh?= =?utf-8?q?5PCLlzr/0AAp5bFMU00JhGupjS+IdpMjYpppIB4DKkF3fkitwrMtrnRFEKnFa5abI?= =?utf-8?q?8bkRnwYmfzDSohmp9OECuYw8JB9j2TkN3qmyJrqLTNpoovSRqbuqSabnCnwy0yaqX?= =?utf-8?q?jqjdJPfLeBwUXgX+ztRFcaXL/UByKFCZLVW3pJo3QC1ZPBbEmQSXRQNr3OR46V3rK?= =?utf-8?q?nxRwU2o48kCIoCKibM/YCfNCJvEdOgJgo7X50N8tG2XSgvuRobAAEZ8Xf97iydVbK?= =?utf-8?q?QZMCrAE3iQWE7r0bn+Rx5Niuo/keUXcsSqWx4W5ntKsKUCndwWnyzQUm7kH5TolPs?= =?utf-8?q?g4P1rbuqiGmmGacGC3wghcn3rzE2NJNAKtsjU2DTKDLKXLG4nyTHYen4vzs8TrJqm?= =?utf-8?q?fAJqYkXbBMCCNTYKjBtwkyXS8mmJZO8s8iVjwxx9M/4a6UmGuJ4uanEHcvRh2X+uZ?= =?utf-8?q?akxEVwVNo0Mq1JZrEDIRol+yOCCtVTZc32nlwzUc+N1NzpQh3ZgQnx7af1d5psi77?= =?utf-8?q?YBrD8e0c8KaV7/j9GOu/s4a38FJR/+RSOEktxVl4a/LsrpXU/8GZb+TBusHZ2gpRn?= =?utf-8?q?nkDfnUpXGhkya8k/WCbMrSRUCBhu90B/a9Uja3AarBiaTawKCqyOIcCRkFZLHU/nc?= =?utf-8?q?1iw8EYtPALJt6cgD26zfY10dpSH7N0t6TcoDKUP9oDdngdq9zXtoiyn3ZbLyCuES4?= =?utf-8?q?736ohnGrvWLNUf3Dd9R8EHbZTsn4b/qtFB2IJ4h5YSH2/nO1swk68F20K+DRvK/LY?= =?utf-8?q?YVGW3vGlpR0C?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89a6310f-b0f6-482f-c96a-08db8e6f6db2 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:23.7631 (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: l6qZtsKcX/P9EELv9oY++AMTPNF7ymWakIX0YNSh0fnZiqJA+zeazMdrkmuCgGqTLeMa11PszLRpzJgisnGC3Q== 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_BLOCKED, 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: 1772558368949063955 X-GMAIL-MSGID: 1772558368949063955 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: Angelo Dureghello Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-esdhc-mcf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-mcf.c b/drivers/mmc/host/sdhci-esdhc-mcf.c index 05926bf5ecf9..a07f8333cd6b 100644 --- a/drivers/mmc/host/sdhci-esdhc-mcf.c +++ b/drivers/mmc/host/sdhci-esdhc-mcf.c @@ -489,7 +489,7 @@ static int sdhci_esdhc_mcf_probe(struct platform_device *pdev) return err; } -static int sdhci_esdhc_mcf_remove(struct platform_device *pdev) +static void sdhci_esdhc_mcf_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -502,8 +502,6 @@ static int sdhci_esdhc_mcf_remove(struct platform_device *pdev) clk_disable_unprepare(mcf_data->clk_per); sdhci_pltfm_free(pdev); - - return 0; } static struct platform_driver sdhci_esdhc_mcf_driver = { @@ -512,7 +510,7 @@ static struct platform_driver sdhci_esdhc_mcf_driver = { .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = sdhci_esdhc_mcf_probe, - .remove = sdhci_esdhc_mcf_remove, + .remove_new = sdhci_esdhc_mcf_remove, }; module_platform_driver(sdhci_esdhc_mcf_driver); From patchwork Thu Jul 27 07:00:38 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: 126722 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp918947vqo; Thu, 27 Jul 2023 00:32:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlGON/0gNW6ai/d00+WX0/Wro/ybfflpBWQMb7HK+kXq6Y9s5hF2SWA/eP36m+NEv5w620jp X-Received: by 2002:a05:6a21:7741:b0:133:2a73:fdd5 with SMTP id bc1-20020a056a21774100b001332a73fdd5mr3719277pzc.32.1690443145153; Thu, 27 Jul 2023 00:32:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443145; cv=pass; d=google.com; s=arc-20160816; b=HR6AT3C8CGmHtCJC3R7sQvwm4+5fWEUDQX1MSUwWeHmSpTnMpUMXYCDgrrGIoU9tpW jEm9i06kmwEaiF6fNUsAj4vcq3zvlqY/ny0hm4OYJY01lT0fpOJ5SNZKu96a8DzMLyXV krh7nlMQqzZ3B5jCzb1DcO0Ll8gTo7vcSHRuDVOlMf45Nnm/b1Xg56EEkAIBwYrOCTif zCYDRmcW9Dmu+JDrzRg04sB5HuA6+0/lN21y0zHNIKPdMsuru6TuhnGifBwrn4mgZcgW am3CnwdQABk4rGTShti8WWnIxu7Vd4vg+4kKtng11nAANhWWrT2eu78eZR2+CspDB0x9 Z10g== 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=FXZpNO+3dmb0lnQ8WXsQM3rNh0ZF61gf7J5F6UfMTHc=; fh=DltQIqE9+pGXrPR5WLFAdWiPosppoWjSKQ/zZl2z5K8=; b=E0DYxNEeFEyfO4PBeuOn2GuYPv8cMD9CEp/KrZFIHfKaG5O4s70vEd6kGZbBRcRFql j2IwzqTJYiZdfDgmerGhNLTAGIMCVVAsCi8yLAnflf6blOaBi0HvixXSgxlwT17FpSWj Wl8TT3zDyN1J39cGZetWg/iZqTYT/za/ah8m11tyO8t4A4btDxUPp/hUvSytpushUWPz LgaRssWChmAwe7dURy7lKk9bbyYGLLTyqLviXoa6wdOxpE4YSX27GusBStRRTP29GsgF Fw1oqKKPfBhk4vNFTgGi7MCDfzVgtUizb7FvjKRbpy6vSGWAupYSXj4VWhddAyj09Jzz 1Cag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=jB7EGA3+; 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 n127-20020a632785000000b005634b43d2e6si898801pgn.627.2023.07.27.00.32.11; Thu, 27 Jul 2023 00:32:25 -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=jB7EGA3+; 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 S232384AbjG0HGA (ORCPT + 99 others); Thu, 27 Jul 2023 03:06:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233050AbjG0HEv (ORCPT ); Thu, 27 Jul 2023 03:04:51 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20725.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::725]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F8923AA5; Thu, 27 Jul 2023 00:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kQYhB4tsjPc9HPdaHuHpmIx6o0x10O/8xvLIiC0xJMs951rX6v0+shLqXL+IjyQLmBryHGG51fZYnGVprYXVybVsarmCtlLnt8DAvK7G/Jngtere3n0tS6DwDMTp0n64J7aZC/FYXQ65+b+f2yxJjrbsKBO+yJ7JD6XvnFKuGoDc1I2JyezYHBUZYPZhe/m6/fww91cc8Pd2yspNegfek4jCnuz5Xpe5CGUox/4k95Ge3Zv518rT22lyR/kvABhjc9P1CajKa3WBPxB1DLZyhlv2TXalCjB6MPbBFlhEpFdk+8qEgcGiKO0vwP5x9pCg4y9B97itaTyJMGGgCFm3jg== 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=FXZpNO+3dmb0lnQ8WXsQM3rNh0ZF61gf7J5F6UfMTHc=; b=Mm1hh4DG49UzQGFE5yPO6cUP0WuUqvtmswJWwzHecWIKzQ1vUDcQTu8CL6jzvFbczd5ttiWyuWfhhbixA1sVBMuym0iPxp+cJAmGnWKLk/prVjWfBy6/U26oOIgXsaBD8Yd0k7g+RC3Mhn3dHQ4taM9WWnhLBU6hi2GbjbHgfWT9HqBOJESaMWRbrIeFe6jT0t0olioP/jtHRs6W7jjNWJuooQ19AuIb+ODtX29A3H4QC5Ux/zjFFe7dSOG0zZ3DO/4ItlqB7ebbSBpT1y41PlM7mFbxRdRRDbFOiwIThwfWsYrvaOwDgMGEorxGFtLPoUErjuz04fKClgF8xPrQTw== 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=FXZpNO+3dmb0lnQ8WXsQM3rNh0ZF61gf7J5F6UfMTHc=; b=jB7EGA3+6DdO+UuEIO+yCElpuv1WdFo4D6AkgNZUH+7GgjDSrmQpYYgW5V9rk3lQd020qjulIo1S3THzyF/sZ9FlOY+rWSqVFpyfECAcSPtgDv2l4B/dCIU52cd+/Goo4AZ2BQ7GH3RPYaWpjx1v2c+Kra4l3xN4dzYN4OEPyhn9gdxFoUDACj+iYiud+CHtAZ12Vir4jwHuC3tN93rlYHhVKEjESuFEQrNKrbOqmcW9jQEW4ZBoRmPrJoLr0jWBFbyKdTVeanMciiIZkec4xJcOlXEPuVnScSb99lki+Tu8SNLa9drxmjGrTl7FnhFPCAMzYpSMao6NaCPBo/NmLA== 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:43 +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:43 +0000 From: Yangtao Li To: Tony Huang , Li-hao Kuo , 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 v3 49/62] mmc: sunplus-mmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:38 +0800 Message-Id: <20230727070051.17778-49-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: 28f76511-c70a-4270-2938-08db8e6f6ea1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m9XUME3szuqM09seQbNp5zr18IQqDqJKjwRN4mCSfFmXd1vDNQsFvF01Cg1VJJsgse9xFp/RWrolBJrIBzdYlFvJ2GvHlr69pc732zqWYSFCBgogpv7G5JGQmKnHcoHsBcJkEtmxbc6OudclXWF6Dv27m8HwdifVIhLnvF6ANSBMbG99mX1w0S/JD70UWiGpTwfaxV5JEzPcv85dVyaAPuW8Upq+eRgcgTiqck62/Dy6WV0wbHqeNvz9ra/73Z6nrwCZgk6+5rDn2fauAHXBPYI8c4uUrueaDmebUJTdKWbLoRO+7R3Bn3BMiVOTyftWmfQoLCgMOrqOWhboc2y92oznxDDudDVhwzc3jCa/3fYonHV0Rw1SmfW4WXQ+fajnHs2A/jeCi5Ry2PUDrpgUKTtz3oFdHW1PKziAPHobPOVgefYzkMaEfY+gVRGgjODWgEu1ldU/BchgDmttm3EWFKT9Ndr4dIPE1tCwCMefo4yIQ9kF38UBgWGr1AQzkQ1bSBoBW3C3EuO1j9tX1bF3BH8fiw3hkI0mvm0jljlESMEhh1TmNMLd1ENnRCtAn093S5uJR0QXugTYuce1P0dz8MX8sWmpQHPD66lnwnrjT9YhPY1VticvALS2C+xhtI5V 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)(66574015)(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?w+tJF83Q9q7dMxx/3uZKC6bTEpFs?= =?utf-8?q?P4HgitphH8PkEMKO7wp83Vu7qbhv2K+Fot35w5tl0+cXxQoUqoLPV1axkAYxyzA37?= =?utf-8?q?rrmEyUcVILpuwIIMsDD05fHS0i/zoa4OyelmwHVLGAZ1HklBrSGyztA5EVSt0u+fX?= =?utf-8?q?zUJqcX91BarebLa+f8Putn85rX1wGeEhbA6mk7Pi5WN6+JFQ8o64GAGjsAu+PulId?= =?utf-8?q?sF5LaFr/OgRqn3jxXbo9NO3OYQkyy6IMbmjXPCTHddK98V2YCVGvmTNLTRfwEmjHv?= =?utf-8?q?99exPH840BYNHUOHR9+7pzh3g0VPVLN0+cRj55QnIU2w2FSq4Ps5T1d7TPnLIfkDb?= =?utf-8?q?/a+WVLJhRQezeAJn2On9FVcwAGcaTaKM0/TX3fVvACOrCMf9I8rRC4VP9v1HCdx2a?= =?utf-8?q?NYN+StI4NpzqdLdD7IFd7j874M10z1a48QIGXpKoNGrtJxANPHwZGwLM5gnFoazPn?= =?utf-8?q?TTvOYHy+F+yQUJMBipfve/y7T9l1AbWsG9eWztfFicYKXc5q7ecNvh0TIrEQZpF91?= =?utf-8?q?iZ1jjLO0bBBszSr5QJSeaifs9hWsFyr0Nn4sdYYU0bVbtswIhZEmNuhpll8+LQm3r?= =?utf-8?q?Az8tgO1mWRsIkXk/HA9fa+sNwOzncUpoIKeebr3x/RniXjUVyZndqoQfBO8NCXXPP?= =?utf-8?q?c0UExUS6AMMCRN7aTMadX8AId/YRC7bO255hl5mtFqa93QUrg2J4RGKShG/dzZUYt?= =?utf-8?q?4Z9Q/OORzZCgjtpBKa+MTz10OdJzOkteIQ1Ez8Poj5mgqqrilF/38uAQJIZqpzm8g?= =?utf-8?q?MqNsi3LMxizX+VRQv/dq50J+9mILhwk9ks/5bM/Ai0GDYwUnzQ0O8CRpbzDTgfmWQ?= =?utf-8?q?LBESl4TIm/cY6cF2CzbSbSdULpUK2uOnr/Blz9b7wES17zWazudQxir43HTSJo4WU?= =?utf-8?q?LFTk3FQgGQ+d7FCRs5w8/M3R1GbDCzkNJCrDEcqo6qqUjeYbUEfd8h9jA89ghcdTL?= =?utf-8?q?r1SGwm5GM0J7eAJAPMnvmKoeAfdVowiiZ/QAjj/0AJQvENM9+Fv8E17u45KW7Ssnx?= =?utf-8?q?Qcn93d1AUTRUniEJVWTZUvO+QzSlWFSvsGwD3qYmRRhk3mIMYngEzC+GwbhHh4WlV?= =?utf-8?q?11BrEij0CB7PchV0D2nYk1XxMc3SkhL04drGOs4/JelFQ5csbrvtIFNaOzxR34b5y?= =?utf-8?q?WeXmrFD2jxJvkN+7cu7WYYzUh9jPmNxHecHAdXAJGV6yc23Q2FwoDaCw25kqMuD56?= =?utf-8?q?jPrcsUkqBD+qiVmNzXCOLCV/kMMVi31hVRBozor1x5nokH31zauLSsXfhjldm8KlK?= =?utf-8?q?gYlmXIJw2ZZhs4nufIxxtybJwFQpWZcapGyDeLt4x3UXg7AB+lXJt0W9iWF/0e9hC?= =?utf-8?q?aC9lbvAsB4zXINLBC2kBHdtUQY/ACCGPmflwtIm7XWGvEcveqGW0KwylrNIAUhnY1?= =?utf-8?q?ZPXALnrkBY8PL5mKOKclHuYn72mteYHVUsKVIdm7baRFWBbg4cRVJ4eW3bzR/mUcs?= =?utf-8?q?ouT/bwHjnoxDMiviaRF68SPACmrd4EAuJsCeSC2Sjc9AIaJj3bwBHiP/8wZfbi9YA?= =?utf-8?q?QEp5C9tI+0wN?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28f76511-c70a-4270-2938-08db8e6f6ea1 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:25.2964 (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: jE0FBfdW1sZ9P3UAMt92hos8nO00lyTGfn5acWmdggWgK16/3peod/ZMGQyXc0W4DQseexsX5+vWCmgZKQ411A== 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_BLOCKED, 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: 1772558111048216056 X-GMAIL-MSGID: 1772558111048216056 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/sunplus-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sunplus-mmc.c b/drivers/mmc/host/sunplus-mmc.c index a55a87f64d2a..2f30a683a17f 100644 --- a/drivers/mmc/host/sunplus-mmc.c +++ b/drivers/mmc/host/sunplus-mmc.c @@ -946,7 +946,7 @@ static int spmmc_drv_probe(struct platform_device *pdev) return ret; } -static int spmmc_drv_remove(struct platform_device *dev) +static void spmmc_drv_remove(struct platform_device *dev) { struct spmmc_host *host = platform_get_drvdata(dev); @@ -957,8 +957,6 @@ static int spmmc_drv_remove(struct platform_device *dev) pm_runtime_disable(&dev->dev); platform_set_drvdata(dev, NULL); mmc_free_host(host->mmc); - - return 0; } static int spmmc_pm_runtime_suspend(struct device *dev) @@ -993,7 +991,7 @@ MODULE_DEVICE_TABLE(of, spmmc_of_table); static struct platform_driver spmmc_driver = { .probe = spmmc_drv_probe, - .remove = spmmc_drv_remove, + .remove_new = spmmc_drv_remove, .driver = { .name = "spmmc", .pm = pm_ptr(&spmmc_pm_ops), 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?XpRY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u1Qkpdx9kOcrQClqDYAgBtfvpshbabudsm8qmbGgfVt4plKrQbnlx33OapC9i?= =?utf-8?q?AZP80Gn+77KFM2B6KEQ8lCyRfDlvckV+HOtdJbGg186rjnH2ayFZDpeizWlVGcWcx?= =?utf-8?q?BwimBoC1cUgk5nhzqZNvV7+Y0pYuUPUH/pVL+ecaxqga2mNoSVDj5XyZ6mmeKdX/1?= =?utf-8?q?sGO6OxoZDHyv0OZMVEj3DPlQ9GdgPFGtWJ7KdUIANmyyIEoOSZ6tEcy/tjxa9PhrJ?= =?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); From patchwork Thu Jul 27 07:00:40 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: 126775 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp938037vqo; Thu, 27 Jul 2023 01:15:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlFeNcBdcVmaaZ7NwZwmuw6SByg/89LuctdIYR6O4UnouhDdhV5UPDX9c43QdTRkW5KMIDI0 X-Received: by 2002:a05:6402:502:b0:522:2c44:a91d with SMTP id m2-20020a056402050200b005222c44a91dmr1235119edv.36.1690445718708; Thu, 27 Jul 2023 01:15:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690445718; cv=pass; d=google.com; s=arc-20160816; b=UnLmFr0azGmoxQos3MmupJc7J8spZN+4g9XMHcwmD3VEM3MLJPzXVgklWRiF1XUlx7 Tj5HBa/FfMNClAQhmbGCt3sJPF2whvCZ0E2KDoUHtn7dbSw09nxuIQSkPw3qNl51cBTT Ovrr5IK1DOAqG3qdB2gwdLylJ1isfLbVP+MMFhF0V18jTNMD80MCIUbpG2w8K6AUU0OL 9AUiJRDQ3NUoa/OajV85wtjhgcuI3ovXvnTxxSY/HTyEP/F/POrdBGFReaIZV6YjCqtg EICzj+W0giviDYCwey76p8ZFH3I/nhLK7RGALbRVh+2eNo5GGL4B4wYL8aR6Fwp3QQmT YfcQ== 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=uPnrvKCQGrGsesSBC854cGT5go4mKOa3EElli0C165Q=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=ZdN+egXE/FyQLDJstn7KU7hD1CkxFELYo5cCXtG1lH/oxM8f+oFo0F81PWj25u3kkH 2Vc5I/RokLnMooCupytv3nQ2Gd8RdMg+6GdnNt4gk7BGUYuFXkyi7yr95bRrcAU3IiFm u6BDKjyspC0Ef2NrKtdQmLAZ0JfFugpmxwKvioC93rF7BUjA3AHyw2/Lcx0ztrbjJwue 4tFfj3jeX6/2MadkmMCXJuVi+ybQ11Q25KRJ87XiXTzab8Qd15yFuxYMdgeKjZIsP8X8 EL5O7c/KMW0gxka4z6PZ9jEHqEdsYz/ieI5jmpu0rKEN1tJwRb4vkryFkVyit7//qdq5 i2JQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=BoY6FuRZ; 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 n11-20020aa7c68b000000b0052246a57e0esi652011edq.1.2023.07.27.01.14.54; Thu, 27 Jul 2023 01:15: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=BoY6FuRZ; 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 S233178AbjG0HLC (ORCPT + 99 others); Thu, 27 Jul 2023 03:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233144AbjG0HKX (ORCPT ); Thu, 27 Jul 2023 03:10:23 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20725.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::725]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BEF64EDE; Thu, 27 Jul 2023 00:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SlF5YNQxPC0GvMlvQDcAamdkGso8OgjWxBTOAQtIY4GzmTTji49R6muBCho0L92NAZ/1hC1G85pQBvYAGjY9fLlKw4EZqaXVinebvrnxfA/RyQmlc49BPCtGTPvJ3kbfylN+glwfwagOcrhuhDRzfAC52358nMJP5tBxiG00u6CCAfFH/8QCRe3dVDppaitDsBHbjXmo4QIrHhZTOgDdOCOur6CCGmn3uH3CE1v7LAYJ7SbtAGVpNcLpNf0pvzCpzbaZuPF6fz9JeByOZHqUryZwsH+Jh9emNcOrb/wm8c/MCENo3L4zJswkmZPSAoGfGdcXP8YVQXy9T9MlctEvog== 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=uPnrvKCQGrGsesSBC854cGT5go4mKOa3EElli0C165Q=; b=VhSQNRYXGkfTfzb3o7Kpg2D2cf2G83p75Opz8vWHx2e2N4rNWQSWEFv9R1B6QHxArpiN0a8b5BPcbP8l6Grfn4j5G1qup0dWQVezLfqR872IxY73pMy38WcG5cGhbiQJ9qWDm0az8KbK59EgURh5lGhb9f9LiW7Z8iR50I7sdcuPaw1pV9Nvl4y0rfhfr+GtGapE3XqipY9xge+cdo4YQYY+8HDmJ3u6KOXF6hm7o6pZjkHqw13CEzA8P1TeUFWEorABHgx+83McN1u8IHM82A2sQOOAHns91IZ7rsz5rhAmlMED7nfm1FHdL+EBNE0RyPNm6MR37th5bte2lNk9NQ== 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=uPnrvKCQGrGsesSBC854cGT5go4mKOa3EElli0C165Q=; b=BoY6FuRZAOdca1DtGORzXiBv9ys0pOljZ73sVn3yw8oHhhw/qXjy0II4Cxyznq5vMdW37/6bS2NUlF4pdCGSlYh/NuhaScMiu2RVppbbMTDpOeV6FqyHdwtjcadzLQQ9OkrdbJVTPkV3MeDfphAdXLVlgkeLUdoOoNhxnBHTBTPx1FUAe0EvUYQK1VrW5veL/fr+JLHIL28mAlGSphpEa0tmmUX1CfWIgWISfEfbcppfdm3Va6atNaVFnka0ekLEbNPgv1oe03ZFDoBlQArLd1gqhffLfCvDrB/8RpGWdt3v+0kKsOtkEy7ZzHTKHkFD8DN1Y9CBMadJeJQcDbAozg== 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: 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 v3 51/62] mmc: mxcmmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:40 +0800 Message-Id: <20230727070051.17778-51-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: 9639d4bd-6a0e-4ac0-74a4-08db8e6f7068 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sY5403S8SmMp+vCGdB4C4Yy9apx2NX+bLU/Gcz5s60YdremJFXKRNY6hsI6DA9VjYaLoZ07QMaUfyJhYpRjBJC0qipjEIC7qQxcc3i2+6nG+lXxJUiBDUhCNKQ0nkDLQDTKD96kJ11vuCNRtx9uvtroglK7RUBYRe0rw6sjYGBeOhfNORk59x8uef0IBq4AfGp8bh7pwM7pTmjVckQqMdfDGuPtrGybgEoDjhjz0Mhby19cNBmEjZwxYmq8kCH43rtF3KTCPvi2GUWXh9HHeesbQvRJwyqU3bcROtM7b89u38ronomQjkO/vG6BEoF3+q/jn1iCvTTsi4Bno6D0m9QqYipvISHWg/HdaiCpUIgrd4P/xEL3Zhe44jEBgdeUxhjrvTO8NJCVT4SOtkTBbf6Vhipdg7Ve80DU2K6SMM9URs9w0lqRxoR/lW6L7hsgCQ6+3ldX/py5ZY8N5Wu3evUxOopcW7RlFczzPsPbNMFipU3Z7zqbxUxpL45b5bxqN/JtY4YVmMWqRPNhFLg017OQtpO1+Hk8k7Oe8sTsqNs83ba2Jb9pm1bXmQziWXgwkydIfSNUHu0E67exEFcKxuompuItnLYLukF5Ea2pLjPoIV6G9ih868Xv6fMxXuFzZ 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)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66574015)(66946007)(8676002)(6916009)(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?8/IhjvV934C5z0QqEyiZq1U0OQnz?= =?utf-8?q?YNrrLK01m2Rg4GyIFUAzYb+QEK9Wk4i1lTUzVTN821FzGb1tWc2STuntL6IRBiI9G?= =?utf-8?q?drDqsQ5odaomURzM7EvtnKETVdNUwJt3q/KGpBoZgbpjwUEJzCXmpng47xhf4835b?= =?utf-8?q?iEltF4JZ6IMgdTa10i8/kYBFO5qm0cJZ7/U9NhSUZpprDO8apAvZWsK6Otuc5YE7T?= =?utf-8?q?AgmyUURuE9pRF9gwoTLIwWa8k3moEd7TUrxP/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6gDqqPRYy0IPJsWe5+ZBUz?= =?utf-8?q?X6JYCm2nquy3PlBHi4ThpYZoSkKaeFbeYl+mh036yLhQ2EJunGtrymgd3WZrX9X/q?= =?utf-8?q?eNI/QGiCo7cXcjq/Rr5OEyGeACyv0WhVxzebhSTG//KCWh64TfFl9Q54Wcg+bp/EV?= =?utf-8?q?awfXYosETeRNWF32KIFvTm9hV+LrSyyFFWkFp6KtLphWqPf6uvoPNfdB1T6knO8bq?= =?utf-8?q?a1tew2nXQThfwX41nAOvfq3vp5LcY05BU6bfumVvRIYCadDXoimPsJSITajdsKmop?= =?utf-8?q?HprF20NGQddPGLnyq3KSJksEC2WrgEKzSlnJKkLGj02Wm0PvILdleHSxHTxSfkC1b?= =?utf-8?q?0Ymq2WyIzpT+vEjkoYKoPvn5oKVtzlR8TCISbgh9dodaAEwxaCt8CGRAEzpD5mfHy?= =?utf-8?q?p782fGgHI5Py?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9639d4bd-6a0e-4ac0-74a4-08db8e6f7068 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:28.2786 (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: 2pkxKm7GEoyF8IMb2ZG0tLBflWzwdkW4S9Ldjx+S0CUb5Kf8OtG6pKcBWpdR2t7YfqccVSxd+YwvQwxXLfJtGg== 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_BLOCKED, 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: 1772560810017825005 X-GMAIL-MSGID: 1772560810017825005 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/mxcmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index f3a72569dd1a..133127e45b81 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -1163,7 +1163,7 @@ static int mxcmci_probe(struct platform_device *pdev) return ret; } -static int mxcmci_remove(struct platform_device *pdev) +static void mxcmci_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct mxcmci_host *host = mmc_priv(mmc); @@ -1180,8 +1180,6 @@ static int mxcmci_remove(struct platform_device *pdev) clk_disable_unprepare(host->clk_ipg); mmc_free_host(mmc); - - return 0; } static int mxcmci_suspend(struct device *dev) @@ -1215,7 +1213,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(mxcmci_pm_ops, mxcmci_suspend, mxcmci_resume); static struct platform_driver mxcmci_driver = { .probe = mxcmci_probe, - .remove = mxcmci_remove, + .remove_new = mxcmci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:41 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: 126718 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp915357vqo; Thu, 27 Jul 2023 00:23:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlFHnt7m7recCa+RgSNO5DKqzuqRFiTDkE8HDaWnkJeL/YMehZXUEL+NeP8bZXDqNyqr7FuV X-Received: by 2002:a17:90a:ea0d:b0:268:3582:a6be with SMTP id w13-20020a17090aea0d00b002683582a6bemr4131765pjy.33.1690442610606; Thu, 27 Jul 2023 00:23:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690442610; cv=pass; d=google.com; s=arc-20160816; b=LU1HuHtmwnaPEdYkUjzo/QA7hVdx+APEir8cD7zIOLzFbp4SWMOgcbC6NDZhVTqt3F KXCErULe05EgTtnsb/LHbFkzVhiE10aEE922C4B1lt5qeBks8kjx8S9FgP0uA0bDI14j JWuw0BZsQrnFyuOnVX9dxwPko7uZ4BX3YsS0KYsuBy8yx6nt78xNvcZjXAzIOuqgjqfT IkVdNFcVZgqGIMPMCIvUrLuQTLOz1AtGbBm2zsomUQfMl2zU3Ch+GB9fZU/cqNOenKtl WNbgQqbtokkeFli4U8rsKcgV/0u719piD0ghUDeB1QGykp62Ncy9yEKPA03N9yJ6Ymz0 kBLA== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; fh=WUayfhwsFyI2R0meOGTXjXcOW9Lju/3B5D3r7aLramk=; b=ysNDF7aptp/DM5NyN4j/tpe0TjdBPywarOOKpZrochD2d+4tcD1Ovc23aY42bEYnwB uIEQJSQJM2qw5xVU26WxcCNEaZsT44akET7/AO7kFKW1+7TynPLnyrcCKX6DxsvlcfW6 wO7rMubxmefq/0S8Kp1HS/g9FE1nD+xLMqVnBkBeNLrqgbzXbZlo03J0jsVcvpbhQpu+ EBBPYUNCxk4vSNl/Bu7UH62Zbnv4oAmEM+h9twVkJFkg45meyn9d0pzRVAcNdEj5gZFp +S9XMu2PIVotJAW0f1I3bB95g6LB31JwTy7w1LsqY+UC0PRTsSQRE6c2DBlIlDAw1G7s xTKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=HKm1SqQq; 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 nu18-20020a17090b1b1200b002680f4e8969si1041742pjb.95.2023.07.27.00.23.17; Thu, 27 Jul 2023 00:23:30 -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=HKm1SqQq; 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 S233003AbjG0HIw (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233208AbjG0HIA (ORCPT ); Thu, 27 Jul 2023 03:08:00 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20725.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::725]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D92422721; Thu, 27 Jul 2023 00:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AYvPRACFFpTo8RdWOw/ZCUzU17TctvwIXVnepEh/7r+Y7qv/4dXYg4I9687kIHp0Yl4diqj3VWrC7sQK81OU4+AHyuGEegh2+whOSahtdVVAwQvmIgGhabLkQ2FHZE3cU7WwXc289ucSzEDOJo8Ujs3Pn+jo1xLimbe0hFha2MrjJSLt/qQ76lHd5P7ZFibaq7AnN5kKYjiTcmlwY4BGx38l2tQQCk1/FZm6tL2lrSSLA/UuH7KaOwA6CJzfjXt32vMBMlmLzlXV1CMtwpFhYS8MmKPSAReeb6t7JHbUe3S16eVB5vFBuFo3gl86PjJQzU89hNAzylQmf5ylAzeADw== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; b=jiMJFnUgLNYR+cLOM1eglUa3hXRXBBJKNZNlbBurum2wR63LCCvV/uxMMVZAm8uGJ2bmq7aIymAYHcDkjpJZn1D7/NR4NmF76w0sQEIWaSRDRyl8etLDYg6dMaoAzKujN+SYOciNXEoGcuufZnaP5vSpJsUlaKJZPPrQfPqa0EnyH+OjdQ/TwixuozqpZ5WBshpAuMsJML++MmGrsCi3SM0aOgiBlYb757SXl/k197JHOoBZF3qYHcBYqGIXSNfGj3LNxklPRs3wamE7fCAPl7DEo5QhiAlB1354JuxYRlsLKRy0E02Lghf49ftrMcZf8X4n21BaK72R9thLnL+3fw== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; b=HKm1SqQqjoHEi7NFFOkCBfz6B/3Tp7A+dULMC9SBDWABxMe+kWzYshs57c8OMEFS6wXS448Akynjz8oyT+Ks9VFmikqwPbCicacOZUMc25lPI96V05gZiFO7OBYQPgHlWs319gBnLOkSAaA0HS8fL9AmLNg9J1vHVutmPXvUsXIeMCLhtYXytZpo44fcD4aruVGyzv85ig+CpKnZZq+Ry7lO1aysCcZnulBoB5aSCbwHiIIJIR6U8iVAve871nbdJ1HMUoIVafy58je7GCKbRGlhT62KsuAUbfk66zmoV+g48H8xZRR3Ciux7xvdlmHUnYaOBgrCybMbU8EPzyrPTw== 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: Nicolas Pitre , 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 v3 52/62] mmc: mvsdio: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:41 +0800 Message-Id: <20230727070051.17778-52-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: cea732c0-8bda-407b-6030-08db8e6f7141 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aHfwVFATQ4I10s2Ikz2jk3aJ8mka8ADyu/JtYrsxRs8So8utEtxysyquEMsJpjznJhNzkoRFTFm+ZTCrE4/ZHV5aPiUMPqUcn2EuGGPtVXtaMuOZJ/gzGUDqHrp7blKHmeTMxc7Jjzlkq6mkUTnSuF1C0qMO7Stn9jnKMAfQMzn9oeQQXLhn+aSicTJAQ7CDI5uT3zBpVqJRIpcUvtFHAm1wOXtxRulazj/3ttHa2aYtSZ3Bh7/Gl20yhJsstaENeXqDvuLIoJe67RRNamERBOiD/F+0B+VvbRI53mWaHB0fKNH4m+/RGeXX2nb+YboxeOz+EoUE9h/0T/ZG9xltoPC5w1xGtKCzAV2ZrYuarRlrLN7xuAeNRlY4xIfgD5Ph9ZGvYJU8+TYYGZcC7vPsI2JWteYipG51k3dhVEPJfuEhH3v6t6D6AnXPDxO+xAmtF58QKAEL3x4aLeXLHRuCLOljixL64BwAL8XWNimHQLQtK4CuWMzR+XELAyiq8T/idvj+N1KNnoe+90beHZgl4nY360NKHPshGYmGDBVUTDqT7gd383nhsDie1W9HPuQPvKve33br+SU0KbwMGFp8KW8jjzjgGS5kpe0O91lDXkMLwFPVFQgVH/tLTDrrHRta 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?/FWQSAfA2JlvmB9kXVtevjFD6B5h?= =?utf-8?q?QIdHZsqnPS+W5yd1rx3pBVf585qj+SpG8PcZISghakhFPCpnCNw5cEUnkty/cA9FK?= =?utf-8?q?XbH5k2a5dLYVz5g5YHJDwHTYIe+MJljcOU4oXghW5l8FXyKMPHD8OKYuvENz24aPQ?= =?utf-8?q?CDJU+m3qkrp3M56WN8Xw/jBN8/yMPjhG1MOoMD1V2OxLJ78gSD4n+VDxn3JHX/jv5?= =?utf-8?q?1dIZJui0EkeYG8rMOnlmeHey33xd0r9LQu0HGVhgl7m47mkBFT+pKph7nBxL8rHDy?= =?utf-8?q?Ov5CesYwJyedkLhdq8WhDng+78B1pjxtML/BCtJG58G50JolivuDiXOj4m/9Sn3Pe?= =?utf-8?q?09cj4v/Gsgf4RDQ7VeApOs3K6QmKsF8lonR21OjFxsVvB/daxp57QNjYOki/x9kdH?= =?utf-8?q?0nHE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WsXJSlCXPoPjIQtzWgwysI5lzE52JYLqDTR+WYkK4VO+7pkYOxsxGbnFs5iE8G3Wu?= =?utf-8?q?uGXW+V3YEfOuKgTSAaX2zaspM7+WzlLHLqTeIqDHC91ITTl9NG9DmM5YMxvLgld6c?= =?utf-8?q?sWuntNqbl9SLgeikRTSeLvrKx03dGAAX+WJGyju6Db8cFf8PLFX+zTEq8+fAlxZ5p?= =?utf-8?q?Y4hO0VIZu7y4ov6UU966oowF0LfI5viO36FuThZh4WLbZZq9jUtNf+0bgE/BI9Ntv?= =?utf-8?q?g+xFCJ7iuwz8?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cea732c0-8bda-407b-6030-08db8e6f7141 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:29.7047 (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: zLbe+Fz8wLrrxX66AiV+uyxHoziXyFi/HsAZUzinrgLH8wn6RigIM2rw/HgF8poHnM1a279ejbWWbrdhd++68g== 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_BLOCKED, 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: 1772557550630282736 X-GMAIL-MSGID: 1772557550630282736 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/mvsdio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index b4f6a0a2fcb5..ca01b7d204ba 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -796,7 +796,7 @@ static int mvsd_probe(struct platform_device *pdev) return ret; } -static int mvsd_remove(struct platform_device *pdev) +static void mvsd_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); @@ -809,8 +809,6 @@ static int mvsd_remove(struct platform_device *pdev) if (!IS_ERR(host->clk)) clk_disable_unprepare(host->clk); mmc_free_host(mmc); - - return 0; } static const struct of_device_id mvsdio_dt_ids[] = { @@ -821,7 +819,7 @@ MODULE_DEVICE_TABLE(of, mvsdio_dt_ids); static struct platform_driver mvsd_driver = { .probe = mvsd_probe, - .remove = mvsd_remove, + .remove_new = mvsd_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:42 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: 126720 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp916581vqo; Thu, 27 Jul 2023 00:26:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlG8OaDuCXGOQ9nFcY+mG4cGpq2tTbCT7u7bDcUargHe1B0Ke9b2xifnR9bOlRCiJYbP0mEA X-Received: by 2002:a17:906:13:b0:993:fba5:cdf1 with SMTP id 19-20020a170906001300b00993fba5cdf1mr1315097eja.22.1690442805617; Thu, 27 Jul 2023 00:26:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690442805; cv=pass; d=google.com; s=arc-20160816; b=aCj2g0y7SzJ9xlCYCrTmzscx31NpAQt8JgL7+5hhPRTarkj8maVJiNumAkgRuuXQsQ DEZwKQwUg/djvvDzCOzH74Qx8XBDwel6/XgUwmiPMttzfw7jK3Tqml98h448WcGMVLQ6 XhHgvahWc9JdBed9SE1gJNq970JpYRebRSfkQBONCoDJrobuQtE8j2KXqK6PJXPAKPWd 5ItR8J9qPX6PgoSJ6EQJnLbrDag7NopnxihfR6c6/P/nyfBolXK7u+TAODldJo4RVi9s elMwNdi1hOjvZYRi+XWFXBymL5KgDDFGaH+CBvLGptWrRpdz4Q1u93As0BewC3HJf1nI YORw== 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=+AftkKfw0z8AD4ham5M5MC4dYIWJjDbvgy5EIjA9X60=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=awQRMLIqvFHqyn4u42vx4TTCWqNxqJJVGYlworIZcEfPBCRJ6fuIj2+jeXUQXmkzEm ibdue88KKhe/evhywozwQvQvo8r+Yejle48pZ5wK8w1OSUskFNaqYjRZJwh/4Bk+dhnZ svpqAttYCPvl9V/evOfpOw+5mLg82Zkq8ztgXL4zXXDVxRn3dh4t529/E/r/7jKbuGon p3T37btk+A4ahMFxT/J97Gt4NI8FtOstCv1x/iqQxOxpIwyQrS90AL5amdz7G6tAB2UT CMXsNBwcWWqGKYqmxZ9FByi3Gz0N388gTtGlUNdRAJW49w7mMUG+AEBTZWxqbsiEFpVy vPZQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Ykl4jBfG; 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 e3-20020a17090681c300b0099b4a25c9b5si573434ejx.450.2023.07.27.00.26.19; Thu, 27 Jul 2023 00:26:45 -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=Ykl4jBfG; 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 S232071AbjG0HPZ (ORCPT + 99 others); Thu, 27 Jul 2023 03:15:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233114AbjG0HO6 (ORCPT ); Thu, 27 Jul 2023 03:14:58 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20711.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::711]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B240872A1; Thu, 27 Jul 2023 00:09:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j4mW8h5PnrLFdbw/N9wUEPDikqhdEN852t/6buh7BD07rXqq3Vq47Swuid6vsz8bDP6hMJivHB22c6U8YEgkJ+0IjocevewW60G977Wh9eHELx9n6AWZTrFIVVeRumnkLu7HbD190PrzSxTkQQk2IXlb+qRKZwLckXjgOh7GDIVCSc3M6Fwy9XP4JJX+zvp/7YUKr39vBeinPBJibvLomRqFrLXdjysRO6cHHZudiHQ3qglGwQwozLKMvK4AvM0WrqqZjbe3bKwhs+P/woO6OchLr2gNs+Ezdch7DNKKmgks6XIZybGkuDFYExfjeNi7D6o+ji21k9fjyYBQjv33/Q== 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=+AftkKfw0z8AD4ham5M5MC4dYIWJjDbvgy5EIjA9X60=; b=mdr11/Zw5dP/BWs8+EwtFXDpnJYC7qkcajCl/fX/mCPt1cDMq3Fs46XTa+tJIuwHQNfSbFRhzI7be5fWKff6zSOGGSBQdYE9Z6ju/H37iVCiK2dRdXLOJDEegdmuTTl0yXKa0hJq+5EsSQ6UBm3JwJYEOZFbvSppWqOu3zw4vE9WrW+FHypmb8xG/EMuPkPXdcOrn+XOCjYH4Yr9Ct4n6qAsuqZeR+1Oc6mIpeEd3bDK2IMSMtvgbzL75Cr8E/s/jmFtZlhrofJxoyribuzidHRmWFJPi2UypU6Trg4+zhtK0UkimdB2PdmOiMyQKaFjUV4EPFYmcfB0h0sGbmmPig== 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=+AftkKfw0z8AD4ham5M5MC4dYIWJjDbvgy5EIjA9X60=; b=Ykl4jBfGWj2kKMfTnw7L+a2uxHb4VnkV1QXQb6nE9BDSOW2Oihskc3VPyaV4xokj2WTWJ7unVTjmNDlzGIIAfYFGN7FgJWTT7YfZqvX/mbJ1DPSrOyxzB3bvPNr5A8IgmtwnD50L6LLXy/YWpmIUlKw0uZV37kajMtcx616vHcd3yhUqIfWgTu4nv9MQYTR2QovE3i1TWRIiCNvglhEKaOTySfLnx+mdF1hCGrqmqnzdXy1JO6qLstLBP0Cfem2YET6FTnWdnTS2RXAq4GGS4LnhhO6RbHhkeBVgyWmX/i4jjsIVTCLc+QF+3DDVtR2+dHl1RS+hYFlGCZ86dydCjw== 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:45 +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:45 +0000 From: Yangtao Li To: 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 v3 53/62] mmc: pwrseq_simple: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:42 +0800 Message-Id: <20230727070051.17778-53-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: 62204229-a88c-4a76-60b4-08db8e6f720e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hCBheim7O+eGCQyt1jjaQZKqXh5Bt979nAJ4zKFR8N0DVqrXF7W9b3iYuw944FJPswBf0XKC3BPYoBw6tCO+OIZmUqxyp7wVBb84vjaO6molR2gZ0p9OImz3qCqz7M2ctQgEcermueNnzmkfUlmtjZn+M3Ny/w9lGADC/chnRozWTZfUsc4aO/OGXWEZDcQS0Yj+k7goBXWwPv7QtrulBXnWslH37r0tl5+wMbOHtJgTIL1R5V2xxpFd168HnPULkzBg/JiMNu7Mjitrnj86eWYUhH2ljJGRdSTaAXbC4VmaMwgFVfgU8WP6U8gLLaOxIP0fvlNkf1/AsAXsWOPDFMcXg0/pIkRvbpUwsmj65k+rTWUue0S9qbfiKwo7ocGNlUdZEWlQev9fF+97GCAgjVzm39eeDxjfmW0yHYT0TGXOFZsuVK/rqMyWnWe1iw3BMgEtt+StROKifnX8p9SjaeBB2CzvuDBu/4uQUipCVT9VqV3HDkkX3bsD8nPd0cRFFbRpWFYTv2u2y9LbHPCjgoQ+LeAPdUF7kykebSp3fSucRQxaJambvvL6WBnY4D7dMqA0vUTH5wuxS8B27MR6kEebuO5aMh+rx8Gg1hcEbNQLrcFc561m+f+XrgMOn2NZ 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)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66946007)(8676002)(6916009)(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?E9NX6gQJyHq831xE10EOWVW0p/DJ?= =?utf-8?q?0uZ8ux4dFcRCJcKBOG2tNKfipfk0rK8Z3fp4/xuXS385FQ0rXfJteKNd/gOFP3d5Z?= =?utf-8?q?t91I1JR7nribk8nCTFLRQRUbZ6preBX1yXg1BfbEe/RSMZikqv4efaOEEkrRE8Ht9?= =?utf-8?q?+RVLZh5IPmLy5hFNuN2uyUea/1YmcJHGnfyKdh7KYBjdjoUI0VSC4U2+b7oXYrK5C?= =?utf-8?q?IMZW3w4NB4CeJCRbgIRLjme4PPVDEPqWY7dKUQYIl3A3TFBNJs2uIj5DTaREkVhxm?= =?utf-8?q?N5RAYCSZvhaiAOWH5z7wKNdA08YuCuJMUFQmv8R59Y+D7HdjGcXLf+dQ+aiUyCBSL?= =?utf-8?q?N5HUhSmUdCzJHrAV9Tt0Pw2eO5XZeyXM1pjIiEFsvfx0pmFSH4UZjJZ1Znf8nyGFc?= =?utf-8?q?zSiibNMg61NV0Xtn6RyX374o+fooCLw5N0HvkwsMl9cu70XV9SG082CiNFlyqo11m?= =?utf-8?q?EdzSHeaxvIA6mQ5LYJWui+JI+fPTAdwoQpnno4DWjINr2UcEvDCX1bmMf6cK9JVEP?= =?utf-8?q?cOjR8ZdQEb5XkXKM8r+psRcW/TpSzFkPBOe84K2LhgHNnc8EtjsuoGlDZomX51CWK?= =?utf-8?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RBDU2Nody0VHWxQfW1TSg6PkdX4iaS05zd/oVX64jP0gOZiceugwaffbU?= =?utf-8?q?D+ouzynowUH7?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62204229-a88c-4a76-60b4-08db8e6f720e 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:31.0340 (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: v59jLg8A8N2RnRtcUQzugxwMLungP44UeqgFvf3/sLBKjw21tJit2poVsELHS9IEPYoGgZOa6f8bk0HVItIt2Q== 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,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: 1772557755138577608 X-GMAIL-MSGID: 1772557755138577608 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/core/pwrseq_simple.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c index 3bac1e71411b..df9588503ad0 100644 --- a/drivers/mmc/core/pwrseq_simple.c +++ b/drivers/mmc/core/pwrseq_simple.c @@ -142,18 +142,16 @@ static int mmc_pwrseq_simple_probe(struct platform_device *pdev) return mmc_pwrseq_register(&pwrseq->pwrseq); } -static int mmc_pwrseq_simple_remove(struct platform_device *pdev) +static void mmc_pwrseq_simple_remove(struct platform_device *pdev) { struct mmc_pwrseq_simple *pwrseq = platform_get_drvdata(pdev); mmc_pwrseq_unregister(&pwrseq->pwrseq); - - return 0; } static struct platform_driver mmc_pwrseq_simple_driver = { .probe = mmc_pwrseq_simple_probe, - .remove = mmc_pwrseq_simple_remove, + .remove_new = mmc_pwrseq_simple_remove, .driver = { .name = "pwrseq_simple", .of_match_table = mmc_pwrseq_simple_of_match, From patchwork Thu Jul 27 07:00:43 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: 126752 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp923099vqo; Thu, 27 Jul 2023 00:41:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlFqD0tpGxHINBYVY+JCXgvXLKG1ZjoeWdUewDCplXdm5hztVyvmHtN2PcE69tUd3+/6X1Mg X-Received: by 2002:a17:907:770c:b0:99b:ca24:ce42 with SMTP id kw12-20020a170907770c00b0099bca24ce42mr1182706ejc.44.1690443695920; Thu, 27 Jul 2023 00:41:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443695; cv=pass; d=google.com; s=arc-20160816; b=ZBhI9G4UZ9h6Sr73SXVJR5Y9TGuOMe97kB+AhugdyLRJOZHO28Yq5radkuZbk6KJhY 9QfEc6ky/gyWNiXrLO7l9Midj/gw86QSMh+2fsCu8tDayydhZUh9w2DTeoDRunq5wgRP QdO0Jy/Fx3bTAJpPY5m14CGqBz3R0v8zHb6i5wvCqkLcYEsurc5Bk4nljs0vgbZu2nyr uM71Al5ZzHALYbO4okI/+Fa/ljixe07z0rRyRgXRSt5sc9ZlWFl+I8Ubnpo60ORJy9Vv t9lODjklq9dEXiEYCeaV/pTjrcE16CD6JLvTh+1NBrgcbj0I0GZTnsSFVQgQt6M8CQtj MamQ== 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=bSVSY0tmOM4h4fHb2UFkj/zeTOsEVDjfwp+nRZtPSG8=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=pSCVUEixf5Sagujwx9GgZkpuMzZ89jRefdkBbmeepYTPzwTprqlx3oGVGsdNpEPJHe BGFzBCAqTfH2wGPzm/ei216zaFqi3cpS3v+l1dmgyG0oMKZwEnvuRlGn+40jdGdycKf2 qYPzxO9ODif2EUWqmHtMli3g67mIuS0VUmRx15FPvFsyER/GH15gKSndFl5hrAKriLV/ TAMirSBnT5NQLqKKYX1vjbka4RW9AXFFtQIFi0wm8Jd/HFFN/tIn5eNHAD7x1RWGWXDJ zi62qSF5iiB5351VEtVAfhuyV7zQCizkuO+rCBNDFIKHE2hoUlIo5LpabMp6iYAbS9vi WpzA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=BreGQRPy; 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 a2-20020a1709065f8200b00987d26a0998si649256eju.455.2023.07.27.00.41.11; Thu, 27 Jul 2023 00:41:35 -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=BreGQRPy; 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 S233057AbjG0HI7 (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233243AbjG0HID (ORCPT ); Thu, 27 Jul 2023 03:08:03 -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 E9D3749EB; Thu, 27 Jul 2023 00:04:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G5DRWNE1r+LRv/HQeA4yOAag9T7ql3SABtqRgiCViL+tmiJvSIYFm1uuNSN3zfC1Mi29Qr6yW6FZh8P5UzH6UYHESB/xz8Hy5SGRdCg83tUT2HdsBe/t5/JR7JNO4VSH7ZZxgskR8StRLEG1ZKC8wXczm6Y27wT941Eed7fzkVAk6rtii1hckVrYTwsAcLePWBFRN12ND2uXmPbwW7yhiAaeoZkXKUJ0o4bnr9fjyt13GhW5FFPQiquyDre0BQqeSY6jTAy93c6E83TrLYCVld0O+nNSVu1UF5C/4LfFnfC8SNcoFDkzgEbKhWFIhsPEKLtyLN3JAZ97KFxyAtz5Hg== 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=bSVSY0tmOM4h4fHb2UFkj/zeTOsEVDjfwp+nRZtPSG8=; b=ItvpSKFXCA7MFdDiTWko1bRjTvPmWNKHYZtUDIEql00E3+3wIh4OJeGhTMP9YPLllrj+t6iK6M86wqkKkd+jNGRFIZk3bd+tLOhXSvztRdP5iQPYYmZS/Te4oD1HEltDU18zZkQn5O/6C2jj+YH0XGcOJjIKNEt90sEK7ZARoScZa8oRWp70+UuwB8neqtv9QOP+cnvPbAt5cWSH6W64+LQ6eeQiWD5Pnr0KaooHM1q9H3gC0QIaHBaKWwFrIk2FGtosaDESbqsK/kqbyy0MprT23Qau657Tp6hMiFES1hT0udK4KPvEA2gifIxFRvW2Uhb+mgDPdZYz48QwWk7ljg== 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=bSVSY0tmOM4h4fHb2UFkj/zeTOsEVDjfwp+nRZtPSG8=; b=BreGQRPyjhEEYjg5dglmMkjCaoUPB2IWarwdNiBRq4k860RkPWgMSEkhccpk1cCgAhX3PMU4DWv9rprMHsa89zLUdrrkC17y6WQTvX5mdzJ1GObVdm7T+yuAcN3sTGRmAqtuNOaDoGckMNAVQeQGtWzN6kRi00n/aJIwlH8cjMdyUk6rm0rqgBYg4tEti5f9eg+koS41bKo7rrqFqx5cVnfHvJwRXMmVpJ7shaRuoX1cuAOyxvyQrI1zkR2Bpi3hIE9fj/ZDXUzqU/VWRaVqDtYl2m+aQcbc1jaS9wnPVD3JquEdfCY7O8BgKeZir+4imF2UFiyAN4gbc6ILMzY4YQ== 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:45 +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:45 +0000 From: Yangtao Li To: 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 v3 54/62] mmc: pwrseq: sd8787: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:43 +0800 Message-Id: <20230727070051.17778-54-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: c59eafa2-8874-4d42-cf75-08db8e6f732e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FuDH2aEExJ9sfiDvKUczpK5+nGPCbDtR4uslrMk8n2v3v+NMAS+K2DeSwMtNtFTrdR2FW1yEUBGVtd/fItYh3YjfJOksNJigQVBKRdrqu9v+Bud1ao+mOzUGErVuZ7GGS+5jXvAisdTzr3sjhI8eVvAD9LZo09gefGk3X4uteJBK96muzGiUv6onIGOV2VSmvXZ0IOIktDFSUQ4xd2/JgbU6ijVzEP+YeIT3cMWmYDPBZC47n1+c59boTloL1fNXOGZC7IUGj89MErkbWcnNW6Kh+YplabCMm3tQNgNOC8DBpnVW/MfXDO/sKiRod0j6JvR7xYi5IQfr4W72Ii6Ay0Ba2lBqiPnzzer1H8XHUDYm9cosQ8Gk6IHZ2l+BT8ri3E5suGJ7Ar9ndGmQpOqQbind/0+dzBI/tgQGlMvsumISHDaN9d+oqaSxVhCA3jtC5B4/gtr1tUWtq9c+vV4qvGcsZX7xBaj+cmA7QQLe7CM+xFVfd1EzXHx3fJPoj9ULrzQbTyrY7Ug2mJ8c0XIK7gMjDAbetwQynONHHAJ83HToFSzQq2EGl9bd1mIJv7uWdXBU2AUI4dtXAGxeCzqExOktCaS2XbOe9e+IcR5/l5i0krZXxRQHBCNEh1OyuUiG 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)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66946007)(8676002)(6916009)(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?8t3TXpH/Rg0ZtQYfIFRMUV/j0EKl?= =?utf-8?q?enN8K1RHiNuGBI2jFO9TLmB5R6APiV9L67kT9wM6q5mWHhk1eFKizmGngwrlelriT?= =?utf-8?q?SgY5fEEwdgPgg0ILXog+UZ5QNSj+PZMnK4X1Z3rdeoO62z1M04FQZkiAQhcADwe4A?= =?utf-8?q?bvsD+L6QrFGvgfZRDbvsr0vbpHYiE51EmvkrsmH0T2FCdDalLWyw4yB58PxEk/DUJ?= =?utf-8?q?96CsFlVehkquiqyXmrkjcI/uH+65lPYYUo0rskH4wMngbMtA8M9158chrpxDEM0M+?= =?utf-8?q?YlGt7upoPq8XBXJ1g1V6hQftk7A0IVcTuWjwOG4pQWNSEZrMTB+zJPHRWtKWlSvHB?= =?utf-8?q?8j1rZSWvDmyRM8O2lLcyR8qHgf7fWan9eujr+GooJeXt7sjiVe73w2rpg5hUqFj68?= =?utf-8?q?lZBqiDHEsDanJjWh5yMS4LxPCjyEIjbXdIx9q7jKmRABm5Fh2LOabHAynr/cbETpo?= =?utf-8?q?ADiFOVxOglWX3GlQCM1Kugl2m6C8aTalRrZrEOlzQ/IMlq/cpKy9CbcfsJhJYxrq0?= =?utf-8?q?hGo5SRw7uJbz+mzLxU221FK0YQwJbiGX94w8tftELn5mfyID5r06eflTAK4OnMFt0?= =?utf-8?q?KFpKTZeLsGxtz8zMk/U2bApP+zKmQqAMWnDCMac2E5jnTcbAW9DcQIuaQaVbbgTsf?= =?utf-8?q?KTwq4Z4paI/Cv8x1BX/Mn/vURtlTN5dYoFxM/3tBT8VA50CiFNAeDC0H6Dps/LoKk?= =?utf-8?q?oIP5d3vARGwUMwalO2sERlO6Pq7oGPBcds+RCGi+nThjPvMnIQz/D1140uUmE95mz?= =?utf-8?q?a1rxrhyqwRflg403k2A8zac5WahNZSvXFjZBPboA57bi8E7C1xXn46NqyipDAS7M2?= =?utf-8?q?TYav8XzT8MUPl6/mqiSQlaH0MrxcJaj/2v5KoJtRuiNo1Y8v4c3gvyOPCT4+gHUBa?= =?utf-8?q?W4xSV5I+FIa8k1lW+QwIQ7zaZmA2M4TgtONkfBfwGmGMLM/A5pH3viTVD8JpDqVCG?= =?utf-8?q?MNnO/QhzeYjztXY3LPRHp8mtzsAwn/WT6rLh0L1or+4HGqXnXNYmI3Reg3PTD6jA+?= =?utf-8?q?++kgHfwM5U3T+v7vqV0ofN4tWG6LjLxp3VIm8dNvYq93Sv+voPxRLhm96G/X7gbNK?= =?utf-8?q?lJN7aqnBk2YNVbcBRTmezhrClWMFbfsD/rkqK23kmH1EXfL6R89yaP75S3Kw8qf6A?= =?utf-8?q?G83T64SRLOmMPFc+QWc/4wOxHRKXOrkRo9zwFZWmQsHD34ne947VbdnQ6ta/zy0QO?= =?utf-8?q?5PMdoE0YUCOry7AHr1TLF46t/WSY++/srEGq4KNF2nabyvHce0j5kTWa40sF0cpAc?= =?utf-8?q?bwkJ5vsxlB18dFidkUib6b+6VFPEMgKwKbGCVSbklJhhNlpNotvOwPs8Z+cX6YkJE?= =?utf-8?q?bDLjRJ5L8waCcEYDPyJYHy1H5cmWlNeCh1Qd0IlNtN7FK8jEpwxmSnvstNVDGHzEo?= =?utf-8?q?HezXZjCMi13qrKxS22qrEZbwgSIQZwVDN6VFU32WsDw2kywOz5lGNMxrb+nCaBSKs?= =?utf-8?q?fdAuTZLhvm97wDUhgHNcXrY8KArW5cKV+CNmXNs+IXt5M69v/LO5Mfdc1ylvKQNLr?= =?utf-8?q?yjhndKIz+Fny?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c59eafa2-8874-4d42-cf75-08db8e6f732e 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:32.9445 (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: T/e9MMDH7i02wcyK4eSmz7PBnfGaxR7XiiBGGWgaR9b8co5EUd0BIyHg68L9KVgQZoIsRyFJXsjHGM5QYAL34g== 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: 1772558689026400567 X-GMAIL-MSGID: 1772558689026400567 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/core/pwrseq_sd8787.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/pwrseq_sd8787.c b/drivers/mmc/core/pwrseq_sd8787.c index 0c5f5e371e1f..0c5808fc3206 100644 --- a/drivers/mmc/core/pwrseq_sd8787.c +++ b/drivers/mmc/core/pwrseq_sd8787.c @@ -113,18 +113,16 @@ static int mmc_pwrseq_sd8787_probe(struct platform_device *pdev) return mmc_pwrseq_register(&pwrseq->pwrseq); } -static int mmc_pwrseq_sd8787_remove(struct platform_device *pdev) +static void mmc_pwrseq_sd8787_remove(struct platform_device *pdev) { struct mmc_pwrseq_sd8787 *pwrseq = platform_get_drvdata(pdev); mmc_pwrseq_unregister(&pwrseq->pwrseq); - - return 0; } static struct platform_driver mmc_pwrseq_sd8787_driver = { .probe = mmc_pwrseq_sd8787_probe, - .remove = mmc_pwrseq_sd8787_remove, + .remove_new = mmc_pwrseq_sd8787_remove, .driver = { .name = "pwrseq_sd8787", .of_match_table = mmc_pwrseq_sd8787_of_match, From patchwork Thu Jul 27 07:00:44 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: 126745 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp921727vqo; Thu, 27 Jul 2023 00:38:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlHtGvpkQW3nLgCSXNpB0A6Q8nPp/tm0OYuSBeewrShchtBH2BjFWRrtVb1SebPpp6OogMGg X-Received: by 2002:a05:6358:c20:b0:129:df95:f9a9 with SMTP id f32-20020a0563580c2000b00129df95f9a9mr1541851rwj.2.1690443504107; Thu, 27 Jul 2023 00:38:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443504; cv=pass; d=google.com; s=arc-20160816; b=nj0pD9nOVk89ocQaaUhGeuXQ7Kb42v2RgVCFoMaKVRmo6QpWJj9P13/BIulI5YKp9J qsGZ64FWDcHATKppjR/CHprE2bBocyN3M1cmQ6g8wa8vt1kaGhuFrYBa+sIjX4XwmPtl 2zwtQNx9mEQpWvN487b2iccKu3b7US2NwGQgdvBfyImYDyRKGG62kBcK/Zik7gZDEMUk 1zAqTNr5maJAYeJgLjaWNNBjFv5gm3ca7jq8uqtVmSrA0a7mwc/dwBYS6T0DGB1H8IUI WazqbO07Veeg87euhW62jJl9T4BkZmDS9rb9KiSDC44uBISSjLl8AfiOuhjP/B8Xqj3U t7Xg== 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=VbvoRarTmihEE9SfYnfLmCP64NcG9T0qKBlCHawhwDE=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=ZDaco5DVwJhyu0/RLoYojuydChMMzZG7OfRiZ+nOTmkW8zrKPb8ju3wvMm5riGkuZ2 XFyOJy3gZQBM04zYyO4aQG4bzUids3u7f4E0+oQ/L8tVfu6aCrXR+UOYTnpqh+s7lzDg aRW3k34B/XPE/wClWYEEZZ41cTlBbXsX75YPYep53FoMxQcsQHlfMqEWhXBHBBG9e7Z0 QM7V/LNHkWYsHfuZzXve0N54Z/nLMegQCgk4DnlDW6viuyUQQPi5EBPairQU4oWYICbj cbxZWV3ajimqdByIeD+B9jUDmZoIgHPs67hPLw8IF8bRi5OtqkI7p3P47B5NoSeSH52W dByw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=DsK6lYUh; 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 bv188-20020a632ec5000000b00563ddd55c6csi864543pgb.115.2023.07.27.00.38.11; Thu, 27 Jul 2023 00:38:24 -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=DsK6lYUh; 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 S231618AbjG0HIc (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232480AbjG0HHR (ORCPT ); Thu, 27 Jul 2023 03:07:17 -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 28CC230D3; Thu, 27 Jul 2023 00:04:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MJEPaObnPj4dUfnTti7hg3zYkuBsuSRjQl3K9r1T1cfLxTZ+ObTdnrKLBIrw0nRVuCrUN84jrm0VKGKk10bBbGXaw/vguLCwaooxRDrX5VWJqivGBOCvj0STSNK7CyeAp4RAbHEWYX1sCbM6cSIaIdzmKobcNtSbL/pIBK2ikhXnS+somy5O9sD0Zljv+GyLyhjOfNnp02VpUQmTnD0mzL/ApjGzxEU5C1AKTLzSVYXX3W67Fuwfn1tNnIOMLdUyObMg5/XdG1Ob5rP3P8LynjmyEdJtxxVBIVsY0kC5shiXrY968zB+PyX+kIbcSgxJEwbYSDFf0FDKDLTdspcYsQ== 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=VbvoRarTmihEE9SfYnfLmCP64NcG9T0qKBlCHawhwDE=; b=GyDegS8k9jCpoX9bjfV2gl6CV0fu/Dny3qTf0GRR76K5oScUERcZK48u6pxVFgDI4ncjLP/kHaF+ZMZs0VVYJFa9OOxdKm7PLyTxTav+tV/HZCJZc0a5qBHTplVjZCnS61cd/cxUD0J4xdO28ql1UkbgGtZ8S1mw45nXaVk1t6zraEvVi3QG24OR0fOs6VTgq0++lKLxFpF2USc9aGcBVT8uALUsiY8qNl07d4ZoDsz0LXDLZ98mWYFTc8frh/aBdbfK0fw2spMnq0/bUXX8276l3kxAxIYpf4gnftfPAOzkpxgCpffE1ZUUiEBnPMRocXDzDN3cQA31Tp9E4yibIw== 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=VbvoRarTmihEE9SfYnfLmCP64NcG9T0qKBlCHawhwDE=; b=DsK6lYUhYdErJ/jH2AjAKGnJhFqpasNL5QAbBhGjbyz9bjXZBlH0l7eRKsyPlL1q+nFGQUmZi/RjkrpRBjyX3IvIiqkJ+wthEX3T1z1j7RO3pNLqxLaryX3U6TFVO6HVrbQGq/sKpzH2rr17mz8gg8skdugr+hGKHPWNKH2jDxZNg6okYJnE+pxTR7u5jvk3GBU2G0vXOR1+TdgHjvSOqXx6/V7Eh68ns40SMXWjhMCH+2OQpoDPIaqP72SeUZS6cEfEwk311y7fL9NeWIfMo98yC5RT+K2NRmTgeBozXsiNqOUjh6LwmQKn3GMNQfYtY9WqSmMYrnhuF3ecy3YkxA== 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:45 +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:45 +0000 From: Yangtao Li To: 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 v3 55/62] mmc: pwrseq: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:44 +0800 Message-Id: <20230727070051.17778-55-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: 03f7b106-0f34-4f27-6dbc-08db8e6f73f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Tbw0nkQN63OYFRB2ByhL42oIC521u8zv3qM971wfHDkMPirHlxJWhBAp9S5Odn0wNc2uWqvraU6TtdDrqOg112KGkpjwkc3ocAsqarR9Ffa2Tfr7u4OLv7v8r1Uj9x/6uDFQ0Qad1gx+wRPrWyI1OjpPciyyFaXZCBgCR45TTjq1UZCFM0gBcbaSFkdaapdcvLZimKGfmZbeb6fYUiqCc0QykPvC6uKd/I3+DnX0UoAo9y5pIjE0aMpvl5Hy10hQvlnZD2UOn85W6acDAU51AHeRzH/KfvMNEYiedhKacG1vwov5JiQjFoJXRgUYagXm9ZXlwJy+fEsK2VpF6GEWlU4GRhqxBZdmCB/hZ2OXkdJwEfY1HuvMLw/Wf0bKVOSgdb5lJ1wHUVHOtF4dIJJi0sQK0RZRL6E1oIybugvWlqmXS+a0wBa1a7Sb6FR18lfzuoDux6Jqa2ej3alRFVf8aywOVYVT879OyMXlSB+fvDlaDr83niv5ZNlorVtQVWJv2rEuRzt0aTMdeZKowoTKKfBoHulIHYI20+zGEQ5JvXvS+hnTFlMm0L8pJ9VCB6R5RWcKcpwJu8a3nY31k8xh03wDzL+ycVWT3/QRN98mQJJHlVUx6zOx3HS3QlSNiZSQ 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)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66946007)(8676002)(6916009)(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?dI6lHusV8dzP4EoBXTVfU4GuIt8c?= =?utf-8?q?CXhTOg9LyLzk/0+X1KB4jAZKtenJE7/mRUka8SeIjS/hnmcyy4cmf8Oox2M6xgboo?= =?utf-8?q?1w0ZT8SccQMJD06OcuEhRMAAq9J1y6K7JUx+eYxLSDgVH4hm17lju6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Z?= =?utf-8?q?epICpSVaTT0S/MIms2DznX4exOMVBBoBMoW7hBw5hXmcDwZt56oR1qWlOqr4oui1C?= =?utf-8?q?6+hD17dpwtyo2gYaoY4obQtnXmttc2NW7quuaMHFXiwPX8OGDe5Ag+lhudkKMz65z?= =?utf-8?q?Ik80Un5TRJtD3rU3fBXNCJ0iNH/24KxCNLdKf8aggZUuW6gQ2Lc+tMlG5afzF79S1?= =?utf-8?q?uWAW/E+HKVWW0j3gRebMJu2aWVxeZbQVa6LSl3DdcEHB9294UE0rLeTygTOvQmgs/?= =?utf-8?q?i0cdG9lgoKuApXDG7kfooJ7jCJkEJsM8oLm8zVN8+MRWNFpWXB+vdLbeH1ZmHlm02?= =?utf-8?q?nM5Pnkpih3shgmmY2lvCN7BJ+y6UGMT5xNQCQuWH//c+YJK9KQyZefmX5LMFDY/Ix?= =?utf-8?q?0DKjZ03Hd0zr8MZUpAp3nTZsSoJwtRGvNQlZDY6SdfNWSnxs2v2g65QHJ9VSUAzDq?= =?utf-8?q?epTexk8eIdqsbLK7BtsGNGXC0GqMO1UBU8w/cQSIJrC35Eqyoh3efMH6w37zdREm+?= =?utf-8?q?nLCZVOtbn7mq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03f7b106-0f34-4f27-6dbc-08db8e6f73f9 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:34.2614 (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: 2mq7O/EEHX8F4mf7C6dypowY0WDP9ooKCYv91/agnRphOzHzRujblEZJ+vghVhdfYMLSKT7R3s7uwd0S2jiPfA== 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: 1772558487755575143 X-GMAIL-MSGID: 1772558487755575143 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/core/pwrseq_emmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/pwrseq_emmc.c b/drivers/mmc/core/pwrseq_emmc.c index f6dde9edd7a3..3b6d69cefb4e 100644 --- a/drivers/mmc/core/pwrseq_emmc.c +++ b/drivers/mmc/core/pwrseq_emmc.c @@ -90,14 +90,12 @@ static int mmc_pwrseq_emmc_probe(struct platform_device *pdev) return mmc_pwrseq_register(&pwrseq->pwrseq); } -static int mmc_pwrseq_emmc_remove(struct platform_device *pdev) +static void mmc_pwrseq_emmc_remove(struct platform_device *pdev) { struct mmc_pwrseq_emmc *pwrseq = platform_get_drvdata(pdev); unregister_restart_handler(&pwrseq->reset_nb); mmc_pwrseq_unregister(&pwrseq->pwrseq); - - return 0; } static const struct of_device_id mmc_pwrseq_emmc_of_match[] = { @@ -109,7 +107,7 @@ MODULE_DEVICE_TABLE(of, mmc_pwrseq_emmc_of_match); static struct platform_driver mmc_pwrseq_emmc_driver = { .probe = mmc_pwrseq_emmc_probe, - .remove = mmc_pwrseq_emmc_remove, + .remove_new = mmc_pwrseq_emmc_remove, .driver = { .name = "pwrseq_emmc", .of_match_table = mmc_pwrseq_emmc_of_match, From patchwork Thu Jul 27 07:00:45 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: 126781 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp938625vqo; Thu, 27 Jul 2023 01:16:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlGR8FYLwweaTjGoASSUgC+i3CKj6ykl6WDmo51rfUQt8aT5Y5s6d3OM5WRWRtcfCAbm7aVv X-Received: by 2002:a50:ef05:0:b0:521:d1f0:3013 with SMTP id m5-20020a50ef05000000b00521d1f03013mr1169713eds.33.1690445790841; Thu, 27 Jul 2023 01:16:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690445790; cv=pass; d=google.com; s=arc-20160816; b=yJAaQR8Uj0a4CBCmNDZyyS79nECFmiJfTtXSv8V2MBqGBBhEGWAeCY4uaVcR5iTE7m lmZDqK2cWhyCTfKpZBJII0wVsVxT0lpaLnQfJewfFz7+fODTErLopMWL7eULS/UZwimG +Vp/+oUMvOahup058o0ry1/CjzVtVUbhNEFm6f6x5PP8bAxbQN6PRNqkQkYH7taYatQm cxwVs1t41ZoiELL7eJpgY/qgXRi8O7AvujB/ScDL3wF1OZuLGWRb7ndQUTdLEU6FrSBM Yf149RbmY49XpTd3gnxHmNO2WIxaZhjUNcuHkCX3pX43HQ8FvcRJwBtoXz2v2/Y4b/Tq SUkg== 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=jiMupy/2gpTgAg4IecGGpHWMYbsCUu9rI2DrKBUHpxE=; fh=qaoyuzCS9Qfot0ptYzM89NjDvwtd+S0K0JfQxr5yr94=; b=1DDae1yCZ+aL3Lk8HjF/dZAx1cJ2vF/hewi5e+dfFKBeoNUF1N5+YTcG6cO1voUnep yJoemwJeXXYyNia78FlyphJ1Qxelqpu0PrNcaZIOb+h480VBRv5KOwGh3iL+nr9sM+oK B/F+o6GN9ipoKhj5PAO8yWddxR4noHl1kBRqKRxwW+Kdn7mX2+FtUNSsAp2NADAY527U +MkBGRY52jrfxy0w8V7SzjMemsaghcYrzvGFgx/Y5uoTgCHJX90YJ5yDIBzmnDiAa+Hv +jb/HEA3jr4VwkB1o06ZKgUbu8qZRthnuJCD8RWBwbj4ASSTHhIlQus5lbmrHI6VYYuq KV2g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=H8rxWy56; 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 bc15-20020a056402204f00b005222c16046esi609340edb.55.2023.07.27.01.16.07; Thu, 27 Jul 2023 01:16:30 -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=H8rxWy56; 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 S233083AbjG0HKP (ORCPT + 99 others); Thu, 27 Jul 2023 03:10:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232227AbjG0HJR (ORCPT ); Thu, 27 Jul 2023 03:09:17 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20725.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::725]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FC514231; Thu, 27 Jul 2023 00:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dfzChjqBbfIqi4Lsmdd/kNQx+FGdLKuFjy9GvACWIowbk3HNBCPH2rAQXiqcfOAyzoAqWr+2yPvP0ljK6GGkIqMSpxpGmlLbSKD6xhvnR1vJA479oV2mky3J5DBz10K5CkRTIdL5WELgfZl6e1NhtufiZcFgLnVRHcdzNHQ+vl5BUL3E5ZlloXv4jYQuioyMyRJKlajY0GOEh9UZ1xETrFycgkEvTMxydKLgGq8ujesEUAcnJ0wk/cAnmSO1a+o+eTeDqqYzuccdp52fu61Hqeh4FexLsjcbEWo7H0u0g5V1/yQVt4+Tr1CCkx9Aj9o0yYo4LgGs5RzHUwEx6/jG/Q== 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=jiMupy/2gpTgAg4IecGGpHWMYbsCUu9rI2DrKBUHpxE=; b=TMuzxHDpITtc8dqMTsDSES2UIe9xd/hkmbhI3+tTkVT++dl8M1FLGFhS2XlIfbRnQPTgWGwF0l/Gtc3zpqQjribAzWrEK5QuAyThiaUeMSvaZ0dWt2gS255kkv4zPOuJsmdrwliMDRRFY+nkWYRvMDpDPPmRC2LUOKUeNLnIxoORJOQsFut994+qGSUcALhMUatnHqULQ/o8P6xS9imDCo8k2kABVkmOLQvKN9Ktle3fIqmkoxMgi5ZtX+HSsfzbZsOzgX8M46ufsFj0gPR2snXi/LfVLri7jpmVPcXOF5ThDnmZqAsCnlL+5HPNx+diStw2ZEK8aeA78LIu1cOYqA== 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=jiMupy/2gpTgAg4IecGGpHWMYbsCUu9rI2DrKBUHpxE=; b=H8rxWy56h24l4Tpd+STKcLcob3hajxrgWLDRf/PEBcllg/gwtUXl2UfMnOlFpZfD33oxCsG4//rabds259EUm73nJywQytpD53jQYedE+4d+rBnmqhM/AslBe5aD3UHr2DHQ2QJaer4/ASM4d4/WvdQ9I8GX/3e+hgGqcDid0EXrhzHGbW9WJeQg/8TTCa3WIDbvufWBHfIqZA61iTosYuwjDyeuV4MRP7wtwSfJ+IbhmXbNRbKoclE8Wr16EWeRei4ATEI2mF0P7tUxW0xoOGq8xRHS5Lxutwur6efOvZvOHR+mg9ZNOG4MWnx4vHGpyB7UBcOQsMKSWHSuIvg9Cw== 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:45 +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:45 +0000 From: Yangtao Li To: Wolfram Sang , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Geert Uytterhoeven , linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 56/62] mmc: renesas_sdhi: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:45 +0800 Message-Id: <20230727070051.17778-56-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: b45a852c-ee7e-4af2-6273-08db8e6f7542 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5xtIChDEQvE+RCJoRtpDjBTGb5Rj++t7ORJtFRqNqSbwx4PV2Mnbq+GEJa6YzCR1pFtOaySRZU5zda8fBx2fi9YERffq4PyOGUcp/Vz9DI9nySd//MRZmU892l+sGoPVNIgyQxcs9uwySlsQaSnnCuNQG6K4XlxVAJR5YbELReJFDVG8bVJ0/hOTL/RfXuPwaDP6MPxSA9pDLZxNNaA3nLeS0WiwQnpiJukIBZDFXMl8fp8iqT6IkvJW3FML6hbv+22V5/88h7/SgQrN7CB1p4+6exGYdJYcsGc/9Gb4WEdQhmKBUMFsfslLmXdEdmKL/DCiMZhkLMDEJjSxWvHjKJfWNyDVi80JgqkDvPW3XyQrVwajQbLjNe81FSgCGEbsCM371MKnr8dMwOPe3ZIXMrggJs89vAE6PN3eyVXIKwfmeZTxQInnBC+kjhrc88E4N65wiUaoZulIMylqOfi/t4QKFMCT0Gp4/5DCiNKDGWiQ+gjDO1ZmWtiUUs0ChjgCnyj6wMB3YLKtqxnX123j8tNR0zZYtJpvathS4d8MDxd4Hasiis9Ew6NODTbJDgtHYh23v//MO4t4Szbwm93pgYWL3j4aT0in3vWgzLF4JMPRahIWihfANs0EraZ34SX0 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)(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?rxKcj0w2qHB36TnqC4MWJar5L751?= =?utf-8?q?Cd+L+wQ9dUEFlbdaE+0MzzGexTpW+HenRo+3SuJJ824YaTXI7L5Zq/iOF2IUnNhJh?= =?utf-8?q?fme7Gs16NKPHA+Tb3RcgweJuQ1avZ7tqFOJk4+79FKpOcPhaoT5ap/EADFAvzXGlE?= =?utf-8?q?Yzs+arrIDDzgRR80RhGS5lIJciGQyXHmvHNoQ7fn/lxdW0ADckvf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xzcCrnZPn3?= =?utf-8?q?W/AuN2MZQtcBwTjhGHXYzexdJTkLdqUeoGq5E0YIWUDNA5RGTYghzy/4XG0hpWyEz?= =?utf-8?q?sImFqthV6PQAEF5bpSqT+4ay/rswoyqkwsPxA5qlagRavzTUEqfa47PKcEueFqLCC?= =?utf-8?q?gumN5ypjWXdrgZ26WX1jUK6xn6ie9yPl26Zxne6eQY1OPRpeo8rdai4tU3SZS8mtF?= =?utf-8?q?8nazlSkpzjw9nV8JVQAyW7fexoteEW8LPixpKu4HNa57y1EvB1bfdZrt6lXdi6G0c?= =?utf-8?q?M0dwxPASuTd9VQ+TQUwesLPDjnfbPIdfMvBt8HXHbIE6+eCpf3KjfaweKEtrfXLtJ?= =?utf-8?q?Cq1xrsoUBP3Hgg7SYbk5lO4fBldbshVXRvBqEILmJvzfjwIXU63+9E9759InhYO1g?= =?utf-8?q?hinzgMIaTPUpW2EQvlO8spUnzpCRTbQ7AH28LZSeQ41TtXUDaRX6tIXDidDns2G7p?= =?utf-8?q?ZtFcbYvwhGVP?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b45a852c-ee7e-4af2-6273-08db8e6f7542 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:36.5178 (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: xKprV2yE9sx7P62DoKB59z0D/zW05DYucwBBfawGHYrx7rMveSvq33zmLaziypk2fNjoDBbqALeW2+1RuJ1bBg== 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_BLOCKED, 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: 1772560885942329544 X-GMAIL-MSGID: 1772560885942329544 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 Reviewed-by: Geert Uytterhoeven --- drivers/mmc/host/renesas_sdhi.h | 2 +- drivers/mmc/host/renesas_sdhi_core.c | 4 +--- drivers/mmc/host/renesas_sdhi_internal_dmac.c | 2 +- drivers/mmc/host/renesas_sdhi_sys_dmac.c | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/renesas_sdhi.h b/drivers/mmc/host/renesas_sdhi.h index 68da3da9e2e5..c1fb9740eab0 100644 --- a/drivers/mmc/host/renesas_sdhi.h +++ b/drivers/mmc/host/renesas_sdhi.h @@ -101,5 +101,5 @@ int renesas_sdhi_probe(struct platform_device *pdev, const struct tmio_mmc_dma_ops *dma_ops, const struct renesas_sdhi_of_data *of_data, const struct renesas_sdhi_quirks *quirks); -int renesas_sdhi_remove(struct platform_device *pdev); +void renesas_sdhi_remove(struct platform_device *pdev); #endif diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 10dbdb4abc93..c675dec587ef 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -1149,15 +1149,13 @@ int renesas_sdhi_probe(struct platform_device *pdev, } EXPORT_SYMBOL_GPL(renesas_sdhi_probe); -int renesas_sdhi_remove(struct platform_device *pdev) +void renesas_sdhi_remove(struct platform_device *pdev) { struct tmio_mmc_host *host = platform_get_drvdata(pdev); tmio_mmc_host_remove(host); renesas_sdhi_clk_disable(host); tmio_mmc_host_free(host); - - return 0; } EXPORT_SYMBOL_GPL(renesas_sdhi_remove); diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c index 9ab813903b2c..d8efb8035b1f 100644 --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c @@ -609,7 +609,7 @@ static struct platform_driver renesas_internal_dmac_sdhi_driver = { .of_match_table = renesas_sdhi_internal_dmac_of_match, }, .probe = renesas_sdhi_internal_dmac_probe, - .remove = renesas_sdhi_remove, + .remove_new = renesas_sdhi_remove, }; module_platform_driver(renesas_internal_dmac_sdhi_driver); diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c index b559ad38b667..248dfeef942a 100644 --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c @@ -470,7 +470,7 @@ static struct platform_driver renesas_sys_dmac_sdhi_driver = { .of_match_table = renesas_sdhi_sys_dmac_of_match, }, .probe = renesas_sdhi_sys_dmac_probe, - .remove = renesas_sdhi_remove, + .remove_new = renesas_sdhi_remove, }; module_platform_driver(renesas_sys_dmac_sdhi_driver); From patchwork Thu Jul 27 07:00: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: 126789 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp940577vqo; Thu, 27 Jul 2023 01:20:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlGPSQFL1Gb7dnGZYevb2+7n8ZgB60mDLPHemDKLKEnhJ6FX1q1+Mh3p3Qk8XNwrRSBzSRsl X-Received: by 2002:a05:6a00:3991:b0:682:7d8a:f887 with SMTP id fi17-20020a056a00399100b006827d8af887mr4463598pfb.30.1690446045835; Thu, 27 Jul 2023 01:20:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690446045; cv=pass; d=google.com; s=arc-20160816; b=1Fq+Sos+yPWrpXdCUcwIYgZnh2osoFYpc7FHlLcAXnP7qyRS1QSnjXz2qkS1N3pRdS hU112ZBO2C6yc2oEuJO5I5PjW0F1fkOHuBhVFDv0j3U8ExKZ0BheikV81BLEFhNs15+1 xnu7OBYg3c0i6X1euIzxmCJFENosJnKIpzd+I7ZIKf+yJYWTefmQEW6ntnDCaATZfuYz fRa6kQDbp25L20NCVCoo1PT8LEH2hO62Sr8JWTCsd4vYI2UccFAZ7toAkDG9+6gOYwqp sQLNvz0mHSTvNLnaLuX42M+P7I8ov5Lq/L5ziKm63QhpYtKrSfICCz+lXZZfDvyZVyfU bM1w== 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=mMjCvFA1NPvX3oCRuaryE7iTIS0yrHphNTOEU7WI1is=; fh=kC1CexfW9ltpXhMXST8QULziLqJSdvxMWdq29YdIdiQ=; b=eRqVfOzEPtjYLA5hY7RKVq3rc49zXZnLeT3OMfFArr7QWXnf89XXB1NySNhMD6ddoS qAy9StVPLagHZoveuLyHS3Bh8zITClSsOTB01JApSFsQHCM+7rfJj3a/ZcaN5Ir6fAqg 3tjuWQ692v012AckulbpwJ91aijv9taLFz6EGPKoIqEYQUkr1WGwDZQzjN2HVTqhQCZe 0mqq9wDS3yF4EwM7vaHhyWeS6KZ2kct4mW7x8pijDvOmwrvl4p140pvQzJgEzJreaSp3 OJpDqqKiFdRLzvq31Ks2X1yy5CihCZi7FqynJ6wkCGAqIcO23pmVLRZso7d7A80qBLRV 33SA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mhiIjKZS; 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 n25-20020aa79059000000b0067dd7254cb0si984089pfo.39.2023.07.27.01.20.31; Thu, 27 Jul 2023 01:20:45 -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=mhiIjKZS; 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 S233113AbjG0HHn (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbjG0HGs (ORCPT ); Thu, 27 Jul 2023 03:06:48 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2126.outbound.protection.outlook.com [40.107.215.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 018352D5F; Thu, 27 Jul 2023 00:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KGcn+I4Ub+B0uY1L7jneCX5ykg6CYibcpcWffsHhkUPgLy9t1mT22Nry4TsXxfygcYTDqQT0lNzktYFNBGuC8WRMZ2sQURO/bz+jGRhWdheNu3WNe6KLu1HSizBJA4tY41cCEL7UI4ShVibDLApL1v6K7z+z5vwgJMfj+/F1+pEhjZsoDsnmAAbeaKM9ucWtlcvp8s7TuXd92FuyMeaahrBas36GQbaHtmHNQBotG6ZHZkqLsvaD73vJB2dAunwzm1zgLAK6kSu/dJCiXVNAxKkMfnQrGNMjI+T1Kn/RRUIBUYOKZ8oHKUD/9hohqDt2VPH1YFPtnAegjzecWkrFGA== 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=mMjCvFA1NPvX3oCRuaryE7iTIS0yrHphNTOEU7WI1is=; b=cuhcpcgQqVTlJWnoeO06/yfxS+j8uS9+WccKHyBi9ysTq9PIXs7M7Mz0vbZ8lmWe764bleGmjYlUch7cKnbAoxPgxIVVp6c0kqjn2UWNPOWqvGg1GQzgWPmboK4+lycDUyJN/ZcjYtXcfLMX+7uA0vBc87nqvHvBshfUh78k0M4kvXtE8ZBV+7yy1EtbJYIJo11wT9Jm3KCtisWZ2cBynMs7GOtPHGfYrQlqQJwRYRjFFneIowt2nZNTTgRaAkFIFLKpm1mls0EHd2cTWDBqwhj0ebzJIuP+rJP2N78dXa65CcgwI+cnnEAB0N/GwuK21Yx9kFkmdlxBJY1DQWV73A== 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=mMjCvFA1NPvX3oCRuaryE7iTIS0yrHphNTOEU7WI1is=; b=mhiIjKZSoXAOVm/ZkisFNbTezKPtp7U1vv3iPvOqhMCSklivuWPh+GVOaiTdz5iN+FXlrDsJvEQ5dweh7+38ThtqOP2miwJkkusMMwTod4ccA2yHu01VyJcxCjK7vP0pwGXia/S2FRq2BrcEqmSoe/pgRkvAgEyu4r9vpI5yJ01BudvIHqFi9IvtOgOMZUjAtagNIMw3QPqa1MX/vOiBbBrFl0xbKI2ADSmusf9GGGorB8jqMqtTpnBWmdEmJXlli8YEEqRAk7g6f9eG5fZnIZDkmXZtFo02SIEmKlK3Ve48RUvy7k7STLRdsJgUV/CF/ze4PG7S4vAnMx5PA5Lxtw== 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 PSAPR06MB4152.apcprd06.prod.outlook.com (2603:1096:301:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:46 +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:46 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 57/62] mmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:46 +0800 Message-Id: <20230727070051.17778-57-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_|PSAPR06MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f0b5464-b2be-453e-8a6c-08db8e6f77b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Tt79AfqB03ZaMLP9dg19lbuhbHA15Fx83IAbsUMM0ke1D4n7pwlZSA0fygnHhTcz/9FN11wqKZLWK0lR2j5wp2JBjWAV7JbE4kcBfCQVZO5RK7usWYoOSjxVIt9QprhCT90SKlcvobbqdwwQfmEt6j0LyGcOTSI8wa6KNRrv1ckhqV+amiq67SWGFQOIkOtJc0JhffEnTLsUzMk9gsakORIZhr5YHWezS3iawTawczD7ZB7o4TZiHz50muYN/qKQRrUHV458vxRN3ZnXrUsEeWoBJMSLJ0nSGQHVgMG+NA+ySgAKC4idhshCfwxo854IB7UGEZj/y9U/KL/6HstyOdUNxFWufOvERhFXP+fh67ZqQ18ePr3bN7fiHsavxpGrKUhT4fgG5ll+/znAh5HSRs82Outg8EwTuXmTa1u6T92RSFrKhZYbrajxTylfrikvC5efXaoPCz2wde6LIHC6akK6tEaq/8Ryjsv4cDRlaptRxkwslVxD1mnB9P2gQTbKKrfCjyM/m1D36Y9CZqzDtlY0WwXpw2zkpERQYGtgmh5bz/xsea7gyiLx+OFtyqycqwAzCNbIiqBGvBjPHs/DvlyAiDpFIvTa3x8JfrcFsQ1F3DgtySN+ZmBQ4CRnzks5lF4rkLiFP7WFxoy4x+CoCg== 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)(366004)(136003)(39850400004)(346002)(376002)(451199021)(921005)(6486002)(478600001)(52116002)(83380400001)(26005)(1076003)(6506007)(6512007)(38350700002)(38100700002)(66556008)(66946007)(4326008)(54906003)(66476007)(110136005)(186003)(2616005)(5660300002)(7416002)(316002)(8936002)(8676002)(2906002)(41300700001)(86362001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ik7/mxupHhFvtKyg8oSHJEKNav8F?= =?utf-8?q?oIu/T2cfzn7WMsIdsLtxvMb14RgEjNQLQiqYW52ZhT7bYyLNc1J2AIpd+HLshyaHr?= =?utf-8?q?f6lA7icGaVcBr9lhY3z9N0VkcFMSTFFJLZ5UltaG4t+VjZScDnK9q4dywxjCr9KQL?= =?utf-8?q?6KUzUMPTsldaWBC315EfdboRDIyiCReAcwXAuKGlCAV6ZMJdt0avU9XyRBckEEbef?= =?utf-8?q?fS1zkkSaOQgGkRGXGpVJcXil0irfqvOt+O/kxLjOGZdjJ6SmNXeiRzztL2u/CpB+A?= =?utf-8?q?O+noQeGdQvq+df4sHLj3CUFN02EqXQmitJiJxx+SKROj+b63573ubEUZvPuSbEkeu?= =?utf-8?q?OhsLKu2VjLFAWfu1WA/vDXjxaRu0aUAemZXHPTQAkbga6Ztmlgh2lMK1iFj7h6NlY?= =?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FCwq4P62x1zYczDmLleGkASfLzNJnSdWTW8ZMte5OnrLPiMy4Nok8ZJOYBkmUO?= =?utf-8?q?Ai8lqb5NBAHievqKRdaUnfLQ2AUSk1YpUCWF5HpGYoGj2CBp3bPYIi36HiJJhMTA8?= =?utf-8?q?55hLekPmORE0PbIwTWNfUqbggShhIalGPztlOheP4rbGPTV4ZO2OtJuZz/YSatQJh?= =?utf-8?q?l23Y7L2srfh1JxYX9eZZc45qNv7zQlg1zHUi+hRiuMIOBZiA6hWiXA5wzaEpKGqeO?= =?utf-8?q?aIfzJiTmLQ1m?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f0b5464-b2be-453e-8a6c-08db8e6f77b0 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:40.5400 (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: XCupYqMD7AOXMcy0UOBCYNpB6Qc3xXu7oiPLb6h0ikp9cQVet8uV6ztVpQumEkU9ANWwMlJcACLEPyRqht+ysQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4152 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: 1772561152881065483 X-GMAIL-MSGID: 1772561152881065483 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: Florian Fainelli # Broadcom Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-bcm-kona.c | 2 +- drivers/mmc/host/sdhci-brcmstb.c | 2 +- drivers/mmc/host/sdhci-cadence.c | 2 +- drivers/mmc/host/sdhci-dove.c | 2 +- drivers/mmc/host/sdhci-iproc.c | 2 +- drivers/mmc/host/sdhci-of-esdhc.c | 2 +- drivers/mmc/host/sdhci-of-hlwd.c | 2 +- drivers/mmc/host/sdhci-of-sparx5.c | 2 +- drivers/mmc/host/sdhci-pltfm.c | 4 +--- drivers/mmc/host/sdhci-pltfm.h | 2 +- drivers/mmc/host/sdhci-pxav2.c | 2 +- 11 files changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c index 6a93a54fe067..2e3736603853 100644 --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -319,7 +319,7 @@ static struct platform_driver sdhci_bcm_kona_driver = { .of_match_table = sdhci_bcm_kona_of_match, }, .probe = sdhci_bcm_kona_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_bcm_kona_driver); diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c index 4c22337199cf..a2b6d8f2eeb6 100644 --- a/drivers/mmc/host/sdhci-brcmstb.c +++ b/drivers/mmc/host/sdhci-brcmstb.c @@ -430,7 +430,7 @@ static struct platform_driver sdhci_brcmstb_driver = { .of_match_table = of_match_ptr(sdhci_brcm_of_match), }, .probe = sdhci_brcmstb_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, .shutdown = sdhci_brcmstb_shutdown, }; diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c index d2f625054689..1702a499b36a 100644 --- a/drivers/mmc/host/sdhci-cadence.c +++ b/drivers/mmc/host/sdhci-cadence.c @@ -617,7 +617,7 @@ static struct platform_driver sdhci_cdns_driver = { .of_match_table = sdhci_cdns_match, }, .probe = sdhci_cdns_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_cdns_driver); diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c index 5e5bf82e5976..75335dbf223c 100644 --- a/drivers/mmc/host/sdhci-dove.c +++ b/drivers/mmc/host/sdhci-dove.c @@ -110,7 +110,7 @@ static struct platform_driver sdhci_dove_driver = { .of_match_table = sdhci_dove_of_match_table, }, .probe = sdhci_dove_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_dove_driver); diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index 86eb0045515e..0dbebcecd8fc 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -432,7 +432,7 @@ static struct platform_driver sdhci_iproc_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_iproc_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, .shutdown = sdhci_iproc_shutdown, }; module_platform_driver(sdhci_iproc_driver); diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 48ca1cf15b19..5072b59f6165 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -1521,7 +1521,7 @@ static struct platform_driver sdhci_esdhc_driver = { .pm = &esdhc_of_dev_pm_ops, }, .probe = sdhci_esdhc_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_esdhc_driver); diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c index 12675797b296..cba3ba48e9dc 100644 --- a/drivers/mmc/host/sdhci-of-hlwd.c +++ b/drivers/mmc/host/sdhci-of-hlwd.c @@ -85,7 +85,7 @@ static struct platform_driver sdhci_hlwd_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_hlwd_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_hlwd_driver); diff --git a/drivers/mmc/host/sdhci-of-sparx5.c b/drivers/mmc/host/sdhci-of-sparx5.c index 28e4ee69e100..26aaab068e00 100644 --- a/drivers/mmc/host/sdhci-of-sparx5.c +++ b/drivers/mmc/host/sdhci-of-sparx5.c @@ -260,7 +260,7 @@ static struct platform_driver sdhci_sparx5_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_sparx5_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_sparx5_driver); diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 673e750a8490..72d07b49b0a3 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -187,7 +187,7 @@ int sdhci_pltfm_register(struct platform_device *pdev, } EXPORT_SYMBOL_GPL(sdhci_pltfm_register); -int sdhci_pltfm_unregister(struct platform_device *pdev) +void sdhci_pltfm_unregister(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -196,8 +196,6 @@ int sdhci_pltfm_unregister(struct platform_device *pdev) sdhci_remove_host(host, dead); clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index 9bd717ff784b..6e6a443dafd9 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h @@ -102,7 +102,7 @@ extern void sdhci_pltfm_free(struct platform_device *pdev); extern int sdhci_pltfm_register(struct platform_device *pdev, const struct sdhci_pltfm_data *pdata, size_t priv_size); -extern int sdhci_pltfm_unregister(struct platform_device *pdev); +extern void sdhci_pltfm_unregister(struct platform_device *pdev); extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host); diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c index 91aca8f8d6ef..1c1e763ce209 100644 --- a/drivers/mmc/host/sdhci-pxav2.c +++ b/drivers/mmc/host/sdhci-pxav2.c @@ -359,7 +359,7 @@ static struct platform_driver sdhci_pxav2_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_pxav2_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_pxav2_driver); From patchwork Thu Jul 27 07:00:47 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: 126816 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp960019vqo; Thu, 27 Jul 2023 02:06:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlHR1/nWmg206EDLKAeWpX6UTxILLROkpvNMF+mzdbpC44Sk3oGYRQYuOQKwxn2QDtn70s07 X-Received: by 2002:a05:6a21:47c8:b0:122:8096:7012 with SMTP id as8-20020a056a2147c800b0012280967012mr3943233pzc.3.1690448778209; Thu, 27 Jul 2023 02:06:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690448778; cv=pass; d=google.com; s=arc-20160816; b=gdG+CH8vN2fGpO/LH48wPjlHwbz9GzMNFIGKBqyM6x9djaiNj/8IX9fBA/u30jFWkY gbm2QDAZ6rV+yLbvllB2MzvC0DL77LEQGVle7AaSl5iVgAx4Q4au1QTzX/XNMmJjo7pf pYvFxpgFdYB3v+PCFScTDuu6BIAGFrhqEz+QkKZfIJ71y1rVquwIIbh0zyr0zGOODBdH TDbnrrEj7Ab6AKCtwRSlVbB/Ff+VkA/xu4JaFbXYY2RTNprPwWboQeEufneXOH9yh6t/ +VF8SdN2wrXxxXSt3aykdtywBBYowBjZCMfsFKwjDbNnuoH0FEH9YDIr8++IR7pBAdsk S+Fw== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; fh=7b0Y5Cx3utyrzaG4S8aa3Mo2ByBxutW+yB8187lmbIY=; b=lvNtP1onBFS/pCVIx8P8NE+Py5Q57sh3qResioVKvoZ52/KzeNVJNhkirLmlP+mgJT RhPbVq2HLlyivjEJJ9dkVeGUw78WuSBdOjEHy/urwkM7SdbYZNGfHh9SLLPWp1dJc5Di ARWkrfxC+qnzIPt/dXbDp2IbAQQ9RxH/f2dtjz1httuaTZOdH2jqSZsMPlcZrxif8EuA kOgVxp7ZrkmGxXibmiHZtAczhs4QhXZ5uh2vHmoUOnzO1ZXxCYYh4UxZAibCv8hpVhtm Sj9Gm1Envj3rLht6+d6GWRx6t6/XGUp75r5uUgY/2EFbrrWo4FwE0BipSvWzlBUWRrta yHvw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=X4uEj3J0; 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 t14-20020a170902e84e00b001b521cf9578si1082392plg.443.2023.07.27.02.06.04; Thu, 27 Jul 2023 02:06: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=X4uEj3J0; 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 S231735AbjG0HGh (ORCPT + 99 others); Thu, 27 Jul 2023 03:06:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232909AbjG0HFg (ORCPT ); Thu, 27 Jul 2023 03:05:36 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2090.outbound.protection.outlook.com [40.107.215.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06888448E; Thu, 27 Jul 2023 00:03:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QrMGg0VoNOb5BL9E4PkFmGzJ6fs3b8malkIC9PyGqMJlsHrOKAfYcDBYr0XwLf2t8wUA0reCMqOy/WbMFHYAi1ptnNzYWsoQwS02380IX75xdy2GUdIregF3JiAWX9sXmWibFQFjMgDslxJbwQ3UPbDU7Kh7arzhapc71FxtioCYkqW0/kO03KFNgqGLKKjj9P/LGUKTF1nFMR8E72uBdfZQChIDouBGz6k8+WpQq61mjtM3ZZKhpg4xbH1tWyyre9E0Jre8jsXVxVtcrGtHILtt/rJGMV6EyI8RxlZ2hqObr1j/Ir/78qfwppAcGcdCt37wsdl+pYPeD+W+V8lgSg== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; b=MeeaEKrXaEshNhaf4YMer+1fIeDuPs1WJrBEl9w1Z4MIm9oL6GyiJPZPB9zfvm0pEzJtWCTviMeBjkjjolVIZ5meASObCqsVe2fa1LCalGump+qqrEyHJGWTCty5aAvigQf8uc6fAuxshMpHFEYNjegZcq5Aif5tcYTCRgORFftYqVG9Xwz7bcObDa+a3tyrDzmL+Bz17KpNLpPSl7kl6iE7rMCtjPi25GUkPGaxt/6ihy4XATGR/N+m0Fg5owfeUnTIFySpjkyTi5MvZmYxcTq+04eVxNoq9vhrQ/+QXCIiz86+pPC6H1l+02dJCXE3hVr89ggCX6crGRw/fvCHvQ== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; b=X4uEj3J0X9lAfGTbA5/KCkv9O6ofhqPNtdRH6syxfSj2Rfh07FiAg1Ubxj0GKIJ3WXEj1DO29pWpdMqcVFFbNJbDWlk2woN/J27+sZhjqoO6iShRyrEJ6fF/xSesCLML20KSilQnYPTDQy+58K6bUP3VqmCow2FBlIyV+LoDefrFVRI42UGVe9GN3tFKXjppt4PAGGoAED8ntAvfm+wkI01svaLra37vwZZ1PGPbltluO+6D+1ML3TfhPkXJ4enmMU6Dx9bPihhBbvZMWlms/6GmeM/5ofvO9gv3lNNgD1Pl3BvKBZj9ktpk03KEyX4F40X/wR1I43VQS7Z+5MP8vg== 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 PSAPR06MB4152.apcprd06.prod.outlook.com (2603:1096:301:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:46 +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:46 +0000 From: Yangtao Li To: Ulf Hansson , Kunihiko Hayashi , Masami Hiramatsu Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 58/62] mmc: uniphier-sd: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:47 +0800 Message-Id: <20230727070051.17778-58-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_|PSAPR06MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: f64abb1d-ee8b-46c9-c092-08db8e6f78b6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hzCw2saiXh5oij8OiezOTxeXiP66wLtzh2CijXgl3EuxhEXJAw6cUAgzahhs1pT3dlzPrgt0fvq+ExwVaNPPAeVIJAXvXrlqIF9gqXGATks1qAFuJ5G9NJeON6W3f0A4BrR/OdOBP6DWMF3L8zNmzU2kxy5KgfxI8MBsqjL5Pdw0Zry74P+BwRut70MgYDgBWvD1wuIcBT/84OzxCIA7N30ghOKlFmHX9FD2IkCku3taWqQ1hTPdTr4UsRNtdxSudO+6giexUZwguuSxVDGzIA+aVKXuG3DvUhfD4DD6SFMMLFjjEmXdlAdl55PNAPnGSbGJXmYIxp9YttMc9THY2j3PsiYYit6dq+7yMRlauw9PZ5VFebs//s77RhZqJxxj5GsxQ141vH855hq/vhvhXRTpkB1YEceVdjJiquvTleD2pi22mQK39v3btyIMMVK7QJt3tKGLS8WqGerhpHJWw1x8AMjTbE+6ZREmXR62BSvBtBAu3Nk2E9c/4Qs69cF0Sci+aVWvPY5YMyI+88QdkRWUbz3a7fOf4PsazMAaC4QzUiLL5Ob34DgPTaHEj1dXJsFSRFbM3xzOf4XHFmstxV/eZTrmBKxsW6KaxhZx0vdMiZ2bKwftU/efZEjC6vyS 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)(366004)(136003)(39850400004)(346002)(376002)(451199021)(6486002)(478600001)(52116002)(83380400001)(26005)(1076003)(6506007)(6512007)(38350700002)(38100700002)(66556008)(66946007)(4326008)(54906003)(66476007)(110136005)(186003)(2616005)(5660300002)(316002)(8936002)(8676002)(2906002)(41300700001)(86362001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?5gu0n/9CYi6dFrWw9e8kFXgQWCuk?= =?utf-8?q?85DubcPVnkoECNN6nJ2Pmz3R9+Bg6Za8G8zap6fPRDK/cZznqP9UGB6KR7Dby0oDg?= =?utf-8?q?xsEGHNdYsPpWkKkdgwY2K9ueF3CoHuY2vxw4PNJ7Ib9KB/JGwDSvYhR0nlR5f3mJL?= =?utf-8?q?JbKOG7+qApA+CxHlJqFZ0p2BR2oKqPJjGPed7b9iFCMXRCsRMjA1cgPKKTbk11KdU?= =?utf-8?q?j/6tznTUKC378tMovhLYrpXxZAuIY/tMHYShJcqozTrSP2jM/DRRDUyaRQ10S5cjP?= =?utf-8?q?/XHu4WwMuz7sK8NxxAYp/DQn8dPnlBuyM14+RfYHsli014FXW1r4ZttdkgMFiruZw?= =?utf-8?q?j0PxBn7mbwFEzfrY7SBZMVUsXWOqrtB9VaKqFtr8v64/UR62WRmKcBuN5Hb0CxJru?= =?utf-8?q?pEovdtn7QWCnQnN5CSYTzVywAveekn6F5DEOrqCj+l/22OReVfD9c6L+bsXbcJ5uO?= =?utf-8?q?sHuXHskprg1Eq2ZTlJzbNdQzF+kyMcZcjh78fYtWcAk3u5UPn4r33jJydcrkl3frG?= =?utf-8?q?eu/p8LvILdZF6SGFncnWOBsYylO23rcfVPeQc+0zONP17pGj+6FrLj9M3v6j7KBh2?= =?utf-8?q?50J1NnktJ9iIgjZo+cuIGKelxU9zGwLCZ0mi1CijqAQDQpN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T2ei7nES1d2cY+n6d?= =?utf-8?q?KUwIvljWi+Uk?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f64abb1d-ee8b-46c9-c092-08db8e6f78b6 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:42.2000 (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: /248dpgNnj3tYJb7auMysIoahVR1WPleQWcFUJpMOe4B2EdSbPJEhzYPlznDTuSD2QjVjefggUnPOV6nPWhSFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4152 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_BLOCKED, 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: 1772564017888746127 X-GMAIL-MSGID: 1772564017888746127 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/uniphier-sd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index 61acd69fac0e..33a4d1c6ef04 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -727,15 +727,13 @@ static int uniphier_sd_probe(struct platform_device *pdev) return ret; } -static int uniphier_sd_remove(struct platform_device *pdev) +static void uniphier_sd_remove(struct platform_device *pdev) { struct tmio_mmc_host *host = platform_get_drvdata(pdev); tmio_mmc_host_remove(host); uniphier_sd_clk_disable(host); tmio_mmc_host_free(host); - - return 0; } static const struct of_device_id uniphier_sd_match[] = { @@ -757,7 +755,7 @@ MODULE_DEVICE_TABLE(of, uniphier_sd_match); static struct platform_driver uniphier_sd_driver = { .probe = uniphier_sd_probe, - .remove = uniphier_sd_remove, + .remove_new = uniphier_sd_remove, .driver = { .name = "uniphier-sd", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 27 07:00:48 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: 126716 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp914608vqo; Thu, 27 Jul 2023 00:21:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHD6JmqUa4w4/Hp/sJQhD190zMW4dJPqzd1MPoS2SSeWyjh+M/HaRqSDarilDAB4R4jXS+N X-Received: by 2002:a05:6358:c12:b0:133:6c9:c43 with SMTP id f18-20020a0563580c1200b0013306c90c43mr2097634rwj.30.1690442515567; Thu, 27 Jul 2023 00:21:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690442515; cv=pass; d=google.com; s=arc-20160816; b=QIUUx02hj79wiB6rWXHt1HwmYFIFYnQYi1KoKSaxGH+YghaaP3km/uZwnX9Ss+RYOs I6qSGFPGqVqAyWch4R1dHHhM29kWIBS0I7ofodplSOu36z9OmFvZtZdF414cwKIc3I29 RXNZKS9S704FSNJwU9oWx0xYgiepOFIcgK6e9BxQ+xD4kE7QeUOSJL7afQuWoESN2m6c 8tmG6t/8k0uocIpcp1EYcmFp5Xyvhut9NpjA3Bmm8M65eQQQQPrcPhUq2vNEvts2wQsM Su1jFGnds0K2lEleV/LC4BegjwynztcMpxyYQbtEYbYp6v4of9LoK0V3JFVvXGlChKKm NN/w== 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=9Wq3D3MP18gp00gViiexlDEzaE6ODfTIsN21lyfNhC4=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=Kym6DjmMUwz4SqUU0kkogxYf8JMMwpCgh6uFS51B8MkcpRlT7JcYlMR8t4WSYAuH6e synZjvkjP+N5nTs/WRa4MBqAbjwiRDMDi5LAlQBjjzas+SBQqrUGmuqmlM0d42SRTgYF RZEi3xvNIGSCPmnHVGFkiwDwuVpYjz++vxa3AIG970UAohbMxtqU3hfbm71jTxsNh2Ss zBWV5ekVL1U17OJkibDTyEeuy0SNoqYYu4YjmHolpD0TcuTQqNbg2j8/g4P+rCexxxk5 8lUK8ajO5HX36lRl/7K+mF7EHaRgtL8+ev3LgZQJr32xV+++gqXNpXGLFEMC0IE1M04/ ix8Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=iDNb0JaU; 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 p26-20020a63741a000000b005578c6a7689si843454pgc.91.2023.07.27.00.21.42; Thu, 27 Jul 2023 00:21:55 -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=iDNb0JaU; 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 S232635AbjG0HIo (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232101AbjG0HHq (ORCPT ); Thu, 27 Jul 2023 03:07:46 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2090.outbound.protection.outlook.com [40.107.215.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09C69E0; Thu, 27 Jul 2023 00:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KZmCHmTEMhCbD/7vGHr9vp+LZfBMVDQ0yZT+g8Z2P2gLjnc59IWiuCamZV9YNugSzw+gU+hjSZUWrkboCfhflm0U5mgNXOU/BtsgzhWfLw7zIKt7peaW8l2HPEtu8MdMP81Xe1n+aHIF0Nj/KO3OvwEq9ud4MqMnI9a06tjYCboGaNCXTggS6qUNI72QCZGCzowIGKWpXLDzM1ALBbMXJhGbCR16AaOSaALPiKoWgbRcyguTHzpvap/OVjJbFyI7cBxOQQgOKP7cqsNb6rzLEuM22TgLAr3rGVXWLSGq+IUzJAV22nW8eOrEjaUmjuBRYn0dLmYSU/byGVORJlTCLw== 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=9Wq3D3MP18gp00gViiexlDEzaE6ODfTIsN21lyfNhC4=; b=UUZXl0TwLfLyAZ+KilbasVyAOgFFfmPpr5faEK48dk5wIo2JtUwWMyMoxkmGPECyQ04gJHGptDI9H9k2laTuxtTBc87094gREnbLHFpWPfhweQCNmWjrJeYU/BSrDbe3a5WAq6rI8Y1RvS5tEkxVVcdWoJ4qigxQDZZ8WdfixmxpFwD3TZPikbrBsCbgkeMAWi5z45haCsvYkhLFwhKRSFMCeBLPz7/Lreu52sUGz3q2LK8Ly1NZtd9bDgAxU8oB9kTU5O2APotOBIGlHldcwQB5pe5Lze8vABSLS/3AKKEVHGofoNv/YZw1wxXqft4XVaZgIHcUF/GlV9BZepG0Vw== 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=9Wq3D3MP18gp00gViiexlDEzaE6ODfTIsN21lyfNhC4=; b=iDNb0JaUjEm0NE71hxkwX13JWMSchrNaExE9DOq9ZClKM2jXmifaQWUZIva4pTjjuXTkDXEPU3wg0N2ALlJChPDu5gVkNFrfrYg/JlyXNrv/PrmMNxfGPLuw4IXGfeKqpnWqCbafyLiyen2b9tELGklHF4fSmq4q/crm3vZwS2gOo2fgTgYlmunbyIhZkfWg24pqMgoLN1ODF5dGMXRbf5XY78pMql7cepa64e8OfH5N8lyrWKtWZt2/+VSdYVwVpHL6olDxG4U6BpPyD109KV2etOk69L9eJX5KYy859wkg16Ct25PSuFhqZTV3/PZOny05wPOFnw3A+BRHBTVl7g== 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 PSAPR06MB4152.apcprd06.prod.outlook.com (2603:1096:301:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:46 +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:46 +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 v3 59/62] mmc: sdhci_am654: Properly handle failures in .remove() Date: Thu, 27 Jul 2023 15:00:48 +0800 Message-Id: <20230727070051.17778-59-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_|PSAPR06MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: afaafa2a-a1df-406b-e7c6-08db8e6f798a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZcWnBz+gIw8bqywvX1/HTp4Y21SGp1Tr8MvJ4F+brgQ06W8fQiYBfZj1/LBz/yq+Ok7i6+S4NqoeRChZo1zFBJEuJso/dZyb9NZxmhRIjLvkVM44FC+BRc2qYt7Eql2MRnSQ+mk4TVsIMICg3s9rBZ2S5oPAHFE9clznVHHJmnyIVaOMZ2v/XytLHLoQunWWEaa4wylF0tM7TKgCbiaidnEbZz7LgQz0Zpq60sb+njoTiuVF4hDKWyGQmF73jblEVl3DVLIavhhoClZecTEvTZ8LHapiWQ/yUgykcUQuSRUIoRU8Ks3CNIui9U+ghGCY1H+meZqecsWdyHrE1E1eJA965FJBXa3nFQCkBrMe52/xSgmb+vPO34Ui6FBSltrycY5/EHNFhykgOuZwb0vEIaeVtI2wHqVTzqPOKsKjK/m3TA7V2bUONVuHLG3PBdeCD5nwjRMQuJH5Gge95DWVrN3iTgFcJ7qoNneqg+tEsNMqwJAkuaemRWjCBP3Mb5TDfzH76+FsWlfrNobFQJv6T5OL/JIe3TB2tCrujCf01MOo/saiLcaoAHyJtuzIH/Ga3OwCJfnOzkFTCituf4pfKsfmszicnYaV8ypRPbqnEb0JgGWkrEHqRxcmbQtgytT/ZN0iKJhdCDjcL9ixI1w+VQ== 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)(366004)(136003)(39850400004)(346002)(376002)(451199021)(6486002)(478600001)(52116002)(83380400001)(26005)(1076003)(6506007)(6512007)(38350700002)(38100700002)(66556008)(66946007)(4326008)(54906003)(66476007)(110136005)(186003)(2616005)(5660300002)(316002)(8936002)(8676002)(2906002)(41300700001)(86362001)(36756003)(142923001);D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1EG79iehGYg5gmlpeFBgSSzp5Mse3J7sad5mHzMRGEI?= =?utf-8?q?dlT0zj3PvHeCDKDaVyKVPRP/0J/h9QUi37/aWrO0yXVELwJZZJ+SqPWr7sO/I5m3R?= =?utf-8?q?/Kw+aqORANwcbmmy79KEOtyx3/1mB4wKZlYaglvYC4NIctpioycsPs0EXl2q/1WnC?= =?utf-8?q?4Xb4m9CJ8C0UnuizICRzOBL6u6SPBASwwIZqwkOGhLZvASGbvu2D3urgkRtrfxg+Y?= =?utf-8?q?kc3W6wieSRvA+HlNj4d9v0EDKlDCSi5y2mqvX3nXWCkgFE6bhux/8JgIhikWqNHzn?= =?utf-8?q?xM5n0FXuPpRVGnAuUbAQAaN6S0Lt9YMnlqfOxVE6cUkMYR7OFYxKeHO2ElVymb0Fj?= =?utf-8?q?To/ZEJGhcYxyZNos50QkPq7sfUUPd742BhpT8s0H0dnwqXXnn1DVwmYLxVgmu+tr2?= =?utf-8?q?pZX5wi8tOapPlGuLrv8FjTmBUXMqf+moIMNCKL7BNIXoAn9fuymjWJFb5wRj46syy?= =?utf-8?q?CPgugWQh+SMZwrIfSAPeUa7mekFToDvl5WukYYoXaH/kuZpnZub9J9P1pHt+kB3Qj?= =?utf-8?q?Hy3P+ZPjzkg4UA1nayo10R6sp4duF5i4IYlbC4XKUSqc7egaoY1WgaMFJXgUfCy0p?= =?utf-8?q?02Vx7p//w0cZQlPVgnNunU826vQownaWZsfW6NilZFOUXlgrfjhlbsny+3mpKaxez?= =?utf-8?q?xIJrR9Exd3keSCiGCqlIkvI//GFVxkEkSKYlLt3kwB2ddtYYsSvlzx6EaVu3d9Qfg?= =?utf-8?q?wlZUi/fh0JS2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: afaafa2a-a1df-406b-e7c6-08db8e6f798a 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:43.6893 (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: DKFCjM3yAPKXNTcm+9+ZYdlmR4IEkMDe8J46lnS4KWVknFJv2Q8R8HROkkunF4s8ATzAWhGELBuhOTuO2z4gTg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4152 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_BLOCKED, 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: 1772557451272170092 X-GMAIL-MSGID: 1772557451272170092 Returning an error code in a platform driver's remove function is wrong most of the time and there is an effort to make the callback return void. To prepare this rework the function not to exit early. Cc: Uwe Kleine-König Signed-off-by: Yangtao Li Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci_am654.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index 7cdf0f54e3a5..1cc84739ef2f 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -870,16 +870,17 @@ static int sdhci_am654_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); + struct device *dev = &pdev->dev; int ret; - ret = pm_runtime_resume_and_get(&pdev->dev); + ret = pm_runtime_get_sync(dev); if (ret < 0) - return ret; + dev_err(dev, "pm_runtime_get_sync() Failed\n"); sdhci_remove_host(host, true); clk_disable_unprepare(pltfm_host->clk); - pm_runtime_disable(&pdev->dev); - pm_runtime_put_noidle(&pdev->dev); + pm_runtime_disable(dev); + pm_runtime_put_noidle(dev); sdhci_pltfm_free(pdev); return 0; } From patchwork Thu Jul 27 07:00:49 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: 126774 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp937997vqo; Thu, 27 Jul 2023 01:15:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlH1LezVfvoO9mlT8dAeOO8i9spXh54b3tpMyNrZ0Gx3TF1qBmsW07URktetnFF0iR4wZq41 X-Received: by 2002:a17:906:9bf6:b0:99b:484b:21b4 with SMTP id de54-20020a1709069bf600b0099b484b21b4mr1654392ejc.8.1690445714398; Thu, 27 Jul 2023 01:15:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690445714; cv=pass; d=google.com; s=arc-20160816; b=Q03J8ZIlqlx72+hCiyk6RA68map17oJad26LY3BZnw8Q3zXtCszK5VQfjNhT1t+27Q uZQI958b7WFaODQKfg3boaFXy7onviYHce1izIr3HIbe5DeRZcuSt9dfXBCZ+6ImXHdj vzDE2r3WM2MnZqRGeZYBdr8H4aFp3pkibIpjs/vZu4lx3UeDNclV8+oKuBYntHl83sgb zlccQToQiL2h5ltQkilG2ZcKjt2tmBe7VoSypH6Y8jilK5uqXeqHME6HSSZnzUVSfcpx pKyXJ3h39pEjLvHi4DyPa3FBvaLmqcwOBYhAmgsNaxJdnIY0gqw1ri/N80GFfM6kyvSN Q8Kw== 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=Ea1uyoB9OAes3hLHcB2QP8c9cVmAH7ysXueKFlnpsyY=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=cn3Gqm7t4lYKLZ1ORBi7E0RMIoLoF0bzr/bMbxxhjmdjAXp/vmSl+PLUg4rzHNWpcg pW0ZM/DbX6AZwxEje2xi+dTgWce78W+KI2KxuXfNe4yCgx2zTSpxFWnZL5TtJFNID1vs vaqyu42wra/PP2J++1Dlmz7zqoDgQjJaAHWMuokFYuISSev27cA6cR5zhERQg3LI5zFh pl8DuwzPAbwZoUH+C6G5pjZtrpAfh2tK9/Sum4YzzqBBYJ9TQm1TQP+Sbo7GRun2a36D Jy22pLxRG/Z2PKZuVi0PaVkaN4Soh2jZ84CaobOLT3lY7XSTCedB/yTNUH3vdg474Cll WBfA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Hn3q31Ps; 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 a13-20020a170906684d00b009886470de61si658572ejs.857.2023.07.27.01.14.50; Thu, 27 Jul 2023 01:15:14 -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=Hn3q31Ps; 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 S233179AbjG0HJ0 (ORCPT + 99 others); Thu, 27 Jul 2023 03:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233298AbjG0HIK (ORCPT ); Thu, 27 Jul 2023 03:08:10 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2091.outbound.protection.outlook.com [40.107.255.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF0A049FA; Thu, 27 Jul 2023 00:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FgbjmGfMUG4FyTuiT1cw74YlwgVpH/bY7/1m7Ogc5bu+c8XBNvVurO7tXERO0MPktQq/Ef1w9b2OTZelrBOm8ZmoMB/8SIbAvpsSSV1TClWGeqhr4Kd04CGe6rtSK2laAgXZIyJI4CYVh0qzS4SY5OHndJx6AkzU6GQpsIvS7aPHCFNA2tAuus4k1JZks1oNrposB2+vSEV+WWB3aY94wkLUoRdQs0qW3QcweBY+iTJTKWgSp5b1ajPKVhZpRE7c/uKH8QRek+OLb2xYde9SfS9AtQjFIr3Pll6tZ52DUsWDhAiRDFUSUD19DmieTj4CsC2U860X3yh6wKq55VeKnw== 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=Ea1uyoB9OAes3hLHcB2QP8c9cVmAH7ysXueKFlnpsyY=; b=csrNYWkiadUz/0eUNkFOmJurBiJqlJRX0whvRK39TPhXOqm14Rc36ZrBX9Zt8hQ5cZsQx6wLYIzS7djVaUKjhhyYOIWRGdruaIGBJexPwzoR6LAV9uAIRo1WU8qpBkKdrOyvF1fjZTz0MVz30Y7A31524yPlKUz1SAkdG2e/GWL2Q7waAvMrMelblaIpONAsdwKz0Lg0hhR3q85fezTRcjDLajG5fEhjb1rOYXe3bc4dDds6Z7lB7LydDcK+2KOVRL9e0HuwtK0+xsw/iMQrZdc3VSMHB4+giG36YL93qNaMhPRSxbxvvGip2OPU8GO59x14bmbGJYPDfarybtbL3w== 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=Ea1uyoB9OAes3hLHcB2QP8c9cVmAH7ysXueKFlnpsyY=; b=Hn3q31PsTVEgtF4Ub00cSV6fkhzqM8PuvcnpcE7C6H71OPzLsVVrl5DByv99wuPYdC+9ZhjimX/pUMClKhCz0pusYuAEZ0ULS+FdfQHAV35m6DUR8f5OzRxx8Doa1+AEUpcTz66SPhMpce0D+ixDOz0u6RSwfeqn3MgQzjov9KSjzYefEqYKzpJnAtZENPiZs/skrtcDGKGYohLDW6DCuFcVcWsN4DrQLSG79DB83oVCeHmKQz8U153MfoidpCT7lOSn1oA+FfCK5TIYjGnYmRrI67HD8t0qPIKkvdeUGZyClVlIR+TumneMKO0yAfITQ2mYIHDLE6amlafGgqk8rg== 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 PSAPR06MB4152.apcprd06.prod.outlook.com (2603:1096:301:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:47 +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:47 +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 v3 60/62] mmc: sdhci_am654: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:49 +0800 Message-Id: <20230727070051.17778-60-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_|PSAPR06MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: be7a9570-4a16-4db6-bea2-08db8e6f7a6f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BVrZ+K9OvOpUmae369NymOq4bn+eqzZBBQKOyNIUJKHAx5C0+KmrFgPAhYWr3jQ6gewTqHxm9SzJtoDAt4oh7DfSva3jFBMaqKm5T92Otl1qUWvdQY0FNfE1zESJA2ZoZkq+b0LmUc0XEZGusvqTwkjwJEGNIFSWPYn/lpMOBolZuUAEt+4ycbsAUkdzVHULcOd2t0sDvGs6kbnxfH7ZHD3xxKX7qrFneW+LWVT/CrJjQGfyaQmTGlR2W+L2RJjPgoUEr92qEz4DGtctPyoAwRZeWz8h7vXbM2lDv6fTaQFQRJjE6pxj8uvygUjy9ZiH2eHqBH9lOgUwh7O/qW5HSOSppyPeH3jbqEXpoT+7AoI8slp7N8NJvjP3SwKijQHIHTpQGHSIEiBkZ6/lt/bL3/x0r6ase8KnNIOskaqi1evtmmQkhHj7SKGnkVaW1xnZSIrVgwA8WAkitl1C9jnFhFSvC9LReoJhevOlX2ZbzMDAn3B1nSmnyoNTM3SgnENCE+syRmBDCSyWCv1fpCdOBbuOi0xFkgVS39zd4NGnt5ow/CiRPielv1Fb+nrWpbfpy0jHhIT1T/DoGM5Wp8vDCwf0PRlbMXI8YBp9U7FoDZCw5zYvVnOCeiFLxLEY1SFO 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)(366004)(136003)(39850400004)(346002)(376002)(451199021)(6486002)(478600001)(52116002)(83380400001)(26005)(1076003)(6506007)(6512007)(38350700002)(38100700002)(66556008)(66946007)(4326008)(54906003)(66476007)(110136005)(186003)(2616005)(5660300002)(316002)(8936002)(8676002)(2906002)(41300700001)(86362001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?NLTmzvo+r3c/2jCdtOSWfjkoU+Bi?= =?utf-8?q?SDf4aeVAfybCfkZipEBdwBqqkh1HHRtOVqUKqgYZCHoR6nzMkKaG5fhwb7rMkXUYM?= =?utf-8?q?Dm8pIZSKRFeACJ3dplapLyy896Hx+TtMUKTTT9ozvQ0k7BIuGd90pEW51wJ2SZfUr?= =?utf-8?q?5dcrZrxrVeo1HpRMPXkMx2xMzTXPP2jAb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H6PX7mK0mT+lUt0yG5Uf0Co0OKk?= =?utf-8?q?Oe5i34EErzCqLZunKibeKklt6nuX7vn+8DhQFONg8HjRHwQgaSjIbm2BX2WMBTqTZ?= =?utf-8?q?gM6LjiP1TBgPVcUkhu1qVSM33kzs0gtcX6RalXR/zCxf04qXPKy+Xa+dcSyukDoQg?= =?utf-8?q?KbiqGE3wPGDC9DIizvxzkHiYOP6nj4nU7C2ieWgtyINZ0TYWJbt+53snBK7nWgXKF?= =?utf-8?q?/wNuGEITtSO2/f48H1bc3Zww3sWDpMDUFMNzzx2806FRmhywNvw1kD4hlHQfYUg/F?= =?utf-8?q?dbmA7i1D8T+28Ny+1FFCr1xuCThZAMuE5CArzvojScCJlGINFEhG9/Zx4FpSVhM7R?= =?utf-8?q?W/FkiwpoPbRlHn08gyZ+Rce9/OGxeJRxi4YZbT+fkScdLM3RXVafTvybu3/yacjW3?= =?utf-8?q?TG02cW5ASGAFk1T8csgcN4H5lacs4T/TpPg2rcnrdoFr461M5XfrizMm8yZdDBRro?= =?utf-8?q?XT88lMHB1SBW?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: be7a9570-4a16-4db6-bea2-08db8e6f7a6f 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:45.0923 (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: VqlMwAEra4lAqjyvVDHWctf6k4zkM7lUv4z0QDextpF5I6Mh6pTIq108rYffm86asQ9BWMhXP/8PVPIrN8vP3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4152 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_BLOCKED, 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: 1772560804972271756 X-GMAIL-MSGID: 1772560804972271756 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: Adrian Hunter --- drivers/mmc/host/sdhci_am654.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index 1cc84739ef2f..c125485ba80e 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -866,7 +866,7 @@ static int sdhci_am654_probe(struct platform_device *pdev) return ret; } -static int sdhci_am654_remove(struct platform_device *pdev) +static void sdhci_am654_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -882,7 +882,6 @@ static int sdhci_am654_remove(struct platform_device *pdev) pm_runtime_disable(dev); pm_runtime_put_noidle(dev); sdhci_pltfm_free(pdev); - return 0; } #ifdef CONFIG_PM @@ -994,7 +993,7 @@ static struct platform_driver sdhci_am654_driver = { .of_match_table = sdhci_am654_of_match, }, .probe = sdhci_am654_probe, - .remove = sdhci_am654_remove, + .remove_new = sdhci_am654_remove, }; module_platform_driver(sdhci_am654_driver); From patchwork Thu Jul 27 07:00:50 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: 126715 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp913745vqo; Thu, 27 Jul 2023 00:20:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlF56Mme+lvFiMVpFGdjY2a3ULhkQlBTtAElUUt9kU0EN2NRrOQO8LRaLUsRQLtHHCSCrQhb X-Received: by 2002:a05:6a20:7f8a:b0:12f:dc60:2b9e with SMTP id d10-20020a056a207f8a00b0012fdc602b9emr4931796pzj.48.1690442403976; Thu, 27 Jul 2023 00:20:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690442403; cv=pass; d=google.com; s=arc-20160816; b=PEE5ZQWtecuVaK1WXNPS3P8a/bHd3RKZSj0wo0RC1UBAVyQC2lrz64oxkcwKKLOS1T a257t+TiGUAe6gZOkhvRajDorQsEqNo57usvjI74mQjXxJ+J+IEsXTbIlvo/PazNI3nR RVYj+St9tq3M8udTJKcUGX6Sqsm/FkZnKtYN9WWZ0lxwlWWYqHvAfY+qXxN0Wkgy5i/c L/BbhbForj4YnKfb40UXpfNsJybWyomou0Yr/VjiEwEH2/QEfLo5i41s2rjJO9OJosA4 ngg8ZhcLNplGhydDiYuCLLiJR8f3SJlYhJEPIPUFG/uo2DibSTvCtVkAyZJ4h7TcX0FQ zVpA== 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=UgkpH6iKKcR7a4wKXniEGd6Oga+gRHlJdFEF4UCfl5I=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=Di8mg5T5caWeV8/W4ortL+2HvZ9N77xZnMRFeYqnBrlA8fimHzEBhqmOApEO2W98T+ +E2RivRrGhOUGy09W6vyM+wNxw8Xu011dKwridUflB2O2l9dvpCSq9mVuLlf5Iqj9kkA a/pO6vGZl/E6vAA1A2O0muGcpc0XRXOlJxvQFQlcUKXW3j3Ff3VX5JYscNqeciPq9qpP eG1KcTFk/2zW+OMx/16o8DgeMvTdBV8TyJqzYh7yXaGm407wzt3aeSuDFWlR29rYOb45 TjYcBQ0d81Eol2SDNYa54irPSL1RGXvU9LXIleijhAp27sDx/CSe3yKYEjUrOAe1AeuV yssg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fa5NxtQj; 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 t33-20020a634461000000b00543c1b14062si844697pgk.79.2023.07.27.00.19.46; Thu, 27 Jul 2023 00:20: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=fa5NxtQj; 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 S231750AbjG0HHq (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232371AbjG0HGs (ORCPT ); Thu, 27 Jul 2023 03:06:48 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2090.outbound.protection.outlook.com [40.107.215.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 136F72D63; Thu, 27 Jul 2023 00:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dlcljh/lY1roGLeghwutf9d3JvuGcx/4TiVIW55p02f+xu49b2MTfBQOniUPGikCXIMJtelOncn/gMCqrZQpQQ9huz9+JoOrWf/D9cE0bmwZsm7jcQaS62A3Dv5k8khvmYtqgNNZBE3uYt0APaTqnvkhm9iELlxG157o0Hav8jjqHacQmHL/W5SMTWTb/WaD0s09PFaWWLqYRyzin0lipEtL1lWGNe2tDjwLW7rDgcvlcosSXBMjPPfM/N9RVQ9GCMs/nqzC0YjtzAdDYUqzj2+mbeESGBB7lahvi4mDHN2ycKwjTtFX1CpPAKkBibQGYZgsBqeeSXGlktyYLJVQTg== 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=UgkpH6iKKcR7a4wKXniEGd6Oga+gRHlJdFEF4UCfl5I=; b=KOAOPs+fIAV9iDZ4amwmUmFAMHR4HUow+VBhoHEYY5IUlahA4o7Uo4a5EEm6wGpuBNUA9qR9zQnSWouI7X2hdvplZ5SlmXgXkf3U36hYpWM1X24gIVKLfXVPxIGxjZ27SppUFV10Ru/Eqw7U/kDlwpYIsVlxE/cOlpCvntZXa/Uwe2R6qQS5SAaZgGBnNeHXYOWlewBygaw0BjqluN+ywLDNmIfNM8fMH0TLGN5C8q3D0j6EDcIJoQJc9x5tCmQZ/mPRDghZzJHbFdFiPFvkiU5ANcynuVZRcswD0QaVL7127cGIkc+xTi0+CteDTbb5r5mfLQbUuZYfWW1NknniAQ== 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=UgkpH6iKKcR7a4wKXniEGd6Oga+gRHlJdFEF4UCfl5I=; b=fa5NxtQjNgF/XvnDgEBbKlGpeuQhPHR4vKWfCYlUW7KVHxLPZNjFnRDlmM6nmfW1VLq5cWokCbzHHB99N/ScTBgYL47xVEeu/jrUoPkHROZNiYyINEYORdJt6xp/loG7YII1RLqB/qhncUfB4A92PIt1T2st2HKaqL8PO9LgOsttTLr99W6ybVu5Bgknl69q6+kvCTkfomAscybFmmw3ZkD4UwQDfe6BLbGKwVEzJy1n8T0voyCrXIMTbTu+IJWKTTrFj0aMrktAf9rF2A0AjdyEa45dF+tsxiwa9XHDsV0PepXimOyh8i4PJ46iVvKPaOxhYaf4DvHWhxSKPib0mw== 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 PSAPR06MB4152.apcprd06.prod.outlook.com (2603:1096:301:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:47 +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:47 +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 v3 61/62] mmc: f-sdh30: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:50 +0800 Message-Id: <20230727070051.17778-61-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_|PSAPR06MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: 1212ea1f-6995-4399-47e5-08db8e6f7b46 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o7B9fHdbSVjtabl/FnTD+NnstSLfwtNZL7JOMlqHsCuDOPjG2YczKfeQ6M7CdTRiyU9LBVZZb1Z11p6sL43wwjPz2PzNrrFc1cXEMuhf1A6wIDLmLrPLBChNX7SvK1tXmwp6pqb7lYgEqAfFiyrpOyuGuFP9dkWGpsUvEZJON+QhcApGkWlB9CNkiycqUt9W/+M7aAW9CauEo1+dhkMcahtTEoryngTGj7sVZrt7nvY/Lva/zRNyPiFmXGkYXaN9nFHtSXkUnFiUQqza+Aa/sa8oVSBp4Q/EBHRMKWkyh83cAy+pjL3GB0twFe0+6GCNXSQyRcYPuKKuZOadLpnHck0DesRlI5lMUT49+9wWtuJgdnMS9K857yv3AFBF/I7UEhwhS75oKUdzKSKACTUgLGhXpU83Ufcqc/MAzmMHl6jQm7WfBCgJmM9wiX09pfunwNLa7cTIKBB+Mmxo7Tvzk2Ml8YrSKMSLZctMMu3w7Wq/NdorqYFASfl16oEXngj7/53kyyiyWLqzhgCSFSF3PDj+aySBCFaC9KNGa98Sod4jUrH5ZBCpF7Y/KTpPfkqdqsg5pJpIQl4xhqYa+Ew/FlFMpiyNhhsl7mu3kLZiubEhTYPXDASxWIxOdhg8m7mQ 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)(366004)(136003)(39850400004)(346002)(376002)(451199021)(6666004)(6486002)(478600001)(52116002)(83380400001)(26005)(1076003)(6506007)(6512007)(38350700002)(38100700002)(66556008)(66946007)(4326008)(54906003)(66476007)(110136005)(186003)(2616005)(5660300002)(316002)(8936002)(8676002)(2906002)(41300700001)(86362001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?drFpk9SmMR1A+Qchkb2ZsPf7KGRP?= =?utf-8?q?CvV3dp1ST4QjpumpCDktChqHExPixfIGICOP8WO8ECwLFOsa5qDXFRh1dgH+7BkMi?= =?utf-8?q?bg/0SdFei25oyAQSSmsTNNFuc88iafgAA/YyJmg3DwcNVacUckg2X6WMd4fst29G9?= =?utf-8?q?0L2IML9wlnGVRVzL1mMWl/LHTEx4Fohb8ljXeN8Qu7H5vf3s7fw4mvEfxNanafdsT?= =?utf-8?q?BEwSBjvBv1bgAxdaCSAwNA3YMJzkApieU841bI6HLhHQElngI5fQdMzF8vkE0+6k+?= =?utf-8?q?guR8zwaG+YufpHPs1gGqcyGR4EFdgzNKWcvjjcf1ntpV4O1LMZyIJhDVkjAhFFRXD?= =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?utf-8?q?VlFGlZktjSo1k1pMvgqHJ0ZpgEZq4iGtBK2bSCjQjvdA9YhERTuEkycGQHz8glZVN?= =?utf-8?q?U/c9qcGDLrmyLYAB2IrMoF4qkjX0AmJp2+EPzchOE3qeM3IQSPO4I//AF6jiAA3K2?= =?utf-8?q?ZvEZXFCllgo7Gghb1+yTUffJAIBE8FSKxlSGUNS52tgla+p+BOxBIsBKxFLT4UQSZ?= =?utf-8?q?0HhcoWgBbQlA8jiDzkbyUxgKYB5rgln6xkC47+L069SWhM0EaI0NyqpD0U+VcYWhZ?= =?utf-8?q?8SjWrHAtKD6GpZfUJ0s1oT/uPJqZaPazowU2DFJ9l/LMLYBhFrAEMguXZFWHGzIyz?= =?utf-8?q?mKqmmteSq1Nf?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1212ea1f-6995-4399-47e5-08db8e6f7b46 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:46.7675 (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: BCrOr199+mh8cbOIIhI4Kve+/3kkp3YQ1zZvXpAP1XICvWCW/rpNM+6SnG1p7YwBaE/8wuisImCP9h9KpxerBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4152 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_BLOCKED, 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: 1772557334134504286 X-GMAIL-MSGID: 1772557334134504286 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: Uwe Kleine-König Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci_f_sdh30.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index b01ffb4d0973..840084ee72e6 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -206,7 +206,7 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev) return ret; } -static int sdhci_f_sdh30_remove(struct platform_device *pdev) +static void sdhci_f_sdh30_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host); @@ -216,8 +216,6 @@ static int sdhci_f_sdh30_remove(struct platform_device *pdev) clk_disable_unprepare(priv->clk_iface); sdhci_pltfm_unregister(pdev); - - return 0; } #ifdef CONFIG_OF @@ -245,8 +243,8 @@ static struct platform_driver sdhci_f_sdh30_driver = { .acpi_match_table = ACPI_PTR(f_sdh30_acpi_ids), .pm = &sdhci_pltfm_pmops, }, - .probe = sdhci_f_sdh30_probe, - .remove = sdhci_f_sdh30_remove, + .probe = sdhci_f_sdh30_probe, + .remove_new = sdhci_f_sdh30_remove, }; module_platform_driver(sdhci_f_sdh30_driver); From patchwork Thu Jul 27 07:00:51 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: 126755 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp923574vqo; Thu, 27 Jul 2023 00:42:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlEyKt6aZ5ulk6wOKbQ4i38Ztz7LuA+S2O+B4HKbhgDSr6rwDCXgMF6KuFTd2Q6ZFWXGya/9 X-Received: by 2002:a17:906:10cb:b0:967:e015:f542 with SMTP id v11-20020a17090610cb00b00967e015f542mr1255862ejv.44.1690443767109; Thu, 27 Jul 2023 00:42:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443767; cv=pass; d=google.com; s=arc-20160816; b=vJraVrv/uAr3QIqShrsU3AFQo5CLnMNnJHg8verwbTEFIvIvdgTpxSNVjq/4CXBbv3 x/vK9BMODg5Syp7z2b1P5VGkSekBZq9qiB6nJVqpsCNMaYtKWds/BPTiHNrBsJiJfCXK r4Fr5t0DJFwKSuHdBhh/Ty2DI17n01oFX162cEWS4Lx+qOghud1F1GuOkulddbZKEabE 4kC/B6yeuOft3MtYDYEPlkJ7e8jMd4AOFIQvTSTE5ExdZQ7ZEzlz4p6nyn6W/+XC0plc k6ldoJgUYe20rT7x8zbQSGi7cP2ooTlrEy4QBZfXXd4mdfBe3JJD2OV7XDShqyfgkYUy 24zg== 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=bcT8TsOkXmzzeka/1/dQjq/N2WSLPScPPwSFO+0rVvg=; fh=o0pesePd+0cJMsgvhMr2zlUwhlhITfpqTmToOl12smM=; b=YrdF9V5W9ol2AauUAAQCHkN/KftRRue9aCVFc7nFVDK3cV/yPAWMR8HLZFi/Tc5l2G 7lMooCXBDhlVyHuHQ26hOVMMnhPZM6L4OYN6FBPb55aOFv51zhWuZPVe0CVkl/2jthzv FQ58TEO3tRfmb8idzcmbSK56+n2dLLo97vUTauOINHdCYJ+C0ZYqElE5a3wN+7z3NOux fWa/houKi2UGTLTxe1IHjvh7eFuCFKI8bxkS8vHvbDNMZwdW4M2S0Thk1Z+CjPW30Jpm ajhdbvADEUz5ghuhk5NFn56bw3aQQX+JrCA0PKqn2tvV5oWKajLmb4xxnImWldtAVu8W zGrw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="p9l/2P6h"; 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 j13-20020a17090686cd00b0098dafe075ccsi643434ejy.97.2023.07.27.00.42.23; Thu, 27 Jul 2023 00:42:47 -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="p9l/2P6h"; 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 S233155AbjG0HJV (ORCPT + 99 others); Thu, 27 Jul 2023 03:09:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233273AbjG0HIH (ORCPT ); Thu, 27 Jul 2023 03:08:07 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20729.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 483D949F1; Thu, 27 Jul 2023 00:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mbQQQaYStS58XllNgeQCaxdx4vROErkz53nGfYWsrEeuP1SkLjzPZbAqTJdNGa/6LIKPUii7wYhA7lr7UhoX2Bi9HnG9i0cg+re81akr0sgJ6Gf9vPLp4Zc4AQjxz/quwvPMJD7F8hw1nUCU689H71CN2lNILxVMH7AAIC4kDvrUoUplQJ9PR5EYD+TjdCy4WyY15OGVQA5ynF4AvnTo+hb+xUq38vJnl8vN1HJxtFp2hUYRbci0VWYfTf91tmmsrAkmRVxHV6U0yEU5BZJD0VTtm0j+xXksdJ9EI9PaoysXwkrfBN/yDWVIiblyxp6m/djI9ZQadPSIcAiZwrP7fg== 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=bcT8TsOkXmzzeka/1/dQjq/N2WSLPScPPwSFO+0rVvg=; b=K1fZor3LkXUrntte7wl+yZoohfAo93iDfuaTVS4Shrf/f6NM2YAjzN2tmMmb7ztJTXHPtDRYmscAPMQcw6Z1KkCaYci5R13dbKCpWxIW7/nrzQA97TxsKng4bSwbsDwT8k1WOxLSyLG8Qb23iVbGn020n/DbzGIEQYas85NKTgOiIXa7gvDyhb3P3gm/pJTFLCn0XLos913JEKp6pEXKOG62aVYXVhkvXcByxOixJdvN7LBqUwb/C7BGUDwqgVLF0xrqJjVQj8vwWMXG57Z8ZpbgFgEpz1it19+Ni9oaciZRcprg6Zu1pGmfX0kMaY9+Ofu9VYbexKfpx+QLcZd+HQ== 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=bcT8TsOkXmzzeka/1/dQjq/N2WSLPScPPwSFO+0rVvg=; b=p9l/2P6hQqbl8nYoOozhlE5vQAg1coQmP9S6mx3mu9PfXODEEXQWzuDiRRfqTJnn0qNIosRiFFTjsWGCJ+/GGA9vDSp3+isQL3HnwV9nSZ5ThEq7fM9oYlmHp6retqMnfhkFimhoFMkMi3rCLa1oMFKeGdstjc5s+CHv/iy+B/kuz347LFqV9VbfTMrGpPTGRd1iyPAzD7o6ltMRqHH46rN811xHuM5ChjqgIO5A9EM9Vqsc8pgR/Jr1z8U0KnigR9AlT495cwbnyuVg3eBXd2EfIIZrkW/7hPUEI1NnYwXSfJbhXZrRoXm8AaqCSAZEzjgV5laNOVNZ9jw/NNPbmg== 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 PSAPR06MB4152.apcprd06.prod.outlook.com (2603:1096:301:34::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:48 +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:48 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Kunihiko Hayashi Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 62/62] mmc: f-sdh30: fix order of function calls in sdhci_f_sdh30_remove Date: Thu, 27 Jul 2023 15:00:51 +0800 Message-Id: <20230727070051.17778-62-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_|PSAPR06MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: 81d192c5-ce8a-4ac0-694c-08db8e6f7c58 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5FrgY7idtNy3UpNTJnbmlnFtUnC9RIj5KlqNp/Gk6Zdz4G9w7TSs5xVl42TDVeCz9iKjxuECNKUMq9xd77FPNcUy1ZpOf7vDShzG0ifja2PZvOdJhtEzApi8mN30BSzIoaDa6ixwVcPxbYG4IpzTr1EW2NtEJAd2g16l3G4dgdU02YU7kvOdOhAWNuGJSb1oKdOCAuBOObFtF0wnt9CwVKj61c6f5SkZIPTbklyVzZop0jbZcDJWYBQzoKyNoDUXejTRsRKUTdr7cQNZ5Yhaxiok8yN8KtAkoer8hcNNKXAHBqQ5dhBlMMtqqIVJCRARm0VPLjnC9HWej8gkcxj41PDnKjuFZm8+bnHWuebcpxV7rmZxtEXFjjR7c9iw7bU8LhlY6ik9x0lJsjPkvMwwgKfvbq/4y1JebOU6DLMyRsCWPwv5RnPpuUSl0IA8xsmrTcA2SJE+q3M3jd6iaue3fid+FtWJf3TI0cUNB1TaOw/GebZKGPRozaIyAnIfNNWXAjzMxbXXNDxRSv1pHIrdSQLRYiPWAPvQHLabAslVpTSdOOXbk3mTAhrUu19jz1NlA8Tom09+g7Z2Hl+nxCuGmE3DV9eH1GUkt7qD4no4lk219MBFKBTp4BDT0pW8AzMh 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)(366004)(136003)(39850400004)(346002)(376002)(451199021)(6666004)(6486002)(478600001)(52116002)(83380400001)(26005)(1076003)(6506007)(6512007)(38350700002)(38100700002)(66556008)(66946007)(4326008)(54906003)(66476007)(110136005)(66574015)(186003)(2616005)(5660300002)(316002)(8936002)(8676002)(2906002)(41300700001)(4744005)(86362001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?tCQQ+Sy1RDixaIc3ntVAtjmux2tO?= =?utf-8?q?OXfFJsMXrW8P6qYbuC2ZCD6thZ0aWAIavjRccZVwxXBKq0+3qnTlxt1gu/FanRURk?= =?utf-8?q?aB7O0RrnLvqhZmvlGilzX98OHiRfywkulArsAGzTbgJDUSqUwcr+RwV5HQ4aMeB5T?= =?utf-8?q?9AGXrCpaCyWqP2ObTMcp0/dpj8kVjPlFKe6M/bu4GfbSj1/Yfue42Mg34/sHfVztS?= =?utf-8?q?4hVDkggdXb6HHZCnTnDz7KGIITJOmSjJ6orHiJzu/pX1Upu6/sbMp+x767jNazN0/?= =?utf-8?q?YcWrPyTpXxYtQG8wQn7Vg0iu31ZpkXZFMGKm1ke80D4l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5POM6kjNcE3Kf0RdHjfLS+nRzt3pS?= =?utf-8?q?0ZkHkpq8n3RCBAXeKj72Y/zX7nKv05UfN8hW2L09NDogplr7hdyQF63GGRbNGqVWl?= =?utf-8?q?SsaYroKqSn5PXgzBpjELhxf64myLsMABRy4HXY/xZMVlII8ezr5G14hUNVmfieZxk?= =?utf-8?q?JclTJUJdorXeJEmjC2iWGdrIWt+UyvBeO2zYTPfxswfVdMbCn13Aqv18E2YFlJqf2?= =?utf-8?q?1lzHB3b5eQkUdgCZhB0l6AktzQOIP8HIL3uARxxI5el3RCkrXX1daYd+tliVtpbLr?= =?utf-8?q?c8j/Wd1bZq1tLPSRH/xP7Py4sMPlmDIqpLpmkcmUese/4ViNhlAiujqyfrHdRVHUA?= =?utf-8?q?Qwk7XTKBULpy?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 81d192c5-ce8a-4ac0-694c-08db8e6f7c58 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:48.4011 (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: VWLAaOhm8nGABZ0wbkrbPqU21xQYZYZXWw/NbE1KScX8sl3XAHbBRpGaYyax5J0SJ6btho9y01iOzWnhHqbwEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4152 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_BLOCKED, 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: 1772558763511006147 X-GMAIL-MSGID: 1772558763511006147 The order of function calls in sdhci_f_sdh30_remove is wrong, let's call sdhci_pltfm_unregister first. Cc: Uwe Kleine-König Fixes: 5def5c1c15bf ("mmc: sdhci-f-sdh30: Replace with sdhci_pltfm") Signed-off-by: Yangtao Li Reported-by: Uwe Kleine-König Acked-by: Uwe Kleine-König --- drivers/mmc/host/sdhci_f_sdh30.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index 840084ee72e6..964fa18a61a4 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -211,11 +211,11 @@ static void sdhci_f_sdh30_remove(struct platform_device *pdev) struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host); + sdhci_pltfm_unregister(pdev); + reset_control_assert(priv->rst); clk_disable_unprepare(priv->clk); clk_disable_unprepare(priv->clk_iface); - - sdhci_pltfm_unregister(pdev); } #ifdef CONFIG_OF