From nobody Fri Dec 19 17:14:29 2025 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 3FA1E2EAFA for ; Fri, 22 Dec 2023 22:51:15 +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 1rGoMK-0005ZU-RX; Fri, 22 Dec 2023 23:51:12 +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 1rGoMJ-000quv-CD; Fri, 22 Dec 2023 23:51:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMK-000Ff4-1G; Fri, 22 Dec 2023 23:51:12 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 01/13] irqchip/imgpdc: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:32 +0100 Message-ID: <472fc6f6bcd54b73f8af206d079a80cb8744d0ca.1703284359.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.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=1698; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=ikkg4JLsV23pZpK+eXaO/MNjdovcQlGL4kRwoXR9+eQ=; b=owGbwMvMwMXY3/A7olbonx/jabUkhtQ2oR3rk4JSF9mdDfhk+6o3Y+ZUM7XqrHiNO2F7OyxE9 /SJdnZ1MhqzMDByMciKKbLYN67JtKqSi+xc++8yzCBWJpApDFycAjARh0L2f6pVXTPsjf3vRq78 p+1ab/Lj7GY5e+nkh3f1Uybzusz9GnX456zNSZ/uzZ1X5Bh4sq8mf9a5ktPlV0qdXh66VGqzhP2 6dPc7C21nPmm1xrUbe9dK+MTFsUyelS1zzDBgk96b5HW+yg45l5peTLTKYZ5+gpnZal2xjv2zx2 nqniUVk74b+dw4Z5n+PJl1bvh8Fctc9Zj/G1amROiFzys+InujQfKD/QbvGYExWXlhTh+W/Zy+v yP0Zte5A/3qF89VfZoZyXf80dzY3IPRUluKQ3fpHvd6aZD0gclp2SO3iZFMDzvmmpvZxme09cbW eUlLsZf+jl9jH/7EQtz9oePi/1lml3bHLD79zENFi9kRAA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig --- drivers/irqchip/irq-imgpdc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-imgpdc.c b/drivers/irqchip/irq-imgpdc.c index 5831be454673..be7451c52f3b 100644 --- a/drivers/irqchip/irq-imgpdc.c +++ b/drivers/irqchip/irq-imgpdc.c @@ -461,12 +461,11 @@ static int pdc_intc_probe(struct platform_device *pde= v) return ret; } =20 -static int pdc_intc_remove(struct platform_device *pdev) +static void pdc_intc_remove(struct platform_device *pdev) { struct pdc_intc_priv *priv =3D platform_get_drvdata(pdev); =20 irq_domain_remove(priv->domain); - return 0; } =20 static const struct of_device_id pdc_intc_match[] =3D { @@ -480,7 +479,7 @@ static struct platform_driver pdc_intc_driver =3D { .of_match_table =3D pdc_intc_match, }, .probe =3D pdc_intc_probe, - .remove =3D pdc_intc_remove, + .remove_new =3D pdc_intc_remove, }; =20 static int __init pdc_intc_init(void) --=20 2.42.0 From nobody Fri Dec 19 17:14:29 2025 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 0981F381BE for ; Fri, 22 Dec 2023 22:51:24 +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 1rGoML-0005Zb-AE; Fri, 22 Dec 2023 23:51:13 +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 1rGoMJ-000quy-IS; Fri, 22 Dec 2023 23:51:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMK-000Ff8-1s; Fri, 22 Dec 2023 23:51:12 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 02/13] irqchip/imx-intmux: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:33 +0100 Message-ID: X-Mailer: git-send-email 2.42.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=1784; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=4EOrr+KkEGskg0P1J9XoWIGL8rKAKsaZhlgGBH5sOgo=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK5wCvDc6ILPQThuf+7sez3z1TdJh7yxJ24I 1sfizwPvvyJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSuQAKCRCPgPtYfRL+ TurYB/9xFiFUgWxcVzchQkEssIjqdO3bOh0+LZnN5kDZlcdcvByn6cNaEDhBNexJcJBzYHNqcnv 4Y4PM8PpVw07Bq2T3PpWwyP50Qnqx+hAL8ULOFvYY8FSL88chdUC5ERpkqPXXwugOuInqnoMzIE m/3922hXTJ7IZIxDJbL/0aXIGWbdsZPI9l1GNAXPCSgdvgMNKqXNiRTQ0yv5xDEzZ+ZbJ77DJwS u5rQ2hFjE6rmzQ11yq66KKK8onKBiJgc6JtsTX4FCuMXJuv3OQQXFh7P0Tltq7CCLd/rixwmIjJ +xfL9Fwyh4PYJRDuPXh8xuwM2kJ4rSYwz06GqW4YRIk9exUk X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig --- drivers/irqchip/irq-imx-intmux.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-imx-intmux.c b/drivers/irqchip/irq-imx-int= mux.c index aa041e4dfee0..de292bde058f 100644 --- a/drivers/irqchip/irq-imx-intmux.c +++ b/drivers/irqchip/irq-imx-intmux.c @@ -282,7 +282,7 @@ static int imx_intmux_probe(struct platform_device *pde= v) return ret; } =20 -static int imx_intmux_remove(struct platform_device *pdev) +static void imx_intmux_remove(struct platform_device *pdev) { struct intmux_data *data =3D platform_get_drvdata(pdev); int i; @@ -298,8 +298,6 @@ static int imx_intmux_remove(struct platform_device *pd= ev) } =20 pm_runtime_disable(&pdev->dev); - - return 0; } =20 #ifdef CONFIG_PM @@ -359,6 +357,6 @@ static struct platform_driver imx_intmux_driver =3D { .pm =3D &imx_intmux_pm_ops, }, .probe =3D imx_intmux_probe, - .remove =3D imx_intmux_remove, + .remove_new =3D imx_intmux_remove, }; builtin_platform_driver(imx_intmux_driver); --=20 2.42.0 From nobody Fri Dec 19 17:14:29 2025 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 C8BCC1EB43 for ; Fri, 22 Dec 2023 22:51:25 +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 1rGoML-0005Zf-AD; Fri, 22 Dec 2023 23:51:13 +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 1rGoMJ-000qv1-PE; Fri, 22 Dec 2023 23:51:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMK-000FfC-2Y; Fri, 22 Dec 2023 23:51:12 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 03/13] irqchip/imx-irqsteer: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:34 +0100 Message-ID: X-Mailer: git-send-email 2.42.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=1880; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=xfWwPsMpemUSHTIcU/EikGDBKd36foZe+1G4fTs3hqo=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK6Fur6CUd1UOKaLZ5K33vkMMIOKWjwsqHiH 25whVgrJMeJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSugAKCRCPgPtYfRL+ TmM1B/0dtKRdQR04yQXFSmzwaKbsX5SOncdt4JztEDpjk9maci6FPNbO2abC9u92f4VLYrEnQbO WyEdYipdt3kPefqWG8bmhncSmyWaAK5Q95KMUDzm+zD66K5GQM9YjaZrGXyALfPMUAK2mHx5563 4aZblITVqigT8nGGU2xr0oI4OGTlBTBCJrYF65ypXXvXJbubUiMrnk/Pdfw2iHWkuLKvNH5Xcue SlDTOQuUDCUMGtkmkC7aS/xJfTHZGAP2gQwrLKx5ewD5ahv+L391QchrYo3AYQsLCRPeuWuj5qP 3eUQObHtwIkaRfDnEh9PCXgEqAXakiYb81I+xLYTBkygm3v1 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig --- drivers/irqchip/irq-imx-irqsteer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-i= rqsteer.c index bd9543314539..05f6b5e8370d 100644 --- a/drivers/irqchip/irq-imx-irqsteer.c +++ b/drivers/irqchip/irq-imx-irqsteer.c @@ -231,7 +231,7 @@ static int imx_irqsteer_probe(struct platform_device *p= dev) return ret; } =20 -static int imx_irqsteer_remove(struct platform_device *pdev) +static void imx_irqsteer_remove(struct platform_device *pdev) { struct irqsteer_data *irqsteer_data =3D platform_get_drvdata(pdev); int i; @@ -243,8 +243,6 @@ static int imx_irqsteer_remove(struct platform_device *= pdev) irq_domain_remove(irqsteer_data->domain); =20 clk_disable_unprepare(irqsteer_data->ipg_clk); - - return 0; } =20 #ifdef CONFIG_PM @@ -312,6 +310,6 @@ static struct platform_driver imx_irqsteer_driver =3D { .pm =3D &imx_irqsteer_pm_ops, }, .probe =3D imx_irqsteer_probe, - .remove =3D imx_irqsteer_remove, + .remove_new =3D imx_irqsteer_remove, }; builtin_platform_driver(imx_irqsteer_driver); --=20 2.42.0 From nobody Fri Dec 19 17:14:29 2025 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 A1E812EAFD for ; Fri, 22 Dec 2023 22:51:15 +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 1rGoML-0005aA-FC; Fri, 22 Dec 2023 23:51:13 +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 1rGoMJ-000qv5-VE; Fri, 22 Dec 2023 23:51:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMK-000FfG-39; Fri, 22 Dec 2023 23:51:12 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 04/13] irqchip/keystone: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:35 +0100 Message-ID: <4c852a3359aa06bedcf3a10f3fd8c1e008cc5a3a.1703284359.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.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=1968; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=+EDCUP6ePG/o+3slA3AQpIK7gkTvq8KdHgzdFcR2yug=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK7wEMzZpDvgUxYeqw07y4uj4q89h2lKndDj gIK7Plj5u2JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSuwAKCRCPgPtYfRL+ Tql4CACibtjb7MoMPwK/QFusOJrRV/PTZB0AK1KY73AwyE6W0xfcGAHQMsdXhy6e71UZL6JpVr/ P920+t1qHobfHNZHgpZMFLOiRlIEHWJ4KVpEUuNxHSUa9zQzNpPZLpKwmgnhSlXTzT6+XU/tmXj HQCLEVFfT0v9XcYCiJ57oFu1dFDXsOXr0yVzztk8s6WKL8j2Hr1MrRFki+WTWN/Lo8MPGOrPHG0 nL7V4RHDcGysnieTH3mg7tEdoyOfir/aPgFD8bIDR1GwXf4NLgXhahVBXdH+MTBdQdLr8nG/8nL 8dmlDQ9FhM9/o6EzydOvIOwWginPpiCLxDr7j06R6z48wDUp X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig --- drivers/irqchip/irq-keystone.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-keystone.c b/drivers/irqchip/irq-keystone.c index a36396db4b08..30f1979fa124 100644 --- a/drivers/irqchip/irq-keystone.c +++ b/drivers/irqchip/irq-keystone.c @@ -190,7 +190,7 @@ static int keystone_irq_probe(struct platform_device *p= dev) return 0; } =20 -static int keystone_irq_remove(struct platform_device *pdev) +static void keystone_irq_remove(struct platform_device *pdev) { struct keystone_irq_device *kirq =3D platform_get_drvdata(pdev); int hwirq; @@ -201,7 +201,6 @@ static int keystone_irq_remove(struct platform_device *= pdev) irq_dispose_mapping(irq_find_mapping(kirq->irqd, hwirq)); =20 irq_domain_remove(kirq->irqd); - return 0; } =20 static const struct of_device_id keystone_irq_dt_ids[] =3D { @@ -212,7 +211,7 @@ MODULE_DEVICE_TABLE(of, keystone_irq_dt_ids); =20 static struct platform_driver keystone_irq_device_driver =3D { .probe =3D keystone_irq_probe, - .remove =3D keystone_irq_remove, + .remove_new =3D keystone_irq_remove, .driver =3D { .name =3D "keystone_irq", .of_match_table =3D of_match_ptr(keystone_irq_dt_ids), --=20 2.42.0 From nobody Fri Dec 19 17:14:29 2025 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 A1E482EAE2 for ; Fri, 22 Dec 2023 22:51:15 +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 1rGoML-0005b4-L1; Fri, 22 Dec 2023 23:51:13 +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 1rGoMK-000qv8-4a; Fri, 22 Dec 2023 23:51:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoML-000FfK-0V; Fri, 22 Dec 2023 23:51:13 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 05/13] irqchip/ls-scfg-msi: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:36 +0100 Message-ID: <1e7143ca68ff0715e0f954504e750fc92e8c6d80.1703284359.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.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=1883; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=T1s6nZ+UFXNsHF/tEsghgxMk/3MV7Hfp5CW/lu69Rfk=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK8rTA2Zo9mskRHVQ0jTz8KMEyB9ljzLNQoN +Gi3RlkZuCJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSvAAKCRCPgPtYfRL+ Tvv0B/9h2A9o02TYkvoJ0+giW51E20iTqIUiYdsuoDmXjeHFnDtbR299IamdAInCPp+yIfyGuRA VsaWsYzr/A0+PLFJ+woG/PPCNyNhZCGSfjzsKZ6NqujBynxImio642zaas+u4O74nSTkdD8rxKN ASM+shm9aa+jn337GejBExGpd6Kl4wBO8aTCkbKZrwx6D2B4uHrL/YRy6O1m4ZB9JxzkFazRUAh J/UNcGrak8aKpWszKNPOl3M9WJ88sbxhFyd7WGl7r5Br8L1dCMowGOMnr6GcZIfBW9C/C1IfHiu DKM/VlQbxce3QjIqoW9ma9qGJ0k3lJ/hb9Djkz56O04eOzZt X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig --- drivers/irqchip/irq-ls-scfg-msi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scf= g-msi.c index 15cf80b46322..0b9b598b206f 100644 --- a/drivers/irqchip/irq-ls-scfg-msi.c +++ b/drivers/irqchip/irq-ls-scfg-msi.c @@ -398,7 +398,7 @@ static int ls_scfg_msi_probe(struct platform_device *pd= ev) return 0; } =20 -static int ls_scfg_msi_remove(struct platform_device *pdev) +static void ls_scfg_msi_remove(struct platform_device *pdev) { struct ls_scfg_msi *msi_data =3D platform_get_drvdata(pdev); int i; @@ -410,8 +410,6 @@ static int ls_scfg_msi_remove(struct platform_device *p= dev) irq_domain_remove(msi_data->parent); =20 platform_set_drvdata(pdev, NULL); - - return 0; } =20 static struct platform_driver ls_scfg_msi_driver =3D { @@ -420,7 +418,7 @@ static struct platform_driver ls_scfg_msi_driver =3D { .of_match_table =3D ls_scfg_msi_id, }, .probe =3D ls_scfg_msi_probe, - .remove =3D ls_scfg_msi_remove, + .remove_new =3D ls_scfg_msi_remove, }; =20 module_platform_driver(ls_scfg_msi_driver); --=20 2.42.0 From nobody Fri Dec 19 17:14:29 2025 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 EF51F2E853 for ; Fri, 22 Dec 2023 22:51:25 +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 1rGoML-0005bm-T8; Fri, 22 Dec 2023 23:51:13 +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 1rGoMK-000qvD-D7; Fri, 22 Dec 2023 23:51:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoML-000FfO-1L; Fri, 22 Dec 2023 23:51:13 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: Charles Keepax , Richard Fitzgerald , alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 06/13] irqchip/madera: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:37 +0100 Message-ID: <64c2f79760c53f29651e7126418c407ff699317d.1703284359.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.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=1755; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=oNyOtJmRK/PlWo4BKGbaCJgMzouADPvq3uSryPTzQhI=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK9Y8lRVhNFkK9eJWWYKEZRt6Vy9FJ7h2sj6 VryWfbz2laJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSvQAKCRCPgPtYfRL+ TngFCACHKhMzBPTBKVocA6VfvDGmuukvynuqR9RfEljwyjneu/L12qaidTDwjPFQtNSEm6HZUBa K7ywfUFIwGDqS1YVFVeBCOV8jGXoZQ1+LY1U/MmzIzFuLOaUIu8bU2Rtqzq4dKUaXpuQFQ4XgN/ zHN+B6RKZtpT46Rivq79vpIoz+ujbj3zvTwiti73wKa72M9tvxC8H0l0UV1oqbQtq8wqtMMTNru aZL67AYTcfqSmIXXkOi0XtADOuwcMMChC1mY4F/J7L2+ro3Wf8NrGMpdohxtssProziTgnyhXrJ LUKLwQ6vOC4EWnqbFzHzpsKePslWuOr8y1HurRhaWAvl7i9V X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig Reviewed-by: Richard Fitzgerald --- drivers/irqchip/irq-madera.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-madera.c b/drivers/irqchip/irq-madera.c index 3eb1f8cdf674..b424c0a327f7 100644 --- a/drivers/irqchip/irq-madera.c +++ b/drivers/irqchip/irq-madera.c @@ -222,7 +222,7 @@ static int madera_irq_probe(struct platform_device *pde= v) return 0; } =20 -static int madera_irq_remove(struct platform_device *pdev) +static void madera_irq_remove(struct platform_device *pdev) { struct madera *madera =3D dev_get_drvdata(pdev->dev.parent); =20 @@ -232,13 +232,11 @@ static int madera_irq_remove(struct platform_device *= pdev) */ madera->irq_dev =3D NULL; regmap_del_irq_chip(madera->irq, madera->irq_data); - - return 0; } =20 static struct platform_driver madera_irq_driver =3D { .probe =3D &madera_irq_probe, - .remove =3D &madera_irq_remove, + .remove_new =3D madera_irq_remove, .driver =3D { .name =3D "madera-irq", .pm =3D &madera_irq_pm_ops, --=20 2.42.0 From nobody Fri Dec 19 17:14:29 2025 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 EF4E62E84F for ; Fri, 22 Dec 2023 22:51:25 +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 1rGoMM-0005cI-Bt; Fri, 22 Dec 2023 23:51: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 1rGoMK-000qvH-JV; Fri, 22 Dec 2023 23:51:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoML-000FfS-1y; Fri, 22 Dec 2023 23:51:13 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 07/13] irqchip/mvebu-pic: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:38 +0100 Message-ID: X-Mailer: git-send-email 2.42.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=1815; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=YEdXLtjjB7MdLkwVRjWTzbmlfH5H3E2yBwtLiqFjuN8=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK/qY6qVh1CQvCesFeEHW82L2SThLnfZpHqn YQVEAd4ZOmJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSvwAKCRCPgPtYfRL+ ToKsB/0YopidcAoPuZVZY8pzovI6MHDYU0tVfCD6UxIrJpBC2C6kFSoxYL7QN8up16WNvLYE2lR f1gTuaISvFVhWpGshqK81Awjdo4FwaBqZQMEgvVWG3niOKVIZ9WRi+DhoFSh0/uml6a3+Q3YZ5V zopiut6A9xnm6NHJuXcB08ukkBF1uFnSPgEnCk0tZs027gIymP93N83affj48eHQLFkzr74/Qhs gjiH+VFZ3cr4ae03XZq4s5kGp4pL2TS/Y1qVlDNxCQD6OtPxGjNIeo6Rj8xNBL5dr58IANxom1A 1uMIbpQ1Hk3z7J/0DZVCkbhf0PcGbknLCaPIJx0rR6vyLuc1 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig Acked-by: Gregory CLEMENT --- drivers/irqchip/irq-mvebu-pic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-mvebu-pic.c b/drivers/irqchip/irq-mvebu-pi= c.c index ef3d3646ccc2..57e3f99b61f5 100644 --- a/drivers/irqchip/irq-mvebu-pic.c +++ b/drivers/irqchip/irq-mvebu-pic.c @@ -167,14 +167,12 @@ static int mvebu_pic_probe(struct platform_device *pd= ev) return 0; } =20 -static int mvebu_pic_remove(struct platform_device *pdev) +static void mvebu_pic_remove(struct platform_device *pdev) { struct mvebu_pic *pic =3D platform_get_drvdata(pdev); =20 on_each_cpu(mvebu_pic_disable_percpu_irq, pic, 1); irq_domain_remove(pic->domain); - - return 0; } =20 static const struct of_device_id mvebu_pic_of_match[] =3D { @@ -185,7 +183,7 @@ MODULE_DEVICE_TABLE(of, mvebu_pic_of_match); =20 static struct platform_driver mvebu_pic_driver =3D { .probe =3D mvebu_pic_probe, - .remove =3D mvebu_pic_remove, + .remove_new =3D mvebu_pic_remove, .driver =3D { .name =3D "mvebu-pic", .of_match_table =3D mvebu_pic_of_match, --=20 2.42.0 From nobody Fri Dec 19 17:14:29 2025 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 930282F503 for ; Fri, 22 Dec 2023 22:51:16 +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 1rGoMM-0005cR-8Y; Fri, 22 Dec 2023 23:51: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 1rGoMK-000qvL-PB; Fri, 22 Dec 2023 23:51:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoML-000FfW-2Y; Fri, 22 Dec 2023 23:51:13 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 08/13] irqchip/pruss-intc: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:39 +0100 Message-ID: <071057cfdc0bc52c574f74156b410c0337adb69c.1703284359.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.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=1947; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=zqHuEaXEImwnlCY9D26ACfYfCkuRPJSjdQSURwFRoRw=; b=owGbwMvMwMXY3/A7olbonx/jabUkhtQ2oQOndrv++VI/M4H9w4wjfYf+qlmx3z0/zTJTOSrA/ JHM2ZTYTkZjFgZGLgZZMUUW+8Y1mVZVcpGda/9dhhnEygQyhYGLUwAmkt7H/oej4u+LBMdiBTGt taGZh1Q+6npnKR2q0xM/8rryX8CFqKd3U3pSDufzVPZenBRauOL3nczPNotFi6pKpytkOtW8Cbh dXRvrcPlJi9h2Xhat01NCdXySb8paZ5mmeabeufOp/aiKp5zILcUpfi1sNb8+P7577uKnrxcS69 9/Xj9lsY5BzNe0syKb196s8fyavO3QWakftxftqnbz/Zykfv5EEu/DlwuNH+XnRUbNtbTT7v0dn Z5ooVQek9KnX8H8zeugl4p6gKfv/UTJ8xmCZ5e7nflYkMh8nz2sqna1mP0+s5XbPn2ymr5btWCz 7xaDbxcdZputDmiNZP5REsTR2e+y/nCE2Ywo10Nu9Zn7AA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig --- drivers/irqchip/irq-pruss-intc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-i= ntc.c index 0f64ecb9b1f4..6daefa7c87bf 100644 --- a/drivers/irqchip/irq-pruss-intc.c +++ b/drivers/irqchip/irq-pruss-intc.c @@ -599,7 +599,7 @@ static int pruss_intc_probe(struct platform_device *pde= v) return ret; } =20 -static int pruss_intc_remove(struct platform_device *pdev) +static void pruss_intc_remove(struct platform_device *pdev) { struct pruss_intc *intc =3D platform_get_drvdata(pdev); u8 max_system_events =3D intc->soc_config->num_system_events; @@ -616,8 +616,6 @@ static int pruss_intc_remove(struct platform_device *pd= ev) irq_dispose_mapping(irq_find_mapping(intc->domain, hwirq)); =20 irq_domain_remove(intc->domain); - - return 0; } =20 static const struct pruss_intc_match_data pruss_intc_data =3D { @@ -650,7 +648,7 @@ static struct platform_driver pruss_intc_driver =3D { .suppress_bind_attrs =3D true, }, .probe =3D pruss_intc_probe, - .remove =3D pruss_intc_remove, + .remove_new =3D pruss_intc_remove, }; module_platform_driver(pruss_intc_driver); =20 --=20 2.42.0 From nobody Fri Dec 19 17:14:29 2025 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 B20092F52A for ; Fri, 22 Dec 2023 22:51:16 +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 1rGoMM-0005d3-GQ; Fri, 22 Dec 2023 23:51: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 1rGoMK-000qvP-Vp; Fri, 22 Dec 2023 23:51:14 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMM-000Ffa-00; Fri, 22 Dec 2023 23:51:14 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 09/13] irqchip/renesas-intc-irqpin: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:40 +0100 Message-ID: <6dc03cf63382d24f954c167aaa988f8e31d6b89d.1703284359.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.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=1951; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=EKV4srlNWNOnWsCdCeZKIamXZGGpGXN+FOJhjjqDpnQ=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhLBMcLIRm4Fn3o0htbqDSG0GLVzvYibnLsko 1zh9ZvKmXOJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSwQAKCRCPgPtYfRL+ TmtGB/oDXf+zULXmpxsxQh1t0lCC/BYHVX+wTolPVew/VD0Wp4cKkG4E1blL5qZl803SQwiYXwE bdx2R0Fx1NNZ0WpSFeB1SANiewzBGca0W73hTjNeIT2cqlYwWxo4MTgdNaGdLpEidaRZY78kJLy rVOFxJkufmkOur3PejIrXOFLc1heJTbKTqTaijc5WTcobEGpcdtmsMm+pFYltyw8DayW3Pdc2z5 F/ksE2HjOwry2GNqYRRY3LlEZB43pJrr9FHCvL/Bm8ig+inSLVK6PlOnSlv8aNJUEC82tStuLEa SRYW1AqB5bQHWN2uo9521jh9QtdBfZ+gj0dPrwpauul6W2bd X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig --- drivers/irqchip/irq-renesas-intc-irqpin.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/ir= q-renesas-intc-irqpin.c index fa19585f3dee..939293bc274e 100644 --- a/drivers/irqchip/irq-renesas-intc-irqpin.c +++ b/drivers/irqchip/irq-renesas-intc-irqpin.c @@ -561,14 +561,13 @@ static int intc_irqpin_probe(struct platform_device *= pdev) return ret; } =20 -static int intc_irqpin_remove(struct platform_device *pdev) +static void intc_irqpin_remove(struct platform_device *pdev) { struct intc_irqpin_priv *p =3D platform_get_drvdata(pdev); =20 irq_domain_remove(p->irq_domain); pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); - return 0; } =20 static int __maybe_unused intc_irqpin_suspend(struct device *dev) @@ -585,7 +584,7 @@ static SIMPLE_DEV_PM_OPS(intc_irqpin_pm_ops, intc_irqpi= n_suspend, NULL); =20 static struct platform_driver intc_irqpin_device_driver =3D { .probe =3D intc_irqpin_probe, - .remove =3D intc_irqpin_remove, + .remove_new =3D intc_irqpin_remove, .driver =3D { .name =3D "renesas_intc_irqpin", .of_match_table =3D intc_irqpin_dt_ids, --=20 2.42.0 From nobody Fri Dec 19 17:14:29 2025 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 B20302F535 for ; Fri, 22 Dec 2023 22:51:16 +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 1rGoMM-0005eq-Pk; Fri, 22 Dec 2023 23:51: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 1rGoML-000qvS-5O; Fri, 22 Dec 2023 23:51:14 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMM-000Ffe-0a; Fri, 22 Dec 2023 23:51:14 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 10/13] irqchip/renesas-irqc: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:41 +0100 Message-ID: <2d367ab738ed2e4cf58cffc10d64b0cbe8a1322c.1703284359.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.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=1804; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=RbqlBUDyzNjJon1VjvvsSpLOKIrzb9IWsFsQQCiOHOs=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhLCVKR7Dii+2+5hAaBXjQ5/Enl4dufiFJZ0x jLGSzewFjqJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSwgAKCRCPgPtYfRL+ TirvCACSQbDFKgHkODHm4EXqgX2Vuvl/DG6J6UhiYVJAd7U0cxPHzyxMmODqfiYB8dNKEnJPGVH 4FQxt11lrVOO/dhCckci/i8HHxPTBspbYYsb5F7IauDcdyzZ359zqd5L2MwKDUeE2xXSV+cW1KN w44SgmCGJ6i0W0tt1a08bmkX2ezW9poFgyAoOdmdWLmCwdoHXJNqADzDEoVeIL+UuyqjGf1FH8B u295ZZ4KWO5qTs1xRrFKFD9H3dbxQP6enA0nvZ9Dkp+xhfMypEc8hsJuj9lgI6TTMZ4zZx8LFZC itfj1XF5KF6U6iBrXqAntwuhDf2pA5eRWhNaQiT1jsGHErL9 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig --- drivers/irqchip/irq-renesas-irqc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renes= as-irqc.c index 49b446b396f9..2bcf14d0f34b 100644 --- a/drivers/irqchip/irq-renesas-irqc.c +++ b/drivers/irqchip/irq-renesas-irqc.c @@ -218,14 +218,13 @@ static int irqc_probe(struct platform_device *pdev) return ret; } =20 -static int irqc_remove(struct platform_device *pdev) +static void irqc_remove(struct platform_device *pdev) { struct irqc_priv *p =3D platform_get_drvdata(pdev); =20 irq_domain_remove(p->irq_domain); pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); - return 0; } =20 static int __maybe_unused irqc_suspend(struct device *dev) @@ -248,7 +247,7 @@ MODULE_DEVICE_TABLE(of, irqc_dt_ids); =20 static struct platform_driver irqc_device_driver =3D { .probe =3D irqc_probe, - .remove =3D irqc_remove, + .remove_new =3D irqc_remove, .driver =3D { .name =3D "renesas_irqc", .of_match_table =3D irqc_dt_ids, --=20 2.42.0 From nobody Fri Dec 19 17:14:29 2025 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 1E17A2F841 for ; Fri, 22 Dec 2023 22:51:16 +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 1rGoMN-0005gq-0I; Fri, 22 Dec 2023 23:51:15 +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 1rGoML-000qvX-D7; Fri, 22 Dec 2023 23:51:14 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMM-000Ffi-1M; Fri, 22 Dec 2023 23:51:14 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 11/13] irqchip/renesas-rza1: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:42 +0100 Message-ID: <1a80e31525d0b02063d2ff1baaaa5e87418f54b6.1703284359.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.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=1796; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=Bsz1h5QGxzBut3kdIXUNVPDmYjq+hBPugF7vd2mkQfE=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhLDGfDRrLiK/KeH7o6vmgeojd4haTpeIWkVf dHLHVF6VfmJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSwwAKCRCPgPtYfRL+ Ti/6B/0Uc7C0uWLP+JiDX8poWb9fqLqVJkboTbGDuw8QKClnZ8GXnZ1kWfqxq+sEAxAzJ5kqVaw 1Z6yi6Fg8XYidEuyCh9wwlEqGPU/sojxhURWyGaLh2ZLUnW4yZzqZ5XbsPgGNUecuNJx0Ge1b1W mZu4V5EHMq0GFrq56K40kZbmluI1LIBr48WiXF5xYuRyLSzgn9EfNy7h4Qk1xEWj7bausZD73+P NqiU2OkIiT1Zltu0xSb/5zxZafiCctFRj4Xvygbl1LZPexPts3IfCyJ8NqU/N09G2u0GDAnB9HC rWPzyNQy9GGObqdVm6PVyA21KDXDAzvE6nuAmNXtX1faAqgP X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig --- drivers/irqchip/irq-renesas-rza1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rza1.c b/drivers/irqchip/irq-renes= as-rza1.c index e4c99c2e0373..f293ad13809f 100644 --- a/drivers/irqchip/irq-renesas-rza1.c +++ b/drivers/irqchip/irq-renesas-rza1.c @@ -244,12 +244,11 @@ static int rza1_irqc_probe(struct platform_device *pd= ev) return ret; } =20 -static int rza1_irqc_remove(struct platform_device *pdev) +static void rza1_irqc_remove(struct platform_device *pdev) { struct rza1_irqc_priv *priv =3D platform_get_drvdata(pdev); =20 irq_domain_remove(priv->irq_domain); - return 0; } =20 static const struct of_device_id rza1_irqc_dt_ids[] =3D { @@ -260,7 +259,7 @@ MODULE_DEVICE_TABLE(of, rza1_irqc_dt_ids); =20 static struct platform_driver rza1_irqc_device_driver =3D { .probe =3D rza1_irqc_probe, - .remove =3D rza1_irqc_remove, + .remove_new =3D rza1_irqc_remove, .driver =3D { .name =3D "renesas_rza1_irqc", .of_match_table =3D rza1_irqc_dt_ids, --=20 2.42.0 From nobody Fri Dec 19 17:14:29 2025 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 F263133CD1 for ; Fri, 22 Dec 2023 22:51:20 +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 1rGoMN-0005ie-Ah; Fri, 22 Dec 2023 23:51:15 +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 1rGoML-000qvb-K2; Fri, 22 Dec 2023 23:51:14 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMM-000Ffm-21; Fri, 22 Dec 2023 23:51:14 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: Maxime Coquelin , Alexandre Torgue , linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 12/13] irqchip/stm32-exti: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:43 +0100 Message-ID: X-Mailer: git-send-email 2.42.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=1709; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=7EUZkiwcSMvqh8+WiN8ti4/qLswt+nYfqNb7cjNoDwE=; b=owGbwMvMwMXY3/A7olbonx/jabUkhtQ2oSMTEhY9Zs929nbyD5xYoyjS+nYDj6jyi+el7leDn jmqlSzpZDRmYWDkYpAVU2Sxb1yTaVUlF9m59t9lmEGsTCBTGLg4BWAimw+x/3cIPnHvtvdmj4Ty 9ga120sKuFJanNI+Mpj72VXN6xZasHSLG+exki/JRu4BTzLFQxaf/n9Ia46uV3bt0S1yjLu/8Oo o67l8kHmUmCLvddSq+vfMPI6WCe8WZaotS5iiWytTeHbz+eQ0xrri5ZmFpxNF5kb8Zw0Sl9ytOi P61k7pGdeX6Uk++b5Wtt0urV9U8fn/l3O/BcfYrzQxWGjy5ckNNrEUc9Hv3lPXZp/jEBcx2G77u drG+t0defaoNfJ7d69dHquZ6bTg+OQAnwR+r0258158KVO97Hdsn2K0dSIDT+wPPuaM09J6+hF2 W11XSv7IOJe49VXOp8Y1LGVMARYJ0wtP/E0w/caizP0QAA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig Reviewed-by: Antonio Borneo --- drivers/irqchip/irq-stm32-exti.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-e= xti.c index 971240e2e31b..c61a97caafc9 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -898,10 +898,9 @@ static void stm32_exti_remove_irq(void *data) irq_domain_remove(domain); } =20 -static int stm32_exti_remove(struct platform_device *pdev) +static void stm32_exti_remove(struct platform_device *pdev) { stm32_exti_h_syscore_deinit(); - return 0; } =20 static int stm32_exti_probe(struct platform_device *pdev) @@ -991,7 +990,7 @@ MODULE_DEVICE_TABLE(of, stm32_exti_ids); =20 static struct platform_driver stm32_exti_driver =3D { .probe =3D stm32_exti_probe, - .remove =3D stm32_exti_remove, + .remove_new =3D stm32_exti_remove, .driver =3D { .name =3D "stm32_exti", .of_match_table =3D stm32_exti_ids, --=20 2.42.0 From nobody Fri Dec 19 17:14:29 2025 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 43A9A2F848 for ; Fri, 22 Dec 2023 22:51:17 +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 1rGoMN-0005kS-D2; Fri, 22 Dec 2023 23:51:15 +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 1rGoML-000qve-Pv; Fri, 22 Dec 2023 23:51:14 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMM-000Ffq-2d; Fri, 22 Dec 2023 23:51:14 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 13/13] irqchip/ts4800: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:44 +0100 Message-ID: <0bdce86b50e5aa50cffbc4add332cbfbad87521e.1703284359.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.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=1756; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=9P+LbVGo/TTFNAJ4I3GeO7ieNbGzcoms9p3NIoglRlk=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhLGp3MhPzeMepy+cjVPc+NFm3S9EHw6HmeBh C7a4Nuop7OJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSxgAKCRCPgPtYfRL+ TmboB/9qmaYqiy97cqHTGGuAQvFVvZN4gGMqto4Kaaf0xFalfX9pPt9PfNIz/7t+QxpeotlQFgS /46uwjiI6Y6L1SPM/zHhu4nCz1w45mE6n3UKrpUa6uzDhRBPSmgD9IMBSFP8UUDDXM4gzVipw/i QLqjO/jZ8fVNs/JTgSgCBHY+az5lkrqaY5LuuceqGDp/CIx9hAzAJbpm8gF0gn5ATmpKIiUISf4 Y1xADOcIOkLrJ/ExX815lXkXnH2NhgyPkH0air7oi+r0ajNbIjAVhpELfUB7r1WLf78cDRpHA9H LXGXg6e5DbirV+XyQ/LNyzCg5NLQsC/CG7EHB42w4kO/Mipv X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable 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=C3=B6nig --- drivers/irqchip/irq-ts4800.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-ts4800.c b/drivers/irqchip/irq-ts4800.c index b2d61d4f6fe6..c69a819f099c 100644 --- a/drivers/irqchip/irq-ts4800.c +++ b/drivers/irqchip/irq-ts4800.c @@ -139,13 +139,11 @@ static int ts4800_ic_probe(struct platform_device *pd= ev) return 0; } =20 -static int ts4800_ic_remove(struct platform_device *pdev) +static void ts4800_ic_remove(struct platform_device *pdev) { struct ts4800_irq_data *data =3D platform_get_drvdata(pdev); =20 irq_domain_remove(data->domain); - - return 0; } =20 static const struct of_device_id ts4800_ic_of_match[] =3D { @@ -156,7 +154,7 @@ MODULE_DEVICE_TABLE(of, ts4800_ic_of_match); =20 static struct platform_driver ts4800_ic_driver =3D { .probe =3D ts4800_ic_probe, - .remove =3D ts4800_ic_remove, + .remove_new =3D ts4800_ic_remove, .driver =3D { .name =3D "ts4800-irqc", .of_match_table =3D ts4800_ic_of_match, --=20 2.42.0