From nobody Fri Sep 20 05:53:37 2024 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 5681147F53 for ; Wed, 27 Dec 2023 21:02:58 +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 1rIb3I-0000m3-U9; Wed, 27 Dec 2023 22:02:56 +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 1rIb3H-001wEl-Dx; Wed, 27 Dec 2023 22:02:56 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIb3I-001ZVH-1S; Wed, 27 Dec 2023 22:02:56 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jassi Brar Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 01/12] mailbox: bcm-flexrm: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 22:02:29 +0100 Message-ID: <0350a37650c27dddd81514627f51ce8278979428.1703710628.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=1940; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=FFehYL1Gn3qYjpBCEFKip15UQ3w2S8PSDK17hMiB7oo=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljJDmW5WaRVDaTExhDJ2dHaJ0e/+Dtkte2R0Sk UcrLi9+EYeJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYyQ5gAKCRCPgPtYfRL+ TgTTB/sF8nPHGkF89/EAWpe4KhSmfHU92qIjexhsoHCpltQJKdVDYAWXYP1cLRYgyM8FBlGuSDy pgTiX/bzMpQpWvlafPN6DdE0nDqA0ix7J5HFh3V4IPNDCriCjDG2l19h3IBz80p+poBdNgpXmuA 69mz/ep4fooRJRQVLdmOI4WnyEktgWjdpf3mYij6lIdCWFXYZvKuRjCfpnUeDLjjUOKneVkQ5gc 8sJe/aIFhWSfTrS5dChE9W4MTSHD0FvJw/K2Cmh/oJIkUSCjP/qTQ0RDzXpAv5wQkkwU3hwOErQ F+dNjjSzrJfg5dhJtcadg8SySzyYwx73I3ZO2hm1V8jT+zxE 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/mailbox/bcm-flexrm-mailbox.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/bcm-flexrm-mailbox.c b/drivers/mailbox/bcm-fle= xrm-mailbox.c index a2b8839d4e7c..e3e28a4f7d01 100644 --- a/drivers/mailbox/bcm-flexrm-mailbox.c +++ b/drivers/mailbox/bcm-flexrm-mailbox.c @@ -1650,7 +1650,7 @@ static int flexrm_mbox_probe(struct platform_device *= pdev) return ret; } =20 -static int flexrm_mbox_remove(struct platform_device *pdev) +static void flexrm_mbox_remove(struct platform_device *pdev) { struct device *dev =3D &pdev->dev; struct flexrm_mbox *mbox =3D platform_get_drvdata(pdev); @@ -1661,8 +1661,6 @@ static int flexrm_mbox_remove(struct platform_device = *pdev) =20 dma_pool_destroy(mbox->cmpl_pool); dma_pool_destroy(mbox->bd_pool); - - return 0; } =20 static const struct of_device_id flexrm_mbox_of_match[] =3D { @@ -1677,7 +1675,7 @@ static struct platform_driver flexrm_mbox_driver =3D { .of_match_table =3D flexrm_mbox_of_match, }, .probe =3D flexrm_mbox_probe, - .remove =3D flexrm_mbox_remove, + .remove_new =3D flexrm_mbox_remove, }; module_platform_driver(flexrm_mbox_driver); =20 --=20 2.43.0 From nobody Fri Sep 20 05:53:37 2024 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 5684B47F78 for ; Wed, 27 Dec 2023 21:02:58 +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 1rIb3J-0000mE-6J; Wed, 27 Dec 2023 22:02:57 +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 1rIb3H-001wEo-Md; Wed, 27 Dec 2023 22:02:56 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIb3I-001ZVM-2I; Wed, 27 Dec 2023 22:02:56 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jassi Brar Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 02/12] mailbox: bcm-pdc: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 22:02:30 +0100 Message-ID: <44de4bb380b6af0be33eaf8cf96d767ed7608a36.1703710628.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=1741; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=jveChMb3h44uByjcawnGUpyLJqMmp76ass0nnH1hY1A=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljJDn9BM0ryFt/JmZOCM418wpd3Zmu3v/321/P Jf/1Sq+17qJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYyQ5wAKCRCPgPtYfRL+ TnbMB/4+AiEoxUh4Rj3VweDs+RMtUOGfU48l2YhH2whN8mjFzIAIUrGWD1FPU1pWsVgejCeGcur ++/ur4Y+cw1CSQX1UXjG4Bh6GtrMxxHxX9c/j0ElXYRi3MkKKZDL7j60owkY2jJiTOZo86hMLie osli7TD/G2Wc9455gUr+hYc2xeMT5i/ZpHCakvPGNXDQ9tb+42b3h9qyWzsmcvyKgW8Xk10+yB4 4ccmNxkf6rg7U/kZnsZM6sxNiGryMiNuqdUlgq3XMwtSkJBAiwjbAV98aZTPFK8aL+yU/3dAOvs n/KCoRFLdmXgVVqQMxv/hI2lED7vfaXec4jFRRa3dGLaJX39 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/mailbox/bcm-pdc-mailbox.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mailbox/bcm-pdc-mailbox.c b/drivers/mailbox/bcm-pdc-ma= ilbox.c index 778faeced81e..1768d3d5aaa0 100644 --- a/drivers/mailbox/bcm-pdc-mailbox.c +++ b/drivers/mailbox/bcm-pdc-mailbox.c @@ -1605,7 +1605,7 @@ static int pdc_probe(struct platform_device *pdev) return err; } =20 -static int pdc_remove(struct platform_device *pdev) +static void pdc_remove(struct platform_device *pdev) { struct pdc_state *pdcs =3D platform_get_drvdata(pdev); =20 @@ -1617,12 +1617,11 @@ static int pdc_remove(struct platform_device *pdev) =20 dma_pool_destroy(pdcs->rx_buf_pool); dma_pool_destroy(pdcs->ring_pool); - return 0; } =20 static struct platform_driver pdc_mbox_driver =3D { .probe =3D pdc_probe, - .remove =3D pdc_remove, + .remove_new =3D pdc_remove, .driver =3D { .name =3D "brcm-iproc-pdc-mbox", .of_match_table =3D pdc_mbox_of_match, --=20 2.43.0 From nobody Fri Sep 20 05:53:37 2024 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 5A37F481A5 for ; Wed, 27 Dec 2023 21:03:01 +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 1rIb3J-0000mR-JU; Wed, 27 Dec 2023 22:02:57 +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 1rIb3I-001wEs-02; Wed, 27 Dec 2023 22:02:57 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIb3J-001ZVQ-01; Wed, 27 Dec 2023 22:02:57 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jassi Brar 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/12] mailbox: imx: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 22:02:31 +0100 Message-ID: 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=1729; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=tu7OGIAh4t5eSo5RkymTUYbo/0xSaIoNAc2ogwnsVgo=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljJDodYLH7tkz1QmIENibmLSj5ppFvhRT8H2EQ iVhsDahxNyJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYyQ6AAKCRCPgPtYfRL+ TgfFCACPAWNWZETI1tvYwCrw2K4KfE4KqyAXJTss7x7RZKwriOCHeV05ZuvPw3lhNC0qyk9FoZj Z0LwpZq+kn4+yHziqi6i05zT71n51CZNdTQ2kSm6fMd4XxYlC/O5FGYKcOMLLTx7LBQZ7HuiYYl ZsK0Av6p9SLZbIkW770H8l8YmXbFb1ICniZ8xda0nUV37u9lToGXiH1jPdgHP3GdSbL9YsoCqxS PqhBOziRKbN6KRzm8SMjAn9YEbOYXd9KV6PjldGpuiwpv0UGDjlHeRi8u9I0KQcwrHaJuo/BZO6 OmITM3R0hpu1/G7u9Cp7S8D1+F6aoc6rSHhFi4GcNsFCEynj 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/mailbox/imx-mailbox.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index 0af739ab571c..656171362fe9 100644 --- a/drivers/mailbox/imx-mailbox.c +++ b/drivers/mailbox/imx-mailbox.c @@ -903,13 +903,11 @@ static int imx_mu_probe(struct platform_device *pdev) return ret; } =20 -static int imx_mu_remove(struct platform_device *pdev) +static void imx_mu_remove(struct platform_device *pdev) { struct imx_mu_priv *priv =3D platform_get_drvdata(pdev); =20 pm_runtime_disable(priv->dev); - - return 0; } =20 static const struct imx_mu_dcfg imx_mu_cfg_imx6sx =3D { @@ -1070,7 +1068,7 @@ static const struct dev_pm_ops imx_mu_pm_ops =3D { =20 static struct platform_driver imx_mu_driver =3D { .probe =3D imx_mu_probe, - .remove =3D imx_mu_remove, + .remove_new =3D imx_mu_remove, .driver =3D { .name =3D "imx_mu", .of_match_table =3D imx_mu_dt_ids, --=20 2.43.0 From nobody Fri Sep 20 05:53:37 2024 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 D547A47F79 for ; Wed, 27 Dec 2023 21:02:59 +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 1rIb3J-0000mc-Nc; Wed, 27 Dec 2023 22:02:57 +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 1rIb3I-001wEw-7j; Wed, 27 Dec 2023 22:02:57 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIb3J-001ZVU-0m; Wed, 27 Dec 2023 22:02:57 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jassi Brar Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 04/12] mailbox: mailbox-test: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 22:02:32 +0100 Message-ID: <919a9e77958e3a9fee3e473fd714c4add2991b33.1703710628.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=1875; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=2Acds6dO5piUOAVFehlpJWz3DbSbQSTHBdOgG/XhSGc=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljJDqNnoboat7qdmB2aD1OkkF8K0e5IDZbr7Lb NgGvZfkKPKJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYyQ6gAKCRCPgPtYfRL+ TrtbB/kBNSNYr6CiYZ5+Iqb+3kPQ5dPw3J3J17sxWCdHG2fK1X3m7VoIK6/E2QiRHQDMjthjFdg 1HDhwGWDkklLUXI5okyKPtdeWPHixZXx1joX8U9Zfm3AqmUlPen+bl6HypkPDENKqwUn9Z78Cwp skP7eDM0aCZ3zWk2G5u4rY6GlO7vtvTJLQTAADtS2ein/bi2V3KJixCQ96ss87nXXE72jR4QGyS /Gu0AuWDVay78xUapUcBsladtb7IzUNGmn4Y1PnjTwThtNx6ZtRiLf/+IeJFK9HUyYPGLJP9yTi z0dKoLmKwQOCsR+jxXlUMd8NBSZDrxR/Svh1b35sSKK+DUvE 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/mailbox/mailbox-test.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/mailbox-test.c b/drivers/mailbox/mailbox-test.c index 22d6018ceec3..3386b4e72551 100644 --- a/drivers/mailbox/mailbox-test.c +++ b/drivers/mailbox/mailbox-test.c @@ -418,7 +418,7 @@ static int mbox_test_probe(struct platform_device *pdev) return 0; } =20 -static int mbox_test_remove(struct platform_device *pdev) +static void mbox_test_remove(struct platform_device *pdev) { struct mbox_test_device *tdev =3D platform_get_drvdata(pdev); =20 @@ -428,8 +428,6 @@ static int mbox_test_remove(struct platform_device *pde= v) mbox_free_channel(tdev->tx_channel); if (tdev->rx_channel) mbox_free_channel(tdev->rx_channel); - - return 0; } =20 static const struct of_device_id mbox_test_match[] =3D { @@ -444,7 +442,7 @@ static struct platform_driver mbox_test_driver =3D { .of_match_table =3D mbox_test_match, }, .probe =3D mbox_test_probe, - .remove =3D mbox_test_remove, + .remove_new =3D mbox_test_remove, }; module_platform_driver(mbox_test_driver); =20 --=20 2.43.0 From nobody Fri Sep 20 05:53:37 2024 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 966F347F7C for ; Wed, 27 Dec 2023 21:03:00 +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 1rIb3K-0000pG-42; Wed, 27 Dec 2023 22:02:58 +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 1rIb3I-001wF0-KN; Wed, 27 Dec 2023 22:02:57 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIb3J-001ZVY-24; Wed, 27 Dec 2023 22:02:57 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jassi Brar Cc: Matthias Brugger , AngeloGioacchino Del Regno , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 05/12] mailbox: mtk-cmdq: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 22:02:33 +0100 Message-ID: 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=1853; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=gNPFN0uAuZF4HtjtcHLTvZm1u6vrMLv8Z7jJatbefZk=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljJDr7aKKKkVi7JPQZLLyFYy5nVbjgdGseMIZH +nO7DQaZKSJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYyQ6wAKCRCPgPtYfRL+ TirnCACWp3emXtbPKi6jzWJqse5aOSB0rU4Fj6ztni02KHtV0f8QZ8mlamimBQs1wwAFg3JamtL vtLD4W2EKwQr/k7CfonS4FAniuFJo5arz0+UqychTpBJ9ZY1vjHltDudQ6NyiqSbuNfEQ9znAID QYQCNrizRfXOn+Da8HpY0QMUoj3HEsb3SyzjnE8dDrM0aZcGGcUlKbKUq5ZzPKBEbYgKxVB7VCi ZkKEV1DeW1j9lqvyr6x6b9w95nbTQiClhVqqDKA0jEgJkeZDfpnRVaMXM9cz6uVPhREyAUtTDQ5 6JE6oYD9RAd4NQ3d/t5saKBBj1HXwkt1vcbwzKv24K8YHXqc 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/mailbox/mtk-cmdq-mailbox.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-= mailbox.c index de862e9137d5..c9009b729ab2 100644 --- a/drivers/mailbox/mtk-cmdq-mailbox.c +++ b/drivers/mailbox/mtk-cmdq-mailbox.c @@ -367,7 +367,7 @@ static int cmdq_resume(struct device *dev) return 0; } =20 -static int cmdq_remove(struct platform_device *pdev) +static void cmdq_remove(struct platform_device *pdev) { struct cmdq *cmdq =3D platform_get_drvdata(pdev); =20 @@ -378,7 +378,6 @@ static int cmdq_remove(struct platform_device *pdev) cmdq_runtime_suspend(&pdev->dev); =20 clk_bulk_unprepare(cmdq->pdata->gce_num, cmdq->clocks); - return 0; } =20 static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data) @@ -761,7 +760,7 @@ static const struct of_device_id cmdq_of_ids[] =3D { =20 static struct platform_driver cmdq_drv =3D { .probe =3D cmdq_probe, - .remove =3D cmdq_remove, + .remove_new =3D cmdq_remove, .driver =3D { .name =3D "mtk_cmdq", .pm =3D &cmdq_pm_ops, --=20 2.43.0 From nobody Fri Sep 20 05:53:37 2024 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 950A047F7B for ; Wed, 27 Dec 2023 21:03:00 +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 1rIb3K-0000qs-Ib; Wed, 27 Dec 2023 22:02:58 +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 1rIb3J-001wF4-0r; Wed, 27 Dec 2023 22:02:58 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIb3K-001ZVc-08; Wed, 27 Dec 2023 22:02:58 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jassi Brar Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 06/12] mailbox: omap: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 22:02:34 +0100 Message-ID: <466062f1ff1438a22f79260f529a1c2cc233a150.1703710628.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=1656; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=j0aEwW5V8+ktwBY7iIhfiCa+CFqdltoLToqYeqCXqXY=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljJDsFhgpgYrjS7XbMKMaLE98yrtDfwKEB3n+Q RZes6RQi4GJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYyQ7AAKCRCPgPtYfRL+ Thh1B/wPx0HuQZFnGjuuBLvOPrEQwVIO3XWlHql/3OUqpVyaTHqSr9XxEJAM/xYz1+NEPKr0rpb QsPcpQVRd8C6cLnAKwcbsnBkVBxf2w4r+9bNnSPShf1odyY0+oF4Ifz/VwdPQLe7DihdRiaWqQS QtTH85MbKOjcGE/1+Fh/M++/dtBtHGW3aJsUAFHCJZAhwRdJBBSBAT6NYVJHgBuD746NLVnnwZb ifijaU2zEYJBWSnJRlOgEIcA94rNIx7WdUkF4ex72eRJG63SMrovOSgqrgkczx9BxIKSGJRIMKs UmK7PW8zUu2S8TxwerNew41UPZtFCcBY3Lbz26L0uszRl5Ck 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/mailbox/omap-mailbox.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 792bcaebbc9b..c961706fe61d 100644 --- a/drivers/mailbox/omap-mailbox.c +++ b/drivers/mailbox/omap-mailbox.c @@ -865,19 +865,17 @@ static int omap_mbox_probe(struct platform_device *pd= ev) return ret; } =20 -static int omap_mbox_remove(struct platform_device *pdev) +static void omap_mbox_remove(struct platform_device *pdev) { struct omap_mbox_device *mdev =3D platform_get_drvdata(pdev); =20 pm_runtime_disable(mdev->dev); omap_mbox_unregister(mdev); - - return 0; } =20 static struct platform_driver omap_mbox_driver =3D { .probe =3D omap_mbox_probe, - .remove =3D omap_mbox_remove, + .remove_new =3D omap_mbox_remove, .driver =3D { .name =3D "omap-mailbox", .pm =3D &omap_mbox_pm_ops, --=20 2.43.0 From nobody Fri Sep 20 05:53:37 2024 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 B3DC8498BB for ; Wed, 27 Dec 2023 21:03:04 +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 1rIb3K-0000rD-QS; Wed, 27 Dec 2023 22:02:58 +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 1rIb3J-001wF8-9E; Wed, 27 Dec 2023 22:02:58 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIb3K-001ZVg-0x; Wed, 27 Dec 2023 22:02:58 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jassi Brar Cc: Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 07/12] mailbox: qcom-apcs-ipc: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 22:02:35 +0100 Message-ID: <9e4c20de4cf16ae8cf03a1844a000a17e4ed1990.1703710628.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=1902; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=05Aw79eBvCAd2KreU2oJxdpnDsDvRhiwGd7aMF2V4do=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljJDt5XSagpy/f9wKNc7ifFv9CjOCUmtb4pRYN d382lA2HM2JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYyQ7QAKCRCPgPtYfRL+ Tho5B/4slMPTrECJh7cRwJNM5OG+HFXibTK9phg2cNi2f7oFi7RzX2fHVe+2AmZCnAAcbvyoCJy VbfJtdkERRfrIwYPGreUAMLJiDfwK4QezgiiIYg/1jmyxYMNL6n07/XOaxndXs1u6tKXXxzbTVa RYtrMvs6DmlFtMSAY6cuJB8tetw2vri+kr/y+yZmM0xB11VFFdQ6LjscPx9VfgNWD04zywbopch mR/QzVVI4U2sHZ1wCJZgExf4tPAyt62l25ytPz8KCYUEBkpbtxm/NmCtmrqRPK2e4lswZ3AsfuZ AiF1GElyr3260sQUDKdC/dfAIGfzSO4dZXcR8RYRiYsGBMOn 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/mailbox/qcom-apcs-ipc-mailbox.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom= -apcs-ipc-mailbox.c index 79136fb62f01..7d91e7c016ba 100644 --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c @@ -129,14 +129,12 @@ static int qcom_apcs_ipc_probe(struct platform_device= *pdev) return 0; } =20 -static int qcom_apcs_ipc_remove(struct platform_device *pdev) +static void qcom_apcs_ipc_remove(struct platform_device *pdev) { struct qcom_apcs_ipc *apcs =3D platform_get_drvdata(pdev); struct platform_device *clk =3D apcs->clk; =20 platform_device_unregister(clk); - - return 0; } =20 /* .data is the offset of the ipc register within the global block */ @@ -169,7 +167,7 @@ MODULE_DEVICE_TABLE(of, qcom_apcs_ipc_of_match); =20 static struct platform_driver qcom_apcs_ipc_driver =3D { .probe =3D qcom_apcs_ipc_probe, - .remove =3D qcom_apcs_ipc_remove, + .remove_new =3D qcom_apcs_ipc_remove, .driver =3D { .name =3D "qcom_apcs_ipc", .of_match_table =3D qcom_apcs_ipc_of_match, --=20 2.43.0 From nobody Fri Sep 20 05:53:37 2024 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 4E33D49F8D for ; Wed, 27 Dec 2023 21:03:05 +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 1rIb3L-0000sJ-2D; Wed, 27 Dec 2023 22:02:59 +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 1rIb3J-001wFB-HN; Wed, 27 Dec 2023 22:02:58 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIb3K-001ZVk-1k; Wed, 27 Dec 2023 22:02:58 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jassi Brar Cc: Bjorn Andersson , Konrad Dybcio , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 08/12] mailbox: qcom-ipcc: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 22:02:36 +0100 Message-ID: <515f199e83af8a6295d38f0127be230bbbd6098b.1703710628.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=1791; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=dQ7xAWwAr+m6oeIQoY8ovO5/17i2OHqeN97W+/12Du4=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljJDufzD2oU8+z6pomHH+G4A8o2UtNr9z9PhPb vptCsZeZieJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYyQ7gAKCRCPgPtYfRL+ Tq7pB/9Dmb/jKMl6/r477Ic9N1qIMXfrf4k1YWh8kVn7VLU0tzEVL5PeORJkHj5yqzysrPTJyTf G88OGmEFNY5XtxMN/p4IpCnkixdN0ZR1EWm6uCQhsLhJwwwsuGsJodiXkfDT6fSjIedCH7nDyAE dZcXeVoWOjztd+8ps5A3NYZkXGg7gAQP40tblN6PIIwMocxKsGLNhKtt71tsf61wu9SMTUMmgwl QwyWpfrV1MOUrtwmwW+DHBh2a6TvxNX7iWVBRYnzFIpdGj/OqHJURKPOdMYNXifhfstSrbWcQCI r78rzCbFkV3luWKwxJVYlsYlLH64Q9wlWKDEUgllPAHT4bMn 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/mailbox/qcom-ipcc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c index f597a1bd5684..d537cc9c4d4b 100644 --- a/drivers/mailbox/qcom-ipcc.c +++ b/drivers/mailbox/qcom-ipcc.c @@ -326,14 +326,12 @@ static int qcom_ipcc_probe(struct platform_device *pd= ev) return ret; } =20 -static int qcom_ipcc_remove(struct platform_device *pdev) +static void qcom_ipcc_remove(struct platform_device *pdev) { struct qcom_ipcc *ipcc =3D platform_get_drvdata(pdev); =20 disable_irq_wake(ipcc->irq); irq_domain_remove(ipcc->irq_domain); - - return 0; } =20 static const struct of_device_id qcom_ipcc_of_match[] =3D { @@ -348,7 +346,7 @@ static const struct dev_pm_ops qcom_ipcc_dev_pm_ops =3D= { =20 static struct platform_driver qcom_ipcc_driver =3D { .probe =3D qcom_ipcc_probe, - .remove =3D qcom_ipcc_remove, + .remove_new =3D qcom_ipcc_remove, .driver =3D { .name =3D "qcom-ipcc", .of_match_table =3D qcom_ipcc_of_match, --=20 2.43.0 From nobody Fri Sep 20 05:53:37 2024 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 B0021481A8 for ; Wed, 27 Dec 2023 21:03:01 +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 1rIb3L-0000sW-8N; Wed, 27 Dec 2023 22:02:59 +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 1rIb3J-001wFF-OL; Wed, 27 Dec 2023 22:02:58 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIb3K-001ZVo-2S; Wed, 27 Dec 2023 22:02:58 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jassi Brar 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 09/12] mailbox: stm32-ipcc: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 22:02:37 +0100 Message-ID: <3189b81c29e185e76e87a150051e5e73047b76ea.1703710628.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=1799; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=3bDUjGjP7wzxKyoJxgukH0hU9Cj6FBrYyYL2xQFaSUY=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljJDvHB8PRK2f+cN/dTeaPhGdhFq1chpZPlaNJ Nus1qGLwfuJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYyQ7wAKCRCPgPtYfRL+ TnzaCACaIsH1woq68S42H2f/RVHXYiWQHTDmhEhk9nRfPyPMnH/LTY8QR4960J3vS3E4YlzpXD4 e8Fb9Pdn1otwdBaCiCKQ+jFxD5fN3gs8DxO1augzsYhBFFAbiOSlc9dTXbVwVSuISPIxv2eoz5S NBKQsfEydrR5UQymLJYcXo8qJSBg9XGyLpacTXFoTAx1ip1ShhIXCruPrt6bD3uWj3E7NQW8Fre oqDT36vI+j2waULDBWz24J47yHOTscUVw6D5s07bXWglA8P7CAsV/OSDSI94I0AVfnQLBr0rkzi /l1jNsQFzbe93BCZEb8sEpXrBKcYUp6KjT19THwhl5UaysP0 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/mailbox/stm32-ipcc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers/mailbox/stm32-ipcc.c index 4ad3653f3866..1442f275782b 100644 --- a/drivers/mailbox/stm32-ipcc.c +++ b/drivers/mailbox/stm32-ipcc.c @@ -331,7 +331,7 @@ static int stm32_ipcc_probe(struct platform_device *pde= v) return ret; } =20 -static int stm32_ipcc_remove(struct platform_device *pdev) +static void stm32_ipcc_remove(struct platform_device *pdev) { struct device *dev =3D &pdev->dev; =20 @@ -339,8 +339,6 @@ static int stm32_ipcc_remove(struct platform_device *pd= ev) dev_pm_clear_wake_irq(&pdev->dev); =20 device_set_wakeup_capable(dev, false); - - return 0; } =20 #ifdef CONFIG_PM_SLEEP @@ -381,7 +379,7 @@ static struct platform_driver stm32_ipcc_driver =3D { .of_match_table =3D stm32_ipcc_of_match, }, .probe =3D stm32_ipcc_probe, - .remove =3D stm32_ipcc_remove, + .remove_new =3D stm32_ipcc_remove, }; =20 module_platform_driver(stm32_ipcc_driver); --=20 2.43.0 From nobody Fri Sep 20 05:53:37 2024 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 EE9B34A980 for ; Wed, 27 Dec 2023 21:03:05 +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 1rIb3M-0000sn-1M; Wed, 27 Dec 2023 22:03:00 +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 1rIb3J-001wFJ-Uq; Wed, 27 Dec 2023 22:02:59 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIb3K-001ZVs-36; Wed, 27 Dec 2023 22:02:58 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jassi Brar Cc: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de Subject: [PATCH 10/12] mailbox: sun6i-msgbox: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 22:02:38 +0100 Message-ID: <2db7ef94aa35587980697405ec373e0b7bb70466.1703710628.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=1881; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=N/W8lZej+FeOqTdwnnoNmYqEIad8ynzkdcOjXSzw2ts=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljJDwoMJLjfKm4Cc4/ADr3P0UTr8GXSsZIJG6W H2DM2dIZ4+JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYyQ8AAKCRCPgPtYfRL+ TsNlCAC5RWomH9b61vsKXO9seVB+66mp+g78kJnbVAs+m+UWgdssUkxqjQl0IZqc0OlSudVdslX IjnVHkdr/ZzzYZVJVgcTzR4JNZhouUYJDLnKihWTElEo8ye0FJxgHAV9LiHuSoH8NBPRx4vlWOI 1RhV+oIdSY6PtwA5hL6W6T7El2gulfzOCdKPq/q0nawWkBKRj3PEbof8Y5LXTeF+0AV4H/Ip6YR PNVh8GG59D3SPnPZZHLaJYRxWlGwbM/xAJhISVju1WUjnJ7FuoJbXhxMux/7E5dNjCVJ5Dsa2Mr yjFXCkWDvipZ6lhZZsg/qGnz7wXC2tlUUaziuZWURgX0ZjHE 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/mailbox/sun6i-msgbox.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/sun6i-msgbox.c b/drivers/mailbox/sun6i-msgbox.c index 7f8d931042d3..3dcc54dc83b2 100644 --- a/drivers/mailbox/sun6i-msgbox.c +++ b/drivers/mailbox/sun6i-msgbox.c @@ -287,15 +287,13 @@ static int sun6i_msgbox_probe(struct platform_device = *pdev) return ret; } =20 -static int sun6i_msgbox_remove(struct platform_device *pdev) +static void sun6i_msgbox_remove(struct platform_device *pdev) { struct sun6i_msgbox *mbox =3D platform_get_drvdata(pdev); =20 mbox_controller_unregister(&mbox->controller); /* See the comment in sun6i_msgbox_probe about the reset line. */ clk_disable_unprepare(mbox->clk); - - return 0; } =20 static const struct of_device_id sun6i_msgbox_of_match[] =3D { @@ -310,7 +308,7 @@ static struct platform_driver sun6i_msgbox_driver =3D { .of_match_table =3D sun6i_msgbox_of_match, }, .probe =3D sun6i_msgbox_probe, - .remove =3D sun6i_msgbox_remove, + .remove_new =3D sun6i_msgbox_remove, }; module_platform_driver(sun6i_msgbox_driver); =20 --=20 2.43.0 From nobody Fri Sep 20 05:53:37 2024 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 E3525481B3 for ; Wed, 27 Dec 2023 21:03:01 +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 1rIb3L-0000t1-Me; Wed, 27 Dec 2023 22:02:59 +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 1rIb3K-001wFN-4t; Wed, 27 Dec 2023 22:02:59 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIb3L-001ZVw-0V; Wed, 27 Dec 2023 22:02:59 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jassi Brar Cc: Thierry Reding , Jonathan Hunter , linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 11/12] mailbox: tegra-hsp: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 22:02:39 +0100 Message-ID: <8e00bbc23e1115d9ff185d4b98c6d764607036df.1703710628.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=1705; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=PYLOV0x2mjDrqYc2WOt4MZWPAGaq8meNv350E++Xqz4=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljJDxKf9dkG1I03uOMN9mSF6cbRm7XcpAFwVg0 hQObdda4w2JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYyQ8QAKCRCPgPtYfRL+ ToRJB/9LAqLeEDXl6LyRgrBJMUDfPV5gfr4iqzE2TfwlmQtMY9VVZgSzBclmKAp67Bbm/0T/UDQ WQhJApBRY3tDJ6nbdJRiM+X2RqemRskrEpDlrgs8TeSBp+kSzc1D2Vt6mGNLc1z/r/gZrbTFt1o vBbYu411RH9zW7g92zneQxlLLwATK7Pd6poTrBDIWJr8hKPxA/zut4gUqsqzrnID55PyUzK8rn5 huukRLE4HTpWVspSJFxgep0Gz2FiTTPsJt4i9c/NhPq1txhd50cf++t/+yDYPPq9TtoNAE9zbER ey/05V7M2b7TcaR1mlbT1iDSAlnr97gMhjSr9UTe7LvbM0Zz 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/mailbox/tegra-hsp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c index fe29fc2ca526..19ef56cbcfd3 100644 --- a/drivers/mailbox/tegra-hsp.c +++ b/drivers/mailbox/tegra-hsp.c @@ -868,13 +868,11 @@ static int tegra_hsp_probe(struct platform_device *pd= ev) return 0; } =20 -static int tegra_hsp_remove(struct platform_device *pdev) +static void tegra_hsp_remove(struct platform_device *pdev) { struct tegra_hsp *hsp =3D platform_get_drvdata(pdev); =20 lockdep_unregister_key(&hsp->lock_key); - - return 0; } =20 static int __maybe_unused tegra_hsp_resume(struct device *dev) @@ -953,7 +951,7 @@ static struct platform_driver tegra_hsp_driver =3D { .pm =3D &tegra_hsp_pm_ops, }, .probe =3D tegra_hsp_probe, - .remove =3D tegra_hsp_remove, + .remove_new =3D tegra_hsp_remove, }; =20 static int __init tegra_hsp_init(void) --=20 2.43.0 From nobody Fri Sep 20 05:53:37 2024 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 1C397481BB for ; Wed, 27 Dec 2023 21:03:01 +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 1rIb3L-0000tA-SH; Wed, 27 Dec 2023 22:02:59 +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 1rIb3K-001wFR-BB; Wed, 27 Dec 2023 22:02:59 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIb3L-001ZW0-1A; Wed, 27 Dec 2023 22:02:59 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jassi Brar Cc: Michal Simek , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 12/12] mailbox: zynqmp-ipi: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 22:02:40 +0100 Message-ID: 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=1705; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=2b4lUlitkOljYy3sRlFRPbTFvrd9xaqPFryNUK1ZN6s=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljJDzqFtl2kmovE8iqyRfcBJPoRlc6qiRy4eJR F/jvpWQQLmJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYyQ8wAKCRCPgPtYfRL+ TquyB/438vvpPAS3YP4QZzU/Aul2i7Mo5ML2J494dFbYViAl7ltgPfwkDcmca92QlWMEgpAV5VJ 0Yz+wQ4sKk2dWxYStXrFjG9Tniz39LdfLE8wxN7CY6gZ0YYN4kQOYzxQ88/KhvJhCqcsR1L20uu v6y5zySpr2H55+n20BfVMLgJ7NjH7/wmJl2ljlB7J/hDAykGUaA6UN1qk/CYrpcGZiVrr5QeMJE TuwlgdrzNYzx896y0DL9yWRv5PhOM523C9tHqBl1tC4zyWIFTeFR1Lxr+LiEQEcH6Quta3/fz7A z2bSAusqvyIraXRkdrL/bHAFB+Didj4tkwikvO/HJUZX+a3O 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: Michal Simek --- drivers/mailbox/zynqmp-ipi-mailbox.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-= ipi-mailbox.c index 7fa533e80dd9..610a92f9c0b2 100644 --- a/drivers/mailbox/zynqmp-ipi-mailbox.c +++ b/drivers/mailbox/zynqmp-ipi-mailbox.c @@ -688,19 +688,17 @@ static int zynqmp_ipi_probe(struct platform_device *p= dev) return ret; } =20 -static int zynqmp_ipi_remove(struct platform_device *pdev) +static void zynqmp_ipi_remove(struct platform_device *pdev) { struct zynqmp_ipi_pdata *pdata; =20 pdata =3D platform_get_drvdata(pdev); zynqmp_ipi_free_mboxes(pdata); - - return 0; } =20 static struct platform_driver zynqmp_ipi_driver =3D { .probe =3D zynqmp_ipi_probe, - .remove =3D zynqmp_ipi_remove, + .remove_new =3D zynqmp_ipi_remove, .driver =3D { .name =3D "zynqmp-ipi", .of_match_table =3D of_match_ptr(zynqmp_ipi_of_match), --=20 2.43.0