From patchwork Wed Jul 26 03:59: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: 126056 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp162630vqo; Tue, 25 Jul 2023 21:07:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlG8REb7VQcUk2VQ1o1SgY0oItB29Redyis4lIsepbjaWN/a7gZ9MkSHHjmzZlMORiUo8XPf X-Received: by 2002:a05:620a:15e4:b0:767:2198:b52b with SMTP id p4-20020a05620a15e400b007672198b52bmr780571qkm.78.1690344436399; Tue, 25 Jul 2023 21:07:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344436; cv=pass; d=google.com; s=arc-20160816; b=wdEzB7Mml5+EsxMsj/Wu/6gkgLyWz1L2yjb0ntV1AopWKgYXxbjDrvK6pITodYpAD6 jbWeyut2ukZFkXJ79DtUcNfQZqFJsL2c1B+pra+b0kS7d42x2S2HnhpHRuRJJADGQXRH 2tCZlXwZrDmKlZ5dhWkzUrUOOFnQ7ADmVr5UBNqUSDuOJetjtzDvCcdfSxqHxZSzpseA ryl/jJSTc+Kb1u5ix98/9cswBdMArZBXvTjVgxYMHrRuKiTb6zscAokHlB4Xxh5DruRO z9iV/q4KmIh/UWImRJHorEc5WriDauVWQ1E2OnX8K/xG4Jf3110W7+YgluUqXIY0OHGi DLFw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z18-20020a17090ad79200b00262e99964bdsi500432pju.99.2023.07.25.21.07.03; Tue, 25 Jul 2023 21:07:16 -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 S231467AbjGZEB6 (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_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 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> 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?q?d5/4socpRjLIihxLzkLhVUsrk4jS?= =?utf-8?q?DvV1JzP/BejVD8b0AEGr5p97mFBRPKmHDC6Ae+RMgVQyLyyFPTayKn9Jr2VwLizf6?= =?utf-8?q?r2FM55MobwRyCUEVdFJjDVOK6rIFjdOf0KJXtp7sYwU74fycKsZcR+atwVAbvT0VO?= =?utf-8?q?wcg3OuB5Pu1/uHnfmjO/t60SOJ77NpLrzhh0vAMG+omWb5cgSui2vM98zPOuebmGb?= =?utf-8?q?miCHIfUO/TXrO2ZqIlqgBdGIz5bTjwn4cDscs97Y6rcJEZ4MiJz10W95kHZrwRAp8?= =?utf-8?q?2x2ESqmunF/Y9pYbrEYUaODZthSJQEZsh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kQd7TzblWeFZPCbabLpI23it24SLU5MJ?= =?utf-8?q?/SHyN9nd3Q8d4yf9ELbzHvNuEpfEDML9YmrwG+uR1YA7e54VoVfoFbuTTNQDEVFMz?= =?utf-8?q?X9yLBRlSTv9hKMk8A89HULGoujk7T38OCoaisnL8gho/AE3TDgxmanUpN6XzfVz6T?= =?utf-8?q?STG2y79+QfPpnISDFKfHeAHXJ+4hFxAFeIBjz+vguGgwN0JR2v1LWp35NmPwpEdQW?= =?utf-8?q?m464+7aCJIn8hmcMLVF1Ga+Dqp0ey3R7Vrdbm0q5SHrFGaWxTR2xpFEb31Fgaa0BU?= =?utf-8?q?N2MbNGC/Mv3p9s8VPf/65bpw3fuabphvQwrUYkHaY5QAFKhSr16YLi/mYBxlBYjx+?= =?utf-8?q?1pXPDYBlR4v2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 08d442b0-130c-4a34-4066-08db8d8cec08 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772454607644990005 X-GMAIL-MSGID: 1772454607644990005 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,