Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp555757rwb; Tue, 25 Jul 2023 21:46:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlFGiyVXofNT2tCYabtKCzAobCMJG8fJg6D5En0u5IwY62N8P9Ly7oHHHCKH8Q78/keMfmZQ X-Received: by 2002:a05:6402:6c5:b0:522:3b6e:5f6a with SMTP id n5-20020a05640206c500b005223b6e5f6amr700240edy.29.1690346789954; Tue, 25 Jul 2023 21:46:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690346789; cv=pass; d=google.com; s=arc-20160816; b=ILWTAuQA8jBYXPc/QpEp/zdyRUszXW74o5v/8KboFPIupGNibp0bMlWNeeN638tHB+ Fhk6vb0ZB3B/wtClGnYahjdnpTHJXueB5eDNz2xfz38KCIc0PTlyiiOsZby1nU8xK8aM U/CPdC3CGKjcCNHQ9Z4+LXN2tcfa+R8IUjq3Az2XvDauXrX/EWHvxzgSoLOygEOZlZFO u3yAra1nsJ/lEJeKOpvbxQZBkkBmo+zib7Du08Jd3ExhjERsXd/e8UStXL3DxVK9lBoj GUHz9CLNKxiDlbraXYZD5xgvzdK0kLnLw+qNr0iJTpPVyqpSXlUDpIdh3HFJZEZejA6Q KEhA== 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=3lxePQ8lC/6W4f2E62pbw9rU36jnfhYwF2zv17uKEhg=; b=sAImZIZ31QMVDLCiTV3/kMYhQQ1aWUrT59+ppjhXaVCQfIdulgYw23mDmUj7DpbA/b pYjM9iHnhEJucwYE0OUCNccg+SqlNlk9g5G3PfzWc3J6V0OaGx3A2WQD5sykj/fr9yY5 yZ78Y+BaqLC3n2msr+zgPV6tkilpFZWNEtzX7wPH73dKhIm/q7VdSDG4i2ZK8LMl2qE7 49yyqw4aqXcJYoJM94wkGl4k34iDwd5WOvvVm6UZzUZH6Mw14EUW+/XjpBLxTqPtHT4M 3p/glEIs0Zm9NV9XEjVIqgLsUEA8slTKSzSv/WQnrIFoSWipHZ3YTehrkO+mSFBmx22X QUDA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=NruAjOg3; 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 r14-20020aa7da0e000000b005222a4d1a29si4554096eds.292.2023.07.25.21.46.05; Tue, 25 Jul 2023 21:46: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=NruAjOg3; 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 S231462AbjGZEB6 (ORCPT + 99 others); Wed, 26 Jul 2023 00:01:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjGZEBG (ORCPT ); Wed, 26 Jul 2023 00:01:06 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A857268C; Tue, 25 Jul 2023 21:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fh7YWxdKOALah58bnDCmiZ2sCI0qE/25krITgbQQb4JAyj3GqXK8aPyU4nyEmLtnMTeCavsk3rANyBrQcsK0ZWx1I9IVyBz48owFCUA9x8G29QZfyzID5LaHg2AnCiuVGpSKj5go3k4rEwjPcYokxeAhpao+NmYNUkO8eTf/gofE7BQgzT9Z05d3nIwbojHxygbcn+jXIDkqcFSbB5ilgaSnfO3CRHderFZb+Zb9PGZ4W4LVl2DkTo2ANVIdJcaVlYWrgLQuWjcDGrZM4wYUkn0JfpHSAzowEu1+Ae4wDuL4c3679V+VjhQthGG272zYEUqk0CrZ3IR2bLTP+c1P1g== 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=H4jErh3ybX48QhlrZGay7/tVz0PTb27F+7xled3A/i7z0trUt+foAGzgFRlAMtaK5dRWbRna+1KuisEphodWakE6edWCorXMrwaYWpXr2dBGa96jzmqpYo+ouLPreUF+Jj4xlpM+/DhZM+4m6I/pd2O6rZYID7LgJP+CLAtl0+uEUukdeOuFUF4CpK9Z/eRHBEcHz1q0s1VkZSLlPlMJqPo2o9/16QUaNqe5rHfgRKLCOA7vUohEnHVLNJ0ETi36HzhTPWRdkwrXAzKWo35RcpwAo9weufSTsHgRlgwOPg07OeyxQdevXxmyIeGMXHgHVgs7R9fdnA2o5xZXrjquWQ== 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=NruAjOg31qMr1XZqENKd9LE5/XDm4XlRqoNJfmhdPRF1bnSwe5GJdzQM/Nc3Nf+L9LtrWG5B/xQIbEwjxr5eDNQ7CuXdz3X9At2qfUltF0zlhMxr2BfQily8YvminzhTDxyVPDBUYhJeI1qHIDEZzyo4P9NMwnx7If7IetvdFLWezCTXk1R2+Il4N3mFZ0RGAtmLmD+h5MBzGeIRVk7FJ0lyaVOS/ZgWm0diqX3AX7yHiIBkzT6jZmdvovrHylAbi/Sge+TznqDqalGuZv09ERqrqmzaL/MXWW3NGpsgE6TrjO8yP8TAi06p0OxqjTiMReFJY2fR0MvaGHjfsEeQSQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by KL1PR0601MB5463.apcprd06.prod.outlook.com (2603:1096:820:c3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25; Wed, 26 Jul 2023 04:01:00 +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:00 +0000 From: Yangtao Li To: Ulf Hansson , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-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 v2 02/61] mmc: bcm2835: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:42 +0800 Message-Id: <20230726040041.26267-2-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_|KL1PR0601MB5463:EE_ X-MS-Office365-Filtering-Correlation-Id: 08d442b0-130c-4a34-4066-08db8d8cec08 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R2ZWFXdJVmAefUSR8IGC57U5g3OJ3sfLkfxhxN4uMM4Ycdi8iAxNNCeuAK//v/U/jRvrXFUI6K509ELVKTXkiFLRFRF5IlrMsUaoQkRb0EVk7YFTntX65az5AaMrFUUPDQPDRhT4xqthid40olHSrPwkFEp3+XQMCvrsiDpH4i6OGBTv+BuIHRendPQYAx1YK1oJMOPq96OimaA6qCuHLMhrpW/ZY5LBu96CbkS3x4Hkz7GbMtNoZ85iI/kKNJm5zx6xb3CYGJB1+kiq/d/7j/SQJHGmb62biXrPSMFh3nZEiVke2hQZkla04msGuXlE/bvPo50HuplaU0OtrhQsSiIjXcaztQMqjw+wlTywyCXYWicm23/GRcDvfjoWVIf4aml0s+nVNbmfDVGwRuaqGBicFJbRJIqwmrdO86k5l3lMd5xphE6Gyym4u1Hb8I5S97rnuuBq7KLd8W7ExTUpVqCA9UI9YXgSA+cvGj7jWnFl0JgwBwGSW1gPpF7r4ub7WrxeuoP2tm0nYkOxHCZEBtDzgkQZE0Q7u1zbN5H1qtCw3feMz6zDVQFqVlSxYVCviSir9uJA34FkQQzjwc/T7Fdi+KAxdRGeG4bGFxhKyolNySPnIUmiTi8fkKcHNSnn X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(39860400002)(346002)(366004)(376002)(136003)(451199021)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(7416002)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZDUvNHNvY3BSakxJaWh4THprTGhWVXNyazRqU0R2VjFKelAvQmVqVkQ4YjBB?= =?utf-8?B?RUdyNXA5N21GQlJQS21IREM2QWUrUk1nVlF5THl5RlBUYXlLbjlKcjJWd0xp?= =?utf-8?B?emY2cjJGTTU1TW9id1J5Q1VFVmRGSmpEVk9LNnJJRmpkT2YwS0pYdHA3c1l3?= =?utf-8?B?VTc0ZnljS3NaY1IrYXR3VkFidlQwVk93Y2czT3VCNVB1MS91SG5mbWpPL3Q2?= =?utf-8?B?MFNPSjc3TnBMcnpoaDB2QU1HK29tV2I1Y2dTdWkydk05OHpQT3VlYm1HYm1p?= =?utf-8?B?Q0hJZlVPL1RYck8yWnFJbHFnQmRHSXo1YlRqd240Y0RzY3M5N1k2cmNKRVo0?= =?utf-8?B?TWlKejEwVzk1a0hacndSQXA4MngyRVNxbXVuRi9ZOXBZ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db8d8cec08 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:00:59.9743 (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: oKrN8aINOvnirejrfeB/CP03i+jJQVk/0hkfLGw67uh4vWaqfE4ZAg7ksyG6kAsfR6NmlOXisYKBlAzz2iHSlw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5463 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, -- 2.39.0