Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp816364rwp; Thu, 13 Jul 2023 01:11:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGwBAOM6E5LlDWs2MvowH/D9OB2FOlTjzBPYw6CP7OAfqvQfl6XxJ7CXXeJ6o69Kufztt0F X-Received: by 2002:a05:6a00:855:b0:668:73f5:dce0 with SMTP id q21-20020a056a00085500b0066873f5dce0mr533418pfk.29.1689235874676; Thu, 13 Jul 2023 01:11:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689235874; cv=pass; d=google.com; s=arc-20160816; b=QCyUM9MgbBJwpSO7Jz0TwXiU8DBdXRvn57jut6EZh+SyDrVfpTBeJ5gnyaJOlN9gPp jtx42Br8t8of7XFR/OBTbpuN+kf7Lx94RxH25jThq6aGCBs/IrZVfnu57Prvn7kTsxss KYXBW8PWeT9/Fnn+FB8e3brmHicRzmvGcTN9NIAENS5T9S+ELu16ps2OTckkVQcrCY0f JRrmsAeEbQe1Q8/ekIrXlzKI+Ca1OhyyhyvdVoqQrfZHgbAxH80Tf31fTM3OLDPovmA1 FCCjlyonrPzNJxIMRcTNIzQKmW8v1c8fVW5eTKwzUBpt7UvcBXjGF7pc8896DGyiU3VO SJUw== 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=1raQ0367OxAGgkvChHBq/pbYLsJPiLq8qCsfVZ1QcKU=; fh=3lxePQ8lC/6W4f2E62pbw9rU36jnfhYwF2zv17uKEhg=; b=VH/dxauvzFR+tQgo/i/Pv8sVD5QQlQEDvvZYayDgfCghZJd23fiqwJMInQNqoyx2Wf kjaSs36dnFnofr9ZbuCHuxMJug03Y5ijWWve24scPISheWcuTQfNr1VuH31CtABCKnYM IG8n2VRmXpFtcbnNcsviRF0BSwIYvbLpCH54BSG6WHg61zACAWDKL4qBhDcqBCTR1svz h5UOaS7WkWof7XkQFWaKPmx+BJrOhZeiu8CoQ9zXPbI7bHhDotw1UsDZcZF/28vSjguT KgWUNH4Y3uVE1xHl7BWYYwoDKNSkPcYqM6xEh7Oa24DOlVKe+fFuZoAwY5WTiNhv4Ycv FwXg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=dU0lQsCG; 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 a6-20020a655c86000000b0054ff0049d08si4685178pgt.404.2023.07.13.01.11.01; Thu, 13 Jul 2023 01: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=dU0lQsCG; 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 S234044AbjGMIKV (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233843AbjGMIJp (ORCPT ); Thu, 13 Jul 2023 04:09:45 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ED4B2735; Thu, 13 Jul 2023 01:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KRekJdXKrbUA3RkD0Ix6MV+aExOMQSGtEbcq10l2L23fIv1RmYw8it/1dk0pWzY8plMd4aHCYqq6XxqSuf4LMiROnQBISWrYSULAHiZMObPUGEdkvGM+orp30OR82ADoGK/McriiI3HwOrzowRkYfFIPOjqP6hex0ko/ICSJ6AIxX6yFu2/7uQ8HtLC586s61lgV1iuaRCnIQOuEbA/mCczfEWJQXoeuWWcj1Gc9isJVPJC/M87DcnYApUqAJC9noSDfAOo6oXYZNW6M7ree6ehSjd5ahz+e8mri747w1+bEPpoQHLSEUS6Z8vQSJtk80JAcoO7HVr18q+6ggWiIFg== 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=1raQ0367OxAGgkvChHBq/pbYLsJPiLq8qCsfVZ1QcKU=; b=mXejBKsIyAQmOBNTR8jrpWRRrAMGGhJzMIY/UJH6mlhi1neJGuocXjLM6ylgCcacqKp0VQBNofcrqwe6U9MET0S7pc1xC9rrik29k4XzyvdqlaJczmr5oeLxPqSA4vjILuCVbBuKV+iD4quDN9GIvCbXRpTWP2mBPoDPmPfeAUNWfM+SQOJnoLl/6IG3pCqUnbey+DDXVslbxGZ2M2XjZSUB+jo6rBAODt+YQ/1yT0ML9d5IM/nhv4DbCjsiE+C3K6aOjf1EFNbgdZpvql+TSDCI+hhi8yMBP8KocwZTVHQmge2NdBnWvNDp7csNfx8lnNm+DLKI8YVsot/gUouM9w== 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=1raQ0367OxAGgkvChHBq/pbYLsJPiLq8qCsfVZ1QcKU=; b=dU0lQsCGaYRGqVyRBTe0NLXMM8kE14a/c+xj/PP8ybdFN+CcF0dcD+nRP/KUf8AKnJeKhXGEzgJ2In5JyiaJfSVh6bLOMaFnTJxd+4dsuMDOdsDtc/wndizKioDN53oIz0+OP6JKVJu0R0SU/61nzXxXfrfUmOH5gswvru9uUxuSnl1UDTdkvrCH+OBB0cmpg/boaaxzKM+fl79tEGQkXQmrYCUKMJwVYjEDtu96owVftueuMB65UvqA5T8BQjy0pLYX6LXj95ZHa+xq6hrseRGMzP6Wlv1O6rEzS24XpiZLaY26YoqK4209sxonmepQmbOYCdY61IpjcMKf/kCA+w== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 08:08:23 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Thu, 13 Jul 2023 08:08:23 +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 02/58] mmc: bcm2835: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:11 +0800 Message-Id: <20230713080807.69999-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230713080807.69999-1-frank.li@vivo.com> References: <20230713080807.69999-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0091.apcprd02.prod.outlook.com (2603:1096:4:90::31) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: dc7305fc-47b7-4218-a401-08db837853d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YbFkiwVWkoKSgF1d3khTJT2t4/Ar3T0ZJywFGBUTZqACTYpOVJJ4is/VvqJlDuFfZlIThxAmMsqe7sEndaVwkXmuY+UQ2AvFMTOY0D0COmrzwmWbAHy0xAnqxtQDIWplJTIQIt1FUKgT3NkC7YD3K+uZWjt1wpaAdaIZ3TWVbcLAtf3fESw0/7jNDh9Bc8wKNunxHabzu89nnbm4e6E6VIrH03931Yz9q1xmk2V2zdLPWwQEKfPj1y2YtE7yDXTwB80vC0r0wgeXG/wV7C5GXhfp/iclLyhNdvbnktMWCNVrtQqWLHoro9SH0TcBlmvOSrzHxf/2eqmP6Vnb5Y88V+au3CrNMXoyo9+pKFAtFbG0FDBO5Xif6fk6cWdrkapAMnfasuelREKFrhl+nd/tazBd+6QNB4+2Uffv6pSvSPE8Bz271SuORXBgOYJ3LJIkbQSvh+CVxiSNq389bm6P6qEjVdS1kVZ7h0lDShtF8qbHyawRxxN+0c9x76uX/jehHQbC2Nw4xb9/5Bh4Fr0rsIZjC1CcFBSysn7LM9TXl4LvNIPiUniX7KJbPfh5bpDgiUye+UpTi9Xcoiug2IEbD5ca3hZEPtYjxjKh7YKfHpd5qfRlewi8IcM5BTaFup0bSB62A1I6wekQcn5qP4WgNxN34Bx/LzvrPHRVNGtqYos= 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)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(110136005)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(7416002)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OFN3cGp0Rm56cXFSUjdsWkE4a2grVkNYREtNUXdWWDJ5THJDTFAwVjlQbWVv?= =?utf-8?B?eGhqL2dtWUJJM3l5ZHBjaXJsRWNoNk1xSlB3THUyUlBGR0hhaUthRDcrd0pY?= =?utf-8?B?WksydkVJaytVNVhkV2JGRzZRUzBabDh0cmhYWVZRNTFYWlo2aVgrR0g3MldU?= =?utf-8?B?OW1STCtjcit1NWg2bXh0TUNMWUtHNEI3QlZwblNQWW11QkkrMGptV0lZRWQy?= =?utf-8?B?VXpTVldHUDBNSVFRcTROVzIvNkIrM2dsYXdMQUN3VDFOUkNWVzlVWVZEcklU?= =?utf-8?B?aEkweVFwWVJENUZsLzZNRmRHbVY5VENBcWpnSXdya1ZIbmtXZkREZTBtUU9w?= =?utf-8?B?QS9NUkR4NUg2OTNMMHZwOElac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rossTenant-Network-Message-Id: dc7305fc-47b7-4218-a401-08db837853d9 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 08:08:23.0640 (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: qexXGbKL66gAmMci/TcD+sSOpP8kXThM5D2QoU6IMVzhJvg7pcDpijdYbjJh2fegMQ0dqC9v20wuj9lrPqgH7A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 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 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/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