Uwe Kleine-König
2023-Aug-01 11:02 UTC
[Nouveau] [PATCH v2 00/12] drm: Convert to platform remove callback returning void
Hello, (implicit) v1 of this series can be found at https://lore.kernel.org/dri-devel/20230507162616.1368908-1-u.kleine-koenig at pengutronix.de Back then the series contained 53 patches. A big bunch was already applied to drm-misc, this is the remainder; with only little changes compared to v1: - rebased to todays drm-misc-next - Squashed together the two mediatek patches - Adapted the subject prefix for the arcpgu as pointed out by Thomas Zimmermann. (This affected two patches originally, one of them was merged already before anyhow (next-20230801~41^2~34^2~179).) All these patches are pairwise independant of each other and so can be applied individually to their respective maintainer trees. I'm open to get these all in together via drm-misc, but each maintainer picking the individual patches that they are repsonsible for is maybe the easier approach?! Best regards Uwe Uwe Kleine-K?nig (12): drm/armada: Convert to platform remove callback returning void drm/etnaviv: Convert to platform remove callback returning void drm/imx/dcss: Convert to platform remove callback returning void drm/imx/ipuv3: Convert to platform remove callback returning void drm/ingenic: 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/msm: Convert to platform remove callback returning void drm/nouveau: Convert to platform remove callback returning void drm/shmobile: Convert to platform remove callback returning void drm/sprd: Convert to platform remove callback returning void drm/arcpgu: Convert to platform remove callback returning void drivers/gpu/drm/armada/armada_crtc.c | 5 ++--- drivers/gpu/drm/armada/armada_drv.c | 5 ++--- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 6 ++---- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 5 ++--- drivers/gpu/drm/imx/dcss/dcss-drv.c | 6 ++---- drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c | 6 ++---- drivers/gpu/drm/imx/ipuv3/imx-drm-core.c | 5 ++--- drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 5 ++--- drivers/gpu/drm/imx/ipuv3/imx-tve.c | 5 ++--- drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c | 5 ++--- drivers/gpu/drm/imx/ipuv3/parallel-display.c | 6 ++---- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 6 ++---- drivers/gpu/drm/ingenic/ingenic-ipu.c | 5 ++--- drivers/gpu/drm/kmb/kmb_drv.c | 5 ++--- drivers/gpu/drm/mediatek/mtk_cec.c | 5 ++--- drivers/gpu/drm/mediatek/mtk_disp_aal.c | 6 ++---- drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 6 ++---- drivers/gpu/drm/mediatek/mtk_disp_color.c | 6 ++---- drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 6 ++---- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 6 ++---- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 6 ++---- drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 6 ++---- drivers/gpu/drm/mediatek/mtk_dp.c | 6 ++---- drivers/gpu/drm/mediatek/mtk_dpi.c | 6 ++---- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 6 ++---- drivers/gpu/drm/mediatek/mtk_dsi.c | 6 ++---- drivers/gpu/drm/mediatek/mtk_hdmi.c | 5 ++--- drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c | 6 ++---- drivers/gpu/drm/mediatek/mtk_mdp_rdma.c | 5 ++--- drivers/gpu/drm/msm/adreno/adreno_device.c | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 6 ++---- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 6 ++---- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 5 ++--- drivers/gpu/drm/msm/dp/dp_display.c | 6 ++---- drivers/gpu/drm/msm/dsi/dsi.c | 6 ++---- drivers/gpu/drm/msm/hdmi/hdmi.c | 6 ++---- drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 6 ++---- drivers/gpu/drm/msm/msm_drv.c | 6 ++---- drivers/gpu/drm/msm/msm_mdss.c | 6 ++---- drivers/gpu/drm/nouveau/nouveau_platform.c | 5 ++--- drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 6 ++---- 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/tiny/arcpgu.c | 6 ++---- 45 files changed, 90 insertions(+), 164 deletions(-) base-commit: 290cdd7959a734a0ef20ec096af7810177c4b9f8 -- 2.39.2
Uwe Kleine-König
2023-Aug-01 11:02 UTC
[Nouveau] [PATCH v2 09/12] drm/nouveau: Convert to platform remove callback returning void
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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Thomas Zimmermann <tzimmermann at suse.de> Reviewed-by: Jyri Sarha <jyri.sarha at iki.fi> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig at pengutronix.de> --- drivers/gpu/drm/nouveau/nouveau_platform.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_platform.c b/drivers/gpu/drm/nouveau/nouveau_platform.c index 23cd43a7fd19..bf2dc7567ea4 100644 --- a/drivers/gpu/drm/nouveau/nouveau_platform.c +++ b/drivers/gpu/drm/nouveau/nouveau_platform.c @@ -43,11 +43,10 @@ static int nouveau_platform_probe(struct platform_device *pdev) return 0; } -static int nouveau_platform_remove(struct platform_device *pdev) +static void nouveau_platform_remove(struct platform_device *pdev) { struct drm_device *dev = platform_get_drvdata(pdev); nouveau_drm_device_remove(dev); - return 0; } #if IS_ENABLED(CONFIG_OF) @@ -93,5 +92,5 @@ struct platform_driver nouveau_platform_driver = { .of_match_table = of_match_ptr(nouveau_platform_match), }, .probe = nouveau_platform_probe, - .remove = nouveau_platform_remove, + .remove_new = nouveau_platform_remove, }; -- 2.39.2