Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp562065rwb; Tue, 25 Jul 2023 21:57:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlHuLhVuSuDikf/lXTyhhMHxx28abRfNburRWgX8w4305qVxEGu6YzCWDLx7KyrxMT8cwJ1T X-Received: by 2002:a05:6402:756:b0:521:d770:4753 with SMTP id p22-20020a056402075600b00521d7704753mr548331edy.13.1690347453948; Tue, 25 Jul 2023 21:57:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347453; cv=pass; d=google.com; s=arc-20160816; b=sZEWrNOouk7ibpQTetImAqn1zneZLSkkhAaO9gTLnFXC2wF1ejwJCM2pg6NTy48liS 4TOO3YE4MsURddu2h6VngBUJ+YGQ9DDfQEqrsx7Wj4zz7sQG3FKkdpzyIQYACZyQ1JBT svW7gOb7cacwTSGbQs60BZLosBTBCu6bMDmPYmqvn4fpDtAd2hYw/O9q1kZ9Lk7v03wZ dQRp8WHiKKNJJlY9WvDvXcKOQYTKWvp5JSxFLpCnGBYVA0QaMQQlJQ1ZtKIvTPXxVAKx bql+G94OFMYPvdfi1Rt5gce2obnI3mxOOikwyfu8Qbh89avjjBxI/9dVoCxLdYJlpYZ3 B6GQ== 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=Ar1WIk6WbxBtMloV4TWTy4gSQZlnyZjdEAQtF57ZkXBNCEfC7qHW7Wjk31CTGgpiL1 oqvQneGJ+oUPmAY3VYMcwMrnC+eWGH7utbCRrEKKFBf3/jMtEVf9hCJjgwWJhiaCoV5o M5MFuw1ZyB8GiYpZMSzrtQRXm4ClgzO3Y2vL7g1EPjNefiroj+bLhn/4210avmi5MGC6 3rjKC0f7qjHVZe7sf7V4eV/Z7cUD4JYHiqp/y+E0K/B2EbOI0+ykDNQ3SGir6wV53YOz jMDjjwJIgls30OMnjq/3sYFn0G0vqL3O9TvZkXXci7C0ZPdzsj9eGcuoPDLYB1M+ExNL 9d4w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=EgGE+KzC; 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 b11-20020aa7cd0b000000b00521d2800f15si9297373edw.519.2023.07.25.21.57.10; Tue, 25 Jul 2023 21:57:33 -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=EgGE+KzC; 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 S231388AbjGZECa (ORCPT + 99 others); Wed, 26 Jul 2023 00:02:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231340AbjGZEBa (ORCPT ); Wed, 26 Jul 2023 00:01:30 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04D33269A; Tue, 25 Jul 2023 21:01:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c9X6JJstVeMIx1NYbrC4WUzNYBgnH6G2ZuUz7oVfQO8VVUhW8GFUMsZlqz3EdopbP5IpvYgf68hABT+FNEcTOBsakh6tjxSQ878SQtChvqg9COlCQAD8CPjrE5Po22tiH1FwmPNYbEpcoIwsDrwuMTun8BhJsPn6eDPEAlDS2BoTrBGKvYW9aSn7/brBcvimQHh1eOydqTSXh+k2Aoz1rwU6/45JabFCqFydDCZjNWPUgaKM18NvBI3b6rKbaA8YJ8X7kXas+oyEjWMFYSayZdokKbm0ia+2VXOlZ/A3LK+aJkHZOjiiVJFsuPfGvtB1O3GqVipX9XPrYXJJYJkbGw== 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=iadOem73v7RXXT/6hi27s3h8fcc4guU74W62GRLpHjkuP17OCDWV1Sl9DxiugzTn4FDV+XjId8t2fkxfLqPn9n1IM71cCV7jaqAUMTzVS6PBH9hBGg39OcFNBjw7Y9NQziy51OWIU1uv3R3ZieLs4ofpPfFqcvmIteGHV4NAwPk24oXGA6Aja0jnqF3/WmaMMHKTIa+XiYZYSrpnJAxKAnLgyaoqudRB34l1wSCEetzamzm2jd+pwzRFgsWosgRP//f8Hb4J8a33cGqF9dn7xerf/f06cIFGbfzTgT40oiUyLVDkHsqOSLK3itakMZKKc5QNf2yvcpkXU2YqsJR9yA== 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=EgGE+KzC+majlwTJi4W0ty+AboVwpEOkkZbYHUc+jjbXQ0cOJzIv03jjWzLeOc0tCxdVXWBzvFtbqA7Xcs61u5mr75nF/WOCDRTOgh1feZ6FTM71E3izPiHpn2NRT6okr+8XidqT07ZKf6FgM4r4nMI2F/8mPeTw3YNAf/sb+gc2t+q+dF7rAVvsxORCdGxf+yrdAjtnIiIJiSAQhv3P648p6jDjfa2QcFxdrmCKys/ojrZsKsx2ekJS6+wWUA/eK/JrVkRuEFJs2XTMXKYp55FUwIShAv4YXAg5ERX89oEAMnGJsQKQ7/GmWhiT/l5OrFijKcLCK0NhmB+7ZAzAgA== 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: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; Wed, 26 Jul 2023 04:01:20 +0000 From: Yangtao Li To: Aaro Koskinen , Ulf Hansson Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 13/61] mmc: omap: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:53 +0800 Message-Id: <20230726040041.26267-13-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: 617605d1-6116-43cc-f12b-08db8d8cf808 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jW+iTGM+43YsHqyvCaCon6EC6NKdNIjHh+0GRQRWyLRMuYL9FZ1jJFAY5veImEP3Fzn9ELdytPrh+ucRAbyETUied3OblbXgFL04DURd+c4eYPF2s1/fxVz95ZgQku6y14B5Qr5Za+3WZ3yvV9Qp+aSB8pR4xqo2o+FP7htrFqqcNKq0VMC1RGm8FbgNpAAROHnxi0bQJjYuUuHTQ+1PoevCBtvd/UT62PRw9wCF2ckg16g6bCw9BtpmtfPzwmHD72adEOXLXvVVQUvQrjT2+VccPqppwCgNu245f5TcSafoOTRTCgz3EcK3+Q7LJh3AVfEqPC7QXdcMtxR89m0971ptG1Q+iqHuRY+L1VTx1mUCmnCc6RRt+UbUAjMfROEgxMdiX3cpeyV5QZvE5g958bzxK2IsG/7eVypHKF5b7sU+h6iAGwEW/6WaopMDPIwxTCZJvOd7nPmGwp5tu9tGvixyUAi82gQSbjUVNID8Baw4dIXChaXQb4BS42VEp8SwBzu/mrlgbodnJ2nrIjg7Rn5xyGcCvhtohpB8bQWdgJEyln1Z6Dfq2Yr0x9wv1QFvR+vKb78fHMU76wJMWnrjiocSfGl1jzh26h9sYzo52LxjgmEMV7fGWBjxfsaffbeY 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)(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?NDJ3NG5TOUhmcWFWSGxZVzRMbkJNcUo1RXlKODBwN1BNTWJUUTFLODVINW5H?= =?utf-8?B?bmxGbE1WRGhCdkRSbXFDSmM0L0hFYlBxSUgwSGlNQXl3TWpKMkVDK0NIK3Zn?= =?utf-8?B?L2VaakhRc1MwN3lpM3psVHJCUENDTUxxeXdaaEMxRWFzUkg3cTdUR1BMSURp?= =?utf-8?B?K25IMGtGL0UwcUtDZm0zZ0krckswVld5clY5SS9nYmRxWDVRajU5cmJZZ0pp?= =?utf-8?B?T0YxYmxPTXg0ajV4eXIyTVQ5QWh5YWNXNXJ2VURmdUtEVThSaGQ3cTRiSjdM?= =?utf-8?B?UE1sUHpiK1A2Q1hET0NyVUVnL2YwT1YvWFE0ZjNXNHN2T0pTd281VVV5enE3?= =?utf-8?B?RU5JWG9wT1FCVEVSSnVDWk5hZzhGRnY3VDFsU244c29MNHlxdHp6bjVELzBr?= =?utf-8?B?cHYxY1RGZFdJc0xpeUJMVWhyRm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apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:01:20.1025 (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: YpqvNS8WdZ/1FbfJR8LTNXfYiY9IQaddFbjszeo/fb+B2sF+TZynsdW5VIUEiYb48ZyX6ZzXg0OGWmvOTvfI0w== 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/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, -- 2.39.0