Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3474892rdb; Wed, 27 Dec 2023 08:28:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHia4ef6hceuj5GTZSBmudg/+H/BnHIVotfYshNoXlW/bRhGSnQQ6umzQIyrU8dcYzO7WMq X-Received: by 2002:a17:903:11c3:b0:1d4:75c6:9543 with SMTP id q3-20020a17090311c300b001d475c69543mr1415393plh.15.1703694523768; Wed, 27 Dec 2023 08:28:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703694523; cv=none; d=google.com; s=arc-20160816; b=B9eRHFyLOZtFHFMfDcOFZ+74H3YuUQe9uYgTBW2AJ4Qfg+mkJXTxHjy9th3gmeASLw 41RjdvClO2XmcW16LvpB1MmPsUXpDBXpvgxz5wGmYxr9sW0c/1TvJj9f+HDyVwIWOpDa jwLUeq+gJmhRopQEiC1plSqLcSogfpqafON99TEb2OQR0h4pNUEOkj38m9NvuQI13Zn7 RVlwmnfpPYepwvO8X2D67jnv8/cwMag4eKebfunVYlLdyMJK7DnjPLxGgzcJUbti31Sz pLQ1V2eyY295UMzMyF3CTOlZbZDOhA2Z73kSDiPkriuT5jsbxHBTyffuU8HvCWtnAc2P nMqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=QdSW832qXq+pFGBmudFy89fudOYigaDKiGzZCxxrCMY=; fh=mslbplF7pyPB4FwwbMkb69JqaQYQCRyEhCJnroWAO+A=; b=oogekEY2GOS3xCJ0cZhnATUErs6kRGOX8JwglPsLo0/LA66VB39R00NAOSbBKcFOKo XWP2Ca3UqVnasPVA6w6CBxCQIkSOQqNGHdME8f635CgQP+EVwQcZ4KNns/mkleCjzKGT /+rmDmpQe6RKKOSAhyg2nsKKookJIzUaBWKeSIdhg/458BBh9YmcPsCDBWeNyhh6hmv9 2Qk93RbyeBW9oNq4So7LUiDwUea08jDT1Nk4C9TN2nyDkqqF8hHQXK5rxS3LeMnwz6/I MNH0NkExK5nGE0w4niOH0QOTLQ33ZOsStSHRCEWezfZc92IaV8mEgSTHh8KDATgwKWb/ ew7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12133-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12133-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j7-20020a170903024700b001d3ff189f4csi11400992plh.515.2023.12.27.08.28.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 08:28:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12133-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12133-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12133-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6C5D5281FE3 for ; Wed, 27 Dec 2023 16:28:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66FC2482FB; Wed, 27 Dec 2023 16:26:58 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CF4D47F41 for ; Wed, 27 Dec 2023 16:26:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de 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 1rIWk0-00059y-0b; Wed, 27 Dec 2023 17:26:44 +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 1rIWjy-001tZc-14; Wed, 27 Dec 2023 17:26:43 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIWjz-001Wn5-08; Wed, 27 Dec 2023 17:26:43 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Florian Fainelli , Kieran Bingham , Arnd Bergmann , Rob Herring Cc: kernel@pengutronix.de, Broadcom internal kernel review list , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/11] firmware: raspberrypi: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 17:26:31 +0100 Message-ID: <5df31ef3c069f45634631c9c639bbb60ab1d4798.1703693980.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1900; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=8OnFnV9+Q+XjHGFocc6jyNJphVm9oGZbvop0yAJNf9o=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljFA5eCGsDsplPuScmklfE3nyikx3e0+FJY3l8 BL3mj5KWsuJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYxQOQAKCRCPgPtYfRL+ TrYJB/wKMxZ0dVeqePWzIe13JUFhLVI4QUjz0EFQb5Rn475cfqK+B7i3dx0wcVewGUkDahlovG2 tdfvhL//8Gt6HvqFq2H+aCEBbKA4BHa48gkArRdq6xQEZDt5z0rQld5osnTbW0IDOdPoYaNuxo5 mkLOex1INSKouwkConwu8R0j9KDoV2neCB/vd0WEhYl0KpkvNgNdCBWBvMxmtoqSGdvAjb9+zb7 qwYQ7p93oWEIF4p9nBNulGEjF14nU7UlVrhmDf7OSOreQ02WFGTaYPacVKdTH9dxk/m5za93xoD 3zuzyc/kgU28KdvmxsL8G2Y1/r2et4CQOAkdyHhWt/k34anG 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-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 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/firmware/raspberrypi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c index 4cd290a60fba..322aada20f74 100644 --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c @@ -317,7 +317,7 @@ static void rpi_firmware_shutdown(struct platform_device *pdev) rpi_firmware_property(fw, RPI_FIRMWARE_NOTIFY_REBOOT, NULL, 0); } -static int rpi_firmware_remove(struct platform_device *pdev) +static void rpi_firmware_remove(struct platform_device *pdev) { struct rpi_firmware *fw = platform_get_drvdata(pdev); @@ -327,8 +327,6 @@ static int rpi_firmware_remove(struct platform_device *pdev) rpi_clk = NULL; rpi_firmware_put(fw); - - return 0; } static const struct of_device_id rpi_firmware_of_match[] = { @@ -406,7 +404,7 @@ static struct platform_driver rpi_firmware_driver = { }, .probe = rpi_firmware_probe, .shutdown = rpi_firmware_shutdown, - .remove = rpi_firmware_remove, + .remove_new = rpi_firmware_remove, }; module_platform_driver(rpi_firmware_driver); -- 2.43.0