* [PATCH v3 00/16] drm: Convert to platform remove callback returning void
@ 2023-11-02 16:56 Uwe Kleine-König
2023-11-02 16:56 ` [PATCH v3 13/16] drm/meson: " Uwe Kleine-König
2023-11-20 12:05 ` [PATCH v3 00/16] drm: " Uwe Kleine-König
0 siblings, 2 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2023-11-02 16:56 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
Tomi Valkeinen, Sam Ravnborg, Sebastian Reichel, Alexey Brodkin,
Russell King, Aradhya Bhatia, Nikhil Devshatwar,
Javier Martinez Canillas, Zhu Wang, Rob Herring, Lucas Stach,
Inki Dae, Seung-Woo Kim, Kyungmin Park, Krzysztof Kozlowski,
Jingoo Han, Laurentiu Palcu, Shawn Guo, Sascha Hauer,
Philipp Zabel, Steven Price, Liviu Dudau, Thierry Reding,
Marian Cichy, Dan Carpenter, Anitha Chrisanthus, Edmund Dea,
Chun-Kuang Hu, Matthias Brugger, Kevin Hilman, Ben Skeggs,
Karol Herbst, Lyude Paul, Orson Zhai, Baolin Wang, Chunyan Zhang,
Kieran Bingham, Deepak R Varma, Jani Nikula, Jyri Sarha,
Tomi Valkeinen
Cc: Laurent Pinchart, Jonas Karlman, Jernej Skrabec, dri-devel,
kernel, Russell King, Christian Gmeiner, etnaviv, Alim Akhtar,
linux-arm-kernel, linux-samsung-soc, Fabio Estevam,
NXP Linux Team, AngeloGioacchino Del Regno, linux-mediatek,
Jerome Brunet, Martin Blumenstingl, linux-amlogic, nouveau
Hello,
this series converts all platform drivers below drivers/gpu/drm to use
.remove_new(). It starts with a fix for a problem that potentially might
crash the kernel that I stumbled over while implementing the conversion.
Some of the conversion patches following this fix were already send in
earlier series:
https://lore.kernel.org/dri-devel/20230801110239.831099-1-u.kleine-koenig@pengutronix.de
https://lore.kernel.org/dri-devel/20230318190804.234610-1-u.kleine-koenig@pengutronix.de
and three patches (bridge/tpd12s015, exynos + tilcdc) are new. Parts of
the above series were picked up, the patches resend here are not.
See commit 5c5a7680e67b ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.
Compared to the earlier submissions this patch series is rebased to
today's drm-misc-next. Otherwise there is no relevant change.
Best regards
Uwe
Uwe Kleine-König (16):
drm/bridge: tpd12s015: Drop buggy __exit annotation for remove
function
drm/arcpgu: Convert to platform remove callback returning void
drm/armada: Convert to platform remove callback returning void
drm/bridge: cdns-mhdp8546: Improve error reporting in remove callback
drm/bridge: cdns-mhdp8546: Convert to platform remove callback
returning void
drm/bridge: tpd12s015: Convert to platform remove callback returning
void
drm/etnaviv: Convert to platform remove callback returning void
drm/exynos: Convert to platform remove callback returning void
drm/imx/dcss: Convert to platform remove callback returning void
drm/imx: lcdc: Convert to platform remove callback returning void
drm/kmb: Convert to platform remove callback returning void
drm/mediatek: Convert to platform remove callback returning void
drm/meson: Convert to platform remove callback returning void
drm/nouveau: Convert to platform remove callback returning void
drm/sprd: Convert to platform remove callback returning void
drm/tilcdc: Convert to platform remove callback returning void
drivers/gpu/drm/armada/armada_crtc.c | 5 ++---
drivers/gpu/drm/armada/armada_drv.c | 5 ++---
.../drm/bridge/cadence/cdns-mhdp8546-core.c | 22 +++++++++----------
drivers/gpu/drm/bridge/ti-tpd12s015.c | 6 ++---
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 6 ++---
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 5 ++---
drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 6 ++---
drivers/gpu/drm/exynos/exynos7_drm_decon.c | 6 ++---
drivers/gpu/drm/exynos/exynos_dp.c | 6 ++---
drivers/gpu/drm/exynos/exynos_drm_drv.c | 5 ++---
drivers/gpu/drm/exynos/exynos_drm_fimc.c | 6 ++---
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 6 ++---
drivers/gpu/drm/exynos/exynos_drm_g2d.c | 6 ++---
drivers/gpu/drm/exynos/exynos_drm_gsc.c | 6 ++---
drivers/gpu/drm/exynos/exynos_drm_mic.c | 6 ++---
drivers/gpu/drm/exynos/exynos_drm_rotator.c | 6 ++---
drivers/gpu/drm/exynos/exynos_drm_scaler.c | 6 ++---
drivers/gpu/drm/exynos/exynos_drm_vidi.c | 6 ++---
drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++---
drivers/gpu/drm/exynos/exynos_mixer.c | 6 ++---
drivers/gpu/drm/imx/dcss/dcss-drv.c | 6 ++---
drivers/gpu/drm/imx/lcdc/imx-lcdc.c | 6 ++---
drivers/gpu/drm/kmb/kmb_drv.c | 5 ++---
.../gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 5 ++---
drivers/gpu/drm/mediatek/mtk_ethdr.c | 5 ++---
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c | 6 ++---
drivers/gpu/drm/nouveau/nouveau_platform.c | 5 ++---
drivers/gpu/drm/sprd/sprd_dpu.c | 6 ++---
drivers/gpu/drm/sprd/sprd_drm.c | 5 ++---
drivers/gpu/drm/sprd/sprd_dsi.c | 6 ++---
drivers/gpu/drm/tilcdc/tilcdc_drv.c | 9 ++++----
drivers/gpu/drm/tiny/arcpgu.c | 6 ++---
32 files changed, 74 insertions(+), 128 deletions(-)
base-commit: 6fd9487147c4f18ad77eea00bd8c9189eec74a3e
--
2.42.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 13/16] drm/meson: Convert to platform remove callback returning void
2023-11-02 16:56 [PATCH v3 00/16] drm: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-11-02 16:56 ` Uwe Kleine-König
2023-11-20 12:05 ` [PATCH v3 00/16] drm: " Uwe Kleine-König
1 sibling, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2023-11-02 16:56 UTC (permalink / raw)
To: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Daniel Vetter, Kevin Hilman
Cc: Jerome Brunet, Martin Blumenstingl, dri-devel, linux-amlogic,
linux-arm-kernel, kernel
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/meson/meson_dw_mipi_dsi.c b/drivers/gpu/drm/meson/meson_dw_mipi_dsi.c
index e5fe4e994f43..a6bc1bdb3d0d 100644
--- a/drivers/gpu/drm/meson/meson_dw_mipi_dsi.c
+++ b/drivers/gpu/drm/meson/meson_dw_mipi_dsi.c
@@ -323,13 +323,11 @@ static int meson_dw_mipi_dsi_probe(struct platform_device *pdev)
return 0;
}
-static int meson_dw_mipi_dsi_remove(struct platform_device *pdev)
+static void meson_dw_mipi_dsi_remove(struct platform_device *pdev)
{
struct meson_dw_mipi_dsi *mipi_dsi = platform_get_drvdata(pdev);
dw_mipi_dsi_remove(mipi_dsi->dmd);
-
- return 0;
}
static const struct of_device_id meson_dw_mipi_dsi_of_table[] = {
@@ -340,7 +338,7 @@ MODULE_DEVICE_TABLE(of, meson_dw_mipi_dsi_of_table);
static struct platform_driver meson_dw_mipi_dsi_platform_driver = {
.probe = meson_dw_mipi_dsi_probe,
- .remove = meson_dw_mipi_dsi_remove,
+ .remove_new = meson_dw_mipi_dsi_remove,
.driver = {
.name = DRIVER_NAME,
.of_match_table = meson_dw_mipi_dsi_of_table,
--
2.42.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 00/16] drm: Convert to platform remove callback returning void
2023-11-02 16:56 [PATCH v3 00/16] drm: Convert to platform remove callback returning void Uwe Kleine-König
2023-11-02 16:56 ` [PATCH v3 13/16] drm/meson: " Uwe Kleine-König
@ 2023-11-20 12:05 ` Uwe Kleine-König
2023-11-21 8:21 ` Thomas Zimmermann
1 sibling, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2023-11-20 12:05 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
Sam Ravnborg, Sebastian Reichel, Alexey Brodkin, Russell King,
Aradhya Bhatia, Javier Martinez Canillas, Zhu Wang, Rob Herring,
Lucas Stach, Inki Dae, Seung-Woo Kim, Kyungmin Park,
Krzysztof Kozlowski, Jingoo Han, Laurentiu Palcu, Shawn Guo,
Sascha Hauer, Philipp Zabel, Steven Price, Liviu Dudau,
Thierry Reding, Dan Carpenter, Anitha Chrisanthus, Chun-Kuang Hu,
Matthias Brugger, Kevin Hilman, Karol Herbst, Lyude Paul,
Orson Zhai, Baolin Wang, Chunyan Zhang, Kieran Bingham,
Deepak R Varma, Jani Nikula, Jyri Sarha, Tomi Valkeinen
Cc: Jernej Skrabec, Alim Akhtar, Jonas Karlman, Martin Blumenstingl,
nouveau, etnaviv, dri-devel, Christian Gmeiner,
linux-samsung-soc, linux-mediatek, Laurent Pinchart, kernel,
Russell King, Jerome Brunet, linux-amlogic,
AngeloGioacchino Del Regno, Fabio Estevam, linux-arm-kernel,
NXP Linux Team
[-- Attachment #1.1: Type: text/plain, Size: 1302 bytes --]
[Dropped a few people from To that resulted in bounces before.]
On Thu, Nov 02, 2023 at 05:56:41PM +0100, Uwe Kleine-König wrote:
> Hello,
>
> this series converts all platform drivers below drivers/gpu/drm to use
> .remove_new(). It starts with a fix for a problem that potentially might
> crash the kernel that I stumbled over while implementing the conversion.
>
> Some of the conversion patches following this fix were already send in
> earlier series:
>
> https://lore.kernel.org/dri-devel/20230801110239.831099-1-u.kleine-koenig@pengutronix.de
> https://lore.kernel.org/dri-devel/20230318190804.234610-1-u.kleine-koenig@pengutronix.de
>
> and three patches (bridge/tpd12s015, exynos + tilcdc) are new. Parts of
> the above series were picked up, the patches resend here are not.
Apart from a Reviewed-by: by Toni Valkeinen for patch #16 and Inki Dae
who wrote to have taken patch #8 (but that didn't appear in neither next
nor drm-misc-next yet).
Also in v2 they didn't result in euphoric replies.
Can someone who cares about drm as a whole please care for this series
apply it?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 00/16] drm: Convert to platform remove callback returning void
2023-11-20 12:05 ` [PATCH v3 00/16] drm: " Uwe Kleine-König
@ 2023-11-21 8:21 ` Thomas Zimmermann
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Zimmermann @ 2023-11-21 8:21 UTC (permalink / raw)
To: Uwe Kleine-König, Andrzej Hajda, Neil Armstrong,
Robert Foss, Maarten Lankhorst, Maxime Ripard, David Airlie,
Daniel Vetter, Sam Ravnborg, Sebastian Reichel, Alexey Brodkin,
Russell King, Aradhya Bhatia, Javier Martinez Canillas, Zhu Wang,
Rob Herring, Lucas Stach, Inki Dae, Seung-Woo Kim, Kyungmin Park,
Krzysztof Kozlowski, Jingoo Han, Laurentiu Palcu, Shawn Guo,
Sascha Hauer, Philipp Zabel, Steven Price, Liviu Dudau,
Thierry Reding, Dan Carpenter, Anitha Chrisanthus, Chun-Kuang Hu,
Matthias Brugger, Kevin Hilman, Karol Herbst, Lyude Paul,
Orson Zhai, Baolin Wang, Chunyan Zhang, Kieran Bingham,
Deepak R Varma, Jani Nikula, Jyri Sarha, Tomi Valkeinen
Cc: linux-samsung-soc, kernel, AngeloGioacchino Del Regno,
Jonas Karlman, Martin Blumenstingl, nouveau, etnaviv,
Jernej Skrabec, NXP Linux Team, Christian Gmeiner,
linux-mediatek, dri-devel, Alim Akhtar, Russell King,
linux-amlogic, Jerome Brunet, linux-arm-kernel, Laurent Pinchart
[-- Attachment #1.1.1: Type: text/plain, Size: 1574 bytes --]
Hi
Am 20.11.23 um 13:05 schrieb Uwe Kleine-König:
> [Dropped a few people from To that resulted in bounces before.]
>
> On Thu, Nov 02, 2023 at 05:56:41PM +0100, Uwe Kleine-König wrote:
>> Hello,
>>
>> this series converts all platform drivers below drivers/gpu/drm to use
>> .remove_new(). It starts with a fix for a problem that potentially might
>> crash the kernel that I stumbled over while implementing the conversion.
>>
>> Some of the conversion patches following this fix were already send in
>> earlier series:
>>
>> https://lore.kernel.org/dri-devel/20230801110239.831099-1-u.kleine-koenig@pengutronix.de
>> https://lore.kernel.org/dri-devel/20230318190804.234610-1-u.kleine-koenig@pengutronix.de
>>
>> and three patches (bridge/tpd12s015, exynos + tilcdc) are new. Parts of
>> the above series were picked up, the patches resend here are not.
>
> Apart from a Reviewed-by: by Toni Valkeinen for patch #16 and Inki Dae
> who wrote to have taken patch #8 (but that didn't appear in neither next
> nor drm-misc-next yet).
>
> Also in v2 they didn't result in euphoric replies.
>
> Can someone who cares about drm as a whole please care for this series
> apply it?
Except for patches 8 and 16, I've pushed this patchset into drm-misc-next.
Best regards
Thomas
>
> Best regards
> Uwe
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-21 8:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-02 16:56 [PATCH v3 00/16] drm: Convert to platform remove callback returning void Uwe Kleine-König
2023-11-02 16:56 ` [PATCH v3 13/16] drm/meson: " Uwe Kleine-König
2023-11-20 12:05 ` [PATCH v3 00/16] drm: " Uwe Kleine-König
2023-11-21 8:21 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®