Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp570647rwb; Tue, 25 Jul 2023 22:09:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlH0P0WyxEAy+PzBWGLRTIb3gc/4Shc+aRdCVwPa7F/eRIPhe4S5QkR4BxeLVvpTkTx8o38S X-Received: by 2002:a05:6a00:2da4:b0:67f:e74a:d309 with SMTP id fb36-20020a056a002da400b0067fe74ad309mr1089457pfb.30.1690348162013; Tue, 25 Jul 2023 22:09:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690348161; cv=pass; d=google.com; s=arc-20160816; b=0u+f5e/ZqCb93ODanjKv32ITEFAdSPVOtvQYqCe1TPQ+rouNn6G1WQqenesO7RIVzm YR18Tj8KChWbB70RXXHxdWQr1tj5GmZWspD1Py0KM6oy1iaL1oEtB6NfX5JD8jx4DKsM YWoIkCmuU+IqVibUUNcuH68ER8JFpHIq/k/m8Roesh88CvtXrsdlK8y3To+Y6ih89/PU +CLGoR2G0eqbvzsupOmYrvrvgrizv5fZdTBgzygRip37EznZPOmo91gOa+snq2uDfHYM CcRhpSpmzV+wWIvetzSLFCFGPRo9DUl9MEHNEJ6RKd6IYmepbbu/nl7WWiIdsQ0AY+x4 ATOw== 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=ocazOEl168md3fKmnE+ByX18CMvKt2bGMpu4ORckiOIN3x+vaaMfF0mLIORVybn8jn nLap0lBHSrPzefg72A1pEHmNym/dNVO5OrwYsphGEDcpedGAaC6BJ7Mmnt4asdMWV4+x /RBCeYX8+haRgXVPxmsBRb2i6yqYzqmgVRVash/BLYedo1uzJR0/jUWEywaWwpTh/ikt mE3TQLuHJZ9XgxDv7rVzJU+XF5St7B1NW+TFaPoL/oMzwLhe4MdzUmgq7hsWyn6/4rvN ohnNjlt4jp/TkUKYP+aMVBUSnHdSSaxdcyI+2v5b1sJASS2fYfIyi0yhjg7iRPBT96LX y2hA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="fFKKS/Gh"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fj14-20020a056a003a0e00b0068208d19b23si12826484pfb.311.2023.07.25.22.09.09; Tue, 25 Jul 2023 22:09:21 -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="fFKKS/Gh"; 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 S231574AbjGZEER (ORCPT + 99 others); Wed, 26 Jul 2023 00:04:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231587AbjGZEDi (ORCPT ); Wed, 26 Jul 2023 00:03:38 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2110.outbound.protection.outlook.com [40.107.117.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7E684209; Tue, 25 Jul 2023 21:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TbXHsr2SfrsSqt8WFFzVsKTLmWka5EbQGRRdyTUbYdKLAmMJygsII/haJobW2eqAzW0X/pVApqgS/TAK2BLBcvabdDAz7uhecmkFUtiIDQj1mF31lhc9DXKNVEjDtvRWqxCDdDMBrZQszmjw011dfcLH+LvlXAn3k4hc2NRiyXMAu83fWTNzqQGtOR7oK20KB/tvRMEDgC4w64MwNFzePDEF1q2rP/bhuUFvOzGUXiRvdj77g9mH4hsPt5BU8fRXm/Lcz5TM7fdZatBaePJO+wZu/3sZs3F/auzuhVeK1+wDGZPuz89L8E2zJo4tNhNjNq4r3VE7FaCM42C5UjnShA== 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=MjTZu5C1PBdfXLvYrzWVmO3hnIjkGj3YPmW4f7q/kU1ZE0VNDajI78TSXoRwcYHeQLjqyoZccJrsX4DkHgtH83mBbDbyqYkmm6+5OQr3QkRgjH8F4O4YYrqXjap1KemVlIp1tdD86rqoQnnvKISc8JkBpjFPNoKmcD8PwMKurUrQKUYwmslS8EQg8oFlcpOUo8JSYYp7I5rnFd56j98o7v8hfr74gaBWOpeg4mz6qK4+cNefifVzrPdd//f3JC4O1+VxFpMJUi/0QD7ElHxk+SX/qvt6QYaAqRnZzQzck9Aqp28BZlCSJCbVuyP3Pt1K3xYRafALwn4328oytaS/7w== 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=fFKKS/Gh5hmWJVZfF9P+zbvtcMDVZJvAxjqBdHxyoUGsIL2ib0PXmILaZiDYGwLPhgjvz1HxEOqa63vr8Kh6895HT9dxB676mllcCWKcSwh9uuSCZV02k2z5YaKeCIfKk3NPqvwE5aHSa6NVSqo1s3/rJOe1CZyxAXFITWI1MRt+bsuqNy+nXCLEhFosfDY7ZLuWixLZ6UoMqDeNCjOlB70yUkYhuXcjLK8RFmCuxzACmy4Mz/MPZF9WKRLxx1f+DfjNFigFB3tvUm1dhfArUDsZOd1IzULSLlJ96543kbZg29ocwVVKB+tiWwV3cZjRNedrWwWww6+JPDXpGh3WbQ== 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 TYZPR06MB3934.apcprd06.prod.outlook.com (2603:1096:400:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Wed, 26 Jul 2023 04: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; Wed, 26 Jul 2023 04:01:31 +0000 From: Yangtao Li To: Ulf Hansson , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-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 v2 19/61] mmc: meson-gx: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:59 +0800 Message-Id: <20230726040041.26267-19-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726040041.26267-1-frank.li@vivo.com> References: <20230726040041.26267-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB3934:EE_ X-MS-Office365-Filtering-Correlation-Id: 113f54cf-6a28-4450-3a96-08db8d8cfe9e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4i+GW4ZCuJ2TzDRzX/d6lVv9THQuNO3JKJaFjG9KKdh9iVRdWC8ryrT0P4Wkw1KyRjaQatkpZu7yM68LPtwyMqqeaftczL4EorImd+H3VxVbrYhWb11qBzZkHOfe1l44udzik1jJ/TIWT7BisLDZ0oERWWuXDcA+1uDcEdntYVL94CB+ySSyGLymfGe+yXwWzdl1FqE68nny7yy2m97XkoTsrQW8zARTOG4x+CEAhesrq7Qs932fRRQPI3zcAC7oj/E1IKkh/7N5gZAmbXbLtM3c8MsIUyEB80F03F9eypJCnJN+AEB8TI1cotVmocE8l3dgynX9EvNw7NxPp6MciUU2ErBHXoQKFbgm1Prs/lYAdkPwAh6kO7dFvY4EPKJSLSJSSGVRXa56hRRsP4NpXVglTqULCeRCumFo6OC7Ru0wO2eTIYv7p6wx97h6/WTQMlmaUmeXRfwRT0X5DpYo7AG995i0D7Py0OaTlrwvKTOkZCmWi/nd9xcF0mzwbjRqT6BIaZfHOjQZBLw/z7DKzP99ceV/qPOQjI/i4nAcmxuPCGo/jyAngXekGap7V8+JqqdKN9Hgyn/vj+lWU0YVHub1Nz4t5CS6oNuLdamHU8wbwnTBiWIoKZpDGo5NdGCq 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)(396003)(346002)(39860400002)(366004)(136003)(451199021)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(110136005)(6486002)(52116002)(54906003)(66476007)(316002)(4326008)(6666004)(2906002)(7416002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Z3A5cm1ZZ2FlSktSb3JxMS9qQ2dwU0xhRXI0QUF1bmZrR3VMNWhpSE5rZ1Rj?= =?utf-8?B?aUhjWEdOTXBPZERDR0FOVHJwYVErdngyVWt5Ujlpc3N1MVR0dEJSVUVaY1oy?= =?utf-8?B?NlkzbHE1dXhET0E5Q0daUmE1eXdJY3ErMExxYVFHMmllL2RRL2dOZUxrdUN1?= =?utf-8?B?R3FhdWV1MjZUQXJDM21OQ1BuTkFoaUxjR2U0NXVFMkFETFFTcVY5ZVdyS3lz?= =?utf-8?B?TWt1bFZXUGpVc3ljUmhJcjAvVzFrNDllTVlDWDNrNTNybXBYUVJrTEgwRFNp?= =?utf-8?B?ZHIvTnF6dmpwOGJyajhIWkZIWHBzc2pndjlTTWhkZGJmUGNScklQUHZ5ZjNS?= =?utf-8?B?Y0UyYjh6dG9iNGZvLzV0Y2dZMWV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exchange-CrossTenant-Network-Message-Id: 113f54cf-6a28-4450-3a96-08db8d8cfe9e X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:01:31.1017 (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: xuyG4YWJ2HTz7FBNxSzQWRqJxmPCStqp2IqjNbn0kK+npngC7Q3nxtfvLEnZMp7EjUUKH+0xDwE+6VuI2FbvHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/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, -- 2.39.0