Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp389852rdb; Fri, 17 Nov 2023 01:32:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaS6CE49Z9SXQYaf/++dOboOXXvY/Ji2EFWmPgiUPuLq93dZ5xHhlIumuvwFqE7bfqYM0k X-Received: by 2002:a05:6808:1211:b0:3a4:2941:af49 with SMTP id a17-20020a056808121100b003a42941af49mr26406617oil.22.1700213538309; Fri, 17 Nov 2023 01:32:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700213538; cv=none; d=google.com; s=arc-20160816; b=W9wa6qFO5H2qoEfQAv5tcfbT+0QjsyGy21mHR+d+qtjaa4dGKxiFYU6SPDY0jZG/Sc P1z1U1r8gmBVSL6qe5/D5Q1gTl3yHcEu4E8qpm22Th9c88Ha7ewCERsQPPYCNtqOhPcW y1PcJ/DtR4dJjhyRVcQazNV+6h4cs7TCmrRdxdP1kTryHeUk0eZCEicBKSLDdLBfVkUr GOkHd+jmDumdRv9oRem1jPQcZnwzvxpx5Dyc6g+5+BdVHldl99hDtfbOFOqQpTdJyLsY 3ejowWcD46VbhA1Neak/l/32GWmlQGhWcBxh3PwqWsE7marZKBepfav4/PcGEHSeoU9B ajnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=q6Ei7YPa8DQW3wDneBDorOYlp3zHfvDkoZJpdJtf6IM=; fh=fadTG97xF83RiBTNEclBtppjEZsM6JoLuRhcPgaF95g=; b=Ccyq0se4xvFKxuQnpkeWuJYZuu4MdCbkcfS2rT+ppQ77nnLb3topJZuFc5Oo0snlsD TpB4pe67pJyeyzNpGl+9NW6fO1RxHlgEC+MKbmdFtGDzk9OqhlQ/Bsxz9mvA7hHdBgpf K48GE6B5GLbJ8eFuLhyXO+Krm+1dJBP/kkCCStg6qMOrW4rRvK32scyOHnOvnFCJBooR 7lrr9MhE/7NS2Dp6v5pBBgR1HtwUUF9WkY5Y/NQvqn3p/SEgO0RlPblPWEtIxKpFspGq 6e5GtGZB1dzWDAq0EA4mlmNIQjQjxXZI4GK6NcOlNTd4v+Q61uyzZg1KzIJzyCAiyQFx o7uA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id p3-20020a63f443000000b005bd18d53c2bsi1447023pgk.885.2023.11.17.01.32.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 01:32:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4D59B807591A; Fri, 17 Nov 2023 01:32:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345831AbjKQJcP (ORCPT + 53 others); Fri, 17 Nov 2023 04:32:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235749AbjKQJbx (ORCPT ); Fri, 17 Nov 2023 04:31:53 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED0EE1BF3 for ; Fri, 17 Nov 2023 01:31:22 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r3vBy-0002WX-AO; Fri, 17 Nov 2023 10:31:14 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3vBw-009e8c-BG; Fri, 17 Nov 2023 10:31:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1r3vBw-002yjo-1l; Fri, 17 Nov 2023 10:31:12 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Kalle Valo Cc: Arend van Spriel , Franky Lin , Hante Meuleman , Hector Martin , Linus Walleij , "Gustavo A. R. Silva" , Jisoo Jang , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, kernel@pengutronix.de Subject: [PATCH wifi-next 5/6] wifi: brcmfmac: Convert to platform remove callback returning void Date: Fri, 17 Nov 2023 10:31:02 +0100 Message-ID: <20231117093056.873834-13-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231117093056.873834-8-u.kleine-koenig@pengutronix.de> References: <20231117093056.873834-8-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1742; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=cqu0rMxMpS5T9wgBrb7wDBn5AdxukCT6CeUHSM8E6iU=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlVzLW026t15O6rDRTnhHf2VesxOPdyJ0cjRAwE /I3vOTIPXGJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZVcy1gAKCRCPgPtYfRL+ TiscB/9nE0k+th6hnSCSHF+ocm6M+lvednacS1/ZZav5d2nJ14vfg//IUj/z3+txvIdz98wpixc h73feH/uue2zYL5eW8iLXh3vz073mM+9buKfY8yFJ9lHl4lrgxJpNYPje4yO8lBzGgpFVGmcRTC neBmpQl/MNVitv6mFWDfEMbcYEBpjInuTB9sK0Uoo0mtER558HdCM4UUCEBW27VJy5BgO5nXthj Qd6kLvIaEzSL05/9FyUXPJTZymCOZ3JSgAnj11S/Nxdhrh/8R9DwZE8mMnqGaUniDu6NJzZlD/9 sX8seMgnGzWiO763RsnXyXqbJVLjg72mIe7ioEkxCf/Kw0wX X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,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-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 17 Nov 2023 01:32:17 -0800 (PST) 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 ignored (apart from emitting a warning) 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. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c index a194b0e68eb5..b6d458e022fa 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c @@ -578,18 +578,16 @@ static int __init brcmf_common_pd_probe(struct platform_device *pdev) return 0; } -static int brcmf_common_pd_remove(struct platform_device *pdev) +static void brcmf_common_pd_remove(struct platform_device *pdev) { brcmf_dbg(INFO, "Enter\n"); if (brcmfmac_pdata->power_off) brcmfmac_pdata->power_off(); - - return 0; } static struct platform_driver brcmf_pd = { - .remove = brcmf_common_pd_remove, + .remove_new = brcmf_common_pd_remove, .driver = { .name = BRCMFMAC_PDATA_NAME, } -- 2.42.0