From patchwork Thu Jul 13 08:07:11 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: 119634 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1677041vqm; Thu, 13 Jul 2023 01:36:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlHy57We2fjDtBzCeN6eFn7F1/8hFOa4cAeYdXJWXWoNQLnI/cUNqmju6r9HHdos/oNfS/YS X-Received: by 2002:a17:907:505:b0:992:d337:6e44 with SMTP id wj5-20020a170907050500b00992d3376e44mr712863ejb.58.1689237400881; Thu, 13 Jul 2023 01:36:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237400; cv=pass; d=google.com; s=arc-20160816; b=lWfm0QZMXHGBhojMA3lq02+DgEiAT++893K89uSz7PWHbW5LJvlXpYNidXVMmtEr+o 3UWMGio1UbhaRFt6fGycjb5jMb91zkZntWjSxEnGxQX4CcjHNBxtuT2oIq0/7VsilQ8Z 0IcTbQehUOaBr9fts8yKkm3FN8xH6Q50apUy/a6ntpxg2Xh2qZt/4Kuu7VsoHAmKlWJ+ txJWVZgRu1NO6MVRmrOaTWzN0i7HoxU0wfZTO+xMFpbMK4UQ1b9qFBkVIY53c0MsGBtL J0RcIPS47Qo9WY86ZNoGL6Or37mEqBlG8+AT5NWilf3V5IswX/SET7/KMvYTdgSGqVd6 lLRg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s23-20020a170906bc5700b00988a6421830si484957ejv.979.2023.07.13.01.36.17; Thu, 13 Jul 2023 01:36:40 -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 S234048AbjGMIKV (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_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 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> 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?q?8SwpjtFnzqqRR7lZA8kh+VCXDKMQ?= =?utf-8?q?wVX2yLrCLP0V9Pmeoxhj/gmYBI3yydpcirlEch6MqJPwLu2RPFGHaiKaD7+wJXZK2?= =?utf-8?q?vEIk+U5XdWbFG6QS0Zl8trhXYVQ51XZZ6iX+GH72WT9mRL+cr+u5h6mxtMCLYKG4B?= =?utf-8?q?7BVpnSPYmuBI+0jmWIYEd2UzSVWGP0MIQQq4NW2/6B+3glawLACwT1NRCVW9UYVDr?= =?utf-8?q?IThI0yQpYRD5Fl/6MFdGmV9TCAqjgIwrkVHnkWfDDe0mQOpA/MRDx5H693L0vp8IZ?= =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-8?q?I+kGlG6WorzbMxZYP8AJsFDR3KMw+cWLXl70h4NG2i+AF3MCmD4f5e0PiIY29uuzw?= =?utf-8?q?r60LsVQsmqx3VN3Jdplbbe2aMhf2Q5MLtVxdgEYquOgin6vCI8xEUkCzfQSugJ9Vd?= =?utf-8?q?FmFg0KA2BgDnY3o5PSBLG7TKFk/coX4Jsf5YCulFw+x7JdaoBfo+6f6QHJeDIrA+H?= =?utf-8?q?YCQJEUMtSyjrPrewse9usLI8y4OGbwgkGu+0HL+HHRB1Gy5ncVuvsSi3VHiHeBBM/?= =?utf-8?q?b0yKvDBvk5gVmEMeDMeRWe098IgQANarLCs1BmJchvrZBeJliH5x5wUBI/O4F0sJj?= =?utf-8?q?gpCr8xDgwMzu0MpMnD6YfJVfPfwtxX3eyvjN77Hwivesbuh9SFOYJHjdmucpqL0n0?= =?utf-8?q?V1JQnkYrNvtY?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771293797063587945 X-GMAIL-MSGID: 1771293797063587945 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,