All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 000/117] media: Convert to platform remove callback returning void
@ 2023-03-26 14:30 ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab, Benson Leung, Ajye Huang,
	Rory Liu, Scott Chao, Neil Armstrong, Kevin Hilman,
	Marek Szyprowski, Ettore Chimenti, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Sean Young, Sakari Ailus, Ricardo Ribalda,
	Laurent Pinchart, Yang Yingliang, Thierry Reding,
	Jonathan Hunter, Antti Palosaari, Michael Tretter, Ming Qian,
	Shijie Qin, Zhou Peng, Eddie James, Joel Stanley, Eugen Hristev,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Maxime Ripard,
	Philipp Zabel, Bin Liu, Matthias Brugger, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Moudy Ho, Qiheng Lin, Tiffany Lin,
	Yunfei Dong, Dmitry Osipenko, Xavier Roumegue, Mirela Rabulea,
	Shawn Guo, Sascha Hauer, Rui Miguel Silva, Robert Foss,
	Todor Tomov, Andy Gross, Bjorn Andersson, Stanimir Varbanov,
	Vikash Garodia, Niklas Söderlund, Fabrizio Castro,
	Kieran Bingham, Mikhail Ulyanov, Jacopo Mondi, Lad Prabhakar,
	Nathan Chancellor, Yang Li, Dan Carpenter, Jacob Chen,
	Ezequiel Garcia, Heiko Stuebner, Dafna Hirschfeld,
	Krzysztof Kozlowski, Colin Ian King, Sylwester Nawrocki,
	Sylwester Nawrocki, Łukasz Stelmach, Andrzej Pietrasiewicz,
	Jacek Anaszewski, Andrzej Hajda, Fabien Dessenne,
	Patrice Chotard, Hugues Fruchet, Jean-Christophe Trotin,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Yong Deng,
	Paul Kocialkowski, Christophe JAILLET, Lad, Prabhakar,
	Benoit Parrot, Hyun Kwon, Michal Simek, ye xingchen,
	Eduardo Valentin, Sean Wang, Daniel W. S. Almeida, Shuah Khan,
	Daniel Almeida, Hans Verkuil
  Cc: linux-media, kernel, Guenter Roeck, chrome-platform,
	Jerome Brunet, Martin Blumenstingl, linux-amlogic,
	linux-arm-kernel, linux-samsung-soc, linux-stm32, linux-tegra,
	Andrew Jeffery, openbmc, linux-aspeed,
	AngeloGioacchino Del Regno, linux-mediatek, NXP Linux Team,
	Fabio Estevam, Konrad Dybcio, linux-arm-msm, linux-renesas-soc,
	linux-rockchip, Alim Akhtar, linux-sunxi, Kieran Bingham

Hello,

this series adapts the platform drivers below drivers/pci to use the
.remove_new() callback. Compared to the traditional .remove() callback
.remove_new() returns no value. This is a good thing because the driver core
doesn't (and cannot) cope for errors during remove. The only effect of a
non-zero return value in .remove() is that the driver core emits a warning. The
device is removed anyhow and an early return from .remove() usually yields a
resource leak.

By changing the remove callback to return void driver authors cannot
reasonably assume any more that there is some kind of cleanup later.

Only three drivers needed some preparation first to make sure they
return 0 unconditionally in their remove callback. Then all drivers
could be trivially converted without side effects to .remove_new().

The changes to the individual drivers are all orthogonal. If I need to
resend some patches because of some review feedback, I'd like to only
send the patches that actually needed changes, so please pick up the
remaining patches that don't need changing to reduce the amount of mail.

Best regards
Uwe

Uwe Kleine-König (117):
  media: cec-gpio: Convert to platform remove callback returning void
  media: cros-ec-cec: Don't exit early in .remove() callback
  media: cros-ec-cec: Convert to platform remove callback returning void
  media: ao-cec-g12a: Convert to platform remove callback returning void
  media: ao-cec: Convert to platform remove callback returning void
  media: s5p_cec: Convert to platform remove callback returning void
  media: seco-cec: Convert to platform remove callback returning void
  media: stih-cec: Convert to platform remove callback returning void
  media: stm32-cec: Convert to platform remove callback returning void
  media: tegra_cec: Convert to platform remove callback returning void
  media: rtl2832_sdr: Convert to platform remove callback returning void
  media: zd1301_demod: Convert to platform remove callback returning
    void
  media: allegro-core: Convert to platform remove callback returning
    void
  media: ge2d: Convert to platform remove callback returning void
  media: vpu_core: Convert to platform remove callback returning void
  media: vpu_drv: Convert to platform remove callback returning void
  media: aspeed-video: Convert to platform remove callback returning
    void
  media: atmel-isi: Convert to platform remove callback returning void
  media: cdns-csi2rx: Convert to platform remove callback returning void
  media: cdns-csi2tx: Convert to platform remove callback returning void
  media: coda-common: Convert to platform remove callback returning void
  media: pxa_camera: Convert to platform remove callback returning void
  media: m2m-deinterlace: Convert to platform remove callback returning
    void
  media: marvell: Simplify remove callback
  media: marvell: Convert to platform remove callback returning void
  media: mtk_jpeg_core: Convert to platform remove callback returning
    void
  media: mtk_mdp_core: Convert to platform remove callback returning
    void
  media: mtk-mdp3-core: Convert to platform remove callback returning
    void
  media: mtk_vcodec_dec_drv: Convert to platform remove callback
    returning void
  media: mtk_vcodec_enc_drv: Convert to platform remove callback
    returning void
  media: mtk_vpu: Convert to platform remove callback returning void
  media: microchip-csi2dc: Convert to platform remove callback returning
    void
  media: microchip-sama5d2-isc: Convert to platform remove callback
    returning void
  media: microchip-sama7g5-isc: Convert to platform remove callback
    returning void
  media: vde: Convert to platform remove callback returning void
  media: dw100: Convert to platform remove callback returning void
  media: mxc-jpeg: Convert to platform remove callback returning void
  media: imx-mipi-csis: Convert to platform remove callback returning
    void
  media: imx-pxp: Convert to platform remove callback returning void
  media: imx7-media-csi: Convert to platform remove callback returning
    void
  media: mx2_emmaprp: Convert to platform remove callback returning void
  media: camss: Convert to platform remove callback returning void
  media: venus: Warn only once about problems in .remove()
  media: venus: Convert to platform remove callback returning void
  media: vdec: Convert to platform remove callback returning void
  media: venc: Convert to platform remove callback returning void
  media: rcar-fcp: Convert to platform remove callback returning void
  media: rcar-isp: Convert to platform remove callback returning void
  media: rcar-core: Convert to platform remove callback returning void
  media: rcar-csi2: Convert to platform remove callback returning void
  media: rcar_drif: Convert to platform remove callback returning void
  media: rcar_fdp1: Convert to platform remove callback returning void
  media: rcar_jpu: Convert to platform remove callback returning void
  media: renesas-ceu: Convert to platform remove callback returning void
  media: rzg2l-core: Convert to platform remove callback returning void
  media: rzg2l-csi2: Convert to platform remove callback returning void
  media: sh_vou: Convert to platform remove callback returning void
  media: vsp1_drv: Convert to platform remove callback returning void
  media: rga: Convert to platform remove callback returning void
  media: rkisp1-dev: Convert to platform remove callback returning void
  media: gsc-core: Convert to platform remove callback returning void
  media: fimc-core: Convert to platform remove callback returning void
  media: fimc-is-i2c: Convert to platform remove callback returning void
  media: fimc-is: Convert to platform remove callback returning void
  media: fimc-lite: Convert to platform remove callback returning void
  media: media-dev: Convert to platform remove callback returning void
  media: mipi-csis: Convert to platform remove callback returning void
  media: camif-core: Convert to platform remove callback returning void
  media: g2d: Convert to platform remove callback returning void
  media: jpeg-core: Convert to platform remove callback returning void
  media: s5p_mfc: Convert to platform remove callback returning void
  media: bdisp-v4l2: Convert to platform remove callback returning void
  media: c8sectpfe-core: Convert to platform remove callback returning
    void
  media: delta-v4l2: Convert to platform remove callback returning void
  media: hva-v4l2: Convert to platform remove callback returning void
  media: dma2d: Convert to platform remove callback returning void
  media: stm32-dcmi: Convert to platform remove callback returning void
  media: sun4i_csi: Convert to platform remove callback returning void
  media: sun6i_csi: Convert to platform remove callback returning void
  media: sun6i_mipi_csi2: Convert to platform remove callback returning
    void
  media: sun8i_a83t_mipi_csi2: Convert to platform remove callback
    returning void
  media: sun8i-di: Convert to platform remove callback returning void
  media: sun8i_rotate: Convert to platform remove callback returning
    void
  media: am437x-vpfe: Convert to platform remove callback returning void
  media: cal: Convert to platform remove callback returning void
  media: vpif: Convert to platform remove callback returning void
  media: vpif_capture: Convert to platform remove callback returning
    void
  media: vpif_display: Convert to platform remove callback returning
    void
  media: omap_vout: Convert to platform remove callback returning void
  media: isp: Convert to platform remove callback returning void
  media: vpe: Convert to platform remove callback returning void
  media: hantro_drv: Convert to platform remove callback returning void
  media: via-camera: Convert to platform remove callback returning void
  media: video-mux: Convert to platform remove callback returning void
  media: xilinx-csi2rxss: Convert to platform remove callback returning
    void
  media: xilinx-tpg: Convert to platform remove callback returning void
  media: xilinx-vipp: Convert to platform remove callback returning void
  media: xilinx-vtc: Convert to platform remove callback returning void
  media: radio-si476x: Convert to platform remove callback returning
    void
  media: radio-timb: Convert to platform remove callback returning void
  media: radio-wl1273: Convert to platform remove callback returning
    void
  media: radio-platform-si4713: Convert to platform remove callback
    returning void
  media: gpio-ir-recv: Convert to platform remove callback returning
    void
  media: img-ir-core: Convert to platform remove callback returning void
  media: ir-hix5hd2: Convert to platform remove callback returning void
  media: meson-ir-tx: Convert to platform remove callback returning void
  media: meson-ir: Convert to platform remove callback returning void
  media: mtk-cir: Convert to platform remove callback returning void
  media: st_rc: Convert to platform remove callback returning void
  media: sunxi-cir: Convert to platform remove callback returning void
  media: vicodec-core: Convert to platform remove callback returning
    void
  media: vidtv_bridge: Convert to platform remove callback returning
    void
  media: vim2m: Convert to platform remove callback returning void
  media: vimc-core: Convert to platform remove callback returning void
  media: visl-core: Convert to platform remove callback returning void
  media: vivid-core: Convert to platform remove callback returning void
  media: it913x: Convert to platform remove callback returning void

 drivers/media/cec/platform/cec-gpio/cec-gpio.c   |  5 ++---
 drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 16 ++++++++--------
 drivers/media/cec/platform/meson/ao-cec-g12a.c   |  6 ++----
 drivers/media/cec/platform/meson/ao-cec.c        |  6 ++----
 drivers/media/cec/platform/s5p/s5p_cec.c         |  5 ++---
 drivers/media/cec/platform/seco/seco-cec.c       |  6 ++----
 drivers/media/cec/platform/sti/stih-cec.c        |  6 ++----
 drivers/media/cec/platform/stm32/stm32-cec.c     |  6 ++----
 drivers/media/cec/platform/tegra/tegra_cec.c     |  6 ++----
 drivers/media/dvb-frontends/rtl2832_sdr.c        |  6 ++----
 drivers/media/dvb-frontends/zd1301_demod.c       |  6 ++----
 .../media/platform/allegro-dvt/allegro-core.c    |  6 ++----
 drivers/media/platform/amlogic/meson-ge2d/ge2d.c |  6 ++----
 drivers/media/platform/amphion/vpu_core.c        |  6 ++----
 drivers/media/platform/amphion/vpu_drv.c         |  6 ++----
 drivers/media/platform/aspeed/aspeed-video.c     |  6 ++----
 drivers/media/platform/atmel/atmel-isi.c         |  6 ++----
 drivers/media/platform/cadence/cdns-csi2rx.c     |  6 ++----
 drivers/media/platform/cadence/cdns-csi2tx.c     |  6 ++----
 drivers/media/platform/chips-media/coda-common.c |  5 ++---
 drivers/media/platform/intel/pxa_camera.c        |  6 ++----
 drivers/media/platform/m2m-deinterlace.c         |  6 ++----
 drivers/media/platform/marvell/mmp-driver.c      | 16 +++-------------
 .../media/platform/mediatek/jpeg/mtk_jpeg_core.c |  6 ++----
 .../media/platform/mediatek/mdp/mtk_mdp_core.c   |  5 ++---
 .../media/platform/mediatek/mdp3/mtk-mdp3-core.c |  5 ++---
 .../mediatek/vcodec/mtk_vcodec_dec_drv.c         |  5 ++---
 .../mediatek/vcodec/mtk_vcodec_enc_drv.c         |  5 ++---
 drivers/media/platform/mediatek/vpu/mtk_vpu.c    |  6 ++----
 .../media/platform/microchip/microchip-csi2dc.c  |  6 ++----
 .../platform/microchip/microchip-sama5d2-isc.c   |  6 ++----
 .../platform/microchip/microchip-sama7g5-isc.c   |  6 ++----
 drivers/media/platform/nvidia/tegra-vde/vde.c    |  6 ++----
 drivers/media/platform/nxp/dw100/dw100.c         |  6 ++----
 drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c   |  6 ++----
 drivers/media/platform/nxp/imx-mipi-csis.c       |  6 ++----
 drivers/media/platform/nxp/imx-pxp.c             |  6 ++----
 drivers/media/platform/nxp/imx7-media-csi.c      |  6 ++----
 drivers/media/platform/nxp/mx2_emmaprp.c         |  6 ++----
 drivers/media/platform/qcom/camss/camss.c        |  6 ++----
 drivers/media/platform/qcom/venus/core.c         |  6 ++----
 drivers/media/platform/qcom/venus/vdec.c         |  6 ++----
 drivers/media/platform/qcom/venus/venc.c         |  6 ++----
 drivers/media/platform/renesas/rcar-fcp.c        |  6 ++----
 drivers/media/platform/renesas/rcar-isp.c        |  6 ++----
 .../media/platform/renesas/rcar-vin/rcar-core.c  |  6 ++----
 .../media/platform/renesas/rcar-vin/rcar-csi2.c  |  6 ++----
 drivers/media/platform/renesas/rcar_drif.c       |  8 +++-----
 drivers/media/platform/renesas/rcar_fdp1.c       |  6 ++----
 drivers/media/platform/renesas/rcar_jpu.c        |  6 ++----
 drivers/media/platform/renesas/renesas-ceu.c     |  6 ++----
 .../platform/renesas/rzg2l-cru/rzg2l-core.c      |  6 ++----
 .../platform/renesas/rzg2l-cru/rzg2l-csi2.c      |  6 ++----
 drivers/media/platform/renesas/sh_vou.c          |  5 ++---
 drivers/media/platform/renesas/vsp1/vsp1_drv.c   |  6 ++----
 drivers/media/platform/rockchip/rga/rga.c        |  6 ++----
 .../media/platform/rockchip/rkisp1/rkisp1-dev.c  |  6 ++----
 .../media/platform/samsung/exynos-gsc/gsc-core.c |  5 ++---
 .../platform/samsung/exynos4-is/fimc-core.c      |  5 ++---
 .../platform/samsung/exynos4-is/fimc-is-i2c.c    |  6 ++----
 .../media/platform/samsung/exynos4-is/fimc-is.c  |  6 ++----
 .../platform/samsung/exynos4-is/fimc-lite.c      |  5 ++---
 .../platform/samsung/exynos4-is/media-dev.c      |  8 +++-----
 .../platform/samsung/exynos4-is/mipi-csis.c      |  6 ++----
 .../platform/samsung/s3c-camif/camif-core.c      |  6 ++----
 drivers/media/platform/samsung/s5p-g2d/g2d.c     |  5 ++---
 .../media/platform/samsung/s5p-jpeg/jpeg-core.c  |  6 ++----
 drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c |  5 ++---
 drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c |  6 ++----
 .../platform/st/sti/c8sectpfe/c8sectpfe-core.c   |  6 ++----
 drivers/media/platform/st/sti/delta/delta-v4l2.c |  6 ++----
 drivers/media/platform/st/sti/hva/hva-v4l2.c     |  6 ++----
 drivers/media/platform/st/stm32/dma2d/dma2d.c    |  6 ++----
 drivers/media/platform/st/stm32/stm32-dcmi.c     |  6 ++----
 .../media/platform/sunxi/sun4i-csi/sun4i_csi.c   |  6 ++----
 .../media/platform/sunxi/sun6i-csi/sun6i_csi.c   |  6 ++----
 .../sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c      |  6 ++----
 .../sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c  |  6 ++----
 drivers/media/platform/sunxi/sun8i-di/sun8i-di.c |  6 ++----
 .../platform/sunxi/sun8i-rotate/sun8i_rotate.c   |  6 ++----
 drivers/media/platform/ti/am437x/am437x-vpfe.c   |  6 ++----
 drivers/media/platform/ti/cal/cal.c              |  6 ++----
 drivers/media/platform/ti/davinci/vpif.c         |  6 ++----
 drivers/media/platform/ti/davinci/vpif_capture.c |  5 ++---
 drivers/media/platform/ti/davinci/vpif_display.c |  6 ++----
 drivers/media/platform/ti/omap/omap_vout.c       |  5 ++---
 drivers/media/platform/ti/omap3isp/isp.c         |  6 ++----
 drivers/media/platform/ti/vpe/vpe.c              |  6 ++----
 drivers/media/platform/verisilicon/hantro_drv.c  |  5 ++---
 drivers/media/platform/via/via-camera.c          |  5 ++---
 drivers/media/platform/video-mux.c               |  6 ++----
 drivers/media/platform/xilinx/xilinx-csi2rxss.c  |  6 ++----
 drivers/media/platform/xilinx/xilinx-tpg.c       |  6 ++----
 drivers/media/platform/xilinx/xilinx-vipp.c      |  6 ++----
 drivers/media/platform/xilinx/xilinx-vtc.c       |  6 ++----
 drivers/media/radio/radio-si476x.c               |  6 ++----
 drivers/media/radio/radio-timb.c                 |  5 ++---
 drivers/media/radio/radio-wl1273.c               |  6 ++----
 .../media/radio/si4713/radio-platform-si4713.c   |  6 ++----
 drivers/media/rc/gpio-ir-recv.c                  |  6 ++----
 drivers/media/rc/img-ir/img-ir-core.c            |  5 ++---
 drivers/media/rc/ir-hix5hd2.c                    |  5 ++---
 drivers/media/rc/meson-ir-tx.c                   |  6 ++----
 drivers/media/rc/meson-ir.c                      |  6 ++----
 drivers/media/rc/mtk-cir.c                       |  6 ++----
 drivers/media/rc/st_rc.c                         |  5 ++---
 drivers/media/rc/sunxi-cir.c                     |  6 ++----
 .../media/test-drivers/vicodec/vicodec-core.c    |  6 ++----
 drivers/media/test-drivers/vidtv/vidtv_bridge.c  |  6 ++----
 drivers/media/test-drivers/vim2m.c               |  6 ++----
 drivers/media/test-drivers/vimc/vimc-core.c      |  6 ++----
 drivers/media/test-drivers/visl/visl-core.c      |  6 ++----
 drivers/media/test-drivers/vivid/vivid-core.c    |  5 ++---
 drivers/media/tuners/it913x.c                    |  6 ++----
 114 files changed, 237 insertions(+), 449 deletions(-)

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2


^ permalink raw reply	[flat|nested] 255+ messages in thread

* [PATCH 000/117] media: Convert to platform remove callback returning void
@ 2023-03-26 14:30 ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab, Benson Leung, Ajye Huang,
	Rory Liu, Scott Chao, Neil Armstrong, Kevin Hilman,
	Marek Szyprowski, Ettore Chimenti, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Sean Young, Sakari Ailus, Ricardo Ribalda,
	Laurent Pinchart, Yang Yingliang, Thierry Reding,
	Jonathan Hunter, Antti Palosaari, Michael Tretter, Ming Qian,
	Shijie Qin, Zhou Peng, Eddie James, Joel Stanley, Eugen Hristev,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Maxime Ripard,
	Philipp Zabel, Bin Liu, Matthias Brugger, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Moudy Ho, Qiheng Lin, Tiffany Lin,
	Yunfei Dong, Dmitry Osipenko, Xavier Roumegue, Mirela Rabulea,
	Shawn Guo, Sascha Hauer, Rui Miguel Silva, Robert Foss,
	Todor Tomov, Andy Gross, Bjorn Andersson, Stanimir Varbanov,
	Vikash Garodia, Niklas Söderlund, Fabrizio Castro,
	Kieran Bingham, Mikhail Ulyanov, Jacopo Mondi, Lad Prabhakar,
	Nathan Chancellor, Yang Li, Dan Carpenter, Jacob Chen,
	Ezequiel Garcia, Heiko Stuebner, Dafna Hirschfeld,
	Krzysztof Kozlowski, Colin Ian King, Sylwester Nawrocki,
	Sylwester Nawrocki, Łukasz Stelmach, Andrzej Pietrasiewicz,
	Jacek Anaszewski, Andrzej Hajda, Fabien Dessenne,
	Patrice Chotard, Hugues Fruchet, Jean-Christophe Trotin,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Yong Deng,
	Paul Kocialkowski, Christophe JAILLET, Lad, Prabhakar,
	Benoit Parrot, Hyun Kwon, Michal Simek, ye xingchen,
	Eduardo Valentin, Sean Wang, Daniel W. S. Almeida, Shuah Khan,
	Daniel Almeida, Hans Verkuil
  Cc: linux-media, kernel, Guenter Roeck, chrome-platform,
	Jerome Brunet, Martin Blumenstingl, linux-amlogic,
	linux-arm-kernel, linux-samsung-soc, linux-stm32, linux-tegra,
	Andrew Jeffery, openbmc, linux-aspeed,
	AngeloGioacchino Del Regno, linux-mediatek, NXP Linux Team,
	Fabio Estevam, Konrad Dybcio, linux-arm-msm, linux-renesas-soc,
	linux-rockchip, Alim Akhtar, linux-sunxi, Kieran Bingham

Hello,

this series adapts the platform drivers below drivers/pci to use the
.remove_new() callback. Compared to the traditional .remove() callback
.remove_new() returns no value. This is a good thing because the driver core
doesn't (and cannot) cope for errors during remove. The only effect of a
non-zero return value in .remove() is that the driver core emits a warning. The
device is removed anyhow and an early return from .remove() usually yields a
resource leak.

By changing the remove callback to return void driver authors cannot
reasonably assume any more that there is some kind of cleanup later.

Only three drivers needed some preparation first to make sure they
return 0 unconditionally in their remove callback. Then all drivers
could be trivially converted without side effects to .remove_new().

The changes to the individual drivers are all orthogonal. If I need to
resend some patches because of some review feedback, I'd like to only
send the patches that actually needed changes, so please pick up the
remaining patches that don't need changing to reduce the amount of mail.

Best regards
Uwe

Uwe Kleine-König (117):
  media: cec-gpio: Convert to platform remove callback returning void
  media: cros-ec-cec: Don't exit early in .remove() callback
  media: cros-ec-cec: Convert to platform remove callback returning void
  media: ao-cec-g12a: Convert to platform remove callback returning void
  media: ao-cec: Convert to platform remove callback returning void
  media: s5p_cec: Convert to platform remove callback returning void
  media: seco-cec: Convert to platform remove callback returning void
  media: stih-cec: Convert to platform remove callback returning void
  media: stm32-cec: Convert to platform remove callback returning void
  media: tegra_cec: Convert to platform remove callback returning void
  media: rtl2832_sdr: Convert to platform remove callback returning void
  media: zd1301_demod: Convert to platform remove callback returning
    void
  media: allegro-core: Convert to platform remove callback returning
    void
  media: ge2d: Convert to platform remove callback returning void
  media: vpu_core: Convert to platform remove callback returning void
  media: vpu_drv: Convert to platform remove callback returning void
  media: aspeed-video: Convert to platform remove callback returning
    void
  media: atmel-isi: Convert to platform remove callback returning void
  media: cdns-csi2rx: Convert to platform remove callback returning void
  media: cdns-csi2tx: Convert to platform remove callback returning void
  media: coda-common: Convert to platform remove callback returning void
  media: pxa_camera: Convert to platform remove callback returning void
  media: m2m-deinterlace: Convert to platform remove callback returning
    void
  media: marvell: Simplify remove callback
  media: marvell: Convert to platform remove callback returning void
  media: mtk_jpeg_core: Convert to platform remove callback returning
    void
  media: mtk_mdp_core: Convert to platform remove callback returning
    void
  media: mtk-mdp3-core: Convert to platform remove callback returning
    void
  media: mtk_vcodec_dec_drv: Convert to platform remove callback
    returning void
  media: mtk_vcodec_enc_drv: Convert to platform remove callback
    returning void
  media: mtk_vpu: Convert to platform remove callback returning void
  media: microchip-csi2dc: Convert to platform remove callback returning
    void
  media: microchip-sama5d2-isc: Convert to platform remove callback
    returning void
  media: microchip-sama7g5-isc: Convert to platform remove callback
    returning void
  media: vde: Convert to platform remove callback returning void
  media: dw100: Convert to platform remove callback returning void
  media: mxc-jpeg: Convert to platform remove callback returning void
  media: imx-mipi-csis: Convert to platform remove callback returning
    void
  media: imx-pxp: Convert to platform remove callback returning void
  media: imx7-media-csi: Convert to platform remove callback returning
    void
  media: mx2_emmaprp: Convert to platform remove callback returning void
  media: camss: Convert to platform remove callback returning void
  media: venus: Warn only once about problems in .remove()
  media: venus: Convert to platform remove callback returning void
  media: vdec: Convert to platform remove callback returning void
  media: venc: Convert to platform remove callback returning void
  media: rcar-fcp: Convert to platform remove callback returning void
  media: rcar-isp: Convert to platform remove callback returning void
  media: rcar-core: Convert to platform remove callback returning void
  media: rcar-csi2: Convert to platform remove callback returning void
  media: rcar_drif: Convert to platform remove callback returning void
  media: rcar_fdp1: Convert to platform remove callback returning void
  media: rcar_jpu: Convert to platform remove callback returning void
  media: renesas-ceu: Convert to platform remove callback returning void
  media: rzg2l-core: Convert to platform remove callback returning void
  media: rzg2l-csi2: Convert to platform remove callback returning void
  media: sh_vou: Convert to platform remove callback returning void
  media: vsp1_drv: Convert to platform remove callback returning void
  media: rga: Convert to platform remove callback returning void
  media: rkisp1-dev: Convert to platform remove callback returning void
  media: gsc-core: Convert to platform remove callback returning void
  media: fimc-core: Convert to platform remove callback returning void
  media: fimc-is-i2c: Convert to platform remove callback returning void
  media: fimc-is: Convert to platform remove callback returning void
  media: fimc-lite: Convert to platform remove callback returning void
  media: media-dev: Convert to platform remove callback returning void
  media: mipi-csis: Convert to platform remove callback returning void
  media: camif-core: Convert to platform remove callback returning void
  media: g2d: Convert to platform remove callback returning void
  media: jpeg-core: Convert to platform remove callback returning void
  media: s5p_mfc: Convert to platform remove callback returning void
  media: bdisp-v4l2: Convert to platform remove callback returning void
  media: c8sectpfe-core: Convert to platform remove callback returning
    void
  media: delta-v4l2: Convert to platform remove callback returning void
  media: hva-v4l2: Convert to platform remove callback returning void
  media: dma2d: Convert to platform remove callback returning void
  media: stm32-dcmi: Convert to platform remove callback returning void
  media: sun4i_csi: Convert to platform remove callback returning void
  media: sun6i_csi: Convert to platform remove callback returning void
  media: sun6i_mipi_csi2: Convert to platform remove callback returning
    void
  media: sun8i_a83t_mipi_csi2: Convert to platform remove callback
    returning void
  media: sun8i-di: Convert to platform remove callback returning void
  media: sun8i_rotate: Convert to platform remove callback returning
    void
  media: am437x-vpfe: Convert to platform remove callback returning void
  media: cal: Convert to platform remove callback returning void
  media: vpif: Convert to platform remove callback returning void
  media: vpif_capture: Convert to platform remove callback returning
    void
  media: vpif_display: Convert to platform remove callback returning
    void
  media: omap_vout: Convert to platform remove callback returning void
  media: isp: Convert to platform remove callback returning void
  media: vpe: Convert to platform remove callback returning void
  media: hantro_drv: Convert to platform remove callback returning void
  media: via-camera: Convert to platform remove callback returning void
  media: video-mux: Convert to platform remove callback returning void
  media: xilinx-csi2rxss: Convert to platform remove callback returning
    void
  media: xilinx-tpg: Convert to platform remove callback returning void
  media: xilinx-vipp: Convert to platform remove callback returning void
  media: xilinx-vtc: Convert to platform remove callback returning void
  media: radio-si476x: Convert to platform remove callback returning
    void
  media: radio-timb: Convert to platform remove callback returning void
  media: radio-wl1273: Convert to platform remove callback returning
    void
  media: radio-platform-si4713: Convert to platform remove callback
    returning void
  media: gpio-ir-recv: Convert to platform remove callback returning
    void
  media: img-ir-core: Convert to platform remove callback returning void
  media: ir-hix5hd2: Convert to platform remove callback returning void
  media: meson-ir-tx: Convert to platform remove callback returning void
  media: meson-ir: Convert to platform remove callback returning void
  media: mtk-cir: Convert to platform remove callback returning void
  media: st_rc: Convert to platform remove callback returning void
  media: sunxi-cir: Convert to platform remove callback returning void
  media: vicodec-core: Convert to platform remove callback returning
    void
  media: vidtv_bridge: Convert to platform remove callback returning
    void
  media: vim2m: Convert to platform remove callback returning void
  media: vimc-core: Convert to platform remove callback returning void
  media: visl-core: Convert to platform remove callback returning void
  media: vivid-core: Convert to platform remove callback returning void
  media: it913x: Convert to platform remove callback returning void

 drivers/media/cec/platform/cec-gpio/cec-gpio.c   |  5 ++---
 drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 16 ++++++++--------
 drivers/media/cec/platform/meson/ao-cec-g12a.c   |  6 ++----
 drivers/media/cec/platform/meson/ao-cec.c        |  6 ++----
 drivers/media/cec/platform/s5p/s5p_cec.c         |  5 ++---
 drivers/media/cec/platform/seco/seco-cec.c       |  6 ++----
 drivers/media/cec/platform/sti/stih-cec.c        |  6 ++----
 drivers/media/cec/platform/stm32/stm32-cec.c     |  6 ++----
 drivers/media/cec/platform/tegra/tegra_cec.c     |  6 ++----
 drivers/media/dvb-frontends/rtl2832_sdr.c        |  6 ++----
 drivers/media/dvb-frontends/zd1301_demod.c       |  6 ++----
 .../media/platform/allegro-dvt/allegro-core.c    |  6 ++----
 drivers/media/platform/amlogic/meson-ge2d/ge2d.c |  6 ++----
 drivers/media/platform/amphion/vpu_core.c        |  6 ++----
 drivers/media/platform/amphion/vpu_drv.c         |  6 ++----
 drivers/media/platform/aspeed/aspeed-video.c     |  6 ++----
 drivers/media/platform/atmel/atmel-isi.c         |  6 ++----
 drivers/media/platform/cadence/cdns-csi2rx.c     |  6 ++----
 drivers/media/platform/cadence/cdns-csi2tx.c     |  6 ++----
 drivers/media/platform/chips-media/coda-common.c |  5 ++---
 drivers/media/platform/intel/pxa_camera.c        |  6 ++----
 drivers/media/platform/m2m-deinterlace.c         |  6 ++----
 drivers/media/platform/marvell/mmp-driver.c      | 16 +++-------------
 .../media/platform/mediatek/jpeg/mtk_jpeg_core.c |  6 ++----
 .../media/platform/mediatek/mdp/mtk_mdp_core.c   |  5 ++---
 .../media/platform/mediatek/mdp3/mtk-mdp3-core.c |  5 ++---
 .../mediatek/vcodec/mtk_vcodec_dec_drv.c         |  5 ++---
 .../mediatek/vcodec/mtk_vcodec_enc_drv.c         |  5 ++---
 drivers/media/platform/mediatek/vpu/mtk_vpu.c    |  6 ++----
 .../media/platform/microchip/microchip-csi2dc.c  |  6 ++----
 .../platform/microchip/microchip-sama5d2-isc.c   |  6 ++----
 .../platform/microchip/microchip-sama7g5-isc.c   |  6 ++----
 drivers/media/platform/nvidia/tegra-vde/vde.c    |  6 ++----
 drivers/media/platform/nxp/dw100/dw100.c         |  6 ++----
 drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c   |  6 ++----
 drivers/media/platform/nxp/imx-mipi-csis.c       |  6 ++----
 drivers/media/platform/nxp/imx-pxp.c             |  6 ++----
 drivers/media/platform/nxp/imx7-media-csi.c      |  6 ++----
 drivers/media/platform/nxp/mx2_emmaprp.c         |  6 ++----
 drivers/media/platform/qcom/camss/camss.c        |  6 ++----
 drivers/media/platform/qcom/venus/core.c         |  6 ++----
 drivers/media/platform/qcom/venus/vdec.c         |  6 ++----
 drivers/media/platform/qcom/venus/venc.c         |  6 ++----
 drivers/media/platform/renesas/rcar-fcp.c        |  6 ++----
 drivers/media/platform/renesas/rcar-isp.c        |  6 ++----
 .../media/platform/renesas/rcar-vin/rcar-core.c  |  6 ++----
 .../media/platform/renesas/rcar-vin/rcar-csi2.c  |  6 ++----
 drivers/media/platform/renesas/rcar_drif.c       |  8 +++-----
 drivers/media/platform/renesas/rcar_fdp1.c       |  6 ++----
 drivers/media/platform/renesas/rcar_jpu.c        |  6 ++----
 drivers/media/platform/renesas/renesas-ceu.c     |  6 ++----
 .../platform/renesas/rzg2l-cru/rzg2l-core.c      |  6 ++----
 .../platform/renesas/rzg2l-cru/rzg2l-csi2.c      |  6 ++----
 drivers/media/platform/renesas/sh_vou.c          |  5 ++---
 drivers/media/platform/renesas/vsp1/vsp1_drv.c   |  6 ++----
 drivers/media/platform/rockchip/rga/rga.c        |  6 ++----
 .../media/platform/rockchip/rkisp1/rkisp1-dev.c  |  6 ++----
 .../media/platform/samsung/exynos-gsc/gsc-core.c |  5 ++---
 .../platform/samsung/exynos4-is/fimc-core.c      |  5 ++---
 .../platform/samsung/exynos4-is/fimc-is-i2c.c    |  6 ++----
 .../media/platform/samsung/exynos4-is/fimc-is.c  |  6 ++----
 .../platform/samsung/exynos4-is/fimc-lite.c      |  5 ++---
 .../platform/samsung/exynos4-is/media-dev.c      |  8 +++-----
 .../platform/samsung/exynos4-is/mipi-csis.c      |  6 ++----
 .../platform/samsung/s3c-camif/camif-core.c      |  6 ++----
 drivers/media/platform/samsung/s5p-g2d/g2d.c     |  5 ++---
 .../media/platform/samsung/s5p-jpeg/jpeg-core.c  |  6 ++----
 drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c |  5 ++---
 drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c |  6 ++----
 .../platform/st/sti/c8sectpfe/c8sectpfe-core.c   |  6 ++----
 drivers/media/platform/st/sti/delta/delta-v4l2.c |  6 ++----
 drivers/media/platform/st/sti/hva/hva-v4l2.c     |  6 ++----
 drivers/media/platform/st/stm32/dma2d/dma2d.c    |  6 ++----
 drivers/media/platform/st/stm32/stm32-dcmi.c     |  6 ++----
 .../media/platform/sunxi/sun4i-csi/sun4i_csi.c   |  6 ++----
 .../media/platform/sunxi/sun6i-csi/sun6i_csi.c   |  6 ++----
 .../sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c      |  6 ++----
 .../sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c  |  6 ++----
 drivers/media/platform/sunxi/sun8i-di/sun8i-di.c |  6 ++----
 .../platform/sunxi/sun8i-rotate/sun8i_rotate.c   |  6 ++----
 drivers/media/platform/ti/am437x/am437x-vpfe.c   |  6 ++----
 drivers/media/platform/ti/cal/cal.c              |  6 ++----
 drivers/media/platform/ti/davinci/vpif.c         |  6 ++----
 drivers/media/platform/ti/davinci/vpif_capture.c |  5 ++---
 drivers/media/platform/ti/davinci/vpif_display.c |  6 ++----
 drivers/media/platform/ti/omap/omap_vout.c       |  5 ++---
 drivers/media/platform/ti/omap3isp/isp.c         |  6 ++----
 drivers/media/platform/ti/vpe/vpe.c              |  6 ++----
 drivers/media/platform/verisilicon/hantro_drv.c  |  5 ++---
 drivers/media/platform/via/via-camera.c          |  5 ++---
 drivers/media/platform/video-mux.c               |  6 ++----
 drivers/media/platform/xilinx/xilinx-csi2rxss.c  |  6 ++----
 drivers/media/platform/xilinx/xilinx-tpg.c       |  6 ++----
 drivers/media/platform/xilinx/xilinx-vipp.c      |  6 ++----
 drivers/media/platform/xilinx/xilinx-vtc.c       |  6 ++----
 drivers/media/radio/radio-si476x.c               |  6 ++----
 drivers/media/radio/radio-timb.c                 |  5 ++---
 drivers/media/radio/radio-wl1273.c               |  6 ++----
 .../media/radio/si4713/radio-platform-si4713.c   |  6 ++----
 drivers/media/rc/gpio-ir-recv.c                  |  6 ++----
 drivers/media/rc/img-ir/img-ir-core.c            |  5 ++---
 drivers/media/rc/ir-hix5hd2.c                    |  5 ++---
 drivers/media/rc/meson-ir-tx.c                   |  6 ++----
 drivers/media/rc/meson-ir.c                      |  6 ++----
 drivers/media/rc/mtk-cir.c                       |  6 ++----
 drivers/media/rc/st_rc.c                         |  5 ++---
 drivers/media/rc/sunxi-cir.c                     |  6 ++----
 .../media/test-drivers/vicodec/vicodec-core.c    |  6 ++----
 drivers/media/test-drivers/vidtv/vidtv_bridge.c  |  6 ++----
 drivers/media/test-drivers/vim2m.c               |  6 ++----
 drivers/media/test-drivers/vimc/vimc-core.c      |  6 ++----
 drivers/media/test-drivers/visl/visl-core.c      |  6 ++----
 drivers/media/test-drivers/vivid/vivid-core.c    |  5 ++---
 drivers/media/tuners/it913x.c                    |  6 ++----
 114 files changed, 237 insertions(+), 449 deletions(-)

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 255+ messages in thread

* [PATCH 001/117] media: cec-gpio: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/cec-gpio/cec-gpio.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/cec/platform/cec-gpio/cec-gpio.c b/drivers/media/cec/platform/cec-gpio/cec-gpio.c
index c8c4efc83f5f..ff34490fd869 100644
--- a/drivers/media/cec/platform/cec-gpio/cec-gpio.c
+++ b/drivers/media/cec/platform/cec-gpio/cec-gpio.c
@@ -269,13 +269,12 @@ static int cec_gpio_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int cec_gpio_remove(struct platform_device *pdev)
+static void cec_gpio_remove(struct platform_device *pdev)
 {
 	struct cec_gpio *cec = platform_get_drvdata(pdev);
 
 	cec_notifier_cec_adap_unregister(cec->notifier, cec->adap);
 	cec_unregister_adapter(cec->adap);
-	return 0;
 }
 
 static const struct of_device_id cec_gpio_match[] = {
@@ -288,7 +287,7 @@ MODULE_DEVICE_TABLE(of, cec_gpio_match);
 
 static struct platform_driver cec_gpio_pdrv = {
 	.probe	= cec_gpio_probe,
-	.remove = cec_gpio_remove,
+	.remove_new = cec_gpio_remove,
 	.driver = {
 		.name		= "cec-gpio",
 		.of_match_table	= cec_gpio_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 001/117] media: cros-ec-cec: Don't exit early in .remove() callback
  2023-03-26 14:30 ` Uwe Kleine-König
  (?)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  2023-03-26 14:52   ` Uwe Kleine-König
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab, Benson Leung,
	Uwe Kleine-König, Ajye Huang, Rory Liu, Scott Chao
  Cc: Guenter Roeck, linux-media, chrome-platform, kernel

Exiting early in remove without releasing all acquired resources yields
leaks. Note that e.g. memory allocated with devm_zalloc() is freed after
.remove() returns, even if the return code was negative.

While blocking_notifier_chain_unregister() won't fail and so the
change is somewhat cosmetic, platform driver's .remove callbacks are
about to be converted to return void. To prepare that, keep the error
message but don't return early.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
index 6ebedc71d67d..960432230bbf 100644
--- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
+++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
@@ -332,14 +332,16 @@ static int cros_ec_cec_remove(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	int ret;
 
+	/*
+	 * blocking_notifier_chain_unregister() only fails if the notifier isn't
+	 * in the list. We know it was added to it by .probe(), so there should
+	 * be no need for error checking. Be cautious and still check.
+	 */
 	ret = blocking_notifier_chain_unregister(
 			&cros_ec_cec->cros_ec->event_notifier,
 			&cros_ec_cec->notifier);
-
-	if (ret) {
+	if (ret)
 		dev_err(dev, "failed to unregister notifier\n");
-		return ret;
-	}
 
 	cec_notifier_cec_adap_unregister(cros_ec_cec->notify,
 					 cros_ec_cec->adap);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 002/117] media: cec-gpio: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (2 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  2023-03-26 14:49   ` Uwe Kleine-König
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/cec-gpio/cec-gpio.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/cec/platform/cec-gpio/cec-gpio.c b/drivers/media/cec/platform/cec-gpio/cec-gpio.c
index c8c4efc83f5f..ff34490fd869 100644
--- a/drivers/media/cec/platform/cec-gpio/cec-gpio.c
+++ b/drivers/media/cec/platform/cec-gpio/cec-gpio.c
@@ -269,13 +269,12 @@ static int cec_gpio_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int cec_gpio_remove(struct platform_device *pdev)
+static void cec_gpio_remove(struct platform_device *pdev)
 {
 	struct cec_gpio *cec = platform_get_drvdata(pdev);
 
 	cec_notifier_cec_adap_unregister(cec->notifier, cec->adap);
 	cec_unregister_adapter(cec->adap);
-	return 0;
 }
 
 static const struct of_device_id cec_gpio_match[] = {
@@ -288,7 +287,7 @@ MODULE_DEVICE_TABLE(of, cec_gpio_match);
 
 static struct platform_driver cec_gpio_pdrv = {
 	.probe	= cec_gpio_probe,
-	.remove = cec_gpio_remove,
+	.remove_new = cec_gpio_remove,
 	.driver = {
 		.name		= "cec-gpio",
 		.of_match_table	= cec_gpio_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 002/117] media: cros-ec-cec: Don't exit early in .remove() callback
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (3 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  2023-03-26 14:45   ` Guenter Roeck
  2023-03-27  7:52   ` Hans Verkuil
  -1 siblings, 2 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab, Benson Leung,
	Uwe Kleine-König, Ajye Huang, Scott Chao, Rory Liu
  Cc: Guenter Roeck, linux-media, chrome-platform, kernel

Exiting early in remove without releasing all acquired resources yields
leaks. Note that e.g. memory allocated with devm_zalloc() is freed after
.remove() returns, even if the return code was negative.

While blocking_notifier_chain_unregister() won't fail and so the
change is somewhat cosmetic, platform driver's .remove callbacks are
about to be converted to return void. To prepare that, keep the error
message but don't return early.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
index 6ebedc71d67d..960432230bbf 100644
--- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
+++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
@@ -332,14 +332,16 @@ static int cros_ec_cec_remove(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	int ret;
 
+	/*
+	 * blocking_notifier_chain_unregister() only fails if the notifier isn't
+	 * in the list. We know it was added to it by .probe(), so there should
+	 * be no need for error checking. Be cautious and still check.
+	 */
 	ret = blocking_notifier_chain_unregister(
 			&cros_ec_cec->cros_ec->event_notifier,
 			&cros_ec_cec->notifier);
-
-	if (ret) {
+	if (ret)
 		dev_err(dev, "failed to unregister notifier\n");
-		return ret;
-	}
 
 	cec_notifier_cec_adap_unregister(cros_ec_cec->notify,
 					 cros_ec_cec->adap);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 003/117] media: cros-ec-cec: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (4 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  2023-03-26 14:46   ` Guenter Roeck
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab, Benson Leung,
	Uwe Kleine-König, Scott Chao, Rory Liu, Ajye Huang
  Cc: Guenter Roeck, linux-media, chrome-platform, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
index 960432230bbf..3d2600af9fc1 100644
--- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
+++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
@@ -326,7 +326,7 @@ static int cros_ec_cec_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int cros_ec_cec_remove(struct platform_device *pdev)
+static void cros_ec_cec_remove(struct platform_device *pdev)
 {
 	struct cros_ec_cec *cros_ec_cec = platform_get_drvdata(pdev);
 	struct device *dev = &pdev->dev;
@@ -346,13 +346,11 @@ static int cros_ec_cec_remove(struct platform_device *pdev)
 	cec_notifier_cec_adap_unregister(cros_ec_cec->notify,
 					 cros_ec_cec->adap);
 	cec_unregister_adapter(cros_ec_cec->adap);
-
-	return 0;
 }
 
 static struct platform_driver cros_ec_cec_driver = {
 	.probe = cros_ec_cec_probe,
-	.remove  = cros_ec_cec_remove,
+	.remove_new = cros_ec_cec_remove,
 	.driver = {
 		.name = DRV_NAME,
 		.pm = &cros_ec_cec_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 004/117] media: ao-cec-g12a: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
  (?)
@ 2023-03-26 14:30   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/meson/ao-cec-g12a.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/meson/ao-cec-g12a.c b/drivers/media/cec/platform/meson/ao-cec-g12a.c
index 68fe6d6a8178..51294b9b6cd5 100644
--- a/drivers/media/cec/platform/meson/ao-cec-g12a.c
+++ b/drivers/media/cec/platform/meson/ao-cec-g12a.c
@@ -744,7 +744,7 @@ static int meson_ao_cec_g12a_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int meson_ao_cec_g12a_remove(struct platform_device *pdev)
+static void meson_ao_cec_g12a_remove(struct platform_device *pdev)
 {
 	struct meson_ao_cec_g12a_device *ao_cec = platform_get_drvdata(pdev);
 
@@ -753,8 +753,6 @@ static int meson_ao_cec_g12a_remove(struct platform_device *pdev)
 	cec_notifier_cec_adap_unregister(ao_cec->notify, ao_cec->adap);
 
 	cec_unregister_adapter(ao_cec->adap);
-
-	return 0;
 }
 
 static const struct meson_ao_cec_g12a_data ao_cec_g12a_data = {
@@ -780,7 +778,7 @@ MODULE_DEVICE_TABLE(of, meson_ao_cec_g12a_of_match);
 
 static struct platform_driver meson_ao_cec_g12a_driver = {
 	.probe   = meson_ao_cec_g12a_probe,
-	.remove  = meson_ao_cec_g12a_remove,
+	.remove_new = meson_ao_cec_g12a_remove,
 	.driver  = {
 		.name = "meson-ao-cec-g12a",
 		.of_match_table = of_match_ptr(meson_ao_cec_g12a_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 004/117] media: ao-cec-g12a: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/meson/ao-cec-g12a.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/meson/ao-cec-g12a.c b/drivers/media/cec/platform/meson/ao-cec-g12a.c
index 68fe6d6a8178..51294b9b6cd5 100644
--- a/drivers/media/cec/platform/meson/ao-cec-g12a.c
+++ b/drivers/media/cec/platform/meson/ao-cec-g12a.c
@@ -744,7 +744,7 @@ static int meson_ao_cec_g12a_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int meson_ao_cec_g12a_remove(struct platform_device *pdev)
+static void meson_ao_cec_g12a_remove(struct platform_device *pdev)
 {
 	struct meson_ao_cec_g12a_device *ao_cec = platform_get_drvdata(pdev);
 
@@ -753,8 +753,6 @@ static int meson_ao_cec_g12a_remove(struct platform_device *pdev)
 	cec_notifier_cec_adap_unregister(ao_cec->notify, ao_cec->adap);
 
 	cec_unregister_adapter(ao_cec->adap);
-
-	return 0;
 }
 
 static const struct meson_ao_cec_g12a_data ao_cec_g12a_data = {
@@ -780,7 +778,7 @@ MODULE_DEVICE_TABLE(of, meson_ao_cec_g12a_of_match);
 
 static struct platform_driver meson_ao_cec_g12a_driver = {
 	.probe   = meson_ao_cec_g12a_probe,
-	.remove  = meson_ao_cec_g12a_remove,
+	.remove_new = meson_ao_cec_g12a_remove,
 	.driver  = {
 		.name = "meson-ao-cec-g12a",
 		.of_match_table = of_match_ptr(meson_ao_cec_g12a_of_match),
-- 
2.39.2


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 004/117] media: ao-cec-g12a: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/meson/ao-cec-g12a.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/meson/ao-cec-g12a.c b/drivers/media/cec/platform/meson/ao-cec-g12a.c
index 68fe6d6a8178..51294b9b6cd5 100644
--- a/drivers/media/cec/platform/meson/ao-cec-g12a.c
+++ b/drivers/media/cec/platform/meson/ao-cec-g12a.c
@@ -744,7 +744,7 @@ static int meson_ao_cec_g12a_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int meson_ao_cec_g12a_remove(struct platform_device *pdev)
+static void meson_ao_cec_g12a_remove(struct platform_device *pdev)
 {
 	struct meson_ao_cec_g12a_device *ao_cec = platform_get_drvdata(pdev);
 
@@ -753,8 +753,6 @@ static int meson_ao_cec_g12a_remove(struct platform_device *pdev)
 	cec_notifier_cec_adap_unregister(ao_cec->notify, ao_cec->adap);
 
 	cec_unregister_adapter(ao_cec->adap);
-
-	return 0;
 }
 
 static const struct meson_ao_cec_g12a_data ao_cec_g12a_data = {
@@ -780,7 +778,7 @@ MODULE_DEVICE_TABLE(of, meson_ao_cec_g12a_of_match);
 
 static struct platform_driver meson_ao_cec_g12a_driver = {
 	.probe   = meson_ao_cec_g12a_probe,
-	.remove  = meson_ao_cec_g12a_remove,
+	.remove_new = meson_ao_cec_g12a_remove,
 	.driver  = {
 		.name = "meson-ao-cec-g12a",
 		.of_match_table = of_match_ptr(meson_ao_cec_g12a_of_match),
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 005/117] media: ao-cec: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
  (?)
@ 2023-03-26 14:30   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/meson/ao-cec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/meson/ao-cec.c b/drivers/media/cec/platform/meson/ao-cec.c
index 6b440f0635d9..f6f51a34f7bd 100644
--- a/drivers/media/cec/platform/meson/ao-cec.c
+++ b/drivers/media/cec/platform/meson/ao-cec.c
@@ -696,7 +696,7 @@ static int meson_ao_cec_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int meson_ao_cec_remove(struct platform_device *pdev)
+static void meson_ao_cec_remove(struct platform_device *pdev)
 {
 	struct meson_ao_cec_device *ao_cec = platform_get_drvdata(pdev);
 
@@ -704,8 +704,6 @@ static int meson_ao_cec_remove(struct platform_device *pdev)
 
 	cec_notifier_cec_adap_unregister(ao_cec->notify, ao_cec->adap);
 	cec_unregister_adapter(ao_cec->adap);
-
-	return 0;
 }
 
 static const struct of_device_id meson_ao_cec_of_match[] = {
@@ -716,7 +714,7 @@ MODULE_DEVICE_TABLE(of, meson_ao_cec_of_match);
 
 static struct platform_driver meson_ao_cec_driver = {
 	.probe   = meson_ao_cec_probe,
-	.remove  = meson_ao_cec_remove,
+	.remove_new = meson_ao_cec_remove,
 	.driver  = {
 		.name = "meson-ao-cec",
 		.of_match_table = of_match_ptr(meson_ao_cec_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 005/117] media: ao-cec: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/meson/ao-cec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/meson/ao-cec.c b/drivers/media/cec/platform/meson/ao-cec.c
index 6b440f0635d9..f6f51a34f7bd 100644
--- a/drivers/media/cec/platform/meson/ao-cec.c
+++ b/drivers/media/cec/platform/meson/ao-cec.c
@@ -696,7 +696,7 @@ static int meson_ao_cec_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int meson_ao_cec_remove(struct platform_device *pdev)
+static void meson_ao_cec_remove(struct platform_device *pdev)
 {
 	struct meson_ao_cec_device *ao_cec = platform_get_drvdata(pdev);
 
@@ -704,8 +704,6 @@ static int meson_ao_cec_remove(struct platform_device *pdev)
 
 	cec_notifier_cec_adap_unregister(ao_cec->notify, ao_cec->adap);
 	cec_unregister_adapter(ao_cec->adap);
-
-	return 0;
 }
 
 static const struct of_device_id meson_ao_cec_of_match[] = {
@@ -716,7 +714,7 @@ MODULE_DEVICE_TABLE(of, meson_ao_cec_of_match);
 
 static struct platform_driver meson_ao_cec_driver = {
 	.probe   = meson_ao_cec_probe,
-	.remove  = meson_ao_cec_remove,
+	.remove_new = meson_ao_cec_remove,
 	.driver  = {
 		.name = "meson-ao-cec",
 		.of_match_table = of_match_ptr(meson_ao_cec_of_match),
-- 
2.39.2


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 005/117] media: ao-cec: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/meson/ao-cec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/meson/ao-cec.c b/drivers/media/cec/platform/meson/ao-cec.c
index 6b440f0635d9..f6f51a34f7bd 100644
--- a/drivers/media/cec/platform/meson/ao-cec.c
+++ b/drivers/media/cec/platform/meson/ao-cec.c
@@ -696,7 +696,7 @@ static int meson_ao_cec_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int meson_ao_cec_remove(struct platform_device *pdev)
+static void meson_ao_cec_remove(struct platform_device *pdev)
 {
 	struct meson_ao_cec_device *ao_cec = platform_get_drvdata(pdev);
 
@@ -704,8 +704,6 @@ static int meson_ao_cec_remove(struct platform_device *pdev)
 
 	cec_notifier_cec_adap_unregister(ao_cec->notify, ao_cec->adap);
 	cec_unregister_adapter(ao_cec->adap);
-
-	return 0;
 }
 
 static const struct of_device_id meson_ao_cec_of_match[] = {
@@ -716,7 +714,7 @@ MODULE_DEVICE_TABLE(of, meson_ao_cec_of_match);
 
 static struct platform_driver meson_ao_cec_driver = {
 	.probe   = meson_ao_cec_probe,
-	.remove  = meson_ao_cec_remove,
+	.remove_new = meson_ao_cec_remove,
 	.driver  = {
 		.name = "meson-ao-cec",
 		.of_match_table = of_match_ptr(meson_ao_cec_of_match),
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 006/117] media: s5p_cec: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (7 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Marek Szyprowski, Hans Verkuil, Mauro Carvalho Chehab
  Cc: linux-samsung-soc, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/s5p/s5p_cec.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/cec/platform/s5p/s5p_cec.c b/drivers/media/cec/platform/s5p/s5p_cec.c
index 0a30e7acdc10..51ab4a80aafe 100644
--- a/drivers/media/cec/platform/s5p/s5p_cec.c
+++ b/drivers/media/cec/platform/s5p/s5p_cec.c
@@ -249,14 +249,13 @@ static int s5p_cec_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int s5p_cec_remove(struct platform_device *pdev)
+static void s5p_cec_remove(struct platform_device *pdev)
 {
 	struct s5p_cec_dev *cec = platform_get_drvdata(pdev);
 
 	cec_notifier_cec_adap_unregister(cec->notifier, cec->adap);
 	cec_unregister_adapter(cec->adap);
 	pm_runtime_disable(&pdev->dev);
-	return 0;
 }
 
 static int __maybe_unused s5p_cec_runtime_suspend(struct device *dev)
@@ -295,7 +294,7 @@ MODULE_DEVICE_TABLE(of, s5p_cec_match);
 
 static struct platform_driver s5p_cec_pdrv = {
 	.probe	= s5p_cec_probe,
-	.remove	= s5p_cec_remove,
+	.remove_new = s5p_cec_remove,
 	.driver	= {
 		.name		= CEC_NAME,
 		.of_match_table	= s5p_cec_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 007/117] media: seco-cec: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (8 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Ettore Chimenti, Hans Verkuil, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/seco/seco-cec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/seco/seco-cec.c b/drivers/media/cec/platform/seco/seco-cec.c
index 580905e3d066..5d4c5a2cae09 100644
--- a/drivers/media/cec/platform/seco/seco-cec.c
+++ b/drivers/media/cec/platform/seco/seco-cec.c
@@ -668,7 +668,7 @@ static int secocec_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int secocec_remove(struct platform_device *pdev)
+static void secocec_remove(struct platform_device *pdev)
 {
 	struct secocec_data *secocec = platform_get_drvdata(pdev);
 	u16 val;
@@ -686,8 +686,6 @@ static int secocec_remove(struct platform_device *pdev)
 	release_region(BRA_SMB_BASE_ADDR, 7);
 
 	dev_dbg(&pdev->dev, "CEC device removed\n");
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -780,7 +778,7 @@ static struct platform_driver secocec_driver = {
 		   .pm = SECOCEC_PM_OPS,
 	},
 	.probe = secocec_probe,
-	.remove = secocec_remove,
+	.remove_new = secocec_remove,
 };
 
 module_platform_driver(secocec_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 008/117] media: stih-cec: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (9 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Alain Volmat, Hans Verkuil, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/sti/stih-cec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/sti/stih-cec.c b/drivers/media/cec/platform/sti/stih-cec.c
index 4edbdd09535d..a20fc5c0c88d 100644
--- a/drivers/media/cec/platform/sti/stih-cec.c
+++ b/drivers/media/cec/platform/sti/stih-cec.c
@@ -364,14 +364,12 @@ static int stih_cec_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int stih_cec_remove(struct platform_device *pdev)
+static void stih_cec_remove(struct platform_device *pdev)
 {
 	struct stih_cec *cec = platform_get_drvdata(pdev);
 
 	cec_notifier_cec_adap_unregister(cec->notifier, cec->adap);
 	cec_unregister_adapter(cec->adap);
-
-	return 0;
 }
 
 static const struct of_device_id stih_cec_match[] = {
@@ -384,7 +382,7 @@ MODULE_DEVICE_TABLE(of, stih_cec_match);
 
 static struct platform_driver stih_cec_pdrv = {
 	.probe	= stih_cec_probe,
-	.remove = stih_cec_remove,
+	.remove_new = stih_cec_remove,
 	.driver = {
 		.name		= CEC_NAME,
 		.of_match_table	= stih_cec_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 009/117] media: stm32-cec: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:30   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab, Maxime Coquelin,
	Alexandre Torgue, Uwe Kleine-König, Sean Young,
	Sakari Ailus, Ricardo Ribalda, Laurent Pinchart, Yang Yingliang
  Cc: linux-media, linux-stm32, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/stm32/stm32-cec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/stm32/stm32-cec.c b/drivers/media/cec/platform/stm32/stm32-cec.c
index 7b2db46a5722..ada3d153362a 100644
--- a/drivers/media/cec/platform/stm32/stm32-cec.c
+++ b/drivers/media/cec/platform/stm32/stm32-cec.c
@@ -344,7 +344,7 @@ static int stm32_cec_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int stm32_cec_remove(struct platform_device *pdev)
+static void stm32_cec_remove(struct platform_device *pdev)
 {
 	struct stm32_cec *cec = platform_get_drvdata(pdev);
 
@@ -352,8 +352,6 @@ static int stm32_cec_remove(struct platform_device *pdev)
 	clk_unprepare(cec->clk_hdmi_cec);
 
 	cec_unregister_adapter(cec->adap);
-
-	return 0;
 }
 
 static const struct of_device_id stm32_cec_of_match[] = {
@@ -364,7 +362,7 @@ MODULE_DEVICE_TABLE(of, stm32_cec_of_match);
 
 static struct platform_driver stm32_cec_driver = {
 	.probe  = stm32_cec_probe,
-	.remove = stm32_cec_remove,
+	.remove_new = stm32_cec_remove,
 	.driver = {
 		.name		= CEC_NAME,
 		.of_match_table = stm32_cec_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 009/117] media: stm32-cec: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab, Maxime Coquelin,
	Alexandre Torgue, Uwe Kleine-König, Sean Young,
	Sakari Ailus, Ricardo Ribalda, Laurent Pinchart, Yang Yingliang
  Cc: linux-media, linux-stm32, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/stm32/stm32-cec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/stm32/stm32-cec.c b/drivers/media/cec/platform/stm32/stm32-cec.c
index 7b2db46a5722..ada3d153362a 100644
--- a/drivers/media/cec/platform/stm32/stm32-cec.c
+++ b/drivers/media/cec/platform/stm32/stm32-cec.c
@@ -344,7 +344,7 @@ static int stm32_cec_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int stm32_cec_remove(struct platform_device *pdev)
+static void stm32_cec_remove(struct platform_device *pdev)
 {
 	struct stm32_cec *cec = platform_get_drvdata(pdev);
 
@@ -352,8 +352,6 @@ static int stm32_cec_remove(struct platform_device *pdev)
 	clk_unprepare(cec->clk_hdmi_cec);
 
 	cec_unregister_adapter(cec->adap);
-
-	return 0;
 }
 
 static const struct of_device_id stm32_cec_of_match[] = {
@@ -364,7 +362,7 @@ MODULE_DEVICE_TABLE(of, stm32_cec_of_match);
 
 static struct platform_driver stm32_cec_driver = {
 	.probe  = stm32_cec_probe,
-	.remove = stm32_cec_remove,
+	.remove_new = stm32_cec_remove,
 	.driver = {
 		.name		= CEC_NAME,
 		.of_match_table = stm32_cec_of_match,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 010/117] media: tegra_cec: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (11 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  2023-04-04 10:38   ` Thierry Reding
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab, Thierry Reding, Jonathan Hunter
  Cc: linux-tegra, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/cec/platform/tegra/tegra_cec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/cec/platform/tegra/tegra_cec.c b/drivers/media/cec/platform/tegra/tegra_cec.c
index 5e907395ca2e..04dc06e3c42a 100644
--- a/drivers/media/cec/platform/tegra/tegra_cec.c
+++ b/drivers/media/cec/platform/tegra/tegra_cec.c
@@ -421,7 +421,7 @@ static int tegra_cec_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int tegra_cec_remove(struct platform_device *pdev)
+static void tegra_cec_remove(struct platform_device *pdev)
 {
 	struct tegra_cec *cec = platform_get_drvdata(pdev);
 
@@ -429,8 +429,6 @@ static int tegra_cec_remove(struct platform_device *pdev)
 
 	cec_notifier_cec_adap_unregister(cec->notifier, cec->adap);
 	cec_unregister_adapter(cec->adap);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -467,7 +465,7 @@ static struct platform_driver tegra_cec_driver = {
 		.of_match_table = of_match_ptr(tegra_cec_of_match),
 	},
 	.probe = tegra_cec_probe,
-	.remove = tegra_cec_remove,
+	.remove_new = tegra_cec_remove,
 
 #ifdef CONFIG_PM
 	.suspend = tegra_cec_suspend,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 011/117] media: rtl2832_sdr: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (12 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/dvb-frontends/rtl2832_sdr.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c b/drivers/media/dvb-frontends/rtl2832_sdr.c
index 05f71d169726..02c619e51641 100644
--- a/drivers/media/dvb-frontends/rtl2832_sdr.c
+++ b/drivers/media/dvb-frontends/rtl2832_sdr.c
@@ -1463,7 +1463,7 @@ static int rtl2832_sdr_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rtl2832_sdr_remove(struct platform_device *pdev)
+static void rtl2832_sdr_remove(struct platform_device *pdev)
 {
 	struct rtl2832_sdr_dev *dev = platform_get_drvdata(pdev);
 
@@ -1479,8 +1479,6 @@ static int rtl2832_sdr_remove(struct platform_device *pdev)
 	mutex_unlock(&dev->vb_queue_lock);
 	v4l2_device_put(&dev->v4l2_dev);
 	module_put(pdev->dev.parent->driver->owner);
-
-	return 0;
 }
 
 static struct platform_driver rtl2832_sdr_driver = {
@@ -1488,7 +1486,7 @@ static struct platform_driver rtl2832_sdr_driver = {
 		.name   = "rtl2832_sdr",
 	},
 	.probe          = rtl2832_sdr_probe,
-	.remove         = rtl2832_sdr_remove,
+	.remove_new     = rtl2832_sdr_remove,
 };
 module_platform_driver(rtl2832_sdr_driver);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 012/117] media: zd1301_demod: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (13 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/dvb-frontends/zd1301_demod.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/dvb-frontends/zd1301_demod.c b/drivers/media/dvb-frontends/zd1301_demod.c
index bbabe6a2d4f4..17f6e373c13d 100644
--- a/drivers/media/dvb-frontends/zd1301_demod.c
+++ b/drivers/media/dvb-frontends/zd1301_demod.c
@@ -515,7 +515,7 @@ static int zd1301_demod_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int zd1301_demod_remove(struct platform_device *pdev)
+static void zd1301_demod_remove(struct platform_device *pdev)
 {
 	struct zd1301_demod_dev *dev = platform_get_drvdata(pdev);
 
@@ -523,8 +523,6 @@ static int zd1301_demod_remove(struct platform_device *pdev)
 
 	i2c_del_adapter(&dev->adapter);
 	kfree(dev);
-
-	return 0;
 }
 
 static struct platform_driver zd1301_demod_driver = {
@@ -533,7 +531,7 @@ static struct platform_driver zd1301_demod_driver = {
 		.suppress_bind_attrs = true,
 	},
 	.probe          = zd1301_demod_probe,
-	.remove         = zd1301_demod_remove,
+	.remove_new     = zd1301_demod_remove,
 };
 module_platform_driver(zd1301_demod_driver);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 013/117] media: allegro-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (14 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Michael Tretter, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/allegro-dvt/allegro-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/allegro-dvt/allegro-core.c b/drivers/media/platform/allegro-dvt/allegro-core.c
index 2423714afcb9..ec03e17727d7 100644
--- a/drivers/media/platform/allegro-dvt/allegro-core.c
+++ b/drivers/media/platform/allegro-dvt/allegro-core.c
@@ -3919,7 +3919,7 @@ static int allegro_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int allegro_remove(struct platform_device *pdev)
+static void allegro_remove(struct platform_device *pdev)
 {
 	struct allegro_dev *dev = platform_get_drvdata(pdev);
 
@@ -3935,8 +3935,6 @@ static int allegro_remove(struct platform_device *pdev)
 	pm_runtime_disable(&dev->plat_dev->dev);
 
 	v4l2_device_unregister(&dev->v4l2_dev);
-
-	return 0;
 }
 
 static int allegro_runtime_resume(struct device *device)
@@ -4006,7 +4004,7 @@ static const struct dev_pm_ops allegro_pm_ops = {
 
 static struct platform_driver allegro_driver = {
 	.probe = allegro_probe,
-	.remove = allegro_remove,
+	.remove_new = allegro_remove,
 	.driver = {
 		.name = "allegro",
 		.of_match_table = of_match_ptr(allegro_dt_ids),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 014/117] media: ge2d: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
  (?)
@ 2023-03-26 14:30   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Neil Armstrong, Mauro Carvalho Chehab, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/amlogic/meson-ge2d/ge2d.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/amlogic/meson-ge2d/ge2d.c b/drivers/media/platform/amlogic/meson-ge2d/ge2d.c
index 142d421a8d76..09409908ba5d 100644
--- a/drivers/media/platform/amlogic/meson-ge2d/ge2d.c
+++ b/drivers/media/platform/amlogic/meson-ge2d/ge2d.c
@@ -1024,7 +1024,7 @@ static int ge2d_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int ge2d_remove(struct platform_device *pdev)
+static void ge2d_remove(struct platform_device *pdev)
 {
 	struct meson_ge2d *ge2d = platform_get_drvdata(pdev);
 
@@ -1032,8 +1032,6 @@ static int ge2d_remove(struct platform_device *pdev)
 	v4l2_m2m_release(ge2d->m2m_dev);
 	v4l2_device_unregister(&ge2d->v4l2_dev);
 	clk_disable_unprepare(ge2d->clk);
-
-	return 0;
 }
 
 static const struct of_device_id meson_ge2d_match[] = {
@@ -1047,7 +1045,7 @@ MODULE_DEVICE_TABLE(of, meson_ge2d_match);
 
 static struct platform_driver ge2d_drv = {
 	.probe = ge2d_probe,
-	.remove = ge2d_remove,
+	.remove_new = ge2d_remove,
 	.driver = {
 		.name = "meson-ge2d",
 		.of_match_table = meson_ge2d_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 014/117] media: ge2d: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Neil Armstrong, Mauro Carvalho Chehab, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/amlogic/meson-ge2d/ge2d.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/amlogic/meson-ge2d/ge2d.c b/drivers/media/platform/amlogic/meson-ge2d/ge2d.c
index 142d421a8d76..09409908ba5d 100644
--- a/drivers/media/platform/amlogic/meson-ge2d/ge2d.c
+++ b/drivers/media/platform/amlogic/meson-ge2d/ge2d.c
@@ -1024,7 +1024,7 @@ static int ge2d_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int ge2d_remove(struct platform_device *pdev)
+static void ge2d_remove(struct platform_device *pdev)
 {
 	struct meson_ge2d *ge2d = platform_get_drvdata(pdev);
 
@@ -1032,8 +1032,6 @@ static int ge2d_remove(struct platform_device *pdev)
 	v4l2_m2m_release(ge2d->m2m_dev);
 	v4l2_device_unregister(&ge2d->v4l2_dev);
 	clk_disable_unprepare(ge2d->clk);
-
-	return 0;
 }
 
 static const struct of_device_id meson_ge2d_match[] = {
@@ -1047,7 +1045,7 @@ MODULE_DEVICE_TABLE(of, meson_ge2d_match);
 
 static struct platform_driver ge2d_drv = {
 	.probe = ge2d_probe,
-	.remove = ge2d_remove,
+	.remove_new = ge2d_remove,
 	.driver = {
 		.name = "meson-ge2d",
 		.of_match_table = meson_ge2d_match,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 014/117] media: ge2d: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Neil Armstrong, Mauro Carvalho Chehab, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/amlogic/meson-ge2d/ge2d.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/amlogic/meson-ge2d/ge2d.c b/drivers/media/platform/amlogic/meson-ge2d/ge2d.c
index 142d421a8d76..09409908ba5d 100644
--- a/drivers/media/platform/amlogic/meson-ge2d/ge2d.c
+++ b/drivers/media/platform/amlogic/meson-ge2d/ge2d.c
@@ -1024,7 +1024,7 @@ static int ge2d_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int ge2d_remove(struct platform_device *pdev)
+static void ge2d_remove(struct platform_device *pdev)
 {
 	struct meson_ge2d *ge2d = platform_get_drvdata(pdev);
 
@@ -1032,8 +1032,6 @@ static int ge2d_remove(struct platform_device *pdev)
 	v4l2_m2m_release(ge2d->m2m_dev);
 	v4l2_device_unregister(&ge2d->v4l2_dev);
 	clk_disable_unprepare(ge2d->clk);
-
-	return 0;
 }
 
 static const struct of_device_id meson_ge2d_match[] = {
@@ -1047,7 +1045,7 @@ MODULE_DEVICE_TABLE(of, meson_ge2d_match);
 
 static struct platform_driver ge2d_drv = {
 	.probe = ge2d_probe,
-	.remove = ge2d_remove,
+	.remove_new = ge2d_remove,
 	.driver = {
 		.name = "meson-ge2d",
 		.of_match_table = meson_ge2d_match,
-- 
2.39.2


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 015/117] media: vpu_core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (16 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Ming Qian, Shijie Qin, Zhou Peng, Mauro Carvalho Chehab
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/amphion/vpu_core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/amphion/vpu_core.c b/drivers/media/platform/amphion/vpu_core.c
index f9ec1753f7c8..de23627a119a 100644
--- a/drivers/media/platform/amphion/vpu_core.c
+++ b/drivers/media/platform/amphion/vpu_core.c
@@ -709,7 +709,7 @@ static int vpu_core_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int vpu_core_remove(struct platform_device *pdev)
+static void vpu_core_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct vpu_core *core = platform_get_drvdata(pdev);
@@ -728,8 +728,6 @@ static int vpu_core_remove(struct platform_device *pdev)
 	memunmap(core->rpc.virt);
 	mutex_destroy(&core->lock);
 	mutex_destroy(&core->cmd_lock);
-
-	return 0;
 }
 
 static int __maybe_unused vpu_core_runtime_resume(struct device *dev)
@@ -864,7 +862,7 @@ MODULE_DEVICE_TABLE(of, vpu_core_dt_match);
 
 static struct platform_driver amphion_vpu_core_driver = {
 	.probe = vpu_core_probe,
-	.remove = vpu_core_remove,
+	.remove_new = vpu_core_remove,
 	.driver = {
 		.name = "amphion-vpu-core",
 		.of_match_table = vpu_core_dt_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 016/117] media: vpu_drv: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (17 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Ming Qian, Shijie Qin, Zhou Peng, Mauro Carvalho Chehab
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/amphion/vpu_drv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/amphion/vpu_drv.c b/drivers/media/platform/amphion/vpu_drv.c
index f01ce49d27e8..4187b2b5562f 100644
--- a/drivers/media/platform/amphion/vpu_drv.c
+++ b/drivers/media/platform/amphion/vpu_drv.c
@@ -157,7 +157,7 @@ static int vpu_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int vpu_remove(struct platform_device *pdev)
+static void vpu_remove(struct platform_device *pdev)
 {
 	struct vpu_dev *vpu = platform_get_drvdata(pdev);
 	struct device *dev = &pdev->dev;
@@ -173,8 +173,6 @@ static int vpu_remove(struct platform_device *pdev)
 	media_device_cleanup(&vpu->mdev);
 	v4l2_device_unregister(&vpu->v4l2_dev);
 	mutex_destroy(&vpu->lock);
-
-	return 0;
 }
 
 static int __maybe_unused vpu_runtime_resume(struct device *dev)
@@ -229,7 +227,7 @@ MODULE_DEVICE_TABLE(of, vpu_dt_match);
 
 static struct platform_driver amphion_vpu_driver = {
 	.probe = vpu_probe,
-	.remove = vpu_remove,
+	.remove_new = vpu_remove,
 	.driver = {
 		.name = "amphion-vpu",
 		.of_match_table = vpu_dt_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 017/117] media: aspeed-video: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
  (?)
@ 2023-03-26 14:30   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Eddie James, Mauro Carvalho Chehab, Joel Stanley
  Cc: Andrew Jeffery, linux-media, openbmc, linux-arm-kernel,
	linux-aspeed, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/aspeed/aspeed-video.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c
index 794d4dc3a654..374eb7781936 100644
--- a/drivers/media/platform/aspeed/aspeed-video.c
+++ b/drivers/media/platform/aspeed/aspeed-video.c
@@ -2206,7 +2206,7 @@ static int aspeed_video_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int aspeed_video_remove(struct platform_device *pdev)
+static void aspeed_video_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct v4l2_device *v4l2_dev = dev_get_drvdata(dev);
@@ -2228,8 +2228,6 @@ static int aspeed_video_remove(struct platform_device *pdev)
 	aspeed_video_free_buf(video, &video->jpeg);
 
 	of_reserved_mem_device_release(dev);
-
-	return 0;
 }
 
 static struct platform_driver aspeed_video_driver = {
@@ -2238,7 +2236,7 @@ static struct platform_driver aspeed_video_driver = {
 		.of_match_table = aspeed_video_of_match,
 	},
 	.probe = aspeed_video_probe,
-	.remove = aspeed_video_remove,
+	.remove_new = aspeed_video_remove,
 };
 
 module_platform_driver(aspeed_video_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 017/117] media: aspeed-video: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Eddie James, Mauro Carvalho Chehab, Joel Stanley
  Cc: linux-aspeed, Andrew Jeffery, openbmc, kernel, linux-arm-kernel,
	linux-media

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/aspeed/aspeed-video.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c
index 794d4dc3a654..374eb7781936 100644
--- a/drivers/media/platform/aspeed/aspeed-video.c
+++ b/drivers/media/platform/aspeed/aspeed-video.c
@@ -2206,7 +2206,7 @@ static int aspeed_video_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int aspeed_video_remove(struct platform_device *pdev)
+static void aspeed_video_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct v4l2_device *v4l2_dev = dev_get_drvdata(dev);
@@ -2228,8 +2228,6 @@ static int aspeed_video_remove(struct platform_device *pdev)
 	aspeed_video_free_buf(video, &video->jpeg);
 
 	of_reserved_mem_device_release(dev);
-
-	return 0;
 }
 
 static struct platform_driver aspeed_video_driver = {
@@ -2238,7 +2236,7 @@ static struct platform_driver aspeed_video_driver = {
 		.of_match_table = aspeed_video_of_match,
 	},
 	.probe = aspeed_video_probe,
-	.remove = aspeed_video_remove,
+	.remove_new = aspeed_video_remove,
 };
 
 module_platform_driver(aspeed_video_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 017/117] media: aspeed-video: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Eddie James, Mauro Carvalho Chehab, Joel Stanley
  Cc: Andrew Jeffery, linux-media, openbmc, linux-arm-kernel,
	linux-aspeed, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/aspeed/aspeed-video.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c
index 794d4dc3a654..374eb7781936 100644
--- a/drivers/media/platform/aspeed/aspeed-video.c
+++ b/drivers/media/platform/aspeed/aspeed-video.c
@@ -2206,7 +2206,7 @@ static int aspeed_video_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int aspeed_video_remove(struct platform_device *pdev)
+static void aspeed_video_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct v4l2_device *v4l2_dev = dev_get_drvdata(dev);
@@ -2228,8 +2228,6 @@ static int aspeed_video_remove(struct platform_device *pdev)
 	aspeed_video_free_buf(video, &video->jpeg);
 
 	of_reserved_mem_device_release(dev);
-
-	return 0;
 }
 
 static struct platform_driver aspeed_video_driver = {
@@ -2238,7 +2236,7 @@ static struct platform_driver aspeed_video_driver = {
 		.of_match_table = aspeed_video_of_match,
 	},
 	.probe = aspeed_video_probe,
-	.remove = aspeed_video_remove,
+	.remove_new = aspeed_video_remove,
 };
 
 module_platform_driver(aspeed_video_driver);
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 018/117] media: atmel-isi: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:30   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Eugen Hristev, Mauro Carvalho Chehab, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/atmel/atmel-isi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/atmel/atmel-isi.c b/drivers/media/platform/atmel/atmel-isi.c
index 4d15814e4481..b063f980f9e0 100644
--- a/drivers/media/platform/atmel/atmel-isi.c
+++ b/drivers/media/platform/atmel/atmel-isi.c
@@ -1317,7 +1317,7 @@ static int atmel_isi_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int atmel_isi_remove(struct platform_device *pdev)
+static void atmel_isi_remove(struct platform_device *pdev)
 {
 	struct atmel_isi *isi = platform_get_drvdata(pdev);
 
@@ -1329,8 +1329,6 @@ static int atmel_isi_remove(struct platform_device *pdev)
 	v4l2_async_nf_unregister(&isi->notifier);
 	v4l2_async_nf_cleanup(&isi->notifier);
 	v4l2_device_unregister(&isi->v4l2_dev);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -1368,7 +1366,7 @@ static struct platform_driver atmel_isi_driver = {
 		.pm	= &atmel_isi_dev_pm_ops,
 	},
 	.probe		= atmel_isi_probe,
-	.remove		= atmel_isi_remove,
+	.remove_new	= atmel_isi_remove,
 };
 
 module_platform_driver(atmel_isi_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 018/117] media: atmel-isi: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Eugen Hristev, Mauro Carvalho Chehab, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/atmel/atmel-isi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/atmel/atmel-isi.c b/drivers/media/platform/atmel/atmel-isi.c
index 4d15814e4481..b063f980f9e0 100644
--- a/drivers/media/platform/atmel/atmel-isi.c
+++ b/drivers/media/platform/atmel/atmel-isi.c
@@ -1317,7 +1317,7 @@ static int atmel_isi_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int atmel_isi_remove(struct platform_device *pdev)
+static void atmel_isi_remove(struct platform_device *pdev)
 {
 	struct atmel_isi *isi = platform_get_drvdata(pdev);
 
@@ -1329,8 +1329,6 @@ static int atmel_isi_remove(struct platform_device *pdev)
 	v4l2_async_nf_unregister(&isi->notifier);
 	v4l2_async_nf_cleanup(&isi->notifier);
 	v4l2_device_unregister(&isi->v4l2_dev);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -1368,7 +1366,7 @@ static struct platform_driver atmel_isi_driver = {
 		.pm	= &atmel_isi_dev_pm_ops,
 	},
 	.probe		= atmel_isi_probe,
-	.remove		= atmel_isi_remove,
+	.remove_new	= atmel_isi_remove,
 };
 
 module_platform_driver(atmel_isi_driver);
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 019/117] media: cdns-csi2rx: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (20 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Maxime Ripard, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/cadence/cdns-csi2rx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c
index cc3ebb0d96f6..9755d1c8ceb9 100644
--- a/drivers/media/platform/cadence/cdns-csi2rx.c
+++ b/drivers/media/platform/cadence/cdns-csi2rx.c
@@ -473,14 +473,12 @@ static int csi2rx_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int csi2rx_remove(struct platform_device *pdev)
+static void csi2rx_remove(struct platform_device *pdev)
 {
 	struct csi2rx_priv *csi2rx = platform_get_drvdata(pdev);
 
 	v4l2_async_unregister_subdev(&csi2rx->subdev);
 	kfree(csi2rx);
-
-	return 0;
 }
 
 static const struct of_device_id csi2rx_of_table[] = {
@@ -491,7 +489,7 @@ MODULE_DEVICE_TABLE(of, csi2rx_of_table);
 
 static struct platform_driver csi2rx_driver = {
 	.probe	= csi2rx_probe,
-	.remove	= csi2rx_remove,
+	.remove_new = csi2rx_remove,
 
 	.driver	= {
 		.name		= "cdns-csi2rx",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 020/117] media: cdns-csi2tx: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (21 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Maxime Ripard, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/cadence/cdns-csi2tx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/cadence/cdns-csi2tx.c b/drivers/media/platform/cadence/cdns-csi2tx.c
index 58e405b69f67..1e0400b7803e 100644
--- a/drivers/media/platform/cadence/cdns-csi2tx.c
+++ b/drivers/media/platform/cadence/cdns-csi2tx.c
@@ -635,19 +635,17 @@ static int csi2tx_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int csi2tx_remove(struct platform_device *pdev)
+static void csi2tx_remove(struct platform_device *pdev)
 {
 	struct csi2tx_priv *csi2tx = platform_get_drvdata(pdev);
 
 	v4l2_async_unregister_subdev(&csi2tx->subdev);
 	kfree(csi2tx);
-
-	return 0;
 }
 
 static struct platform_driver csi2tx_driver = {
 	.probe	= csi2tx_probe,
-	.remove	= csi2tx_remove,
+	.remove_new = csi2tx_remove,
 
 	.driver	= {
 		.name		= "cdns-csi2tx",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 021/117] media: coda-common: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (22 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Philipp Zabel, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/chips-media/coda-common.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/chips-media/coda-common.c b/drivers/media/platform/chips-media/coda-common.c
index af71eea04dbd..d013ea5d9d3d 100644
--- a/drivers/media/platform/chips-media/coda-common.c
+++ b/drivers/media/platform/chips-media/coda-common.c
@@ -3300,7 +3300,7 @@ static int coda_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int coda_remove(struct platform_device *pdev)
+static void coda_remove(struct platform_device *pdev)
 {
 	struct coda_dev *dev = platform_get_drvdata(pdev);
 	int i;
@@ -3322,7 +3322,6 @@ static int coda_remove(struct platform_device *pdev)
 	coda_free_aux_buf(dev, &dev->workbuf);
 	debugfs_remove_recursive(dev->debugfs_root);
 	ida_destroy(&dev->ida);
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -3347,7 +3346,7 @@ static const struct dev_pm_ops coda_pm_ops = {
 
 static struct platform_driver coda_driver = {
 	.probe	= coda_probe,
-	.remove	= coda_remove,
+	.remove_new = coda_remove,
 	.driver	= {
 		.name	= CODA_NAME,
 		.of_match_table = coda_dt_ids,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 022/117] media: pxa_camera: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (23 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Uwe Kleine-König, Hans Verkuil
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/intel/pxa_camera.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/intel/pxa_camera.c b/drivers/media/platform/intel/pxa_camera.c
index 54270d6b6f50..99a6973b4b54 100644
--- a/drivers/media/platform/intel/pxa_camera.c
+++ b/drivers/media/platform/intel/pxa_camera.c
@@ -2421,7 +2421,7 @@ static int pxa_camera_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int pxa_camera_remove(struct platform_device *pdev)
+static void pxa_camera_remove(struct platform_device *pdev)
 {
 	struct pxa_camera_dev *pcdev = platform_get_drvdata(pdev);
 
@@ -2437,8 +2437,6 @@ static int pxa_camera_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&pcdev->v4l2_dev);
 
 	dev_info(&pdev->dev, "PXA Camera driver unloaded\n");
-
-	return 0;
 }
 
 static const struct dev_pm_ops pxa_camera_pm = {
@@ -2459,7 +2457,7 @@ static struct platform_driver pxa_camera_driver = {
 		.of_match_table = of_match_ptr(pxa_camera_of_match),
 	},
 	.probe		= pxa_camera_probe,
-	.remove		= pxa_camera_remove,
+	.remove_new	= pxa_camera_remove,
 };
 
 module_platform_driver(pxa_camera_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 023/117] media: m2m-deinterlace: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (24 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Uwe Kleine-König; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/m2m-deinterlace.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c
index 1f89e71cdccf..96b35a5d6174 100644
--- a/drivers/media/platform/m2m-deinterlace.c
+++ b/drivers/media/platform/m2m-deinterlace.c
@@ -984,7 +984,7 @@ static int deinterlace_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int deinterlace_remove(struct platform_device *pdev)
+static void deinterlace_remove(struct platform_device *pdev)
 {
 	struct deinterlace_dev *pcdev = platform_get_drvdata(pdev);
 
@@ -993,13 +993,11 @@ static int deinterlace_remove(struct platform_device *pdev)
 	video_unregister_device(&pcdev->vfd);
 	v4l2_device_unregister(&pcdev->v4l2_dev);
 	dma_release_channel(pcdev->dma_chan);
-
-	return 0;
 }
 
 static struct platform_driver deinterlace_pdrv = {
 	.probe		= deinterlace_probe,
-	.remove		= deinterlace_remove,
+	.remove_new	= deinterlace_remove,
 	.driver		= {
 		.name	= MEM2MEM_NAME,
 	},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 024/117] media: marvell: Simplify remove callback
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (25 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Uwe Kleine-König, Hans Verkuil
  Cc: linux-media, kernel

Fold mmpcam_remove() into its only caller mmpcam_platform_remove(). Note
that cam can never be zero, as the probe function calls
platform_set_drvdata() with a non-NULL argument (or returns an error
code in which case .remove() won't be called).

Also use mmpcam_remove() as the function name for the remove callback to
align to mmpcam_probe() for .probe().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/marvell/mmp-driver.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/media/platform/marvell/mmp-driver.c b/drivers/media/platform/marvell/mmp-driver.c
index ef22bf8f276c..964c55eacd89 100644
--- a/drivers/media/platform/marvell/mmp-driver.c
+++ b/drivers/media/platform/marvell/mmp-driver.c
@@ -287,9 +287,9 @@ static int mmpcam_probe(struct platform_device *pdev)
 	return ret;
 }
 
-
-static int mmpcam_remove(struct mmp_camera *cam)
+static int mmpcam_remove(struct platform_device *pdev)
 {
+	struct mmp_camera *cam = platform_get_drvdata(pdev);
 	struct mcam_camera *mcam = &cam->mcam;
 
 	mccic_shutdown(mcam);
@@ -297,15 +297,6 @@ static int mmpcam_remove(struct mmp_camera *cam)
 	return 0;
 }
 
-static int mmpcam_platform_remove(struct platform_device *pdev)
-{
-	struct mmp_camera *cam = platform_get_drvdata(pdev);
-
-	if (cam == NULL)
-		return -ENODEV;
-	return mmpcam_remove(cam);
-}
-
 /*
  * Suspend/resume support.
  */
@@ -369,7 +360,7 @@ MODULE_DEVICE_TABLE(of, mmpcam_of_match);
 
 static struct platform_driver mmpcam_driver = {
 	.probe		= mmpcam_probe,
-	.remove		= mmpcam_platform_remove,
+	.remove		= mmpcam_remove,
 	.driver = {
 		.name	= "mmp-camera",
 		.of_match_table = of_match_ptr(mmpcam_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 025/117] media: marvell: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (26 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Uwe Kleine-König, Hans Verkuil
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/marvell/mmp-driver.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/marvell/mmp-driver.c b/drivers/media/platform/marvell/mmp-driver.c
index 964c55eacd89..e93feefb447b 100644
--- a/drivers/media/platform/marvell/mmp-driver.c
+++ b/drivers/media/platform/marvell/mmp-driver.c
@@ -287,14 +287,13 @@ static int mmpcam_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mmpcam_remove(struct platform_device *pdev)
+static void mmpcam_remove(struct platform_device *pdev)
 {
 	struct mmp_camera *cam = platform_get_drvdata(pdev);
 	struct mcam_camera *mcam = &cam->mcam;
 
 	mccic_shutdown(mcam);
 	pm_runtime_force_suspend(mcam->dev);
-	return 0;
 }
 
 /*
@@ -360,7 +359,7 @@ MODULE_DEVICE_TABLE(of, mmpcam_of_match);
 
 static struct platform_driver mmpcam_driver = {
 	.probe		= mmpcam_probe,
-	.remove		= mmpcam_remove,
+	.remove_new	= mmpcam_remove,
 	.driver = {
 		.name	= "mmp-camera",
 		.of_match_table = of_match_ptr(mmpcam_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 026/117] media: mtk_jpeg_core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:30   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Bin Liu, Mauro Carvalho Chehab, Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
index 969516a940ba..e043da5ea325 100644
--- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
+++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
@@ -1790,7 +1790,7 @@ static int mtk_jpeg_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mtk_jpeg_remove(struct platform_device *pdev)
+static void mtk_jpeg_remove(struct platform_device *pdev)
 {
 	struct mtk_jpeg_dev *jpeg = platform_get_drvdata(pdev);
 
@@ -1798,8 +1798,6 @@ static int mtk_jpeg_remove(struct platform_device *pdev)
 	video_unregister_device(jpeg->vdev);
 	v4l2_m2m_release(jpeg->m2m_dev);
 	v4l2_device_unregister(&jpeg->v4l2_dev);
-
-	return 0;
 }
 
 static __maybe_unused int mtk_jpeg_pm_suspend(struct device *dev)
@@ -1928,7 +1926,7 @@ MODULE_DEVICE_TABLE(of, mtk_jpeg_match);
 
 static struct platform_driver mtk_jpeg_driver = {
 	.probe = mtk_jpeg_probe,
-	.remove = mtk_jpeg_remove,
+	.remove_new = mtk_jpeg_remove,
 	.driver = {
 		.name           = MTK_JPEG_NAME,
 		.of_match_table = of_match_ptr(mtk_jpeg_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 026/117] media: mtk_jpeg_core: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Bin Liu, Mauro Carvalho Chehab, Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
index 969516a940ba..e043da5ea325 100644
--- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
+++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
@@ -1790,7 +1790,7 @@ static int mtk_jpeg_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mtk_jpeg_remove(struct platform_device *pdev)
+static void mtk_jpeg_remove(struct platform_device *pdev)
 {
 	struct mtk_jpeg_dev *jpeg = platform_get_drvdata(pdev);
 
@@ -1798,8 +1798,6 @@ static int mtk_jpeg_remove(struct platform_device *pdev)
 	video_unregister_device(jpeg->vdev);
 	v4l2_m2m_release(jpeg->m2m_dev);
 	v4l2_device_unregister(&jpeg->v4l2_dev);
-
-	return 0;
 }
 
 static __maybe_unused int mtk_jpeg_pm_suspend(struct device *dev)
@@ -1928,7 +1926,7 @@ MODULE_DEVICE_TABLE(of, mtk_jpeg_match);
 
 static struct platform_driver mtk_jpeg_driver = {
 	.probe = mtk_jpeg_probe,
-	.remove = mtk_jpeg_remove,
+	.remove_new = mtk_jpeg_remove,
 	.driver = {
 		.name           = MTK_JPEG_NAME,
 		.of_match_table = of_match_ptr(mtk_jpeg_match),
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 027/117] media: mtk_mdp_core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:30   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Minghsiu Tsai, Houlong Wei, Andrew-CT Chen,
	Mauro Carvalho Chehab, Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/mediatek/mdp/mtk_mdp_core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c b/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c
index d83c4964eaf9..77e310e588e5 100644
--- a/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c
+++ b/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c
@@ -235,7 +235,7 @@ static int mtk_mdp_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mtk_mdp_remove(struct platform_device *pdev)
+static void mtk_mdp_remove(struct platform_device *pdev)
 {
 	struct mtk_mdp_dev *mdp = platform_get_drvdata(pdev);
 	struct mtk_mdp_comp *comp, *comp_temp;
@@ -255,7 +255,6 @@ static int mtk_mdp_remove(struct platform_device *pdev)
 	}
 
 	dev_dbg(&pdev->dev, "%s driver unloaded\n", pdev->name);
-	return 0;
 }
 
 static int __maybe_unused mtk_mdp_pm_suspend(struct device *dev)
@@ -299,7 +298,7 @@ static const struct dev_pm_ops mtk_mdp_pm_ops = {
 
 static struct platform_driver mtk_mdp_driver = {
 	.probe		= mtk_mdp_probe,
-	.remove		= mtk_mdp_remove,
+	.remove_new	= mtk_mdp_remove,
 	.driver = {
 		.name	= MTK_MDP_MODULE_NAME,
 		.pm	= &mtk_mdp_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 027/117] media: mtk_mdp_core: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Minghsiu Tsai, Houlong Wei, Andrew-CT Chen,
	Mauro Carvalho Chehab, Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/mediatek/mdp/mtk_mdp_core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c b/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c
index d83c4964eaf9..77e310e588e5 100644
--- a/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c
+++ b/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c
@@ -235,7 +235,7 @@ static int mtk_mdp_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mtk_mdp_remove(struct platform_device *pdev)
+static void mtk_mdp_remove(struct platform_device *pdev)
 {
 	struct mtk_mdp_dev *mdp = platform_get_drvdata(pdev);
 	struct mtk_mdp_comp *comp, *comp_temp;
@@ -255,7 +255,6 @@ static int mtk_mdp_remove(struct platform_device *pdev)
 	}
 
 	dev_dbg(&pdev->dev, "%s driver unloaded\n", pdev->name);
-	return 0;
 }
 
 static int __maybe_unused mtk_mdp_pm_suspend(struct device *dev)
@@ -299,7 +298,7 @@ static const struct dev_pm_ops mtk_mdp_pm_ops = {
 
 static struct platform_driver mtk_mdp_driver = {
 	.probe		= mtk_mdp_probe,
-	.remove		= mtk_mdp_remove,
+	.remove_new	= mtk_mdp_remove,
 	.driver = {
 		.name	= MTK_MDP_MODULE_NAME,
 		.pm	= &mtk_mdp_pm_ops,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 028/117] media: mtk-mdp3-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:30   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Matthias Brugger, Hans Verkuil, Moudy Ho,
	Qiheng Lin, Uwe Kleine-König
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c
index 97edcd9d1c81..041bcad675da 100644
--- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c
+++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c
@@ -298,14 +298,13 @@ static int mdp_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mdp_remove(struct platform_device *pdev)
+static void mdp_remove(struct platform_device *pdev)
 {
 	struct mdp_dev *mdp = platform_get_drvdata(pdev);
 
 	v4l2_device_unregister(&mdp->v4l2_dev);
 
 	dev_dbg(&pdev->dev, "%s driver unloaded\n", pdev->name);
-	return 0;
 }
 
 static int __maybe_unused mdp_suspend(struct device *dev)
@@ -345,7 +344,7 @@ static const struct dev_pm_ops mdp_pm_ops = {
 
 static struct platform_driver mdp_driver = {
 	.probe		= mdp_probe,
-	.remove		= mdp_remove,
+	.remove_new	= mdp_remove,
 	.driver = {
 		.name	= MDP_MODULE_NAME,
 		.pm	= &mdp_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 028/117] media: mtk-mdp3-core: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Matthias Brugger, Hans Verkuil, Moudy Ho,
	Qiheng Lin, Uwe Kleine-König
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c
index 97edcd9d1c81..041bcad675da 100644
--- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c
+++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c
@@ -298,14 +298,13 @@ static int mdp_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mdp_remove(struct platform_device *pdev)
+static void mdp_remove(struct platform_device *pdev)
 {
 	struct mdp_dev *mdp = platform_get_drvdata(pdev);
 
 	v4l2_device_unregister(&mdp->v4l2_dev);
 
 	dev_dbg(&pdev->dev, "%s driver unloaded\n", pdev->name);
-	return 0;
 }
 
 static int __maybe_unused mdp_suspend(struct device *dev)
@@ -345,7 +344,7 @@ static const struct dev_pm_ops mdp_pm_ops = {
 
 static struct platform_driver mdp_driver = {
 	.probe		= mdp_probe,
-	.remove		= mdp_remove,
+	.remove_new	= mdp_remove,
 	.driver = {
 		.name	= MDP_MODULE_NAME,
 		.pm	= &mdp_pm_ops,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 029/117] media: mtk_vcodec_dec_drv: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:30   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Mauro Carvalho Chehab,
	Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
index 174a6eec2f54..2fa5c5e6607c 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
@@ -487,7 +487,7 @@ static const struct of_device_id mtk_vcodec_match[] = {
 
 MODULE_DEVICE_TABLE(of, mtk_vcodec_match);
 
-static int mtk_vcodec_dec_remove(struct platform_device *pdev)
+static void mtk_vcodec_dec_remove(struct platform_device *pdev)
 {
 	struct mtk_vcodec_dev *dev = platform_get_drvdata(pdev);
 
@@ -509,12 +509,11 @@ static int mtk_vcodec_dec_remove(struct platform_device *pdev)
 	if (!dev->vdec_pdata->is_subdev_supported)
 		pm_runtime_disable(dev->pm.dev);
 	mtk_vcodec_fw_release(dev->fw_handler);
-	return 0;
 }
 
 static struct platform_driver mtk_vcodec_dec_driver = {
 	.probe	= mtk_vcodec_probe,
-	.remove	= mtk_vcodec_dec_remove,
+	.remove_new = mtk_vcodec_dec_remove,
 	.driver	= {
 		.name	= MTK_VCODEC_DEC_NAME,
 		.of_match_table = mtk_vcodec_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 029/117] media: mtk_vcodec_dec_drv: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Mauro Carvalho Chehab,
	Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
index 174a6eec2f54..2fa5c5e6607c 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
@@ -487,7 +487,7 @@ static const struct of_device_id mtk_vcodec_match[] = {
 
 MODULE_DEVICE_TABLE(of, mtk_vcodec_match);
 
-static int mtk_vcodec_dec_remove(struct platform_device *pdev)
+static void mtk_vcodec_dec_remove(struct platform_device *pdev)
 {
 	struct mtk_vcodec_dev *dev = platform_get_drvdata(pdev);
 
@@ -509,12 +509,11 @@ static int mtk_vcodec_dec_remove(struct platform_device *pdev)
 	if (!dev->vdec_pdata->is_subdev_supported)
 		pm_runtime_disable(dev->pm.dev);
 	mtk_vcodec_fw_release(dev->fw_handler);
-	return 0;
 }
 
 static struct platform_driver mtk_vcodec_dec_driver = {
 	.probe	= mtk_vcodec_probe,
-	.remove	= mtk_vcodec_dec_remove,
+	.remove_new = mtk_vcodec_dec_remove,
 	.driver	= {
 		.name	= MTK_VCODEC_DEC_NAME,
 		.of_match_table = mtk_vcodec_match,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 030/117] media: mtk_vcodec_enc_drv: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:30   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Mauro Carvalho Chehab,
	Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
index 9095186d5495..cd0d5da8195a 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
@@ -451,7 +451,7 @@ static const struct of_device_id mtk_vcodec_enc_match[] = {
 };
 MODULE_DEVICE_TABLE(of, mtk_vcodec_enc_match);
 
-static int mtk_vcodec_enc_remove(struct platform_device *pdev)
+static void mtk_vcodec_enc_remove(struct platform_device *pdev)
 {
 	struct mtk_vcodec_dev *dev = platform_get_drvdata(pdev);
 
@@ -466,12 +466,11 @@ static int mtk_vcodec_enc_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&dev->v4l2_dev);
 	pm_runtime_disable(dev->pm.dev);
 	mtk_vcodec_fw_release(dev->fw_handler);
-	return 0;
 }
 
 static struct platform_driver mtk_vcodec_enc_driver = {
 	.probe	= mtk_vcodec_probe,
-	.remove	= mtk_vcodec_enc_remove,
+	.remove_new = mtk_vcodec_enc_remove,
 	.driver	= {
 		.name	= MTK_VCODEC_ENC_NAME,
 		.of_match_table = mtk_vcodec_enc_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 030/117] media: mtk_vcodec_enc_drv: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Mauro Carvalho Chehab,
	Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
index 9095186d5495..cd0d5da8195a 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
@@ -451,7 +451,7 @@ static const struct of_device_id mtk_vcodec_enc_match[] = {
 };
 MODULE_DEVICE_TABLE(of, mtk_vcodec_enc_match);
 
-static int mtk_vcodec_enc_remove(struct platform_device *pdev)
+static void mtk_vcodec_enc_remove(struct platform_device *pdev)
 {
 	struct mtk_vcodec_dev *dev = platform_get_drvdata(pdev);
 
@@ -466,12 +466,11 @@ static int mtk_vcodec_enc_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&dev->v4l2_dev);
 	pm_runtime_disable(dev->pm.dev);
 	mtk_vcodec_fw_release(dev->fw_handler);
-	return 0;
 }
 
 static struct platform_driver mtk_vcodec_enc_driver = {
 	.probe	= mtk_vcodec_probe,
-	.remove	= mtk_vcodec_enc_remove,
+	.remove_new = mtk_vcodec_enc_remove,
 	.driver	= {
 		.name	= MTK_VCODEC_ENC_NAME,
 		.of_match_table = mtk_vcodec_enc_match,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 031/117] media: mtk_vpu: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:30   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Minghsiu Tsai,
	Houlong Wei, Mauro Carvalho Chehab, Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/mediatek/vpu/mtk_vpu.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/mediatek/vpu/mtk_vpu.c b/drivers/media/platform/mediatek/vpu/mtk_vpu.c
index 47b684b92f81..5e2bc286f168 100644
--- a/drivers/media/platform/mediatek/vpu/mtk_vpu.c
+++ b/drivers/media/platform/mediatek/vpu/mtk_vpu.c
@@ -953,7 +953,7 @@ static const struct of_device_id mtk_vpu_match[] = {
 };
 MODULE_DEVICE_TABLE(of, mtk_vpu_match);
 
-static int mtk_vpu_remove(struct platform_device *pdev)
+static void mtk_vpu_remove(struct platform_device *pdev)
 {
 	struct mtk_vpu *vpu = platform_get_drvdata(pdev);
 
@@ -966,8 +966,6 @@ static int mtk_vpu_remove(struct platform_device *pdev)
 	vpu_free_ext_mem(vpu, D_FW);
 	mutex_destroy(&vpu->vpu_mutex);
 	clk_unprepare(vpu->clk);
-
-	return 0;
 }
 
 static int mtk_vpu_suspend(struct device *dev)
@@ -1040,7 +1038,7 @@ static const struct dev_pm_ops mtk_vpu_pm = {
 
 static struct platform_driver mtk_vpu_driver = {
 	.probe	= mtk_vpu_probe,
-	.remove	= mtk_vpu_remove,
+	.remove_new = mtk_vpu_remove,
 	.driver	= {
 		.name	= "mtk_vpu",
 		.pm = &mtk_vpu_pm,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 031/117] media: mtk_vpu: Convert to platform remove callback returning void
@ 2023-03-26 14:30   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Minghsiu Tsai,
	Houlong Wei, Mauro Carvalho Chehab, Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/mediatek/vpu/mtk_vpu.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/mediatek/vpu/mtk_vpu.c b/drivers/media/platform/mediatek/vpu/mtk_vpu.c
index 47b684b92f81..5e2bc286f168 100644
--- a/drivers/media/platform/mediatek/vpu/mtk_vpu.c
+++ b/drivers/media/platform/mediatek/vpu/mtk_vpu.c
@@ -953,7 +953,7 @@ static const struct of_device_id mtk_vpu_match[] = {
 };
 MODULE_DEVICE_TABLE(of, mtk_vpu_match);
 
-static int mtk_vpu_remove(struct platform_device *pdev)
+static void mtk_vpu_remove(struct platform_device *pdev)
 {
 	struct mtk_vpu *vpu = platform_get_drvdata(pdev);
 
@@ -966,8 +966,6 @@ static int mtk_vpu_remove(struct platform_device *pdev)
 	vpu_free_ext_mem(vpu, D_FW);
 	mutex_destroy(&vpu->vpu_mutex);
 	clk_unprepare(vpu->clk);
-
-	return 0;
 }
 
 static int mtk_vpu_suspend(struct device *dev)
@@ -1040,7 +1038,7 @@ static const struct dev_pm_ops mtk_vpu_pm = {
 
 static struct platform_driver mtk_vpu_driver = {
 	.probe	= mtk_vpu_probe,
-	.remove	= mtk_vpu_remove,
+	.remove_new = mtk_vpu_remove,
 	.driver	= {
 		.name	= "mtk_vpu",
 		.pm = &mtk_vpu_pm,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 032/117] media: microchip-csi2dc: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (33 preceding siblings ...)
  (?)
@ 2023-03-26 14:30 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:30 UTC (permalink / raw)
  To: Eugen Hristev, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/microchip/microchip-csi2dc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/microchip/microchip-csi2dc.c b/drivers/media/platform/microchip/microchip-csi2dc.c
index d5b359f607ae..bfb3edcf018a 100644
--- a/drivers/media/platform/microchip/microchip-csi2dc.c
+++ b/drivers/media/platform/microchip/microchip-csi2dc.c
@@ -741,7 +741,7 @@ static int csi2dc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int csi2dc_remove(struct platform_device *pdev)
+static void csi2dc_remove(struct platform_device *pdev)
 {
 	struct csi2dc_device *csi2dc = platform_get_drvdata(pdev);
 
@@ -751,8 +751,6 @@ static int csi2dc_remove(struct platform_device *pdev)
 	v4l2_async_nf_unregister(&csi2dc->notifier);
 	v4l2_async_nf_cleanup(&csi2dc->notifier);
 	media_entity_cleanup(&csi2dc->csi2dc_sd.entity);
-
-	return 0;
 }
 
 static int __maybe_unused csi2dc_runtime_suspend(struct device *dev)
@@ -782,7 +780,7 @@ MODULE_DEVICE_TABLE(of, csi2dc_of_match);
 
 static struct platform_driver csi2dc_driver = {
 	.probe	= csi2dc_probe,
-	.remove = csi2dc_remove,
+	.remove_new = csi2dc_remove,
 	.driver = {
 		.name =			"microchip-csi2dc",
 		.pm =			&csi2dc_dev_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 033/117] media: microchip-sama5d2-isc: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (34 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Eugen Hristev, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/microchip/microchip-sama5d2-isc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/microchip/microchip-sama5d2-isc.c b/drivers/media/platform/microchip/microchip-sama5d2-isc.c
index ac4715d91de6..746f4a2fa9f6 100644
--- a/drivers/media/platform/microchip/microchip-sama5d2-isc.c
+++ b/drivers/media/platform/microchip/microchip-sama5d2-isc.c
@@ -608,7 +608,7 @@ static int microchip_isc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int microchip_isc_remove(struct platform_device *pdev)
+static void microchip_isc_remove(struct platform_device *pdev)
 {
 	struct isc_device *isc = platform_get_drvdata(pdev);
 
@@ -624,8 +624,6 @@ static int microchip_isc_remove(struct platform_device *pdev)
 	clk_disable_unprepare(isc->hclock);
 
 	microchip_isc_clk_cleanup(isc);
-
-	return 0;
 }
 
 static int __maybe_unused isc_runtime_suspend(struct device *dev)
@@ -668,7 +666,7 @@ MODULE_DEVICE_TABLE(of, microchip_isc_of_match);
 
 static struct platform_driver microchip_isc_driver = {
 	.probe	= microchip_isc_probe,
-	.remove	= microchip_isc_remove,
+	.remove_new = microchip_isc_remove,
 	.driver	= {
 		.name		= "microchip-sama5d2-isc",
 		.pm		= &microchip_isc_dev_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 034/117] media: microchip-sama7g5-isc: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (35 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Eugen Hristev, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/microchip/microchip-sama7g5-isc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/microchip/microchip-sama7g5-isc.c b/drivers/media/platform/microchip/microchip-sama7g5-isc.c
index d583eafe5cc1..79ae696764d0 100644
--- a/drivers/media/platform/microchip/microchip-sama7g5-isc.c
+++ b/drivers/media/platform/microchip/microchip-sama7g5-isc.c
@@ -577,7 +577,7 @@ static int microchip_xisc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int microchip_xisc_remove(struct platform_device *pdev)
+static void microchip_xisc_remove(struct platform_device *pdev)
 {
 	struct isc_device *isc = platform_get_drvdata(pdev);
 
@@ -592,8 +592,6 @@ static int microchip_xisc_remove(struct platform_device *pdev)
 	clk_disable_unprepare(isc->hclock);
 
 	microchip_isc_clk_cleanup(isc);
-
-	return 0;
 }
 
 static int __maybe_unused xisc_runtime_suspend(struct device *dev)
@@ -631,7 +629,7 @@ MODULE_DEVICE_TABLE(of, microchip_xisc_of_match);
 
 static struct platform_driver microchip_xisc_driver = {
 	.probe	= microchip_xisc_probe,
-	.remove	= microchip_xisc_remove,
+	.remove_new = microchip_xisc_remove,
 	.driver	= {
 		.name		= "microchip-sama7g5-xisc",
 		.pm		= &microchip_xisc_dev_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 035/117] media: vde: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (36 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-04-04 10:39   ` Thierry Reding
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Dmitry Osipenko, Mauro Carvalho Chehab, Thierry Reding, Jonathan Hunter
  Cc: linux-media, linux-tegra, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/nvidia/tegra-vde/vde.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/nvidia/tegra-vde/vde.c b/drivers/media/platform/nvidia/tegra-vde/vde.c
index f3e863a94c5a..7157734a1550 100644
--- a/drivers/media/platform/nvidia/tegra-vde/vde.c
+++ b/drivers/media/platform/nvidia/tegra-vde/vde.c
@@ -378,7 +378,7 @@ static int tegra_vde_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int tegra_vde_remove(struct platform_device *pdev)
+static void tegra_vde_remove(struct platform_device *pdev)
 {
 	struct tegra_vde *vde = platform_get_drvdata(pdev);
 	struct device *dev = &pdev->dev;
@@ -407,8 +407,6 @@ static int tegra_vde_remove(struct platform_device *pdev)
 
 	gen_pool_free(vde->iram_pool, (unsigned long)vde->iram,
 		      gen_pool_size(vde->iram_pool));
-
-	return 0;
 }
 
 static void tegra_vde_shutdown(struct platform_device *pdev)
@@ -536,7 +534,7 @@ MODULE_DEVICE_TABLE(of, tegra_vde_of_match);
 
 static struct platform_driver tegra_vde_driver = {
 	.probe		= tegra_vde_probe,
-	.remove		= tegra_vde_remove,
+	.remove_new	= tegra_vde_remove,
 	.shutdown	= tegra_vde_shutdown,
 	.driver		= {
 		.name		= "tegra-vde",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 036/117] media: dw100: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (37 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  6:56   ` Xavier Roumegue (OSS)
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Xavier Roumegue, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/nxp/dw100/dw100.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/nxp/dw100/dw100.c b/drivers/media/platform/nxp/dw100/dw100.c
index 189d60cd5ed1..6eed4bde9611 100644
--- a/drivers/media/platform/nxp/dw100/dw100.c
+++ b/drivers/media/platform/nxp/dw100/dw100.c
@@ -1633,7 +1633,7 @@ static int dw100_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int dw100_remove(struct platform_device *pdev)
+static void dw100_remove(struct platform_device *pdev)
 {
 	struct dw100_device *dw_dev = platform_get_drvdata(pdev);
 
@@ -1649,8 +1649,6 @@ static int dw100_remove(struct platform_device *pdev)
 	mutex_destroy(dw_dev->vfd.lock);
 	v4l2_m2m_release(dw_dev->m2m_dev);
 	v4l2_device_unregister(&dw_dev->v4l2_dev);
-
-	return 0;
 }
 
 static int __maybe_unused dw100_runtime_suspend(struct device *dev)
@@ -1692,7 +1690,7 @@ MODULE_DEVICE_TABLE(of, dw100_dt_ids);
 
 static struct platform_driver dw100_driver = {
 	.probe		= dw100_probe,
-	.remove		= dw100_remove,
+	.remove_new	= dw100_remove,
 	.driver		= {
 		.name	= DRV_NAME,
 		.pm = &dw100_pm,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 037/117] media: mxc-jpeg: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mirela Rabulea, Mauro Carvalho Chehab, Shawn Guo, Sascha Hauer
  Cc: NXP Linux Team, Fabio Estevam, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
index f085f14d676a..4dd404d69c4e 100644
--- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
+++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
@@ -2622,7 +2622,7 @@ static const struct dev_pm_ops	mxc_jpeg_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(mxc_jpeg_suspend, mxc_jpeg_resume)
 };
 
-static int mxc_jpeg_remove(struct platform_device *pdev)
+static void mxc_jpeg_remove(struct platform_device *pdev)
 {
 	unsigned int slot;
 	struct mxc_jpeg_dev *jpeg = platform_get_drvdata(pdev);
@@ -2635,15 +2635,13 @@ static int mxc_jpeg_remove(struct platform_device *pdev)
 	v4l2_m2m_release(jpeg->m2m_dev);
 	v4l2_device_unregister(&jpeg->v4l2_dev);
 	mxc_jpeg_detach_pm_domains(jpeg);
-
-	return 0;
 }
 
 MODULE_DEVICE_TABLE(of, mxc_jpeg_match);
 
 static struct platform_driver mxc_jpeg_driver = {
 	.probe = mxc_jpeg_probe,
-	.remove = mxc_jpeg_remove,
+	.remove_new = mxc_jpeg_remove,
 	.driver = {
 		.name = "mxc-jpeg",
 		.of_match_table = mxc_jpeg_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 037/117] media: mxc-jpeg: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mirela Rabulea, Mauro Carvalho Chehab, Shawn Guo, Sascha Hauer
  Cc: NXP Linux Team, Fabio Estevam, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
index f085f14d676a..4dd404d69c4e 100644
--- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
+++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
@@ -2622,7 +2622,7 @@ static const struct dev_pm_ops	mxc_jpeg_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(mxc_jpeg_suspend, mxc_jpeg_resume)
 };
 
-static int mxc_jpeg_remove(struct platform_device *pdev)
+static void mxc_jpeg_remove(struct platform_device *pdev)
 {
 	unsigned int slot;
 	struct mxc_jpeg_dev *jpeg = platform_get_drvdata(pdev);
@@ -2635,15 +2635,13 @@ static int mxc_jpeg_remove(struct platform_device *pdev)
 	v4l2_m2m_release(jpeg->m2m_dev);
 	v4l2_device_unregister(&jpeg->v4l2_dev);
 	mxc_jpeg_detach_pm_domains(jpeg);
-
-	return 0;
 }
 
 MODULE_DEVICE_TABLE(of, mxc_jpeg_match);
 
 static struct platform_driver mxc_jpeg_driver = {
 	.probe = mxc_jpeg_probe,
-	.remove = mxc_jpeg_remove,
+	.remove_new = mxc_jpeg_remove,
 	.driver = {
 		.name = "mxc-jpeg",
 		.of_match_table = mxc_jpeg_match,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 038/117] media: imx-mipi-csis: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Rui Miguel Silva, Laurent Pinchart, Mauro Carvalho Chehab,
	Shawn Guo, Sascha Hauer
  Cc: Fabio Estevam, NXP Linux Team, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/nxp/imx-mipi-csis.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/platform/nxp/imx-mipi-csis.c
index be2768a47995..05d52762e792 100644
--- a/drivers/media/platform/nxp/imx-mipi-csis.c
+++ b/drivers/media/platform/nxp/imx-mipi-csis.c
@@ -1503,7 +1503,7 @@ static int mipi_csis_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mipi_csis_remove(struct platform_device *pdev)
+static void mipi_csis_remove(struct platform_device *pdev)
 {
 	struct v4l2_subdev *sd = platform_get_drvdata(pdev);
 	struct mipi_csis_device *csis = sd_to_mipi_csis_device(sd);
@@ -1520,8 +1520,6 @@ static int mipi_csis_remove(struct platform_device *pdev)
 	media_entity_cleanup(&csis->sd.entity);
 	fwnode_handle_put(csis->sd.fwnode);
 	pm_runtime_set_suspended(&pdev->dev);
-
-	return 0;
 }
 
 static const struct of_device_id mipi_csis_of_match[] = {
@@ -1544,7 +1542,7 @@ MODULE_DEVICE_TABLE(of, mipi_csis_of_match);
 
 static struct platform_driver mipi_csis_driver = {
 	.probe		= mipi_csis_probe,
-	.remove		= mipi_csis_remove,
+	.remove_new	= mipi_csis_remove,
 	.driver		= {
 		.of_match_table = mipi_csis_of_match,
 		.name		= CSIS_DRIVER_NAME,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 038/117] media: imx-mipi-csis: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Rui Miguel Silva, Laurent Pinchart, Mauro Carvalho Chehab,
	Shawn Guo, Sascha Hauer
  Cc: Fabio Estevam, NXP Linux Team, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/nxp/imx-mipi-csis.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/platform/nxp/imx-mipi-csis.c
index be2768a47995..05d52762e792 100644
--- a/drivers/media/platform/nxp/imx-mipi-csis.c
+++ b/drivers/media/platform/nxp/imx-mipi-csis.c
@@ -1503,7 +1503,7 @@ static int mipi_csis_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mipi_csis_remove(struct platform_device *pdev)
+static void mipi_csis_remove(struct platform_device *pdev)
 {
 	struct v4l2_subdev *sd = platform_get_drvdata(pdev);
 	struct mipi_csis_device *csis = sd_to_mipi_csis_device(sd);
@@ -1520,8 +1520,6 @@ static int mipi_csis_remove(struct platform_device *pdev)
 	media_entity_cleanup(&csis->sd.entity);
 	fwnode_handle_put(csis->sd.fwnode);
 	pm_runtime_set_suspended(&pdev->dev);
-
-	return 0;
 }
 
 static const struct of_device_id mipi_csis_of_match[] = {
@@ -1544,7 +1542,7 @@ MODULE_DEVICE_TABLE(of, mipi_csis_of_match);
 
 static struct platform_driver mipi_csis_driver = {
 	.probe		= mipi_csis_probe,
-	.remove		= mipi_csis_remove,
+	.remove_new	= mipi_csis_remove,
 	.driver		= {
 		.of_match_table = mipi_csis_of_match,
 		.name		= CSIS_DRIVER_NAME,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 039/117] media: imx-pxp: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Philipp Zabel, Mauro Carvalho Chehab, Shawn Guo, Sascha Hauer
  Cc: Fabio Estevam, NXP Linux Team, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/nxp/imx-pxp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/nxp/imx-pxp.c b/drivers/media/platform/nxp/imx-pxp.c
index fde3c36e5e1d..90f319857c23 100644
--- a/drivers/media/platform/nxp/imx-pxp.c
+++ b/drivers/media/platform/nxp/imx-pxp.c
@@ -1904,7 +1904,7 @@ static int pxp_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int pxp_remove(struct platform_device *pdev)
+static void pxp_remove(struct platform_device *pdev)
 {
 	struct pxp_dev *dev = platform_get_drvdata(pdev);
 
@@ -1922,8 +1922,6 @@ static int pxp_remove(struct platform_device *pdev)
 	video_unregister_device(&dev->vfd);
 	v4l2_m2m_release(dev->m2m_dev);
 	v4l2_device_unregister(&dev->v4l2_dev);
-
-	return 0;
 }
 
 static const struct pxp_pdata pxp_imx6ull_pdata = {
@@ -1943,7 +1941,7 @@ MODULE_DEVICE_TABLE(of, pxp_dt_ids);
 
 static struct platform_driver pxp_driver = {
 	.probe		= pxp_probe,
-	.remove		= pxp_remove,
+	.remove_new	= pxp_remove,
 	.driver		= {
 		.name	= MEM2MEM_NAME,
 		.of_match_table = pxp_dt_ids,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 039/117] media: imx-pxp: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Philipp Zabel, Mauro Carvalho Chehab, Shawn Guo, Sascha Hauer
  Cc: Fabio Estevam, NXP Linux Team, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/nxp/imx-pxp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/nxp/imx-pxp.c b/drivers/media/platform/nxp/imx-pxp.c
index fde3c36e5e1d..90f319857c23 100644
--- a/drivers/media/platform/nxp/imx-pxp.c
+++ b/drivers/media/platform/nxp/imx-pxp.c
@@ -1904,7 +1904,7 @@ static int pxp_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int pxp_remove(struct platform_device *pdev)
+static void pxp_remove(struct platform_device *pdev)
 {
 	struct pxp_dev *dev = platform_get_drvdata(pdev);
 
@@ -1922,8 +1922,6 @@ static int pxp_remove(struct platform_device *pdev)
 	video_unregister_device(&dev->vfd);
 	v4l2_m2m_release(dev->m2m_dev);
 	v4l2_device_unregister(&dev->v4l2_dev);
-
-	return 0;
 }
 
 static const struct pxp_pdata pxp_imx6ull_pdata = {
@@ -1943,7 +1941,7 @@ MODULE_DEVICE_TABLE(of, pxp_dt_ids);
 
 static struct platform_driver pxp_driver = {
 	.probe		= pxp_probe,
-	.remove		= pxp_remove,
+	.remove_new	= pxp_remove,
 	.driver		= {
 		.name	= MEM2MEM_NAME,
 		.of_match_table = pxp_dt_ids,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 040/117] media: imx7-media-csi: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Rui Miguel Silva, Laurent Pinchart, Mauro Carvalho Chehab,
	Shawn Guo, Sascha Hauer
  Cc: Fabio Estevam, NXP Linux Team, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/nxp/imx7-media-csi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c
index c22bf5c827e7..9ee46c17bd02 100644
--- a/drivers/media/platform/nxp/imx7-media-csi.c
+++ b/drivers/media/platform/nxp/imx7-media-csi.c
@@ -2278,7 +2278,7 @@ static int imx7_csi_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int imx7_csi_remove(struct platform_device *pdev)
+static void imx7_csi_remove(struct platform_device *pdev)
 {
 	struct imx7_csi *csi = platform_get_drvdata(pdev);
 
@@ -2287,8 +2287,6 @@ static int imx7_csi_remove(struct platform_device *pdev)
 	v4l2_async_nf_unregister(&csi->notifier);
 	v4l2_async_nf_cleanup(&csi->notifier);
 	v4l2_async_unregister_subdev(&csi->sd);
-
-	return 0;
 }
 
 static const struct of_device_id imx7_csi_of_match[] = {
@@ -2301,7 +2299,7 @@ MODULE_DEVICE_TABLE(of, imx7_csi_of_match);
 
 static struct platform_driver imx7_csi_driver = {
 	.probe = imx7_csi_probe,
-	.remove = imx7_csi_remove,
+	.remove_new = imx7_csi_remove,
 	.driver = {
 		.of_match_table = imx7_csi_of_match,
 		.name = "imx7-csi",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 040/117] media: imx7-media-csi: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Rui Miguel Silva, Laurent Pinchart, Mauro Carvalho Chehab,
	Shawn Guo, Sascha Hauer
  Cc: Fabio Estevam, NXP Linux Team, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/nxp/imx7-media-csi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c
index c22bf5c827e7..9ee46c17bd02 100644
--- a/drivers/media/platform/nxp/imx7-media-csi.c
+++ b/drivers/media/platform/nxp/imx7-media-csi.c
@@ -2278,7 +2278,7 @@ static int imx7_csi_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int imx7_csi_remove(struct platform_device *pdev)
+static void imx7_csi_remove(struct platform_device *pdev)
 {
 	struct imx7_csi *csi = platform_get_drvdata(pdev);
 
@@ -2287,8 +2287,6 @@ static int imx7_csi_remove(struct platform_device *pdev)
 	v4l2_async_nf_unregister(&csi->notifier);
 	v4l2_async_nf_cleanup(&csi->notifier);
 	v4l2_async_unregister_subdev(&csi->sd);
-
-	return 0;
 }
 
 static const struct of_device_id imx7_csi_of_match[] = {
@@ -2301,7 +2299,7 @@ MODULE_DEVICE_TABLE(of, imx7_csi_of_match);
 
 static struct platform_driver imx7_csi_driver = {
 	.probe = imx7_csi_probe,
-	.remove = imx7_csi_remove,
+	.remove_new = imx7_csi_remove,
 	.driver = {
 		.of_match_table = imx7_csi_of_match,
 		.name = "imx7-csi",
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 041/117] media: mx2_emmaprp: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (42 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Uwe Kleine-König; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/nxp/mx2_emmaprp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/nxp/mx2_emmaprp.c b/drivers/media/platform/nxp/mx2_emmaprp.c
index 3ce84d0f078c..023ed40c6b08 100644
--- a/drivers/media/platform/nxp/mx2_emmaprp.c
+++ b/drivers/media/platform/nxp/mx2_emmaprp.c
@@ -888,7 +888,7 @@ static int emmaprp_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int emmaprp_remove(struct platform_device *pdev)
+static void emmaprp_remove(struct platform_device *pdev)
 {
 	struct emmaprp_dev *pcdev = platform_get_drvdata(pdev);
 
@@ -898,13 +898,11 @@ static int emmaprp_remove(struct platform_device *pdev)
 	v4l2_m2m_release(pcdev->m2m_dev);
 	v4l2_device_unregister(&pcdev->v4l2_dev);
 	mutex_destroy(&pcdev->dev_mutex);
-
-	return 0;
 }
 
 static struct platform_driver emmaprp_pdrv = {
 	.probe		= emmaprp_probe,
-	.remove		= emmaprp_remove,
+	.remove_new	= emmaprp_remove,
 	.driver		= {
 		.name	= MEM2MEM_NAME,
 	},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 042/117] media: camss: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (43 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  8:45   ` Konrad Dybcio
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Robert Foss, Todor Tomov, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab
  Cc: Konrad Dybcio, linux-media, linux-arm-msm, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/qcom/camss/camss.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index 9cda284f1e71..df8a507ce8ac 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -1725,7 +1725,7 @@ void camss_delete(struct camss *camss)
  *
  * Always returns 0.
  */
-static int camss_remove(struct platform_device *pdev)
+static void camss_remove(struct platform_device *pdev)
 {
 	struct camss *camss = platform_get_drvdata(pdev);
 
@@ -1735,8 +1735,6 @@ static int camss_remove(struct platform_device *pdev)
 
 	if (atomic_read(&camss->ref_count) == 0)
 		camss_delete(camss);
-
-	return 0;
 }
 
 static const struct of_device_id camss_dt_match[] = {
@@ -1798,7 +1796,7 @@ static const struct dev_pm_ops camss_pm_ops = {
 
 static struct platform_driver qcom_camss_driver = {
 	.probe = camss_probe,
-	.remove = camss_remove,
+	.remove_new = camss_remove,
 	.driver = {
 		.name = "qcom-camss",
 		.of_match_table = camss_dt_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 043/117] media: venus: Warn only once about problems in .remove()
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (44 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  8:45   ` Konrad Dybcio
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Stanimir Varbanov, Vikash Garodia, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab
  Cc: Konrad Dybcio, linux-media, linux-arm-msm, kernel

The only effect of returning an error code in a remove callback is that
the driver core emits a warning. The device is unbound anyhow.

As the remove callback already emits a (quite verbose) warning when ret
is non-zero, return zero to suppress the additional warning.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/qcom/venus/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 990a1519f968..403ffb92af60 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -448,7 +448,7 @@ static int venus_remove(struct platform_device *pdev)
 	mutex_destroy(&core->lock);
 	venus_dbgfs_deinit(core);
 
-	return ret;
+	return 0;
 }
 
 static void venus_core_shutdown(struct platform_device *pdev)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 044/117] media: venus: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (45 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  8:45   ` Konrad Dybcio
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Stanimir Varbanov, Vikash Garodia, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab
  Cc: Konrad Dybcio, linux-media, linux-arm-msm, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/qcom/venus/core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 403ffb92af60..2ae867cb4c48 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -416,7 +416,7 @@ static int venus_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int venus_remove(struct platform_device *pdev)
+static void venus_remove(struct platform_device *pdev)
 {
 	struct venus_core *core = platform_get_drvdata(pdev);
 	const struct venus_pm_ops *pm_ops = core->pm_ops;
@@ -447,8 +447,6 @@ static int venus_remove(struct platform_device *pdev)
 	mutex_destroy(&core->pm_lock);
 	mutex_destroy(&core->lock);
 	venus_dbgfs_deinit(core);
-
-	return 0;
 }
 
 static void venus_core_shutdown(struct platform_device *pdev)
@@ -891,7 +889,7 @@ MODULE_DEVICE_TABLE(of, venus_dt_match);
 
 static struct platform_driver qcom_venus_driver = {
 	.probe = venus_probe,
-	.remove = venus_remove,
+	.remove_new = venus_remove,
 	.driver = {
 		.name = "qcom-venus",
 		.of_match_table = venus_dt_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 045/117] media: vdec: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (46 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  8:46   ` Konrad Dybcio
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Stanimir Varbanov, Vikash Garodia, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab
  Cc: Konrad Dybcio, linux-media, linux-arm-msm, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/qcom/venus/vdec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index 4ceaba37e2e5..d47c22015770 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -1774,7 +1774,7 @@ static int vdec_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int vdec_remove(struct platform_device *pdev)
+static void vdec_remove(struct platform_device *pdev)
 {
 	struct venus_core *core = dev_get_drvdata(pdev->dev.parent);
 
@@ -1783,8 +1783,6 @@ static int vdec_remove(struct platform_device *pdev)
 
 	if (core->pm_ops->vdec_put)
 		core->pm_ops->vdec_put(core->dev_dec);
-
-	return 0;
 }
 
 static __maybe_unused int vdec_runtime_suspend(struct device *dev)
@@ -1825,7 +1823,7 @@ MODULE_DEVICE_TABLE(of, vdec_dt_match);
 
 static struct platform_driver qcom_venus_dec_driver = {
 	.probe = vdec_probe,
-	.remove = vdec_remove,
+	.remove_new = vdec_remove,
 	.driver = {
 		.name = "qcom-venus-decoder",
 		.of_match_table = vdec_dt_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 046/117] media: venc: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (47 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  8:46   ` Konrad Dybcio
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Stanimir Varbanov, Vikash Garodia, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab
  Cc: Konrad Dybcio, linux-media, linux-arm-msm, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/qcom/venus/venc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index cdb12546c4fa..6d61614656a5 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -1492,7 +1492,7 @@ static int venc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int venc_remove(struct platform_device *pdev)
+static void venc_remove(struct platform_device *pdev)
 {
 	struct venus_core *core = dev_get_drvdata(pdev->dev.parent);
 
@@ -1501,8 +1501,6 @@ static int venc_remove(struct platform_device *pdev)
 
 	if (core->pm_ops->venc_put)
 		core->pm_ops->venc_put(core->dev_enc);
-
-	return 0;
 }
 
 static __maybe_unused int venc_runtime_suspend(struct device *dev)
@@ -1543,7 +1541,7 @@ MODULE_DEVICE_TABLE(of, venc_dt_match);
 
 static struct platform_driver qcom_venus_enc_driver = {
 	.probe = venc_probe,
-	.remove = venc_remove,
+	.remove_new = venc_remove,
 	.driver = {
 		.name = "qcom-venus-encoder",
 		.of_match_table = venc_dt_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 047/117] media: rcar-fcp: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (48 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  7:04   ` Geert Uytterhoeven
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab
  Cc: linux-media, linux-renesas-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/renesas/rcar-fcp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/renesas/rcar-fcp.c b/drivers/media/platform/renesas/rcar-fcp.c
index eb59a3ba6d0f..bcef7b87da7c 100644
--- a/drivers/media/platform/renesas/rcar-fcp.c
+++ b/drivers/media/platform/renesas/rcar-fcp.c
@@ -144,7 +144,7 @@ static int rcar_fcp_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int rcar_fcp_remove(struct platform_device *pdev)
+static void rcar_fcp_remove(struct platform_device *pdev)
 {
 	struct rcar_fcp_device *fcp = platform_get_drvdata(pdev);
 
@@ -153,8 +153,6 @@ static int rcar_fcp_remove(struct platform_device *pdev)
 	mutex_unlock(&fcp_lock);
 
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static const struct of_device_id rcar_fcp_of_match[] = {
@@ -166,7 +164,7 @@ MODULE_DEVICE_TABLE(of, rcar_fcp_of_match);
 
 static struct platform_driver rcar_fcp_platform_driver = {
 	.probe		= rcar_fcp_probe,
-	.remove		= rcar_fcp_remove,
+	.remove_new	= rcar_fcp_remove,
 	.driver		= {
 		.name	= "rcar-fcp",
 		.of_match_table = rcar_fcp_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 048/117] media: rcar-isp: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (49 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  7:10   ` Geert Uytterhoeven
  2023-03-27  8:48   ` Niklas Söderlund
  -1 siblings, 2 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Niklas Söderlund, Mauro Carvalho Chehab
  Cc: linux-media, linux-renesas-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/renesas/rcar-isp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/renesas/rcar-isp.c b/drivers/media/platform/renesas/rcar-isp.c
index 10b3474f93a4..27fe71931a04 100644
--- a/drivers/media/platform/renesas/rcar-isp.c
+++ b/drivers/media/platform/renesas/rcar-isp.c
@@ -503,7 +503,7 @@ static int risp_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int risp_remove(struct platform_device *pdev)
+static void risp_remove(struct platform_device *pdev)
 {
 	struct rcar_isp *isp = platform_get_drvdata(pdev);
 
@@ -515,8 +515,6 @@ static int risp_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 
 	mutex_destroy(&isp->lock);
-
-	return 0;
 }
 
 static struct platform_driver rcar_isp_driver = {
@@ -525,7 +523,7 @@ static struct platform_driver rcar_isp_driver = {
 		.of_match_table = risp_of_id_table,
 	},
 	.probe = risp_probe,
-	.remove = risp_remove,
+	.remove_new = risp_remove,
 };
 
 module_platform_driver(rcar_isp_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 049/117] media: rcar-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (50 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  7:09   ` Geert Uytterhoeven
  2023-03-27  8:47   ` Niklas Söderlund
  -1 siblings, 2 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Niklas Söderlund, Mauro Carvalho Chehab
  Cc: linux-media, linux-renesas-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/renesas/rcar-vin/rcar-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-core.c b/drivers/media/platform/renesas/rcar-vin/rcar-core.c
index 5e53d6b7036c..1398f147e5c2 100644
--- a/drivers/media/platform/renesas/rcar-vin/rcar-core.c
+++ b/drivers/media/platform/renesas/rcar-vin/rcar-core.c
@@ -1442,7 +1442,7 @@ static int rcar_vin_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int rcar_vin_remove(struct platform_device *pdev)
+static void rcar_vin_remove(struct platform_device *pdev)
 {
 	struct rvin_dev *vin = platform_get_drvdata(pdev);
 
@@ -1458,8 +1458,6 @@ static int rcar_vin_remove(struct platform_device *pdev)
 		rvin_parallel_cleanup(vin);
 
 	rvin_dma_unregister(vin);
-
-	return 0;
 }
 
 static SIMPLE_DEV_PM_OPS(rvin_pm_ops, rvin_suspend, rvin_resume);
@@ -1472,7 +1470,7 @@ static struct platform_driver rcar_vin_driver = {
 		.of_match_table = rvin_of_id_table,
 	},
 	.probe = rcar_vin_probe,
-	.remove = rcar_vin_remove,
+	.remove_new = rcar_vin_remove,
 };
 
 module_platform_driver(rcar_vin_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 050/117] media: rcar-csi2: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (51 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  7:13   ` Geert Uytterhoeven
  2023-03-27  8:49   ` Niklas Söderlund
  -1 siblings, 2 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Niklas Söderlund, Mauro Carvalho Chehab
  Cc: linux-media, linux-renesas-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/renesas/rcar-vin/rcar-csi2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-csi2.c b/drivers/media/platform/renesas/rcar-vin/rcar-csi2.c
index 174aa6176f54..1632c9a53ac4 100644
--- a/drivers/media/platform/renesas/rcar-vin/rcar-csi2.c
+++ b/drivers/media/platform/renesas/rcar-vin/rcar-csi2.c
@@ -1574,7 +1574,7 @@ static int rcsi2_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rcsi2_remove(struct platform_device *pdev)
+static void rcsi2_remove(struct platform_device *pdev)
 {
 	struct rcar_csi2 *priv = platform_get_drvdata(pdev);
 
@@ -1585,12 +1585,10 @@ static int rcsi2_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 
 	mutex_destroy(&priv->lock);
-
-	return 0;
 }
 
 static struct platform_driver rcar_csi2_pdrv = {
-	.remove	= rcsi2_remove,
+	.remove_new = rcsi2_remove,
 	.probe	= rcsi2_probe,
 	.driver	= {
 		.name	= "rcar-csi2",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 051/117] media: rcar_drif: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (52 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  7:12   ` Geert Uytterhoeven
  2023-03-28 13:54   ` Fabrizio Castro
  -1 siblings, 2 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Fabrizio Castro, Mauro Carvalho Chehab
  Cc: linux-media, linux-renesas-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/renesas/rcar_drif.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/media/platform/renesas/rcar_drif.c b/drivers/media/platform/renesas/rcar_drif.c
index 3fec41f6e964..3a92f4535c18 100644
--- a/drivers/media/platform/renesas/rcar_drif.c
+++ b/drivers/media/platform/renesas/rcar_drif.c
@@ -1433,19 +1433,17 @@ static int rcar_drif_probe(struct platform_device *pdev)
 }
 
 /* DRIF channel remove */
-static int rcar_drif_remove(struct platform_device *pdev)
+static void rcar_drif_remove(struct platform_device *pdev)
 {
 	struct rcar_drif *ch = platform_get_drvdata(pdev);
 	struct rcar_drif_sdr *sdr = ch->sdr;
 
 	/* Channel 0 will be the SDR instance */
 	if (ch->num)
-		return 0;
+		return;
 
 	/* SDR instance */
 	rcar_drif_sdr_remove(sdr);
-
-	return 0;
 }
 
 /* FIXME: Implement suspend/resume support */
@@ -1476,7 +1474,7 @@ static struct platform_driver rcar_drif_driver = {
 		.pm = &rcar_drif_pm_ops,
 		},
 	.probe = rcar_drif_probe,
-	.remove = rcar_drif_remove,
+	.remove_new = rcar_drif_remove,
 };
 
 module_platform_driver(rcar_drif_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 052/117] media: rcar_fdp1: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (53 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  7:12   ` Geert Uytterhoeven
  2023-03-27  8:39   ` Kieran Bingham
  -1 siblings, 2 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Kieran Bingham, Mauro Carvalho Chehab
  Cc: linux-media, linux-renesas-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/renesas/rcar_fdp1.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/renesas/rcar_fdp1.c b/drivers/media/platform/renesas/rcar_fdp1.c
index 37ecf489d112..d80b3214dfae 100644
--- a/drivers/media/platform/renesas/rcar_fdp1.c
+++ b/drivers/media/platform/renesas/rcar_fdp1.c
@@ -2396,7 +2396,7 @@ static int fdp1_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int fdp1_remove(struct platform_device *pdev)
+static void fdp1_remove(struct platform_device *pdev)
 {
 	struct fdp1_dev *fdp1 = platform_get_drvdata(pdev);
 
@@ -2404,8 +2404,6 @@ static int fdp1_remove(struct platform_device *pdev)
 	video_unregister_device(&fdp1->vfd);
 	v4l2_device_unregister(&fdp1->v4l2_dev);
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static int __maybe_unused fdp1_pm_runtime_suspend(struct device *dev)
@@ -2441,7 +2439,7 @@ MODULE_DEVICE_TABLE(of, fdp1_dt_ids);
 
 static struct platform_driver fdp1_pdrv = {
 	.probe		= fdp1_probe,
-	.remove		= fdp1_remove,
+	.remove_new	= fdp1_remove,
 	.driver		= {
 		.name	= DRIVER_NAME,
 		.of_match_table = fdp1_dt_ids,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 053/117] media: rcar_jpu: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (54 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  7:11   ` Geert Uytterhoeven
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mikhail Ulyanov, Mauro Carvalho Chehab
  Cc: linux-media, linux-renesas-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/renesas/rcar_jpu.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/renesas/rcar_jpu.c b/drivers/media/platform/renesas/rcar_jpu.c
index 2f4377cfbb42..e7f604807825 100644
--- a/drivers/media/platform/renesas/rcar_jpu.c
+++ b/drivers/media/platform/renesas/rcar_jpu.c
@@ -1702,7 +1702,7 @@ static int jpu_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int jpu_remove(struct platform_device *pdev)
+static void jpu_remove(struct platform_device *pdev)
 {
 	struct jpu *jpu = platform_get_drvdata(pdev);
 
@@ -1710,8 +1710,6 @@ static int jpu_remove(struct platform_device *pdev)
 	video_unregister_device(&jpu->vfd_encoder);
 	v4l2_m2m_release(jpu->m2m_dev);
 	v4l2_device_unregister(&jpu->v4l2_dev);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -1746,7 +1744,7 @@ static const struct dev_pm_ops jpu_pm_ops = {
 
 static struct platform_driver jpu_driver = {
 	.probe = jpu_probe,
-	.remove = jpu_remove,
+	.remove_new = jpu_remove,
 	.driver = {
 		.of_match_table = jpu_dt_ids,
 		.name = DRV_NAME,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 054/117] media: renesas-ceu: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (55 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  7:13   ` Geert Uytterhoeven
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Jacopo Mondi, Mauro Carvalho Chehab
  Cc: linux-media, linux-renesas-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/renesas/renesas-ceu.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/renesas/renesas-ceu.c b/drivers/media/platform/renesas/renesas-ceu.c
index f70f91b006b7..02d1ab23d76d 100644
--- a/drivers/media/platform/renesas/renesas-ceu.c
+++ b/drivers/media/platform/renesas/renesas-ceu.c
@@ -1709,7 +1709,7 @@ static int ceu_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int ceu_remove(struct platform_device *pdev)
+static void ceu_remove(struct platform_device *pdev)
 {
 	struct ceu_device *ceudev = platform_get_drvdata(pdev);
 
@@ -1722,8 +1722,6 @@ static int ceu_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&ceudev->v4l2_dev);
 
 	video_unregister_device(&ceudev->vdev);
-
-	return 0;
 }
 
 static const struct dev_pm_ops ceu_pm_ops = {
@@ -1739,7 +1737,7 @@ static struct platform_driver ceu_driver = {
 		.of_match_table = of_match_ptr(ceu_of_match),
 	},
 	.probe		= ceu_probe,
-	.remove		= ceu_remove,
+	.remove_new	= ceu_remove,
 };
 
 module_platform_driver(ceu_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 055/117] media: rzg2l-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (56 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Sakari Ailus, Lad Prabhakar,
	Uwe Kleine-König
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c
index 5939f5165a5e..7a71370fcc32 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c
@@ -298,7 +298,7 @@ static int rzg2l_cru_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rzg2l_cru_remove(struct platform_device *pdev)
+static void rzg2l_cru_remove(struct platform_device *pdev)
 {
 	struct rzg2l_cru_dev *cru = platform_get_drvdata(pdev);
 
@@ -312,8 +312,6 @@ static int rzg2l_cru_remove(struct platform_device *pdev)
 	mutex_destroy(&cru->mdev_lock);
 
 	rzg2l_cru_dma_unregister(cru);
-
-	return 0;
 }
 
 static const struct of_device_id rzg2l_cru_of_id_table[] = {
@@ -328,7 +326,7 @@ static struct platform_driver rzg2l_cru_driver = {
 		.of_match_table = rzg2l_cru_of_id_table,
 	},
 	.probe = rzg2l_cru_probe,
-	.remove = rzg2l_cru_remove,
+	.remove_new = rzg2l_cru_remove,
 };
 
 module_platform_driver(rzg2l_cru_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 056/117] media: rzg2l-csi2: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (57 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, Lad Prabhakar,
	Nathan Chancellor, Yang Li, Uwe Kleine-König, Dan Carpenter
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
index 384fb54e219a..30dad7383654 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
@@ -819,7 +819,7 @@ static int rzg2l_csi2_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rzg2l_csi2_remove(struct platform_device *pdev)
+static void rzg2l_csi2_remove(struct platform_device *pdev)
 {
 	struct rzg2l_csi2 *csi2 = platform_get_drvdata(pdev);
 
@@ -829,8 +829,6 @@ static int rzg2l_csi2_remove(struct platform_device *pdev)
 	v4l2_subdev_cleanup(&csi2->subdev);
 	media_entity_cleanup(&csi2->subdev.entity);
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static int __maybe_unused rzg2l_csi2_pm_runtime_suspend(struct device *dev)
@@ -859,7 +857,7 @@ static const struct of_device_id rzg2l_csi2_of_table[] = {
 };
 
 static struct platform_driver rzg2l_csi2_pdrv = {
-	.remove	= rzg2l_csi2_remove,
+	.remove_new = rzg2l_csi2_remove,
 	.probe	= rzg2l_csi2_probe,
 	.driver	= {
 		.name = "rzg2l-csi2",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 057/117] media: sh_vou: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (58 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Uwe Kleine-König; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/renesas/sh_vou.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/renesas/sh_vou.c b/drivers/media/platform/renesas/sh_vou.c
index ca4310e26c49..8fe3272a541f 100644
--- a/drivers/media/platform/renesas/sh_vou.c
+++ b/drivers/media/platform/renesas/sh_vou.c
@@ -1343,7 +1343,7 @@ static int sh_vou_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int sh_vou_remove(struct platform_device *pdev)
+static void sh_vou_remove(struct platform_device *pdev)
 {
 	struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev);
 	struct sh_vou_device *vou_dev = container_of(v4l2_dev,
@@ -1356,11 +1356,10 @@ static int sh_vou_remove(struct platform_device *pdev)
 	video_unregister_device(&vou_dev->vdev);
 	i2c_put_adapter(client->adapter);
 	v4l2_device_unregister(&vou_dev->v4l2_dev);
-	return 0;
 }
 
 static struct platform_driver sh_vou = {
-	.remove  = sh_vou_remove,
+	.remove_new = sh_vou_remove,
 	.driver  = {
 		.name	= "sh-vou",
 	},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 058/117] media: vsp1_drv: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (59 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  2023-03-27  7:11   ` Geert Uytterhoeven
  2023-03-27  8:41   ` Kieran Bingham
  -1 siblings, 2 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, Mauro Carvalho Chehab
  Cc: linux-media, linux-renesas-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/renesas/vsp1/vsp1_drv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/renesas/vsp1/vsp1_drv.c b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
index 5710152d6511..c1c28f98bd10 100644
--- a/drivers/media/platform/renesas/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
@@ -977,7 +977,7 @@ static int vsp1_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int vsp1_remove(struct platform_device *pdev)
+static void vsp1_remove(struct platform_device *pdev)
 {
 	struct vsp1_device *vsp1 = platform_get_drvdata(pdev);
 
@@ -985,8 +985,6 @@ static int vsp1_remove(struct platform_device *pdev)
 	rcar_fcp_put(vsp1->fcp);
 
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static const struct of_device_id vsp1_of_match[] = {
@@ -999,7 +997,7 @@ MODULE_DEVICE_TABLE(of, vsp1_of_match);
 
 static struct platform_driver vsp1_platform_driver = {
 	.probe		= vsp1_probe,
-	.remove		= vsp1_remove,
+	.remove_new	= vsp1_remove,
 	.driver		= {
 		.name	= "vsp1",
 		.pm	= &vsp1_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 059/117] media: rga: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
  (?)
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Jacob Chen, Ezequiel Garcia, Mauro Carvalho Chehab, Heiko Stuebner
  Cc: linux-media, linux-rockchip, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/rockchip/rga/rga.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c
index 61b25fcf826e..67dcf22e5ba3 100644
--- a/drivers/media/platform/rockchip/rga/rga.c
+++ b/drivers/media/platform/rockchip/rga/rga.c
@@ -930,7 +930,7 @@ static int rga_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rga_remove(struct platform_device *pdev)
+static void rga_remove(struct platform_device *pdev)
 {
 	struct rockchip_rga *rga = platform_get_drvdata(pdev);
 
@@ -947,8 +947,6 @@ static int rga_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&rga->v4l2_dev);
 
 	pm_runtime_disable(rga->dev);
-
-	return 0;
 }
 
 static int __maybe_unused rga_runtime_suspend(struct device *dev)
@@ -986,7 +984,7 @@ MODULE_DEVICE_TABLE(of, rockchip_rga_match);
 
 static struct platform_driver rga_pdrv = {
 	.probe = rga_probe,
-	.remove = rga_remove,
+	.remove_new = rga_remove,
 	.driver = {
 		.name = RGA_NAME,
 		.pm = &rga_pm,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 059/117] media: rga: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Jacob Chen, Ezequiel Garcia, Mauro Carvalho Chehab, Heiko Stuebner
  Cc: linux-media, linux-rockchip, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/rockchip/rga/rga.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c
index 61b25fcf826e..67dcf22e5ba3 100644
--- a/drivers/media/platform/rockchip/rga/rga.c
+++ b/drivers/media/platform/rockchip/rga/rga.c
@@ -930,7 +930,7 @@ static int rga_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rga_remove(struct platform_device *pdev)
+static void rga_remove(struct platform_device *pdev)
 {
 	struct rockchip_rga *rga = platform_get_drvdata(pdev);
 
@@ -947,8 +947,6 @@ static int rga_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&rga->v4l2_dev);
 
 	pm_runtime_disable(rga->dev);
-
-	return 0;
 }
 
 static int __maybe_unused rga_runtime_suspend(struct device *dev)
@@ -986,7 +984,7 @@ MODULE_DEVICE_TABLE(of, rockchip_rga_match);
 
 static struct platform_driver rga_pdrv = {
 	.probe = rga_probe,
-	.remove = rga_remove,
+	.remove_new = rga_remove,
 	.driver = {
 		.name = RGA_NAME,
 		.pm = &rga_pm,
-- 
2.39.2


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 059/117] media: rga: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Jacob Chen, Ezequiel Garcia, Mauro Carvalho Chehab, Heiko Stuebner
  Cc: linux-media, linux-rockchip, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/rockchip/rga/rga.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c
index 61b25fcf826e..67dcf22e5ba3 100644
--- a/drivers/media/platform/rockchip/rga/rga.c
+++ b/drivers/media/platform/rockchip/rga/rga.c
@@ -930,7 +930,7 @@ static int rga_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rga_remove(struct platform_device *pdev)
+static void rga_remove(struct platform_device *pdev)
 {
 	struct rockchip_rga *rga = platform_get_drvdata(pdev);
 
@@ -947,8 +947,6 @@ static int rga_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&rga->v4l2_dev);
 
 	pm_runtime_disable(rga->dev);
-
-	return 0;
 }
 
 static int __maybe_unused rga_runtime_suspend(struct device *dev)
@@ -986,7 +984,7 @@ MODULE_DEVICE_TABLE(of, rockchip_rga_match);
 
 static struct platform_driver rga_pdrv = {
 	.probe = rga_probe,
-	.remove = rga_remove,
+	.remove_new = rga_remove,
 	.driver = {
 		.name = RGA_NAME,
 		.pm = &rga_pm,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 060/117] media: rkisp1-dev: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
  (?)
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Dafna Hirschfeld, Mauro Carvalho Chehab, Heiko Stuebner
  Cc: linux-media, linux-rockchip, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
index f2475c6235ea..4762cb32353d 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
@@ -622,7 +622,7 @@ static int rkisp1_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rkisp1_remove(struct platform_device *pdev)
+static void rkisp1_remove(struct platform_device *pdev)
 {
 	struct rkisp1_device *rkisp1 = platform_get_drvdata(pdev);
 
@@ -638,8 +638,6 @@ static int rkisp1_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&rkisp1->v4l2_dev);
 
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static struct platform_driver rkisp1_drv = {
@@ -649,7 +647,7 @@ static struct platform_driver rkisp1_drv = {
 		.pm = &rkisp1_pm_ops,
 	},
 	.probe = rkisp1_probe,
-	.remove = rkisp1_remove,
+	.remove_new = rkisp1_remove,
 };
 
 module_platform_driver(rkisp1_drv);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 060/117] media: rkisp1-dev: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Dafna Hirschfeld, Mauro Carvalho Chehab, Heiko Stuebner
  Cc: linux-media, linux-rockchip, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
index f2475c6235ea..4762cb32353d 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
@@ -622,7 +622,7 @@ static int rkisp1_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rkisp1_remove(struct platform_device *pdev)
+static void rkisp1_remove(struct platform_device *pdev)
 {
 	struct rkisp1_device *rkisp1 = platform_get_drvdata(pdev);
 
@@ -638,8 +638,6 @@ static int rkisp1_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&rkisp1->v4l2_dev);
 
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static struct platform_driver rkisp1_drv = {
@@ -649,7 +647,7 @@ static struct platform_driver rkisp1_drv = {
 		.pm = &rkisp1_pm_ops,
 	},
 	.probe = rkisp1_probe,
-	.remove = rkisp1_remove,
+	.remove_new = rkisp1_remove,
 };
 
 module_platform_driver(rkisp1_drv);
-- 
2.39.2


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 060/117] media: rkisp1-dev: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Dafna Hirschfeld, Mauro Carvalho Chehab, Heiko Stuebner
  Cc: linux-media, linux-rockchip, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
index f2475c6235ea..4762cb32353d 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
@@ -622,7 +622,7 @@ static int rkisp1_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rkisp1_remove(struct platform_device *pdev)
+static void rkisp1_remove(struct platform_device *pdev)
 {
 	struct rkisp1_device *rkisp1 = platform_get_drvdata(pdev);
 
@@ -638,8 +638,6 @@ static int rkisp1_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&rkisp1->v4l2_dev);
 
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static struct platform_driver rkisp1_drv = {
@@ -649,7 +647,7 @@ static struct platform_driver rkisp1_drv = {
 		.pm = &rkisp1_pm_ops,
 	},
 	.probe = rkisp1_probe,
-	.remove = rkisp1_remove,
+	.remove_new = rkisp1_remove,
 };
 
 module_platform_driver(rkisp1_drv);
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 061/117] media: gsc-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Krzysztof Kozlowski,
	Uwe Kleine-König, Colin Ian King, Hans Verkuil
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos-gsc/gsc-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos-gsc/gsc-core.c b/drivers/media/platform/samsung/exynos-gsc/gsc-core.c
index b147c645ae0b..1fb34de70649 100644
--- a/drivers/media/platform/samsung/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/samsung/exynos-gsc/gsc-core.c
@@ -1201,7 +1201,7 @@ static int gsc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int gsc_remove(struct platform_device *pdev)
+static void gsc_remove(struct platform_device *pdev)
 {
 	struct gsc_dev *gsc = platform_get_drvdata(pdev);
 	int i;
@@ -1220,7 +1220,6 @@ static int gsc_remove(struct platform_device *pdev)
 	pm_runtime_set_suspended(&pdev->dev);
 
 	dev_dbg(&pdev->dev, "%s driver unloaded\n", pdev->name);
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -1311,7 +1310,7 @@ static const struct dev_pm_ops gsc_pm_ops = {
 
 static struct platform_driver gsc_driver = {
 	.probe		= gsc_probe,
-	.remove		= gsc_remove,
+	.remove_new	= gsc_remove,
 	.driver = {
 		.name	= GSC_MODULE_NAME,
 		.pm	= &gsc_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 061/117] media: gsc-core: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Krzysztof Kozlowski,
	Uwe Kleine-König, Colin Ian King, Hans Verkuil
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos-gsc/gsc-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos-gsc/gsc-core.c b/drivers/media/platform/samsung/exynos-gsc/gsc-core.c
index b147c645ae0b..1fb34de70649 100644
--- a/drivers/media/platform/samsung/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/samsung/exynos-gsc/gsc-core.c
@@ -1201,7 +1201,7 @@ static int gsc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int gsc_remove(struct platform_device *pdev)
+static void gsc_remove(struct platform_device *pdev)
 {
 	struct gsc_dev *gsc = platform_get_drvdata(pdev);
 	int i;
@@ -1220,7 +1220,6 @@ static int gsc_remove(struct platform_device *pdev)
 	pm_runtime_set_suspended(&pdev->dev);
 
 	dev_dbg(&pdev->dev, "%s driver unloaded\n", pdev->name);
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -1311,7 +1310,7 @@ static const struct dev_pm_ops gsc_pm_ops = {
 
 static struct platform_driver gsc_driver = {
 	.probe		= gsc_probe,
-	.remove		= gsc_remove,
+	.remove_new	= gsc_remove,
 	.driver = {
 		.name	= GSC_MODULE_NAME,
 		.pm	= &gsc_pm_ops,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 062/117] media: fimc-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab, Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos4-is/fimc-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-core.c b/drivers/media/platform/samsung/exynos4-is/fimc-core.c
index 1791100b6935..a2034ade8b9e 100644
--- a/drivers/media/platform/samsung/exynos4-is/fimc-core.c
+++ b/drivers/media/platform/samsung/exynos4-is/fimc-core.c
@@ -1092,7 +1092,7 @@ static int fimc_suspend(struct device *dev)
 }
 #endif /* CONFIG_PM_SLEEP */
 
-static int fimc_remove(struct platform_device *pdev)
+static void fimc_remove(struct platform_device *pdev)
 {
 	struct fimc_dev *fimc = platform_get_drvdata(pdev);
 
@@ -1108,7 +1108,6 @@ static int fimc_remove(struct platform_device *pdev)
 	fimc_clk_put(fimc);
 
 	dev_info(&pdev->dev, "driver unloaded\n");
-	return 0;
 }
 
 /* S5PV210, S5PC110 */
@@ -1160,7 +1159,7 @@ static const struct dev_pm_ops fimc_pm_ops = {
 
 static struct platform_driver fimc_driver = {
 	.probe		= fimc_probe,
-	.remove		= fimc_remove,
+	.remove_new	= fimc_remove,
 	.driver = {
 		.of_match_table = fimc_of_match,
 		.name		= FIMC_DRIVER_NAME,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 062/117] media: fimc-core: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab, Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos4-is/fimc-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-core.c b/drivers/media/platform/samsung/exynos4-is/fimc-core.c
index 1791100b6935..a2034ade8b9e 100644
--- a/drivers/media/platform/samsung/exynos4-is/fimc-core.c
+++ b/drivers/media/platform/samsung/exynos4-is/fimc-core.c
@@ -1092,7 +1092,7 @@ static int fimc_suspend(struct device *dev)
 }
 #endif /* CONFIG_PM_SLEEP */
 
-static int fimc_remove(struct platform_device *pdev)
+static void fimc_remove(struct platform_device *pdev)
 {
 	struct fimc_dev *fimc = platform_get_drvdata(pdev);
 
@@ -1108,7 +1108,6 @@ static int fimc_remove(struct platform_device *pdev)
 	fimc_clk_put(fimc);
 
 	dev_info(&pdev->dev, "driver unloaded\n");
-	return 0;
 }
 
 /* S5PV210, S5PC110 */
@@ -1160,7 +1159,7 @@ static const struct dev_pm_ops fimc_pm_ops = {
 
 static struct platform_driver fimc_driver = {
 	.probe		= fimc_probe,
-	.remove		= fimc_remove,
+	.remove_new	= fimc_remove,
 	.driver = {
 		.of_match_table = fimc_of_match,
 		.name		= FIMC_DRIVER_NAME,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 063/117] media: fimc-is-i2c: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab, Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.c b/drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.c
index 83a28ef8e099..bef6e9b4a25e 100644
--- a/drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.c
+++ b/drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.c
@@ -82,14 +82,12 @@ static int fimc_is_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int fimc_is_i2c_remove(struct platform_device *pdev)
+static void fimc_is_i2c_remove(struct platform_device *pdev)
 {
 	struct fimc_is_i2c *isp_i2c = platform_get_drvdata(pdev);
 
 	pm_runtime_disable(&pdev->dev);
 	i2c_del_adapter(&isp_i2c->adapter);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -140,7 +138,7 @@ static const struct of_device_id fimc_is_i2c_of_match[] = {
 
 static struct platform_driver fimc_is_i2c_driver = {
 	.probe		= fimc_is_i2c_probe,
-	.remove		= fimc_is_i2c_remove,
+	.remove_new	= fimc_is_i2c_remove,
 	.driver = {
 		.of_match_table = fimc_is_i2c_of_match,
 		.name		= "fimc-isp-i2c",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 063/117] media: fimc-is-i2c: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab, Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.c b/drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.c
index 83a28ef8e099..bef6e9b4a25e 100644
--- a/drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.c
+++ b/drivers/media/platform/samsung/exynos4-is/fimc-is-i2c.c
@@ -82,14 +82,12 @@ static int fimc_is_i2c_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int fimc_is_i2c_remove(struct platform_device *pdev)
+static void fimc_is_i2c_remove(struct platform_device *pdev)
 {
 	struct fimc_is_i2c *isp_i2c = platform_get_drvdata(pdev);
 
 	pm_runtime_disable(&pdev->dev);
 	i2c_del_adapter(&isp_i2c->adapter);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -140,7 +138,7 @@ static const struct of_device_id fimc_is_i2c_of_match[] = {
 
 static struct platform_driver fimc_is_i2c_driver = {
 	.probe		= fimc_is_i2c_probe,
-	.remove		= fimc_is_i2c_remove,
+	.remove_new	= fimc_is_i2c_remove,
 	.driver = {
 		.of_match_table = fimc_is_i2c_of_match,
 		.name		= "fimc-isp-i2c",
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 064/117] media: fimc-is: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab, Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos4-is/fimc-is.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-is.c b/drivers/media/platform/samsung/exynos4-is/fimc-is.c
index a7704ff069d6..530a148fe4d3 100644
--- a/drivers/media/platform/samsung/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/samsung/exynos4-is/fimc-is.c
@@ -915,7 +915,7 @@ static int fimc_is_suspend(struct device *dev)
 }
 #endif /* CONFIG_PM_SLEEP */
 
-static int fimc_is_remove(struct platform_device *pdev)
+static void fimc_is_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct fimc_is *is = dev_get_drvdata(dev);
@@ -932,8 +932,6 @@ static int fimc_is_remove(struct platform_device *pdev)
 	fimc_is_debugfs_remove(is);
 	release_firmware(is->fw.f_w);
 	fimc_is_free_cpu_memory(is);
-
-	return 0;
 }
 
 static const struct of_device_id fimc_is_of_match[] = {
@@ -950,7 +948,7 @@ static const struct dev_pm_ops fimc_is_pm_ops = {
 
 static struct platform_driver fimc_is_driver = {
 	.probe		= fimc_is_probe,
-	.remove		= fimc_is_remove,
+	.remove_new	= fimc_is_remove,
 	.driver = {
 		.of_match_table	= fimc_is_of_match,
 		.name		= FIMC_IS_DRV_NAME,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 064/117] media: fimc-is: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab, Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos4-is/fimc-is.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-is.c b/drivers/media/platform/samsung/exynos4-is/fimc-is.c
index a7704ff069d6..530a148fe4d3 100644
--- a/drivers/media/platform/samsung/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/samsung/exynos4-is/fimc-is.c
@@ -915,7 +915,7 @@ static int fimc_is_suspend(struct device *dev)
 }
 #endif /* CONFIG_PM_SLEEP */
 
-static int fimc_is_remove(struct platform_device *pdev)
+static void fimc_is_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct fimc_is *is = dev_get_drvdata(dev);
@@ -932,8 +932,6 @@ static int fimc_is_remove(struct platform_device *pdev)
 	fimc_is_debugfs_remove(is);
 	release_firmware(is->fw.f_w);
 	fimc_is_free_cpu_memory(is);
-
-	return 0;
 }
 
 static const struct of_device_id fimc_is_of_match[] = {
@@ -950,7 +948,7 @@ static const struct dev_pm_ops fimc_is_pm_ops = {
 
 static struct platform_driver fimc_is_driver = {
 	.probe		= fimc_is_probe,
-	.remove		= fimc_is_remove,
+	.remove_new	= fimc_is_remove,
 	.driver = {
 		.of_match_table	= fimc_is_of_match,
 		.name		= FIMC_IS_DRV_NAME,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 065/117] media: fimc-lite: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab, Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos4-is/fimc-lite.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-lite.c b/drivers/media/platform/samsung/exynos4-is/fimc-lite.c
index e185a40305a8..2fadb18560d7 100644
--- a/drivers/media/platform/samsung/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/samsung/exynos4-is/fimc-lite.c
@@ -1595,7 +1595,7 @@ static int fimc_lite_suspend(struct device *dev)
 }
 #endif /* CONFIG_PM_SLEEP */
 
-static int fimc_lite_remove(struct platform_device *pdev)
+static void fimc_lite_remove(struct platform_device *pdev)
 {
 	struct fimc_lite *fimc = platform_get_drvdata(pdev);
 	struct device *dev = &pdev->dev;
@@ -1610,7 +1610,6 @@ static int fimc_lite_remove(struct platform_device *pdev)
 	fimc_lite_clk_put(fimc);
 
 	dev_info(dev, "Driver unloaded\n");
-	return 0;
 }
 
 static const struct dev_pm_ops fimc_lite_pm_ops = {
@@ -1656,7 +1655,7 @@ MODULE_DEVICE_TABLE(of, flite_of_match);
 
 static struct platform_driver fimc_lite_driver = {
 	.probe		= fimc_lite_probe,
-	.remove		= fimc_lite_remove,
+	.remove_new	= fimc_lite_remove,
 	.driver = {
 		.of_match_table = flite_of_match,
 		.name		= FIMC_LITE_DRV_NAME,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 065/117] media: fimc-lite: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab, Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos4-is/fimc-lite.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-lite.c b/drivers/media/platform/samsung/exynos4-is/fimc-lite.c
index e185a40305a8..2fadb18560d7 100644
--- a/drivers/media/platform/samsung/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/samsung/exynos4-is/fimc-lite.c
@@ -1595,7 +1595,7 @@ static int fimc_lite_suspend(struct device *dev)
 }
 #endif /* CONFIG_PM_SLEEP */
 
-static int fimc_lite_remove(struct platform_device *pdev)
+static void fimc_lite_remove(struct platform_device *pdev)
 {
 	struct fimc_lite *fimc = platform_get_drvdata(pdev);
 	struct device *dev = &pdev->dev;
@@ -1610,7 +1610,6 @@ static int fimc_lite_remove(struct platform_device *pdev)
 	fimc_lite_clk_put(fimc);
 
 	dev_info(dev, "Driver unloaded\n");
-	return 0;
 }
 
 static const struct dev_pm_ops fimc_lite_pm_ops = {
@@ -1656,7 +1655,7 @@ MODULE_DEVICE_TABLE(of, flite_of_match);
 
 static struct platform_driver fimc_lite_driver = {
 	.probe		= fimc_lite_probe,
-	.remove		= fimc_lite_remove,
+	.remove_new	= fimc_lite_remove,
 	.driver = {
 		.of_match_table = flite_of_match,
 		.name		= FIMC_LITE_DRV_NAME,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 066/117] media: media-dev: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab, Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos4-is/media-dev.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos4-is/media-dev.c b/drivers/media/platform/samsung/exynos4-is/media-dev.c
index 98a60f01129d..5ca78fee7804 100644
--- a/drivers/media/platform/samsung/exynos4-is/media-dev.c
+++ b/drivers/media/platform/samsung/exynos4-is/media-dev.c
@@ -1530,12 +1530,12 @@ static int fimc_md_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int fimc_md_remove(struct platform_device *pdev)
+static void fimc_md_remove(struct platform_device *pdev)
 {
 	struct fimc_md *fmd = platform_get_drvdata(pdev);
 
 	if (!fmd)
-		return 0;
+		return;
 
 	fimc_md_unregister_clk_provider(fmd);
 	v4l2_async_nf_unregister(&fmd->subdev_notifier);
@@ -1548,8 +1548,6 @@ static int fimc_md_remove(struct platform_device *pdev)
 	media_device_unregister(&fmd->media_dev);
 	media_device_cleanup(&fmd->media_dev);
 	fimc_md_put_clocks(fmd);
-
-	return 0;
 }
 
 static const struct platform_device_id fimc_driver_ids[] __always_unused = {
@@ -1566,7 +1564,7 @@ MODULE_DEVICE_TABLE(of, fimc_md_of_match);
 
 static struct platform_driver fimc_md_driver = {
 	.probe		= fimc_md_probe,
-	.remove		= fimc_md_remove,
+	.remove_new	= fimc_md_remove,
 	.driver = {
 		.of_match_table = of_match_ptr(fimc_md_of_match),
 		.name		= "s5p-fimc-md",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 066/117] media: media-dev: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab, Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos4-is/media-dev.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos4-is/media-dev.c b/drivers/media/platform/samsung/exynos4-is/media-dev.c
index 98a60f01129d..5ca78fee7804 100644
--- a/drivers/media/platform/samsung/exynos4-is/media-dev.c
+++ b/drivers/media/platform/samsung/exynos4-is/media-dev.c
@@ -1530,12 +1530,12 @@ static int fimc_md_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int fimc_md_remove(struct platform_device *pdev)
+static void fimc_md_remove(struct platform_device *pdev)
 {
 	struct fimc_md *fmd = platform_get_drvdata(pdev);
 
 	if (!fmd)
-		return 0;
+		return;
 
 	fimc_md_unregister_clk_provider(fmd);
 	v4l2_async_nf_unregister(&fmd->subdev_notifier);
@@ -1548,8 +1548,6 @@ static int fimc_md_remove(struct platform_device *pdev)
 	media_device_unregister(&fmd->media_dev);
 	media_device_cleanup(&fmd->media_dev);
 	fimc_md_put_clocks(fmd);
-
-	return 0;
 }
 
 static const struct platform_device_id fimc_driver_ids[] __always_unused = {
@@ -1566,7 +1564,7 @@ MODULE_DEVICE_TABLE(of, fimc_md_of_match);
 
 static struct platform_driver fimc_md_driver = {
 	.probe		= fimc_md_probe,
-	.remove		= fimc_md_remove,
+	.remove_new	= fimc_md_remove,
 	.driver = {
 		.of_match_table = of_match_ptr(fimc_md_of_match),
 		.name		= "s5p-fimc-md",
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 067/117] media: mipi-csis: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab, Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos4-is/mipi-csis.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos4-is/mipi-csis.c b/drivers/media/platform/samsung/exynos4-is/mipi-csis.c
index 6a0d35f33e8c..686ca8753ba2 100644
--- a/drivers/media/platform/samsung/exynos4-is/mipi-csis.c
+++ b/drivers/media/platform/samsung/exynos4-is/mipi-csis.c
@@ -975,7 +975,7 @@ static int s5pcsis_runtime_resume(struct device *dev)
 }
 #endif
 
-static int s5pcsis_remove(struct platform_device *pdev)
+static void s5pcsis_remove(struct platform_device *pdev)
 {
 	struct v4l2_subdev *sd = platform_get_drvdata(pdev);
 	struct csis_state *state = sd_to_csis_state(sd);
@@ -987,8 +987,6 @@ static int s5pcsis_remove(struct platform_device *pdev)
 	s5pcsis_clk_put(state);
 
 	media_entity_cleanup(&state->sd.entity);
-
-	return 0;
 }
 
 static const struct dev_pm_ops s5pcsis_pm_ops = {
@@ -1022,7 +1020,7 @@ MODULE_DEVICE_TABLE(of, s5pcsis_of_match);
 
 static struct platform_driver s5pcsis_driver = {
 	.probe		= s5pcsis_probe,
-	.remove		= s5pcsis_remove,
+	.remove_new	= s5pcsis_remove,
 	.driver		= {
 		.of_match_table = s5pcsis_of_match,
 		.name		= CSIS_DRIVER_NAME,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 067/117] media: mipi-csis: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab, Krzysztof Kozlowski
  Cc: Alim Akhtar, linux-media, linux-arm-kernel, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/exynos4-is/mipi-csis.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/samsung/exynos4-is/mipi-csis.c b/drivers/media/platform/samsung/exynos4-is/mipi-csis.c
index 6a0d35f33e8c..686ca8753ba2 100644
--- a/drivers/media/platform/samsung/exynos4-is/mipi-csis.c
+++ b/drivers/media/platform/samsung/exynos4-is/mipi-csis.c
@@ -975,7 +975,7 @@ static int s5pcsis_runtime_resume(struct device *dev)
 }
 #endif
 
-static int s5pcsis_remove(struct platform_device *pdev)
+static void s5pcsis_remove(struct platform_device *pdev)
 {
 	struct v4l2_subdev *sd = platform_get_drvdata(pdev);
 	struct csis_state *state = sd_to_csis_state(sd);
@@ -987,8 +987,6 @@ static int s5pcsis_remove(struct platform_device *pdev)
 	s5pcsis_clk_put(state);
 
 	media_entity_cleanup(&state->sd.entity);
-
-	return 0;
 }
 
 static const struct dev_pm_ops s5pcsis_pm_ops = {
@@ -1022,7 +1020,7 @@ MODULE_DEVICE_TABLE(of, s5pcsis_of_match);
 
 static struct platform_driver s5pcsis_driver = {
 	.probe		= s5pcsis_probe,
-	.remove		= s5pcsis_remove,
+	.remove_new	= s5pcsis_remove,
 	.driver		= {
 		.of_match_table = s5pcsis_of_match,
 		.name		= CSIS_DRIVER_NAME,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 068/117] media: camif-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (69 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Sylwester Nawrocki, Mauro Carvalho Chehab
  Cc: linux-media, linux-samsung-soc, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/s3c-camif/camif-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/samsung/s3c-camif/camif-core.c b/drivers/media/platform/samsung/s3c-camif/camif-core.c
index 6e8ef86566b7..0b50183d9230 100644
--- a/drivers/media/platform/samsung/s3c-camif/camif-core.c
+++ b/drivers/media/platform/samsung/s3c-camif/camif-core.c
@@ -507,7 +507,7 @@ static int s3c_camif_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int s3c_camif_remove(struct platform_device *pdev)
+static void s3c_camif_remove(struct platform_device *pdev)
 {
 	struct camif_dev *camif = platform_get_drvdata(pdev);
 	struct s3c_camif_plat_data *pdata = &camif->pdata;
@@ -521,8 +521,6 @@ static int s3c_camif_remove(struct platform_device *pdev)
 	camif_clk_put(camif);
 	s3c_camif_unregister_subdev(camif);
 	pdata->gpio_put();
-
-	return 0;
 }
 
 static int s3c_camif_runtime_resume(struct device *dev)
@@ -623,7 +621,7 @@ static const struct dev_pm_ops s3c_camif_pm_ops = {
 
 static struct platform_driver s3c_camif_driver = {
 	.probe		= s3c_camif_probe,
-	.remove		= s3c_camif_remove,
+	.remove_new	= s3c_camif_remove,
 	.id_table	= s3c_camif_driver_ids,
 	.driver = {
 		.name	= S3C_CAMIF_DRIVER_NAME,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 069/117] media: g2d: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Łukasz Stelmach, Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/s5p-g2d/g2d.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/samsung/s5p-g2d/g2d.c b/drivers/media/platform/samsung/s5p-g2d/g2d.c
index dd8864779a7c..89aeba47ed07 100644
--- a/drivers/media/platform/samsung/s5p-g2d/g2d.c
+++ b/drivers/media/platform/samsung/s5p-g2d/g2d.c
@@ -740,7 +740,7 @@ static int g2d_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int g2d_remove(struct platform_device *pdev)
+static void g2d_remove(struct platform_device *pdev)
 {
 	struct g2d_dev *dev = platform_get_drvdata(pdev);
 
@@ -753,7 +753,6 @@ static int g2d_remove(struct platform_device *pdev)
 	clk_put(dev->gate);
 	clk_unprepare(dev->clk);
 	clk_put(dev->clk);
-	return 0;
 }
 
 static struct g2d_variant g2d_drvdata_v3x = {
@@ -778,7 +777,7 @@ MODULE_DEVICE_TABLE(of, exynos_g2d_match);
 
 static struct platform_driver g2d_pdrv = {
 	.probe		= g2d_probe,
-	.remove		= g2d_remove,
+	.remove_new	= g2d_remove,
 	.driver		= {
 		.name = G2D_NAME,
 		.of_match_table = exynos_g2d_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 069/117] media: g2d: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Łukasz Stelmach, Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/s5p-g2d/g2d.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/samsung/s5p-g2d/g2d.c b/drivers/media/platform/samsung/s5p-g2d/g2d.c
index dd8864779a7c..89aeba47ed07 100644
--- a/drivers/media/platform/samsung/s5p-g2d/g2d.c
+++ b/drivers/media/platform/samsung/s5p-g2d/g2d.c
@@ -740,7 +740,7 @@ static int g2d_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int g2d_remove(struct platform_device *pdev)
+static void g2d_remove(struct platform_device *pdev)
 {
 	struct g2d_dev *dev = platform_get_drvdata(pdev);
 
@@ -753,7 +753,6 @@ static int g2d_remove(struct platform_device *pdev)
 	clk_put(dev->gate);
 	clk_unprepare(dev->clk);
 	clk_put(dev->clk);
-	return 0;
 }
 
 static struct g2d_variant g2d_drvdata_v3x = {
@@ -778,7 +777,7 @@ MODULE_DEVICE_TABLE(of, exynos_g2d_match);
 
 static struct platform_driver g2d_pdrv = {
 	.probe		= g2d_probe,
-	.remove		= g2d_remove,
+	.remove_new	= g2d_remove,
 	.driver		= {
 		.name = G2D_NAME,
 		.of_match_table = exynos_g2d_match,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 070/117] media: jpeg-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Andrzej Pietrasiewicz, Jacek Anaszewski, Sylwester Nawrocki,
	Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
index 55814041b8d8..c3c7e48f1b6e 100644
--- a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
@@ -2991,7 +2991,7 @@ static int s5p_jpeg_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int s5p_jpeg_remove(struct platform_device *pdev)
+static void s5p_jpeg_remove(struct platform_device *pdev)
 {
 	struct s5p_jpeg *jpeg = platform_get_drvdata(pdev);
 	int i;
@@ -3008,8 +3008,6 @@ static int s5p_jpeg_remove(struct platform_device *pdev)
 		for (i = jpeg->variant->num_clocks - 1; i >= 0; i--)
 			clk_disable_unprepare(jpeg->clocks[i]);
 	}
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -3164,7 +3162,7 @@ static void *jpeg_get_drv_data(struct device *dev)
 
 static struct platform_driver s5p_jpeg_driver = {
 	.probe = s5p_jpeg_probe,
-	.remove = s5p_jpeg_remove,
+	.remove_new = s5p_jpeg_remove,
 	.driver = {
 		.of_match_table	= of_match_ptr(samsung_jpeg_match),
 		.name		= S5P_JPEG_M2M_NAME,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 070/117] media: jpeg-core: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Andrzej Pietrasiewicz, Jacek Anaszewski, Sylwester Nawrocki,
	Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
index 55814041b8d8..c3c7e48f1b6e 100644
--- a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
@@ -2991,7 +2991,7 @@ static int s5p_jpeg_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int s5p_jpeg_remove(struct platform_device *pdev)
+static void s5p_jpeg_remove(struct platform_device *pdev)
 {
 	struct s5p_jpeg *jpeg = platform_get_drvdata(pdev);
 	int i;
@@ -3008,8 +3008,6 @@ static int s5p_jpeg_remove(struct platform_device *pdev)
 		for (i = jpeg->variant->num_clocks - 1; i >= 0; i--)
 			clk_disable_unprepare(jpeg->clocks[i]);
 	}
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -3164,7 +3162,7 @@ static void *jpeg_get_drv_data(struct device *dev)
 
 static struct platform_driver s5p_jpeg_driver = {
 	.probe = s5p_jpeg_probe,
-	.remove = s5p_jpeg_remove,
+	.remove_new = s5p_jpeg_remove,
 	.driver = {
 		.of_match_table	= of_match_ptr(samsung_jpeg_match),
 		.name		= S5P_JPEG_M2M_NAME,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 071/117] media: s5p_mfc: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Marek Szyprowski, Andrzej Hajda, Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
index 9d2cce124a34..e30e54935d79 100644
--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
@@ -1431,7 +1431,7 @@ static int s5p_mfc_probe(struct platform_device *pdev)
 }
 
 /* Remove the driver */
-static int s5p_mfc_remove(struct platform_device *pdev)
+static void s5p_mfc_remove(struct platform_device *pdev)
 {
 	struct s5p_mfc_dev *dev = platform_get_drvdata(pdev);
 	struct s5p_mfc_ctx *ctx;
@@ -1463,7 +1463,6 @@ static int s5p_mfc_remove(struct platform_device *pdev)
 	s5p_mfc_unconfigure_dma_memory(dev);
 
 	s5p_mfc_final_pm(dev);
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -1690,7 +1689,7 @@ MODULE_DEVICE_TABLE(of, exynos_mfc_match);
 
 static struct platform_driver s5p_mfc_driver = {
 	.probe		= s5p_mfc_probe,
-	.remove		= s5p_mfc_remove,
+	.remove_new	= s5p_mfc_remove,
 	.driver	= {
 		.name	= S5P_MFC_NAME,
 		.pm	= &s5p_mfc_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 071/117] media: s5p_mfc: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Marek Szyprowski, Andrzej Hajda, Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
index 9d2cce124a34..e30e54935d79 100644
--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
@@ -1431,7 +1431,7 @@ static int s5p_mfc_probe(struct platform_device *pdev)
 }
 
 /* Remove the driver */
-static int s5p_mfc_remove(struct platform_device *pdev)
+static void s5p_mfc_remove(struct platform_device *pdev)
 {
 	struct s5p_mfc_dev *dev = platform_get_drvdata(pdev);
 	struct s5p_mfc_ctx *ctx;
@@ -1463,7 +1463,6 @@ static int s5p_mfc_remove(struct platform_device *pdev)
 	s5p_mfc_unconfigure_dma_memory(dev);
 
 	s5p_mfc_final_pm(dev);
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -1690,7 +1689,7 @@ MODULE_DEVICE_TABLE(of, exynos_mfc_match);
 
 static struct platform_driver s5p_mfc_driver = {
 	.probe		= s5p_mfc_probe,
-	.remove		= s5p_mfc_remove,
+	.remove_new	= s5p_mfc_remove,
 	.driver	= {
 		.name	= S5P_MFC_NAME,
 		.pm	= &s5p_mfc_pm_ops,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 072/117] media: bdisp-v4l2: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (73 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Fabien Dessenne, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c
index dd74cc43920d..4471b5c944ca 100644
--- a/drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c
+++ b/drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c
@@ -1257,7 +1257,7 @@ static const struct dev_pm_ops bdisp_pm_ops = {
 	.runtime_resume         = bdisp_runtime_resume,
 };
 
-static int bdisp_remove(struct platform_device *pdev)
+static void bdisp_remove(struct platform_device *pdev)
 {
 	struct bdisp_dev *bdisp = platform_get_drvdata(pdev);
 
@@ -1277,8 +1277,6 @@ static int bdisp_remove(struct platform_device *pdev)
 	destroy_workqueue(bdisp->work_queue);
 
 	dev_dbg(&pdev->dev, "%s driver unloaded\n", pdev->name);
-
-	return 0;
 }
 
 static int bdisp_probe(struct platform_device *pdev)
@@ -1411,7 +1409,7 @@ MODULE_DEVICE_TABLE(of, bdisp_match_types);
 
 static struct platform_driver bdisp_driver = {
 	.probe          = bdisp_probe,
-	.remove         = bdisp_remove,
+	.remove_new     = bdisp_remove,
 	.driver         = {
 		.name           = BDISP_NAME,
 		.of_match_table = bdisp_match_types,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 073/117] media: c8sectpfe-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Patrice Chotard, Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
index c38b62d4f1ae..45ade7210d26 100644
--- a/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
@@ -878,7 +878,7 @@ static int c8sectpfe_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int c8sectpfe_remove(struct platform_device *pdev)
+static void c8sectpfe_remove(struct platform_device *pdev)
 {
 	struct c8sectpfei *fei = platform_get_drvdata(pdev);
 	struct channel_info *channel;
@@ -910,8 +910,6 @@ static int c8sectpfe_remove(struct platform_device *pdev)
 		writel(0, fei->io + SYS_OTHER_CLKEN);
 
 	clk_disable_unprepare(fei->c8sectpfeclk);
-
-	return 0;
 }
 
 
@@ -1178,7 +1176,7 @@ static struct platform_driver c8sectpfe_driver = {
 		.of_match_table = of_match_ptr(c8sectpfe_match),
 	},
 	.probe	= c8sectpfe_probe,
-	.remove	= c8sectpfe_remove,
+	.remove_new = c8sectpfe_remove,
 };
 
 module_platform_driver(c8sectpfe_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 073/117] media: c8sectpfe-core: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Patrice Chotard, Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
index c38b62d4f1ae..45ade7210d26 100644
--- a/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
@@ -878,7 +878,7 @@ static int c8sectpfe_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int c8sectpfe_remove(struct platform_device *pdev)
+static void c8sectpfe_remove(struct platform_device *pdev)
 {
 	struct c8sectpfei *fei = platform_get_drvdata(pdev);
 	struct channel_info *channel;
@@ -910,8 +910,6 @@ static int c8sectpfe_remove(struct platform_device *pdev)
 		writel(0, fei->io + SYS_OTHER_CLKEN);
 
 	clk_disable_unprepare(fei->c8sectpfeclk);
-
-	return 0;
 }
 
 
@@ -1178,7 +1176,7 @@ static struct platform_driver c8sectpfe_driver = {
 		.of_match_table = of_match_ptr(c8sectpfe_match),
 	},
 	.probe	= c8sectpfe_probe,
-	.remove	= c8sectpfe_remove,
+	.remove_new = c8sectpfe_remove,
 };
 
 module_platform_driver(c8sectpfe_driver);
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 074/117] media: delta-v4l2: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (75 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Hugues Fruchet, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/st/sti/delta/delta-v4l2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/st/sti/delta/delta-v4l2.c b/drivers/media/platform/st/sti/delta/delta-v4l2.c
index 03eaee6d15da..da402d1e9171 100644
--- a/drivers/media/platform/st/sti/delta/delta-v4l2.c
+++ b/drivers/media/platform/st/sti/delta/delta-v4l2.c
@@ -1900,7 +1900,7 @@ static int delta_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int delta_remove(struct platform_device *pdev)
+static void delta_remove(struct platform_device *pdev)
 {
 	struct delta_dev *delta = platform_get_drvdata(pdev);
 
@@ -1914,8 +1914,6 @@ static int delta_remove(struct platform_device *pdev)
 	pm_runtime_disable(delta->dev);
 
 	v4l2_device_unregister(&delta->v4l2_dev);
-
-	return 0;
 }
 
 static int delta_runtime_suspend(struct device *dev)
@@ -1956,7 +1954,7 @@ MODULE_DEVICE_TABLE(of, delta_match_types);
 
 static struct platform_driver delta_driver = {
 	.probe = delta_probe,
-	.remove = delta_remove,
+	.remove_new = delta_remove,
 	.driver = {
 		   .name = DELTA_NAME,
 		   .of_match_table = delta_match_types,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 075/117] media: hva-v4l2: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (76 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Jean-Christophe Trotin, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/st/sti/hva/hva-v4l2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/st/sti/hva/hva-v4l2.c b/drivers/media/platform/st/sti/hva/hva-v4l2.c
index bb34d6997d99..3a848ca32a0e 100644
--- a/drivers/media/platform/st/sti/hva/hva-v4l2.c
+++ b/drivers/media/platform/st/sti/hva/hva-v4l2.c
@@ -1422,7 +1422,7 @@ static int hva_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int hva_remove(struct platform_device *pdev)
+static void hva_remove(struct platform_device *pdev)
 {
 	struct hva_dev *hva = platform_get_drvdata(pdev);
 	struct device *dev = hva_to_dev(hva);
@@ -1440,8 +1440,6 @@ static int hva_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&hva->v4l2_dev);
 
 	dev_info(dev, "%s %s removed\n", HVA_PREFIX, pdev->name);
-
-	return 0;
 }
 
 /* PM ops */
@@ -1461,7 +1459,7 @@ MODULE_DEVICE_TABLE(of, hva_match_types);
 
 static struct platform_driver hva_driver = {
 	.probe  = hva_probe,
-	.remove = hva_remove,
+	.remove_new = hva_remove,
 	.driver = {
 		.name		= HVA_NAME,
 		.of_match_table	= hva_match_types,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 076/117] media: dma2d: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Maxime Coquelin, Alexandre Torgue,
	Uwe Kleine-König
  Cc: linux-media, linux-stm32, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/st/stm32/dma2d/dma2d.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/st/stm32/dma2d/dma2d.c b/drivers/media/platform/st/stm32/dma2d/dma2d.c
index 9706aa41b5d2..be56d2b5fae9 100644
--- a/drivers/media/platform/st/stm32/dma2d/dma2d.c
+++ b/drivers/media/platform/st/stm32/dma2d/dma2d.c
@@ -696,7 +696,7 @@ static int dma2d_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int dma2d_remove(struct platform_device *pdev)
+static void dma2d_remove(struct platform_device *pdev)
 {
 	struct dma2d_dev *dev = platform_get_drvdata(pdev);
 
@@ -707,8 +707,6 @@ static int dma2d_remove(struct platform_device *pdev)
 	vb2_dma_contig_clear_max_seg_size(&pdev->dev);
 	clk_unprepare(dev->gate);
 	clk_put(dev->gate);
-
-	return 0;
 }
 
 static const struct of_device_id stm32_dma2d_match[] = {
@@ -722,7 +720,7 @@ MODULE_DEVICE_TABLE(of, stm32_dma2d_match);
 
 static struct platform_driver dma2d_pdrv = {
 	.probe		= dma2d_probe,
-	.remove		= dma2d_remove,
+	.remove_new	= dma2d_remove,
 	.driver		= {
 		.name = DMA2D_NAME,
 		.of_match_table = stm32_dma2d_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 076/117] media: dma2d: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Maxime Coquelin, Alexandre Torgue,
	Uwe Kleine-König
  Cc: linux-media, linux-stm32, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/st/stm32/dma2d/dma2d.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/st/stm32/dma2d/dma2d.c b/drivers/media/platform/st/stm32/dma2d/dma2d.c
index 9706aa41b5d2..be56d2b5fae9 100644
--- a/drivers/media/platform/st/stm32/dma2d/dma2d.c
+++ b/drivers/media/platform/st/stm32/dma2d/dma2d.c
@@ -696,7 +696,7 @@ static int dma2d_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int dma2d_remove(struct platform_device *pdev)
+static void dma2d_remove(struct platform_device *pdev)
 {
 	struct dma2d_dev *dev = platform_get_drvdata(pdev);
 
@@ -707,8 +707,6 @@ static int dma2d_remove(struct platform_device *pdev)
 	vb2_dma_contig_clear_max_seg_size(&pdev->dev);
 	clk_unprepare(dev->gate);
 	clk_put(dev->gate);
-
-	return 0;
 }
 
 static const struct of_device_id stm32_dma2d_match[] = {
@@ -722,7 +720,7 @@ MODULE_DEVICE_TABLE(of, stm32_dma2d_match);
 
 static struct platform_driver dma2d_pdrv = {
 	.probe		= dma2d_probe,
-	.remove		= dma2d_remove,
+	.remove_new	= dma2d_remove,
 	.driver		= {
 		.name = DMA2D_NAME,
 		.of_match_table = stm32_dma2d_match,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 077/117] media: stm32-dcmi: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Hugues Fruchet, Mauro Carvalho Chehab, Maxime Coquelin, Alexandre Torgue
  Cc: linux-media, linux-stm32, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/st/stm32/stm32-dcmi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c
index ad8e9742e1ae..dc3ce08259d5 100644
--- a/drivers/media/platform/st/stm32/stm32-dcmi.c
+++ b/drivers/media/platform/st/stm32/stm32-dcmi.c
@@ -2134,7 +2134,7 @@ static int dcmi_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int dcmi_remove(struct platform_device *pdev)
+static void dcmi_remove(struct platform_device *pdev)
 {
 	struct stm32_dcmi *dcmi = platform_get_drvdata(pdev);
 
@@ -2147,8 +2147,6 @@ static int dcmi_remove(struct platform_device *pdev)
 	media_device_cleanup(&dcmi->mdev);
 
 	dma_release_channel(dcmi->dma_chan);
-
-	return 0;
 }
 
 static __maybe_unused int dcmi_runtime_suspend(struct device *dev)
@@ -2202,7 +2200,7 @@ static const struct dev_pm_ops dcmi_pm_ops = {
 
 static struct platform_driver stm32_dcmi_driver = {
 	.probe		= dcmi_probe,
-	.remove		= dcmi_remove,
+	.remove_new	= dcmi_remove,
 	.driver		= {
 		.name = DRV_NAME,
 		.of_match_table = of_match_ptr(stm32_dcmi_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 077/117] media: stm32-dcmi: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Hugues Fruchet, Mauro Carvalho Chehab, Maxime Coquelin, Alexandre Torgue
  Cc: linux-media, linux-stm32, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/st/stm32/stm32-dcmi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c
index ad8e9742e1ae..dc3ce08259d5 100644
--- a/drivers/media/platform/st/stm32/stm32-dcmi.c
+++ b/drivers/media/platform/st/stm32/stm32-dcmi.c
@@ -2134,7 +2134,7 @@ static int dcmi_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int dcmi_remove(struct platform_device *pdev)
+static void dcmi_remove(struct platform_device *pdev)
 {
 	struct stm32_dcmi *dcmi = platform_get_drvdata(pdev);
 
@@ -2147,8 +2147,6 @@ static int dcmi_remove(struct platform_device *pdev)
 	media_device_cleanup(&dcmi->mdev);
 
 	dma_release_channel(dcmi->dma_chan);
-
-	return 0;
 }
 
 static __maybe_unused int dcmi_runtime_suspend(struct device *dev)
@@ -2202,7 +2200,7 @@ static const struct dev_pm_ops dcmi_pm_ops = {
 
 static struct platform_driver stm32_dcmi_driver = {
 	.probe		= dcmi_probe,
-	.remove		= dcmi_remove,
+	.remove_new	= dcmi_remove,
 	.driver		= {
 		.name = DRV_NAME,
 		.of_match_table = of_match_ptr(stm32_dcmi_of_match),
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 078/117] media: sun4i_csi: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Maxime Ripard, Mauro Carvalho Chehab, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
index 86c5235a0c7a..d6e7d1b36083 100644
--- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
+++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
@@ -260,7 +260,7 @@ static int sun4i_csi_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int sun4i_csi_remove(struct platform_device *pdev)
+static void sun4i_csi_remove(struct platform_device *pdev)
 {
 	struct sun4i_csi *csi = platform_get_drvdata(pdev);
 
@@ -271,8 +271,6 @@ static int sun4i_csi_remove(struct platform_device *pdev)
 	media_device_unregister(&csi->mdev);
 	sun4i_csi_dma_unregister(csi);
 	media_device_cleanup(&csi->mdev);
-
-	return 0;
 }
 
 static const struct sun4i_csi_traits sun4i_a10_csi1_traits = {
@@ -330,7 +328,7 @@ static const struct dev_pm_ops sun4i_csi_pm_ops = {
 
 static struct platform_driver sun4i_csi_driver = {
 	.probe	= sun4i_csi_probe,
-	.remove	= sun4i_csi_remove,
+	.remove_new = sun4i_csi_remove,
 	.driver	= {
 		.name		= "sun4i-csi",
 		.of_match_table	= sun4i_csi_of_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 078/117] media: sun4i_csi: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Maxime Ripard, Mauro Carvalho Chehab, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
index 86c5235a0c7a..d6e7d1b36083 100644
--- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
+++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
@@ -260,7 +260,7 @@ static int sun4i_csi_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int sun4i_csi_remove(struct platform_device *pdev)
+static void sun4i_csi_remove(struct platform_device *pdev)
 {
 	struct sun4i_csi *csi = platform_get_drvdata(pdev);
 
@@ -271,8 +271,6 @@ static int sun4i_csi_remove(struct platform_device *pdev)
 	media_device_unregister(&csi->mdev);
 	sun4i_csi_dma_unregister(csi);
 	media_device_cleanup(&csi->mdev);
-
-	return 0;
 }
 
 static const struct sun4i_csi_traits sun4i_a10_csi1_traits = {
@@ -330,7 +328,7 @@ static const struct dev_pm_ops sun4i_csi_pm_ops = {
 
 static struct platform_driver sun4i_csi_driver = {
 	.probe	= sun4i_csi_probe,
-	.remove	= sun4i_csi_remove,
+	.remove_new = sun4i_csi_remove,
 	.driver	= {
 		.name		= "sun4i-csi",
 		.of_match_table	= sun4i_csi_of_match,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 079/117] media: sun6i_csi: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Yong Deng, Paul Kocialkowski, Mauro Carvalho Chehab,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
index e3e6650181c8..e2723cfa4515 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
@@ -375,7 +375,7 @@ static int sun6i_csi_probe(struct platform_device *platform_dev)
 	return ret;
 }
 
-static int sun6i_csi_remove(struct platform_device *pdev)
+static void sun6i_csi_remove(struct platform_device *pdev)
 {
 	struct sun6i_csi_device *csi_dev = platform_get_drvdata(pdev);
 
@@ -386,8 +386,6 @@ static int sun6i_csi_remove(struct platform_device *pdev)
 		sun6i_csi_v4l2_cleanup(csi_dev);
 
 	sun6i_csi_resources_cleanup(csi_dev);
-
-	return 0;
 }
 
 static const struct sun6i_csi_variant sun6i_a31_csi_variant = {
@@ -426,7 +424,7 @@ MODULE_DEVICE_TABLE(of, sun6i_csi_of_match);
 
 static struct platform_driver sun6i_csi_platform_driver = {
 	.probe	= sun6i_csi_probe,
-	.remove	= sun6i_csi_remove,
+	.remove_new = sun6i_csi_remove,
 	.driver	= {
 		.name		= SUN6I_CSI_NAME,
 		.of_match_table	= of_match_ptr(sun6i_csi_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 079/117] media: sun6i_csi: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Yong Deng, Paul Kocialkowski, Mauro Carvalho Chehab,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
index e3e6650181c8..e2723cfa4515 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
@@ -375,7 +375,7 @@ static int sun6i_csi_probe(struct platform_device *platform_dev)
 	return ret;
 }
 
-static int sun6i_csi_remove(struct platform_device *pdev)
+static void sun6i_csi_remove(struct platform_device *pdev)
 {
 	struct sun6i_csi_device *csi_dev = platform_get_drvdata(pdev);
 
@@ -386,8 +386,6 @@ static int sun6i_csi_remove(struct platform_device *pdev)
 		sun6i_csi_v4l2_cleanup(csi_dev);
 
 	sun6i_csi_resources_cleanup(csi_dev);
-
-	return 0;
 }
 
 static const struct sun6i_csi_variant sun6i_a31_csi_variant = {
@@ -426,7 +424,7 @@ MODULE_DEVICE_TABLE(of, sun6i_csi_of_match);
 
 static struct platform_driver sun6i_csi_platform_driver = {
 	.probe	= sun6i_csi_probe,
-	.remove	= sun6i_csi_remove,
+	.remove_new = sun6i_csi_remove,
 	.driver	= {
 		.name		= SUN6I_CSI_NAME,
 		.of_match_table	= of_match_ptr(sun6i_csi_of_match),
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 080/117] media: sun6i_mipi_csi2: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Paul Kocialkowski, Mauro Carvalho Chehab, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 .../media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c  | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c b/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c
index a220ce849b41..dce130b4c9f6 100644
--- a/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c
+++ b/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c
@@ -737,15 +737,13 @@ static int sun6i_mipi_csi2_probe(struct platform_device *platform_dev)
 	return ret;
 }
 
-static int sun6i_mipi_csi2_remove(struct platform_device *platform_dev)
+static void sun6i_mipi_csi2_remove(struct platform_device *platform_dev)
 {
 	struct sun6i_mipi_csi2_device *csi2_dev =
 		platform_get_drvdata(platform_dev);
 
 	sun6i_mipi_csi2_bridge_cleanup(csi2_dev);
 	sun6i_mipi_csi2_resources_cleanup(csi2_dev);
-
-	return 0;
 }
 
 static const struct of_device_id sun6i_mipi_csi2_of_match[] = {
@@ -756,7 +754,7 @@ MODULE_DEVICE_TABLE(of, sun6i_mipi_csi2_of_match);
 
 static struct platform_driver sun6i_mipi_csi2_platform_driver = {
 	.probe	= sun6i_mipi_csi2_probe,
-	.remove	= sun6i_mipi_csi2_remove,
+	.remove_new = sun6i_mipi_csi2_remove,
 	.driver	= {
 		.name		= SUN6I_MIPI_CSI2_NAME,
 		.of_match_table	= of_match_ptr(sun6i_mipi_csi2_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 080/117] media: sun6i_mipi_csi2: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Paul Kocialkowski, Mauro Carvalho Chehab, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 .../media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c  | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c b/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c
index a220ce849b41..dce130b4c9f6 100644
--- a/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c
+++ b/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c
@@ -737,15 +737,13 @@ static int sun6i_mipi_csi2_probe(struct platform_device *platform_dev)
 	return ret;
 }
 
-static int sun6i_mipi_csi2_remove(struct platform_device *platform_dev)
+static void sun6i_mipi_csi2_remove(struct platform_device *platform_dev)
 {
 	struct sun6i_mipi_csi2_device *csi2_dev =
 		platform_get_drvdata(platform_dev);
 
 	sun6i_mipi_csi2_bridge_cleanup(csi2_dev);
 	sun6i_mipi_csi2_resources_cleanup(csi2_dev);
-
-	return 0;
 }
 
 static const struct of_device_id sun6i_mipi_csi2_of_match[] = {
@@ -756,7 +754,7 @@ MODULE_DEVICE_TABLE(of, sun6i_mipi_csi2_of_match);
 
 static struct platform_driver sun6i_mipi_csi2_platform_driver = {
 	.probe	= sun6i_mipi_csi2_probe,
-	.remove	= sun6i_mipi_csi2_remove,
+	.remove_new = sun6i_mipi_csi2_remove,
 	.driver	= {
 		.name		= SUN6I_MIPI_CSI2_NAME,
 		.of_match_table	= of_match_ptr(sun6i_mipi_csi2_of_match),
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 081/117] media: sun8i_a83t_mipi_csi2: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Hans Verkuil, Paul Kocialkowski, Sakari Ailus,
	Maxime Ripard, Uwe Kleine-König, Christophe JAILLET
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 .../sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c       | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
index cd2e92ae2293..23d32e198aaa 100644
--- a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
+++ b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
@@ -804,15 +804,13 @@ static int sun8i_a83t_mipi_csi2_probe(struct platform_device *platform_dev)
 	return ret;
 }
 
-static int sun8i_a83t_mipi_csi2_remove(struct platform_device *platform_dev)
+static void sun8i_a83t_mipi_csi2_remove(struct platform_device *platform_dev)
 {
 	struct sun8i_a83t_mipi_csi2_device *csi2_dev =
 		platform_get_drvdata(platform_dev);
 
 	sun8i_a83t_mipi_csi2_bridge_cleanup(csi2_dev);
 	sun8i_a83t_mipi_csi2_resources_cleanup(csi2_dev);
-
-	return 0;
 }
 
 static const struct of_device_id sun8i_a83t_mipi_csi2_of_match[] = {
@@ -823,7 +821,7 @@ MODULE_DEVICE_TABLE(of, sun8i_a83t_mipi_csi2_of_match);
 
 static struct platform_driver sun8i_a83t_mipi_csi2_platform_driver = {
 	.probe	= sun8i_a83t_mipi_csi2_probe,
-	.remove	= sun8i_a83t_mipi_csi2_remove,
+	.remove_new = sun8i_a83t_mipi_csi2_remove,
 	.driver	= {
 		.name		= SUN8I_A83T_MIPI_CSI2_NAME,
 		.of_match_table	= of_match_ptr(sun8i_a83t_mipi_csi2_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 081/117] media: sun8i_a83t_mipi_csi2: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Hans Verkuil, Paul Kocialkowski, Sakari Ailus,
	Maxime Ripard, Uwe Kleine-König, Christophe JAILLET
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 .../sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c       | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
index cd2e92ae2293..23d32e198aaa 100644
--- a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
+++ b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
@@ -804,15 +804,13 @@ static int sun8i_a83t_mipi_csi2_probe(struct platform_device *platform_dev)
 	return ret;
 }
 
-static int sun8i_a83t_mipi_csi2_remove(struct platform_device *platform_dev)
+static void sun8i_a83t_mipi_csi2_remove(struct platform_device *platform_dev)
 {
 	struct sun8i_a83t_mipi_csi2_device *csi2_dev =
 		platform_get_drvdata(platform_dev);
 
 	sun8i_a83t_mipi_csi2_bridge_cleanup(csi2_dev);
 	sun8i_a83t_mipi_csi2_resources_cleanup(csi2_dev);
-
-	return 0;
 }
 
 static const struct of_device_id sun8i_a83t_mipi_csi2_of_match[] = {
@@ -823,7 +821,7 @@ MODULE_DEVICE_TABLE(of, sun8i_a83t_mipi_csi2_of_match);
 
 static struct platform_driver sun8i_a83t_mipi_csi2_platform_driver = {
 	.probe	= sun8i_a83t_mipi_csi2_probe,
-	.remove	= sun8i_a83t_mipi_csi2_remove,
+	.remove_new = sun8i_a83t_mipi_csi2_remove,
 	.driver	= {
 		.name		= SUN8I_A83T_MIPI_CSI2_NAME,
 		.of_match_table	= of_match_ptr(sun8i_a83t_mipi_csi2_of_match),
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 082/117] media: sun8i-di: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Jernej Skrabec, Mauro Carvalho Chehab, Chen-Yu Tsai, Samuel Holland
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/sunxi/sun8i-di/sun8i-di.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
index aa65d70b6270..e4b0fd793f55 100644
--- a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
+++ b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
@@ -906,7 +906,7 @@ static int deinterlace_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int deinterlace_remove(struct platform_device *pdev)
+static void deinterlace_remove(struct platform_device *pdev)
 {
 	struct deinterlace_dev *dev = platform_get_drvdata(pdev);
 
@@ -915,8 +915,6 @@ static int deinterlace_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&dev->v4l2_dev);
 
 	pm_runtime_force_suspend(&pdev->dev);
-
-	return 0;
 }
 
 static int deinterlace_runtime_resume(struct device *device)
@@ -1002,7 +1000,7 @@ static const struct dev_pm_ops deinterlace_pm_ops = {
 
 static struct platform_driver deinterlace_driver = {
 	.probe		= deinterlace_probe,
-	.remove		= deinterlace_remove,
+	.remove_new	= deinterlace_remove,
 	.driver		= {
 		.name		= DEINTERLACE_NAME,
 		.of_match_table	= deinterlace_dt_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 082/117] media: sun8i-di: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Jernej Skrabec, Mauro Carvalho Chehab, Chen-Yu Tsai, Samuel Holland
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/sunxi/sun8i-di/sun8i-di.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
index aa65d70b6270..e4b0fd793f55 100644
--- a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
+++ b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
@@ -906,7 +906,7 @@ static int deinterlace_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int deinterlace_remove(struct platform_device *pdev)
+static void deinterlace_remove(struct platform_device *pdev)
 {
 	struct deinterlace_dev *dev = platform_get_drvdata(pdev);
 
@@ -915,8 +915,6 @@ static int deinterlace_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&dev->v4l2_dev);
 
 	pm_runtime_force_suspend(&pdev->dev);
-
-	return 0;
 }
 
 static int deinterlace_runtime_resume(struct device *device)
@@ -1002,7 +1000,7 @@ static const struct dev_pm_ops deinterlace_pm_ops = {
 
 static struct platform_driver deinterlace_driver = {
 	.probe		= deinterlace_probe,
-	.remove		= deinterlace_remove,
+	.remove_new	= deinterlace_remove,
 	.driver		= {
 		.name		= DEINTERLACE_NAME,
 		.of_match_table	= deinterlace_dt_match,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 083/117] media: sun8i_rotate: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Jernej Skrabec, Mauro Carvalho Chehab, Chen-Yu Tsai, Samuel Holland
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c
index fbcca59a0517..bd0c4257bbff 100644
--- a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c
+++ b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c
@@ -833,7 +833,7 @@ static int rotate_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rotate_remove(struct platform_device *pdev)
+static void rotate_remove(struct platform_device *pdev)
 {
 	struct rotate_dev *dev = platform_get_drvdata(pdev);
 
@@ -842,8 +842,6 @@ static int rotate_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&dev->v4l2_dev);
 
 	pm_runtime_force_suspend(&pdev->dev);
-
-	return 0;
 }
 
 static int rotate_runtime_resume(struct device *device)
@@ -907,7 +905,7 @@ static const struct dev_pm_ops rotate_pm_ops = {
 
 static struct platform_driver rotate_driver = {
 	.probe		= rotate_probe,
-	.remove		= rotate_remove,
+	.remove_new	= rotate_remove,
 	.driver		= {
 		.name		= ROTATE_NAME,
 		.of_match_table	= rotate_dt_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 083/117] media: sun8i_rotate: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Jernej Skrabec, Mauro Carvalho Chehab, Chen-Yu Tsai, Samuel Holland
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c
index fbcca59a0517..bd0c4257bbff 100644
--- a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c
+++ b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c
@@ -833,7 +833,7 @@ static int rotate_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int rotate_remove(struct platform_device *pdev)
+static void rotate_remove(struct platform_device *pdev)
 {
 	struct rotate_dev *dev = platform_get_drvdata(pdev);
 
@@ -842,8 +842,6 @@ static int rotate_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&dev->v4l2_dev);
 
 	pm_runtime_force_suspend(&pdev->dev);
-
-	return 0;
 }
 
 static int rotate_runtime_resume(struct device *device)
@@ -907,7 +905,7 @@ static const struct dev_pm_ops rotate_pm_ops = {
 
 static struct platform_driver rotate_driver = {
 	.probe		= rotate_probe,
-	.remove		= rotate_remove,
+	.remove_new	= rotate_remove,
 	.driver		= {
 		.name		= ROTATE_NAME,
 		.of_match_table	= rotate_dt_match,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 084/117] media: am437x-vpfe: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (85 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Lad, Prabhakar, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/ti/am437x/am437x-vpfe.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/ti/am437x/am437x-vpfe.c b/drivers/media/platform/ti/am437x/am437x-vpfe.c
index 2dfae9bc0bba..aac377fcaf35 100644
--- a/drivers/media/platform/ti/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/ti/am437x/am437x-vpfe.c
@@ -2483,7 +2483,7 @@ static int vpfe_probe(struct platform_device *pdev)
 /*
  * vpfe_remove : It un-register device from V4L2 driver
  */
-static int vpfe_remove(struct platform_device *pdev)
+static void vpfe_remove(struct platform_device *pdev)
 {
 	struct vpfe_device *vpfe = platform_get_drvdata(pdev);
 
@@ -2493,8 +2493,6 @@ static int vpfe_remove(struct platform_device *pdev)
 	v4l2_async_nf_cleanup(&vpfe->notifier);
 	v4l2_device_unregister(&vpfe->v4l2_dev);
 	video_unregister_device(&vpfe->video_dev);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -2625,7 +2623,7 @@ MODULE_DEVICE_TABLE(of, vpfe_of_match);
 
 static struct platform_driver vpfe_driver = {
 	.probe		= vpfe_probe,
-	.remove		= vpfe_remove,
+	.remove_new	= vpfe_remove,
 	.driver = {
 		.name	= VPFE_MODULE_NAME,
 		.pm	= &vpfe_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 085/117] media: cal: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (86 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Benoit Parrot, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/ti/cal/cal.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/ti/cal/cal.c b/drivers/media/platform/ti/cal/cal.c
index 1236215ec70e..9c5105223d6b 100644
--- a/drivers/media/platform/ti/cal/cal.c
+++ b/drivers/media/platform/ti/cal/cal.c
@@ -1293,7 +1293,7 @@ static int cal_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int cal_remove(struct platform_device *pdev)
+static void cal_remove(struct platform_device *pdev)
 {
 	struct cal_dev *cal = platform_get_drvdata(pdev);
 	unsigned int i;
@@ -1319,8 +1319,6 @@ static int cal_remove(struct platform_device *pdev)
 	if (ret >= 0)
 		pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 static int cal_runtime_resume(struct device *dev)
@@ -1364,7 +1362,7 @@ static const struct dev_pm_ops cal_pm_ops = {
 
 static struct platform_driver cal_pdrv = {
 	.probe		= cal_probe,
-	.remove		= cal_remove,
+	.remove_new	= cal_remove,
 	.driver		= {
 		.name	= CAL_MODULE_NAME,
 		.pm	= &cal_pm_ops,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 086/117] media: vpif: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (87 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Lad, Prabhakar, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/ti/davinci/vpif.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/ti/davinci/vpif.c b/drivers/media/platform/ti/davinci/vpif.c
index 832489822706..63cdfed37bc9 100644
--- a/drivers/media/platform/ti/davinci/vpif.c
+++ b/drivers/media/platform/ti/davinci/vpif.c
@@ -538,7 +538,7 @@ static int vpif_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int vpif_remove(struct platform_device *pdev)
+static void vpif_remove(struct platform_device *pdev)
 {
 	struct vpif_data *data = platform_get_drvdata(pdev);
 
@@ -551,8 +551,6 @@ static int vpif_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 
 	kfree(data);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -592,7 +590,7 @@ static struct platform_driver vpif_driver = {
 		.name	= VPIF_DRIVER_NAME,
 		.pm	= vpif_pm_ops,
 	},
-	.remove = vpif_remove,
+	.remove_new = vpif_remove,
 	.probe = vpif_probe,
 };
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 087/117] media: vpif_capture: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (88 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Lad, Prabhakar, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/ti/davinci/vpif_capture.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/ti/davinci/vpif_capture.c b/drivers/media/platform/ti/davinci/vpif_capture.c
index 580723333fcc..44d269d6038c 100644
--- a/drivers/media/platform/ti/davinci/vpif_capture.c
+++ b/drivers/media/platform/ti/davinci/vpif_capture.c
@@ -1714,7 +1714,7 @@ static __init int vpif_probe(struct platform_device *pdev)
  *
  * The vidoe device is unregistered
  */
-static int vpif_remove(struct platform_device *device)
+static void vpif_remove(struct platform_device *device)
 {
 	struct channel_obj *ch;
 	int i;
@@ -1732,7 +1732,6 @@ static int vpif_remove(struct platform_device *device)
 		video_unregister_device(&ch->video_dev);
 		kfree(vpif_obj.dev[i]);
 	}
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -1815,7 +1814,7 @@ static __refdata struct platform_driver vpif_driver = {
 		.pm	= &vpif_pm_ops,
 	},
 	.probe = vpif_probe,
-	.remove = vpif_remove,
+	.remove_new = vpif_remove,
 };
 
 module_platform_driver(vpif_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 088/117] media: vpif_display: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (89 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Lad, Prabhakar, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/ti/davinci/vpif_display.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/ti/davinci/vpif_display.c b/drivers/media/platform/ti/davinci/vpif_display.c
index b2df81603f62..f8ec2991c667 100644
--- a/drivers/media/platform/ti/davinci/vpif_display.c
+++ b/drivers/media/platform/ti/davinci/vpif_display.c
@@ -1305,7 +1305,7 @@ static __init int vpif_probe(struct platform_device *pdev)
 /*
  * vpif_remove: It un-register channels from V4L2 driver
  */
-static int vpif_remove(struct platform_device *device)
+static void vpif_remove(struct platform_device *device)
 {
 	struct channel_obj *ch;
 	int i;
@@ -1321,8 +1321,6 @@ static int vpif_remove(struct platform_device *device)
 		video_unregister_device(&ch->video_dev);
 	}
 	free_vpif_objs();
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -1399,7 +1397,7 @@ static __refdata struct platform_driver vpif_driver = {
 			.pm	= &vpif_pm_ops,
 	},
 	.probe	= vpif_probe,
-	.remove	= vpif_remove,
+	.remove_new = vpif_remove,
 };
 
 module_platform_driver(vpif_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 089/117] media: omap_vout: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (90 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Uwe Kleine-König; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/ti/omap/omap_vout.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/ti/omap/omap_vout.c b/drivers/media/platform/ti/omap/omap_vout.c
index 3e0d9af7ffec..4143274089c3 100644
--- a/drivers/media/platform/ti/omap/omap_vout.c
+++ b/drivers/media/platform/ti/omap/omap_vout.c
@@ -1569,7 +1569,7 @@ static void omap_vout_cleanup_device(struct omap_vout_device *vout)
 	kfree(vout);
 }
 
-static int omap_vout_remove(struct platform_device *pdev)
+static void omap_vout_remove(struct platform_device *pdev)
 {
 	int k;
 	struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev);
@@ -1587,7 +1587,6 @@ static int omap_vout_remove(struct platform_device *pdev)
 		omap_dss_put_device(vid_dev->displays[k]);
 	}
 	kfree(vid_dev);
-	return 0;
 }
 
 static int __init omap_vout_probe(struct platform_device *pdev)
@@ -1721,7 +1720,7 @@ static struct platform_driver omap_vout_driver = {
 	.driver = {
 		.name = VOUT_NAME,
 	},
-	.remove = omap_vout_remove,
+	.remove_new = omap_vout_remove,
 };
 
 static int __init omap_vout_init(void)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 090/117] media: isp: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (91 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/ti/omap3isp/isp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/ti/omap3isp/isp.c b/drivers/media/platform/ti/omap3isp/isp.c
index e7327e38482d..f3aaa9e76492 100644
--- a/drivers/media/platform/ti/omap3isp/isp.c
+++ b/drivers/media/platform/ti/omap3isp/isp.c
@@ -1997,7 +1997,7 @@ static int isp_attach_iommu(struct isp_device *isp)
  *
  * Always returns 0.
  */
-static int isp_remove(struct platform_device *pdev)
+static void isp_remove(struct platform_device *pdev)
 {
 	struct isp_device *isp = platform_get_drvdata(pdev);
 
@@ -2014,8 +2014,6 @@ static int isp_remove(struct platform_device *pdev)
 	v4l2_async_nf_cleanup(&isp->notifier);
 
 	kfree(isp);
-
-	return 0;
 }
 
 enum isp_of_phy {
@@ -2476,7 +2474,7 @@ MODULE_DEVICE_TABLE(of, omap3isp_of_table);
 
 static struct platform_driver omap3isp_driver = {
 	.probe = isp_probe,
-	.remove = isp_remove,
+	.remove_new = isp_remove,
 	.id_table = omap3isp_id_table,
 	.driver = {
 		.name = "omap3isp",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 091/117] media: vpe: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (92 preceding siblings ...)
  (?)
@ 2023-03-26 14:31 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Benoit Parrot, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/ti/vpe/vpe.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/ti/vpe/vpe.c b/drivers/media/platform/ti/vpe/vpe.c
index 5b1c5d96a407..6848cbc82f52 100644
--- a/drivers/media/platform/ti/vpe/vpe.c
+++ b/drivers/media/platform/ti/vpe/vpe.c
@@ -2622,7 +2622,7 @@ static int vpe_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int vpe_remove(struct platform_device *pdev)
+static void vpe_remove(struct platform_device *pdev)
 {
 	struct vpe_dev *dev = platform_get_drvdata(pdev);
 
@@ -2635,8 +2635,6 @@ static int vpe_remove(struct platform_device *pdev)
 	vpe_set_clock_enable(dev, 0);
 	vpe_runtime_put(pdev);
 	pm_runtime_disable(&pdev->dev);
-
-	return 0;
 }
 
 #if defined(CONFIG_OF)
@@ -2651,7 +2649,7 @@ MODULE_DEVICE_TABLE(of, vpe_of_match);
 
 static struct platform_driver vpe_pdrv = {
 	.probe		= vpe_probe,
-	.remove		= vpe_remove,
+	.remove_new	= vpe_remove,
 	.driver		= {
 		.name	= VPE_MODULE_NAME,
 		.of_match_table = of_match_ptr(vpe_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 092/117] media: hantro_drv: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:31   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab
  Cc: linux-media, linux-rockchip, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/verisilicon/hantro_drv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
index b0aeedae7b65..ddec42d0bd49 100644
--- a/drivers/media/platform/verisilicon/hantro_drv.c
+++ b/drivers/media/platform/verisilicon/hantro_drv.c
@@ -1093,7 +1093,7 @@ static int hantro_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int hantro_remove(struct platform_device *pdev)
+static void hantro_remove(struct platform_device *pdev)
 {
 	struct hantro_dev *vpu = platform_get_drvdata(pdev);
 
@@ -1109,7 +1109,6 @@ static int hantro_remove(struct platform_device *pdev)
 	reset_control_assert(vpu->resets);
 	pm_runtime_dont_use_autosuspend(vpu->dev);
 	pm_runtime_disable(vpu->dev);
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -1132,7 +1131,7 @@ static const struct dev_pm_ops hantro_pm_ops = {
 
 static struct platform_driver hantro_driver = {
 	.probe = hantro_probe,
-	.remove = hantro_remove,
+	.remove_new = hantro_remove,
 	.driver = {
 		   .name = DRIVER_NAME,
 		   .of_match_table = of_match_ptr(of_hantro_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 092/117] media: hantro_drv: Convert to platform remove callback returning void
@ 2023-03-26 14:31   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:31 UTC (permalink / raw)
  To: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab
  Cc: linux-media, linux-rockchip, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/verisilicon/hantro_drv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
index b0aeedae7b65..ddec42d0bd49 100644
--- a/drivers/media/platform/verisilicon/hantro_drv.c
+++ b/drivers/media/platform/verisilicon/hantro_drv.c
@@ -1093,7 +1093,7 @@ static int hantro_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int hantro_remove(struct platform_device *pdev)
+static void hantro_remove(struct platform_device *pdev)
 {
 	struct hantro_dev *vpu = platform_get_drvdata(pdev);
 
@@ -1109,7 +1109,6 @@ static int hantro_remove(struct platform_device *pdev)
 	reset_control_assert(vpu->resets);
 	pm_runtime_dont_use_autosuspend(vpu->dev);
 	pm_runtime_disable(vpu->dev);
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -1132,7 +1131,7 @@ static const struct dev_pm_ops hantro_pm_ops = {
 
 static struct platform_driver hantro_driver = {
 	.probe = hantro_probe,
-	.remove = hantro_remove,
+	.remove_new = hantro_remove,
 	.driver = {
 		   .name = DRIVER_NAME,
 		   .of_match_table = of_match_ptr(of_hantro_match),
-- 
2.39.2


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 093/117] media: via-camera: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (94 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Uwe Kleine-König; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/via/via-camera.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/via/via-camera.c b/drivers/media/platform/via/via-camera.c
index 95483c84c3f2..94a1260ac393 100644
--- a/drivers/media/platform/via/via-camera.c
+++ b/drivers/media/platform/via/via-camera.c
@@ -1294,7 +1294,7 @@ static int viacam_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int viacam_remove(struct platform_device *pdev)
+static void viacam_remove(struct platform_device *pdev)
 {
 	struct via_camera *cam = via_cam_info;
 	struct viafb_dev *viadev = pdev->dev.platform_data;
@@ -1309,7 +1309,6 @@ static int viacam_remove(struct platform_device *pdev)
 	v4l2_ctrl_handler_free(&cam->ctrl_handler);
 	kfree(cam);
 	via_cam_info = NULL;
-	return 0;
 }
 
 static struct platform_driver viacam_driver = {
@@ -1317,7 +1316,7 @@ static struct platform_driver viacam_driver = {
 		.name = "viafb-camera",
 	},
 	.probe = viacam_probe,
-	.remove = viacam_remove,
+	.remove_new = viacam_remove,
 };
 
 module_platform_driver(viacam_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 094/117] media: video-mux: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (95 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Philipp Zabel, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/video-mux.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/video-mux.c b/drivers/media/platform/video-mux.c
index 71d97042a470..1d9f32e5a917 100644
--- a/drivers/media/platform/video-mux.c
+++ b/drivers/media/platform/video-mux.c
@@ -481,7 +481,7 @@ static int video_mux_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int video_mux_remove(struct platform_device *pdev)
+static void video_mux_remove(struct platform_device *pdev)
 {
 	struct video_mux *vmux = platform_get_drvdata(pdev);
 	struct v4l2_subdev *sd = &vmux->subdev;
@@ -490,8 +490,6 @@ static int video_mux_remove(struct platform_device *pdev)
 	v4l2_async_nf_cleanup(&vmux->notifier);
 	v4l2_async_unregister_subdev(sd);
 	media_entity_cleanup(&sd->entity);
-
-	return 0;
 }
 
 static const struct of_device_id video_mux_dt_ids[] = {
@@ -502,7 +500,7 @@ MODULE_DEVICE_TABLE(of, video_mux_dt_ids);
 
 static struct platform_driver video_mux_driver = {
 	.probe		= video_mux_probe,
-	.remove		= video_mux_remove,
+	.remove_new	= video_mux_remove,
 	.driver		= {
 		.of_match_table = video_mux_dt_ids,
 		.name = "video-mux",
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 095/117] media: xilinx-csi2rxss: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:32   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Hyun Kwon, Laurent Pinchart, Mauro Carvalho Chehab, Michal Simek
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/xilinx/xilinx-csi2rxss.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/xilinx/xilinx-csi2rxss.c b/drivers/media/platform/xilinx/xilinx-csi2rxss.c
index d8a23f18cfbc..5b53745fe44e 100644
--- a/drivers/media/platform/xilinx/xilinx-csi2rxss.c
+++ b/drivers/media/platform/xilinx/xilinx-csi2rxss.c
@@ -1059,7 +1059,7 @@ static int xcsi2rxss_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int xcsi2rxss_remove(struct platform_device *pdev)
+static void xcsi2rxss_remove(struct platform_device *pdev)
 {
 	struct xcsi2rxss_state *xcsi2rxss = platform_get_drvdata(pdev);
 	struct v4l2_subdev *subdev = &xcsi2rxss->subdev;
@@ -1070,8 +1070,6 @@ static int xcsi2rxss_remove(struct platform_device *pdev)
 	mutex_destroy(&xcsi2rxss->lock);
 	clk_bulk_disable_unprepare(num_clks, xcsi2rxss->clks);
 	clk_bulk_put(num_clks, xcsi2rxss->clks);
-
-	return 0;
 }
 
 static const struct of_device_id xcsi2rxss_of_id_table[] = {
@@ -1086,7 +1084,7 @@ static struct platform_driver xcsi2rxss_driver = {
 		.of_match_table	= xcsi2rxss_of_id_table,
 	},
 	.probe			= xcsi2rxss_probe,
-	.remove			= xcsi2rxss_remove,
+	.remove_new		= xcsi2rxss_remove,
 };
 
 module_platform_driver(xcsi2rxss_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 095/117] media: xilinx-csi2rxss: Convert to platform remove callback returning void
@ 2023-03-26 14:32   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Hyun Kwon, Laurent Pinchart, Mauro Carvalho Chehab, Michal Simek
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/xilinx/xilinx-csi2rxss.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/xilinx/xilinx-csi2rxss.c b/drivers/media/platform/xilinx/xilinx-csi2rxss.c
index d8a23f18cfbc..5b53745fe44e 100644
--- a/drivers/media/platform/xilinx/xilinx-csi2rxss.c
+++ b/drivers/media/platform/xilinx/xilinx-csi2rxss.c
@@ -1059,7 +1059,7 @@ static int xcsi2rxss_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int xcsi2rxss_remove(struct platform_device *pdev)
+static void xcsi2rxss_remove(struct platform_device *pdev)
 {
 	struct xcsi2rxss_state *xcsi2rxss = platform_get_drvdata(pdev);
 	struct v4l2_subdev *subdev = &xcsi2rxss->subdev;
@@ -1070,8 +1070,6 @@ static int xcsi2rxss_remove(struct platform_device *pdev)
 	mutex_destroy(&xcsi2rxss->lock);
 	clk_bulk_disable_unprepare(num_clks, xcsi2rxss->clks);
 	clk_bulk_put(num_clks, xcsi2rxss->clks);
-
-	return 0;
 }
 
 static const struct of_device_id xcsi2rxss_of_id_table[] = {
@@ -1086,7 +1084,7 @@ static struct platform_driver xcsi2rxss_driver = {
 		.of_match_table	= xcsi2rxss_of_id_table,
 	},
 	.probe			= xcsi2rxss_probe,
-	.remove			= xcsi2rxss_remove,
+	.remove_new		= xcsi2rxss_remove,
 };
 
 module_platform_driver(xcsi2rxss_driver);
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 096/117] media: xilinx-tpg: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:32   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Hyun Kwon, Laurent Pinchart, Mauro Carvalho Chehab, Michal Simek
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/xilinx/xilinx-tpg.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c b/drivers/media/platform/xilinx/xilinx-tpg.c
index 0f2d5a0edf0c..80353ca44402 100644
--- a/drivers/media/platform/xilinx/xilinx-tpg.c
+++ b/drivers/media/platform/xilinx/xilinx-tpg.c
@@ -894,7 +894,7 @@ static int xtpg_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int xtpg_remove(struct platform_device *pdev)
+static void xtpg_remove(struct platform_device *pdev)
 {
 	struct xtpg_device *xtpg = platform_get_drvdata(pdev);
 	struct v4l2_subdev *subdev = &xtpg->xvip.subdev;
@@ -904,8 +904,6 @@ static int xtpg_remove(struct platform_device *pdev)
 	media_entity_cleanup(&subdev->entity);
 
 	xvip_cleanup_resources(&xtpg->xvip);
-
-	return 0;
 }
 
 static SIMPLE_DEV_PM_OPS(xtpg_pm_ops, xtpg_pm_suspend, xtpg_pm_resume);
@@ -923,7 +921,7 @@ static struct platform_driver xtpg_driver = {
 		.of_match_table	= xtpg_of_id_table,
 	},
 	.probe			= xtpg_probe,
-	.remove			= xtpg_remove,
+	.remove_new		= xtpg_remove,
 };
 
 module_platform_driver(xtpg_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 096/117] media: xilinx-tpg: Convert to platform remove callback returning void
@ 2023-03-26 14:32   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Hyun Kwon, Laurent Pinchart, Mauro Carvalho Chehab, Michal Simek
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/xilinx/xilinx-tpg.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c b/drivers/media/platform/xilinx/xilinx-tpg.c
index 0f2d5a0edf0c..80353ca44402 100644
--- a/drivers/media/platform/xilinx/xilinx-tpg.c
+++ b/drivers/media/platform/xilinx/xilinx-tpg.c
@@ -894,7 +894,7 @@ static int xtpg_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int xtpg_remove(struct platform_device *pdev)
+static void xtpg_remove(struct platform_device *pdev)
 {
 	struct xtpg_device *xtpg = platform_get_drvdata(pdev);
 	struct v4l2_subdev *subdev = &xtpg->xvip.subdev;
@@ -904,8 +904,6 @@ static int xtpg_remove(struct platform_device *pdev)
 	media_entity_cleanup(&subdev->entity);
 
 	xvip_cleanup_resources(&xtpg->xvip);
-
-	return 0;
 }
 
 static SIMPLE_DEV_PM_OPS(xtpg_pm_ops, xtpg_pm_suspend, xtpg_pm_resume);
@@ -923,7 +921,7 @@ static struct platform_driver xtpg_driver = {
 		.of_match_table	= xtpg_of_id_table,
 	},
 	.probe			= xtpg_probe,
-	.remove			= xtpg_remove,
+	.remove_new		= xtpg_remove,
 };
 
 module_platform_driver(xtpg_driver);
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 097/117] media: xilinx-vipp: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:32   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Hyun Kwon, Laurent Pinchart, Mauro Carvalho Chehab, Michal Simek
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/xilinx/xilinx-vipp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
index 0a16c218a50a..3123216b3f70 100644
--- a/drivers/media/platform/xilinx/xilinx-vipp.c
+++ b/drivers/media/platform/xilinx/xilinx-vipp.c
@@ -617,14 +617,12 @@ static int xvip_composite_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int xvip_composite_remove(struct platform_device *pdev)
+static void xvip_composite_remove(struct platform_device *pdev)
 {
 	struct xvip_composite_device *xdev = platform_get_drvdata(pdev);
 
 	xvip_graph_cleanup(xdev);
 	xvip_composite_v4l2_cleanup(xdev);
-
-	return 0;
 }
 
 static const struct of_device_id xvip_composite_of_id_table[] = {
@@ -639,7 +637,7 @@ static struct platform_driver xvip_composite_driver = {
 		.of_match_table = xvip_composite_of_id_table,
 	},
 	.probe = xvip_composite_probe,
-	.remove = xvip_composite_remove,
+	.remove_new = xvip_composite_remove,
 };
 
 module_platform_driver(xvip_composite_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 097/117] media: xilinx-vipp: Convert to platform remove callback returning void
@ 2023-03-26 14:32   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Hyun Kwon, Laurent Pinchart, Mauro Carvalho Chehab, Michal Simek
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/xilinx/xilinx-vipp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
index 0a16c218a50a..3123216b3f70 100644
--- a/drivers/media/platform/xilinx/xilinx-vipp.c
+++ b/drivers/media/platform/xilinx/xilinx-vipp.c
@@ -617,14 +617,12 @@ static int xvip_composite_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int xvip_composite_remove(struct platform_device *pdev)
+static void xvip_composite_remove(struct platform_device *pdev)
 {
 	struct xvip_composite_device *xdev = platform_get_drvdata(pdev);
 
 	xvip_graph_cleanup(xdev);
 	xvip_composite_v4l2_cleanup(xdev);
-
-	return 0;
 }
 
 static const struct of_device_id xvip_composite_of_id_table[] = {
@@ -639,7 +637,7 @@ static struct platform_driver xvip_composite_driver = {
 		.of_match_table = xvip_composite_of_id_table,
 	},
 	.probe = xvip_composite_probe,
-	.remove = xvip_composite_remove,
+	.remove_new = xvip_composite_remove,
 };
 
 module_platform_driver(xvip_composite_driver);
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 098/117] media: xilinx-vtc: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:32   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Hyun Kwon, Laurent Pinchart, Mauro Carvalho Chehab, Michal Simek
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/xilinx/xilinx-vtc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/xilinx/xilinx-vtc.c b/drivers/media/platform/xilinx/xilinx-vtc.c
index 0ae0208d7529..0d5e35c29488 100644
--- a/drivers/media/platform/xilinx/xilinx-vtc.c
+++ b/drivers/media/platform/xilinx/xilinx-vtc.c
@@ -344,15 +344,13 @@ static int xvtc_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int xvtc_remove(struct platform_device *pdev)
+static void xvtc_remove(struct platform_device *pdev)
 {
 	struct xvtc_device *xvtc = platform_get_drvdata(pdev);
 
 	xvtc_unregister_device(xvtc);
 
 	xvip_cleanup_resources(&xvtc->xvip);
-
-	return 0;
 }
 
 static const struct of_device_id xvtc_of_id_table[] = {
@@ -367,7 +365,7 @@ static struct platform_driver xvtc_driver = {
 		.of_match_table = xvtc_of_id_table,
 	},
 	.probe = xvtc_probe,
-	.remove = xvtc_remove,
+	.remove_new = xvtc_remove,
 };
 
 module_platform_driver(xvtc_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 098/117] media: xilinx-vtc: Convert to platform remove callback returning void
@ 2023-03-26 14:32   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Hyun Kwon, Laurent Pinchart, Mauro Carvalho Chehab, Michal Simek
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/platform/xilinx/xilinx-vtc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/xilinx/xilinx-vtc.c b/drivers/media/platform/xilinx/xilinx-vtc.c
index 0ae0208d7529..0d5e35c29488 100644
--- a/drivers/media/platform/xilinx/xilinx-vtc.c
+++ b/drivers/media/platform/xilinx/xilinx-vtc.c
@@ -344,15 +344,13 @@ static int xvtc_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int xvtc_remove(struct platform_device *pdev)
+static void xvtc_remove(struct platform_device *pdev)
 {
 	struct xvtc_device *xvtc = platform_get_drvdata(pdev);
 
 	xvtc_unregister_device(xvtc);
 
 	xvip_cleanup_resources(&xvtc->xvip);
-
-	return 0;
 }
 
 static const struct of_device_id xvtc_of_id_table[] = {
@@ -367,7 +365,7 @@ static struct platform_driver xvtc_driver = {
 		.of_match_table = xvtc_of_id_table,
 	},
 	.probe = xvtc_probe,
-	.remove = xvtc_remove,
+	.remove_new = xvtc_remove,
 };
 
 module_platform_driver(xvtc_driver);
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 099/117] media: radio-si476x: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (100 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, ye xingchen, Uwe Kleine-König, Hans Verkuil
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/radio/radio-si476x.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c
index 171f9cc9ee5e..6061506159f1 100644
--- a/drivers/media/radio/radio-si476x.c
+++ b/drivers/media/radio/radio-si476x.c
@@ -1498,7 +1498,7 @@ static int si476x_radio_probe(struct platform_device *pdev)
 	return rval;
 }
 
-static int si476x_radio_remove(struct platform_device *pdev)
+static void si476x_radio_remove(struct platform_device *pdev)
 {
 	struct si476x_radio *radio = platform_get_drvdata(pdev);
 
@@ -1506,8 +1506,6 @@ static int si476x_radio_remove(struct platform_device *pdev)
 	video_unregister_device(&radio->videodev);
 	v4l2_device_unregister(&radio->v4l2dev);
 	debugfs_remove_recursive(radio->debugfs);
-
-	return 0;
 }
 
 MODULE_ALIAS("platform:si476x-radio");
@@ -1517,7 +1515,7 @@ static struct platform_driver si476x_radio_driver = {
 		.name	= DRIVER_NAME,
 	},
 	.probe		= si476x_radio_probe,
-	.remove		= si476x_radio_remove,
+	.remove_new	= si476x_radio_remove,
 };
 module_platform_driver(si476x_radio_driver);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 100/117] media: radio-timb: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (101 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Uwe Kleine-König; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/radio/radio-timb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/radio/radio-timb.c b/drivers/media/radio/radio-timb.c
index 948ee3eec914..04daa9c358c2 100644
--- a/drivers/media/radio/radio-timb.c
+++ b/drivers/media/radio/radio-timb.c
@@ -151,13 +151,12 @@ static int timbradio_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int timbradio_remove(struct platform_device *pdev)
+static void timbradio_remove(struct platform_device *pdev)
 {
 	struct timbradio *tr = platform_get_drvdata(pdev);
 
 	video_unregister_device(&tr->video_dev);
 	v4l2_device_unregister(&tr->v4l2_dev);
-	return 0;
 }
 
 static struct platform_driver timbradio_platform_driver = {
@@ -165,7 +164,7 @@ static struct platform_driver timbradio_platform_driver = {
 		.name	= DRIVER_NAME,
 	},
 	.probe		= timbradio_probe,
-	.remove		= timbradio_remove,
+	.remove_new	= timbradio_remove,
 };
 
 module_platform_driver(timbradio_platform_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 101/117] media: radio-wl1273: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (102 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Uwe Kleine-König; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/radio/radio-wl1273.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c
index 484046471c03..e8166eac9efe 100644
--- a/drivers/media/radio/radio-wl1273.c
+++ b/drivers/media/radio/radio-wl1273.c
@@ -1977,7 +1977,7 @@ static const struct video_device wl1273_viddev_template = {
 				  V4L2_CAP_RDS_OUTPUT,
 };
 
-static int wl1273_fm_radio_remove(struct platform_device *pdev)
+static void wl1273_fm_radio_remove(struct platform_device *pdev)
 {
 	struct wl1273_device *radio = platform_get_drvdata(pdev);
 	struct wl1273_core *core = radio->core;
@@ -1990,8 +1990,6 @@ static int wl1273_fm_radio_remove(struct platform_device *pdev)
 	v4l2_ctrl_handler_free(&radio->ctrl_handler);
 	video_unregister_device(&radio->videodev);
 	v4l2_device_unregister(&radio->v4l2dev);
-
-	return 0;
 }
 
 static int wl1273_fm_radio_probe(struct platform_device *pdev)
@@ -2147,7 +2145,7 @@ static int wl1273_fm_radio_probe(struct platform_device *pdev)
 
 static struct platform_driver wl1273_fm_radio_driver = {
 	.probe		= wl1273_fm_radio_probe,
-	.remove		= wl1273_fm_radio_remove,
+	.remove_new	= wl1273_fm_radio_remove,
 	.driver		= {
 		.name	= "wl1273_fm_radio",
 	},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 102/117] media: radio-platform-si4713: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (103 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Eduardo Valentin, Mauro Carvalho Chehab, Uwe Kleine-König
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/radio/si4713/radio-platform-si4713.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/radio/si4713/radio-platform-si4713.c b/drivers/media/radio/si4713/radio-platform-si4713.c
index 433f9642786d..9fdaed68a962 100644
--- a/drivers/media/radio/si4713/radio-platform-si4713.c
+++ b/drivers/media/radio/si4713/radio-platform-si4713.c
@@ -190,7 +190,7 @@ static int radio_si4713_pdriver_probe(struct platform_device *pdev)
 }
 
 /* radio_si4713_pdriver_remove - remove the device */
-static int radio_si4713_pdriver_remove(struct platform_device *pdev)
+static void radio_si4713_pdriver_remove(struct platform_device *pdev)
 {
 	struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev);
 	struct radio_si4713_device *rsdev;
@@ -198,8 +198,6 @@ static int radio_si4713_pdriver_remove(struct platform_device *pdev)
 	rsdev = container_of(v4l2_dev, struct radio_si4713_device, v4l2_dev);
 	video_unregister_device(&rsdev->radio_dev);
 	v4l2_device_unregister(&rsdev->v4l2_dev);
-
-	return 0;
 }
 
 static struct platform_driver radio_si4713_pdriver = {
@@ -207,7 +205,7 @@ static struct platform_driver radio_si4713_pdriver = {
 		.name	= "radio-si4713",
 	},
 	.probe		= radio_si4713_pdriver_probe,
-	.remove         = radio_si4713_pdriver_remove,
+	.remove_new     = radio_si4713_pdriver_remove,
 };
 
 module_platform_driver(radio_si4713_pdriver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 103/117] media: gpio-ir-recv: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (104 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/gpio-ir-recv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
index 8dbe780dae4e..fb037788ec10 100644
--- a/drivers/media/rc/gpio-ir-recv.c
+++ b/drivers/media/rc/gpio-ir-recv.c
@@ -126,7 +126,7 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)
 				"gpio-ir-recv-irq", gpio_dev);
 }
 
-static int gpio_ir_recv_remove(struct platform_device *pdev)
+static void gpio_ir_recv_remove(struct platform_device *pdev)
 {
 	struct gpio_rc_dev *gpio_dev = platform_get_drvdata(pdev);
 	struct device *pmdev = gpio_dev->pmdev;
@@ -139,8 +139,6 @@ static int gpio_ir_recv_remove(struct platform_device *pdev)
 		pm_runtime_put_noidle(pmdev);
 		pm_runtime_set_suspended(pmdev);
 	}
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -202,7 +200,7 @@ MODULE_DEVICE_TABLE(of, gpio_ir_recv_of_match);
 
 static struct platform_driver gpio_ir_recv_driver = {
 	.probe  = gpio_ir_recv_probe,
-	.remove = gpio_ir_recv_remove,
+	.remove_new = gpio_ir_recv_remove,
 	.driver = {
 		.name   = KBUILD_MODNAME,
 		.of_match_table = of_match_ptr(gpio_ir_recv_of_match),
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 104/117] media: img-ir-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (105 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab, Uwe Kleine-König
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/img-ir/img-ir-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/rc/img-ir/img-ir-core.c b/drivers/media/rc/img-ir/img-ir-core.c
index 6f8464872033..d87d8e14c556 100644
--- a/drivers/media/rc/img-ir/img-ir-core.c
+++ b/drivers/media/rc/img-ir/img-ir-core.c
@@ -152,7 +152,7 @@ static int img_ir_probe(struct platform_device *pdev)
 	return error;
 }
 
-static int img_ir_remove(struct platform_device *pdev)
+static void img_ir_remove(struct platform_device *pdev)
 {
 	struct img_ir_priv *priv = platform_get_drvdata(pdev);
 
@@ -164,7 +164,6 @@ static int img_ir_remove(struct platform_device *pdev)
 		clk_disable_unprepare(priv->clk);
 	if (!IS_ERR(priv->sys_clk))
 		clk_disable_unprepare(priv->sys_clk);
-	return 0;
 }
 
 static SIMPLE_DEV_PM_OPS(img_ir_pmops, img_ir_suspend, img_ir_resume);
@@ -182,7 +181,7 @@ static struct platform_driver img_ir_driver = {
 		.pm = &img_ir_pmops,
 	},
 	.probe = img_ir_probe,
-	.remove = img_ir_remove,
+	.remove_new = img_ir_remove,
 };
 
 module_platform_driver(img_ir_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 105/117] media: ir-hix5hd2: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (106 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/ir-hix5hd2.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c
index 4ff954b11dc7..0034f615b466 100644
--- a/drivers/media/rc/ir-hix5hd2.c
+++ b/drivers/media/rc/ir-hix5hd2.c
@@ -340,13 +340,12 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int hix5hd2_ir_remove(struct platform_device *pdev)
+static void hix5hd2_ir_remove(struct platform_device *pdev)
 {
 	struct hix5hd2_ir_priv *priv = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(priv->clock);
 	rc_unregister_device(priv->rdev);
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -395,7 +394,7 @@ static struct platform_driver hix5hd2_ir_driver = {
 		.pm     = &hix5hd2_ir_pm_ops,
 	},
 	.probe = hix5hd2_ir_probe,
-	.remove = hix5hd2_ir_remove,
+	.remove_new = hix5hd2_ir_remove,
 };
 
 module_platform_driver(hix5hd2_ir_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 106/117] media: meson-ir-tx: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
  (?)
@ 2023-03-26 14:32   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab, Neil Armstrong, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media,
	linux-arm-kernel, linux-amlogic, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/meson-ir-tx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/meson-ir-tx.c b/drivers/media/rc/meson-ir-tx.c
index abdb62b16e98..6355b79893fb 100644
--- a/drivers/media/rc/meson-ir-tx.c
+++ b/drivers/media/rc/meson-ir-tx.c
@@ -372,13 +372,11 @@ static int __init meson_irtx_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int meson_irtx_remove(struct platform_device *pdev)
+static void meson_irtx_remove(struct platform_device *pdev)
 {
 	struct rc_dev *rc = platform_get_drvdata(pdev);
 
 	rc_unregister_device(rc);
-
-	return 0;
 }
 
 static const struct of_device_id meson_irtx_dt_match[] = {
@@ -390,7 +388,7 @@ static const struct of_device_id meson_irtx_dt_match[] = {
 MODULE_DEVICE_TABLE(of, meson_irtx_dt_match);
 
 static struct platform_driver meson_irtx_pd = {
-	.remove = meson_irtx_remove,
+	.remove_new = meson_irtx_remove,
 	.driver = {
 		.name = DRIVER_NAME,
 		.of_match_table = meson_irtx_dt_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 106/117] media: meson-ir-tx: Convert to platform remove callback returning void
@ 2023-03-26 14:32   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab, Neil Armstrong, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media,
	linux-arm-kernel, linux-amlogic, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/meson-ir-tx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/meson-ir-tx.c b/drivers/media/rc/meson-ir-tx.c
index abdb62b16e98..6355b79893fb 100644
--- a/drivers/media/rc/meson-ir-tx.c
+++ b/drivers/media/rc/meson-ir-tx.c
@@ -372,13 +372,11 @@ static int __init meson_irtx_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int meson_irtx_remove(struct platform_device *pdev)
+static void meson_irtx_remove(struct platform_device *pdev)
 {
 	struct rc_dev *rc = platform_get_drvdata(pdev);
 
 	rc_unregister_device(rc);
-
-	return 0;
 }
 
 static const struct of_device_id meson_irtx_dt_match[] = {
@@ -390,7 +388,7 @@ static const struct of_device_id meson_irtx_dt_match[] = {
 MODULE_DEVICE_TABLE(of, meson_irtx_dt_match);
 
 static struct platform_driver meson_irtx_pd = {
-	.remove = meson_irtx_remove,
+	.remove_new = meson_irtx_remove,
 	.driver = {
 		.name = DRIVER_NAME,
 		.of_match_table = meson_irtx_dt_match,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 106/117] media: meson-ir-tx: Convert to platform remove callback returning void
@ 2023-03-26 14:32   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab, Neil Armstrong, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media,
	linux-arm-kernel, linux-amlogic, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/meson-ir-tx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/meson-ir-tx.c b/drivers/media/rc/meson-ir-tx.c
index abdb62b16e98..6355b79893fb 100644
--- a/drivers/media/rc/meson-ir-tx.c
+++ b/drivers/media/rc/meson-ir-tx.c
@@ -372,13 +372,11 @@ static int __init meson_irtx_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int meson_irtx_remove(struct platform_device *pdev)
+static void meson_irtx_remove(struct platform_device *pdev)
 {
 	struct rc_dev *rc = platform_get_drvdata(pdev);
 
 	rc_unregister_device(rc);
-
-	return 0;
 }
 
 static const struct of_device_id meson_irtx_dt_match[] = {
@@ -390,7 +388,7 @@ static const struct of_device_id meson_irtx_dt_match[] = {
 MODULE_DEVICE_TABLE(of, meson_irtx_dt_match);
 
 static struct platform_driver meson_irtx_pd = {
-	.remove = meson_irtx_remove,
+	.remove_new = meson_irtx_remove,
 	.driver = {
 		.name = DRIVER_NAME,
 		.of_match_table = meson_irtx_dt_match,
-- 
2.39.2


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 107/117] media: meson-ir: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
  (?)
@ 2023-03-26 14:32   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab, Neil Armstrong, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media,
	linux-arm-kernel, linux-amlogic, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/meson-ir.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index 4b769111f78e..49aa309d1a8c 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -177,7 +177,7 @@ static int meson_ir_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int meson_ir_remove(struct platform_device *pdev)
+static void meson_ir_remove(struct platform_device *pdev)
 {
 	struct meson_ir *ir = platform_get_drvdata(pdev);
 	unsigned long flags;
@@ -186,8 +186,6 @@ static int meson_ir_remove(struct platform_device *pdev)
 	spin_lock_irqsave(&ir->lock, flags);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_ENABLE, 0);
 	spin_unlock_irqrestore(&ir->lock, flags);
-
-	return 0;
 }
 
 static void meson_ir_shutdown(struct platform_device *pdev)
@@ -226,7 +224,7 @@ MODULE_DEVICE_TABLE(of, meson_ir_match);
 
 static struct platform_driver meson_ir_driver = {
 	.probe		= meson_ir_probe,
-	.remove		= meson_ir_remove,
+	.remove_new	= meson_ir_remove,
 	.shutdown	= meson_ir_shutdown,
 	.driver = {
 		.name		= DRIVER_NAME,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 107/117] media: meson-ir: Convert to platform remove callback returning void
@ 2023-03-26 14:32   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab, Neil Armstrong, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media,
	linux-arm-kernel, linux-amlogic, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/meson-ir.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index 4b769111f78e..49aa309d1a8c 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -177,7 +177,7 @@ static int meson_ir_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int meson_ir_remove(struct platform_device *pdev)
+static void meson_ir_remove(struct platform_device *pdev)
 {
 	struct meson_ir *ir = platform_get_drvdata(pdev);
 	unsigned long flags;
@@ -186,8 +186,6 @@ static int meson_ir_remove(struct platform_device *pdev)
 	spin_lock_irqsave(&ir->lock, flags);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_ENABLE, 0);
 	spin_unlock_irqrestore(&ir->lock, flags);
-
-	return 0;
 }
 
 static void meson_ir_shutdown(struct platform_device *pdev)
@@ -226,7 +224,7 @@ MODULE_DEVICE_TABLE(of, meson_ir_match);
 
 static struct platform_driver meson_ir_driver = {
 	.probe		= meson_ir_probe,
-	.remove		= meson_ir_remove,
+	.remove_new	= meson_ir_remove,
 	.shutdown	= meson_ir_shutdown,
 	.driver = {
 		.name		= DRIVER_NAME,
-- 
2.39.2


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 107/117] media: meson-ir: Convert to platform remove callback returning void
@ 2023-03-26 14:32   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab, Neil Armstrong, Kevin Hilman
  Cc: Jerome Brunet, Martin Blumenstingl, linux-media,
	linux-arm-kernel, linux-amlogic, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/meson-ir.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index 4b769111f78e..49aa309d1a8c 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -177,7 +177,7 @@ static int meson_ir_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int meson_ir_remove(struct platform_device *pdev)
+static void meson_ir_remove(struct platform_device *pdev)
 {
 	struct meson_ir *ir = platform_get_drvdata(pdev);
 	unsigned long flags;
@@ -186,8 +186,6 @@ static int meson_ir_remove(struct platform_device *pdev)
 	spin_lock_irqsave(&ir->lock, flags);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_ENABLE, 0);
 	spin_unlock_irqrestore(&ir->lock, flags);
-
-	return 0;
 }
 
 static void meson_ir_shutdown(struct platform_device *pdev)
@@ -226,7 +224,7 @@ MODULE_DEVICE_TABLE(of, meson_ir_match);
 
 static struct platform_driver meson_ir_driver = {
 	.probe		= meson_ir_probe,
-	.remove		= meson_ir_remove,
+	.remove_new	= meson_ir_remove,
 	.shutdown	= meson_ir_shutdown,
 	.driver = {
 		.name		= DRIVER_NAME,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 108/117] media: mtk-cir: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:32   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Wang, Sean Young, Mauro Carvalho Chehab, Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/mtk-cir.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/mtk-cir.c b/drivers/media/rc/mtk-cir.c
index 27b7412d02a5..df9349330a93 100644
--- a/drivers/media/rc/mtk-cir.c
+++ b/drivers/media/rc/mtk-cir.c
@@ -420,7 +420,7 @@ static int mtk_ir_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mtk_ir_remove(struct platform_device *pdev)
+static void mtk_ir_remove(struct platform_device *pdev)
 {
 	struct mtk_ir *ir = platform_get_drvdata(pdev);
 
@@ -434,13 +434,11 @@ static int mtk_ir_remove(struct platform_device *pdev)
 
 	clk_disable_unprepare(ir->bus);
 	clk_disable_unprepare(ir->clk);
-
-	return 0;
 }
 
 static struct platform_driver mtk_ir_driver = {
 	.probe          = mtk_ir_probe,
-	.remove         = mtk_ir_remove,
+	.remove_new     = mtk_ir_remove,
 	.driver = {
 		.name = MTK_IR_DEV,
 		.of_match_table = mtk_ir_match,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 108/117] media: mtk-cir: Convert to platform remove callback returning void
@ 2023-03-26 14:32   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Wang, Sean Young, Mauro Carvalho Chehab, Matthias Brugger
  Cc: AngeloGioacchino Del Regno, linux-media, kernel,
	linux-arm-kernel, linux-mediatek

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/mtk-cir.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/mtk-cir.c b/drivers/media/rc/mtk-cir.c
index 27b7412d02a5..df9349330a93 100644
--- a/drivers/media/rc/mtk-cir.c
+++ b/drivers/media/rc/mtk-cir.c
@@ -420,7 +420,7 @@ static int mtk_ir_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mtk_ir_remove(struct platform_device *pdev)
+static void mtk_ir_remove(struct platform_device *pdev)
 {
 	struct mtk_ir *ir = platform_get_drvdata(pdev);
 
@@ -434,13 +434,11 @@ static int mtk_ir_remove(struct platform_device *pdev)
 
 	clk_disable_unprepare(ir->bus);
 	clk_disable_unprepare(ir->clk);
-
-	return 0;
 }
 
 static struct platform_driver mtk_ir_driver = {
 	.probe          = mtk_ir_probe,
-	.remove         = mtk_ir_remove,
+	.remove_new     = mtk_ir_remove,
 	.driver = {
 		.name = MTK_IR_DEV,
 		.of_match_table = mtk_ir_match,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 109/117] media: st_rc: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:32   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Patrice Chotard, Sean Young, Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/st_rc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c
index 19e987a048cc..28477aa95563 100644
--- a/drivers/media/rc/st_rc.c
+++ b/drivers/media/rc/st_rc.c
@@ -194,7 +194,7 @@ static int st_rc_hardware_init(struct st_rc_device *dev)
 	return 0;
 }
 
-static int st_rc_remove(struct platform_device *pdev)
+static void st_rc_remove(struct platform_device *pdev)
 {
 	struct st_rc_device *rc_dev = platform_get_drvdata(pdev);
 
@@ -202,7 +202,6 @@ static int st_rc_remove(struct platform_device *pdev)
 	device_init_wakeup(&pdev->dev, false);
 	clk_disable_unprepare(rc_dev->sys_clock);
 	rc_unregister_device(rc_dev->rdev);
-	return 0;
 }
 
 static int st_rc_open(struct rc_dev *rdev)
@@ -408,7 +407,7 @@ static struct platform_driver st_rc_driver = {
 		.pm     = &st_rc_pm_ops,
 	},
 	.probe = st_rc_probe,
-	.remove = st_rc_remove,
+	.remove_new = st_rc_remove,
 };
 
 module_platform_driver(st_rc_driver);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 109/117] media: st_rc: Convert to platform remove callback returning void
@ 2023-03-26 14:32   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Patrice Chotard, Sean Young, Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/st_rc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c
index 19e987a048cc..28477aa95563 100644
--- a/drivers/media/rc/st_rc.c
+++ b/drivers/media/rc/st_rc.c
@@ -194,7 +194,7 @@ static int st_rc_hardware_init(struct st_rc_device *dev)
 	return 0;
 }
 
-static int st_rc_remove(struct platform_device *pdev)
+static void st_rc_remove(struct platform_device *pdev)
 {
 	struct st_rc_device *rc_dev = platform_get_drvdata(pdev);
 
@@ -202,7 +202,6 @@ static int st_rc_remove(struct platform_device *pdev)
 	device_init_wakeup(&pdev->dev, false);
 	clk_disable_unprepare(rc_dev->sys_clock);
 	rc_unregister_device(rc_dev->rdev);
-	return 0;
 }
 
 static int st_rc_open(struct rc_dev *rdev)
@@ -408,7 +407,7 @@ static struct platform_driver st_rc_driver = {
 		.pm     = &st_rc_pm_ops,
 	},
 	.probe = st_rc_probe,
-	.remove = st_rc_remove,
+	.remove_new = st_rc_remove,
 };
 
 module_platform_driver(st_rc_driver);
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 110/117] media: sunxi-cir: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-03-26 14:32   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/sunxi-cir.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/sunxi-cir.c b/drivers/media/rc/sunxi-cir.c
index b631a81e58bb..75b7aed1579c 100644
--- a/drivers/media/rc/sunxi-cir.c
+++ b/drivers/media/rc/sunxi-cir.c
@@ -364,14 +364,12 @@ static int sunxi_ir_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int sunxi_ir_remove(struct platform_device *pdev)
+static void sunxi_ir_remove(struct platform_device *pdev)
 {
 	struct sunxi_ir *ir = platform_get_drvdata(pdev);
 
 	rc_unregister_device(ir->rc);
 	sunxi_ir_hw_exit(&pdev->dev);
-
-	return 0;
 }
 
 static void sunxi_ir_shutdown(struct platform_device *pdev)
@@ -413,7 +411,7 @@ MODULE_DEVICE_TABLE(of, sunxi_ir_match);
 
 static struct platform_driver sunxi_ir_driver = {
 	.probe          = sunxi_ir_probe,
-	.remove         = sunxi_ir_remove,
+	.remove_new     = sunxi_ir_remove,
 	.shutdown       = sunxi_ir_shutdown,
 	.driver = {
 		.name = SUNXI_IR_DEV,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 110/117] media: sunxi-cir: Convert to platform remove callback returning void
@ 2023-03-26 14:32   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland
  Cc: linux-media, linux-arm-kernel, linux-sunxi, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/rc/sunxi-cir.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/rc/sunxi-cir.c b/drivers/media/rc/sunxi-cir.c
index b631a81e58bb..75b7aed1579c 100644
--- a/drivers/media/rc/sunxi-cir.c
+++ b/drivers/media/rc/sunxi-cir.c
@@ -364,14 +364,12 @@ static int sunxi_ir_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int sunxi_ir_remove(struct platform_device *pdev)
+static void sunxi_ir_remove(struct platform_device *pdev)
 {
 	struct sunxi_ir *ir = platform_get_drvdata(pdev);
 
 	rc_unregister_device(ir->rc);
 	sunxi_ir_hw_exit(&pdev->dev);
-
-	return 0;
 }
 
 static void sunxi_ir_shutdown(struct platform_device *pdev)
@@ -413,7 +411,7 @@ MODULE_DEVICE_TABLE(of, sunxi_ir_match);
 
 static struct platform_driver sunxi_ir_driver = {
 	.probe          = sunxi_ir_probe,
-	.remove         = sunxi_ir_remove,
+	.remove_new     = sunxi_ir_remove,
 	.shutdown       = sunxi_ir_shutdown,
 	.driver = {
 		.name = SUNXI_IR_DEV,
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 111/117] media: vicodec-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (112 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/test-drivers/vicodec/vicodec-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/test-drivers/vicodec/vicodec-core.c b/drivers/media/test-drivers/vicodec/vicodec-core.c
index 1d1bee111732..6f0e20df74e9 100644
--- a/drivers/media/test-drivers/vicodec/vicodec-core.c
+++ b/drivers/media/test-drivers/vicodec/vicodec-core.c
@@ -2179,7 +2179,7 @@ static int vicodec_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int vicodec_remove(struct platform_device *pdev)
+static void vicodec_remove(struct platform_device *pdev)
 {
 	struct vicodec_dev *dev = platform_get_drvdata(pdev);
 
@@ -2196,13 +2196,11 @@ static int vicodec_remove(struct platform_device *pdev)
 	video_unregister_device(&dev->stateful_dec.vfd);
 	video_unregister_device(&dev->stateless_dec.vfd);
 	v4l2_device_put(&dev->v4l2_dev);
-
-	return 0;
 }
 
 static struct platform_driver vicodec_pdrv = {
 	.probe		= vicodec_probe,
-	.remove		= vicodec_remove,
+	.remove_new	= vicodec_remove,
 	.driver		= {
 		.name	= VICODEC_NAME,
 	},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 112/117] media: vidtv_bridge: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (113 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Daniel W. S. Almeida, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/test-drivers/vidtv/vidtv_bridge.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c
index dff7265a42ca..8b04e12af286 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c
@@ -528,7 +528,7 @@ static int vidtv_bridge_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int vidtv_bridge_remove(struct platform_device *pdev)
+static void vidtv_bridge_remove(struct platform_device *pdev)
 {
 	struct vidtv_dvb *dvb;
 	u32 i;
@@ -552,8 +552,6 @@ static int vidtv_bridge_remove(struct platform_device *pdev)
 	dvb_dmx_release(&dvb->demux);
 	dvb_unregister_adapter(&dvb->adapter);
 	dev_info(&pdev->dev, "Successfully removed vidtv\n");
-
-	return 0;
 }
 
 static void vidtv_bridge_dev_release(struct device *dev)
@@ -574,7 +572,7 @@ static struct platform_driver vidtv_bridge_driver = {
 		.name = VIDTV_PDEV_NAME,
 	},
 	.probe    = vidtv_bridge_probe,
-	.remove   = vidtv_bridge_remove,
+	.remove_new = vidtv_bridge_remove,
 };
 
 static void __exit vidtv_bridge_exit(void)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 113/117] media: vim2m: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (114 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, Uwe Kleine-König
  Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/test-drivers/vim2m.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/test-drivers/vim2m.c b/drivers/media/test-drivers/vim2m.c
index 7964426bf2f7..3e3b424b4860 100644
--- a/drivers/media/test-drivers/vim2m.c
+++ b/drivers/media/test-drivers/vim2m.c
@@ -1379,7 +1379,7 @@ static int vim2m_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int vim2m_remove(struct platform_device *pdev)
+static void vim2m_remove(struct platform_device *pdev)
 {
 	struct vim2m_dev *dev = platform_get_drvdata(pdev);
 
@@ -1390,13 +1390,11 @@ static int vim2m_remove(struct platform_device *pdev)
 	v4l2_m2m_unregister_media_controller(dev->m2m_dev);
 #endif
 	video_unregister_device(&dev->vfd);
-
-	return 0;
 }
 
 static struct platform_driver vim2m_pdrv = {
 	.probe		= vim2m_probe,
-	.remove		= vim2m_remove,
+	.remove_new	= vim2m_remove,
 	.driver		= {
 		.name	= MEM2MEM_NAME,
 	},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 114/117] media: vimc-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (115 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  2023-03-27  8:42   ` Kieran Bingham
  -1 siblings, 1 reply; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Shuah Khan, Mauro Carvalho Chehab; +Cc: Kieran Bingham, linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/test-drivers/vimc/vimc-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/test-drivers/vimc/vimc-core.c b/drivers/media/test-drivers/vimc/vimc-core.c
index e82cfa5ffbf4..af127476e920 100644
--- a/drivers/media/test-drivers/vimc/vimc-core.c
+++ b/drivers/media/test-drivers/vimc/vimc-core.c
@@ -387,7 +387,7 @@ static int vimc_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int vimc_remove(struct platform_device *pdev)
+static void vimc_remove(struct platform_device *pdev)
 {
 	struct vimc_device *vimc = platform_get_drvdata(pdev);
 
@@ -397,8 +397,6 @@ static int vimc_remove(struct platform_device *pdev)
 	media_device_unregister(&vimc->mdev);
 	v4l2_device_unregister(&vimc->v4l2_dev);
 	v4l2_device_put(&vimc->v4l2_dev);
-
-	return 0;
 }
 
 static void vimc_dev_release(struct device *dev)
@@ -412,7 +410,7 @@ static struct platform_device vimc_pdev = {
 
 static struct platform_driver vimc_pdrv = {
 	.probe		= vimc_probe,
-	.remove		= vimc_remove,
+	.remove_new	= vimc_remove,
 	.driver		= {
 		.name	= VIMC_PDEV_NAME,
 	},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 115/117] media: visl-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (116 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Daniel Almeida, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/test-drivers/visl/visl-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/test-drivers/visl/visl-core.c b/drivers/media/test-drivers/visl/visl-core.c
index 9cb60ab653bf..9970dc739ca5 100644
--- a/drivers/media/test-drivers/visl/visl-core.c
+++ b/drivers/media/test-drivers/visl/visl-core.c
@@ -480,7 +480,7 @@ static int visl_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int visl_remove(struct platform_device *pdev)
+static void visl_remove(struct platform_device *pdev)
 {
 	struct visl_dev *dev = platform_get_drvdata(pdev);
 
@@ -493,13 +493,11 @@ static int visl_remove(struct platform_device *pdev)
 	}
 #endif
 	video_unregister_device(&dev->vfd);
-
-	return 0;
 }
 
 static struct platform_driver visl_pdrv = {
 	.probe		= visl_probe,
-	.remove		= visl_remove,
+	.remove_new	= visl_remove,
 	.driver		= {
 		.name	= VISL_NAME,
 	},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 116/117] media: vivid-core: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (117 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/test-drivers/vivid/vivid-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/test-drivers/vivid/vivid-core.c b/drivers/media/test-drivers/vivid/vivid-core.c
index f28440e6c9f8..b4fbe32ed538 100644
--- a/drivers/media/test-drivers/vivid/vivid-core.c
+++ b/drivers/media/test-drivers/vivid/vivid-core.c
@@ -2058,7 +2058,7 @@ static int vivid_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int vivid_remove(struct platform_device *pdev)
+static void vivid_remove(struct platform_device *pdev)
 {
 	struct vivid_dev *dev;
 	unsigned int i, j;
@@ -2138,7 +2138,6 @@ static int vivid_remove(struct platform_device *pdev)
 		v4l2_device_put(&dev->v4l2_dev);
 		vivid_devs[i] = NULL;
 	}
-	return 0;
 }
 
 static void vivid_pdev_release(struct device *dev)
@@ -2152,7 +2151,7 @@ static struct platform_device vivid_pdev = {
 
 static struct platform_driver vivid_pdrv = {
 	.probe		= vivid_probe,
-	.remove		= vivid_remove,
+	.remove_new	= vivid_remove,
 	.driver		= {
 		.name	= "vivid",
 	},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* [PATCH 117/117] media: it913x: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
                   ` (118 preceding siblings ...)
  (?)
@ 2023-03-26 14:32 ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:32 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab; +Cc: linux-media, 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 (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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/tuners/it913x.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/tuners/it913x.c b/drivers/media/tuners/it913x.c
index 7696a28fe407..4d5b1c878028 100644
--- a/drivers/media/tuners/it913x.c
+++ b/drivers/media/tuners/it913x.c
@@ -419,7 +419,7 @@ static int it913x_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int it913x_remove(struct platform_device *pdev)
+static void it913x_remove(struct platform_device *pdev)
 {
 	struct it913x_dev *dev = platform_get_drvdata(pdev);
 	struct dvb_frontend *fe = dev->fe;
@@ -429,8 +429,6 @@ static int it913x_remove(struct platform_device *pdev)
 	memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops));
 	fe->tuner_priv = NULL;
 	kfree(dev);
-
-	return 0;
 }
 
 static const struct platform_device_id it913x_id_table[] = {
@@ -446,7 +444,7 @@ static struct platform_driver it913x_driver = {
 		.suppress_bind_attrs	= true,
 	},
 	.probe		= it913x_probe,
-	.remove		= it913x_remove,
+	.remove_new	= it913x_remove,
 	.id_table	= it913x_id_table,
 };
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 255+ messages in thread

* Re: [PATCH 002/117] media: cros-ec-cec: Don't exit early in .remove() callback
  2023-03-26 14:30 ` [PATCH 002/117] media: cros-ec-cec: Don't exit early in .remove() callback Uwe Kleine-König
@ 2023-03-26 14:45   ` Guenter Roeck
  2023-03-27  7:52   ` Hans Verkuil
  1 sibling, 0 replies; 255+ messages in thread
From: Guenter Roeck @ 2023-03-26 14:45 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Hans Verkuil, Mauro Carvalho Chehab, Benson Leung, Ajye Huang,
	Scott Chao, Rory Liu, Guenter Roeck, linux-media,
	chrome-platform, kernel

On Sun, Mar 26, 2023 at 7:32 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> Exiting early in remove without releasing all acquired resources yields
> leaks. Note that e.g. memory allocated with devm_zalloc() is freed after
> .remove() returns, even if the return code was negative.
>
> While blocking_notifier_chain_unregister() won't fail and so the
> change is somewhat cosmetic, platform driver's .remove callbacks are
> about to be converted to return void. To prepare that, keep the error
> message but don't return early.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Guenter Roeck <groeck@chromium.org>

> ---
>  drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
> index 6ebedc71d67d..960432230bbf 100644
> --- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
> +++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
> @@ -332,14 +332,16 @@ static int cros_ec_cec_remove(struct platform_device *pdev)
>         struct device *dev = &pdev->dev;
>         int ret;
>
> +       /*
> +        * blocking_notifier_chain_unregister() only fails if the notifier isn't
> +        * in the list. We know it was added to it by .probe(), so there should
> +        * be no need for error checking. Be cautious and still check.
> +        */
>         ret = blocking_notifier_chain_unregister(
>                         &cros_ec_cec->cros_ec->event_notifier,
>                         &cros_ec_cec->notifier);
> -
> -       if (ret) {
> +       if (ret)
>                 dev_err(dev, "failed to unregister notifier\n");
> -               return ret;
> -       }
>
>         cec_notifier_cec_adap_unregister(cros_ec_cec->notify,
>                                          cros_ec_cec->adap);
> --
> 2.39.2
>

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 003/117] media: cros-ec-cec: Convert to platform remove callback returning void
  2023-03-26 14:30 ` [PATCH 003/117] media: cros-ec-cec: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-03-26 14:46   ` Guenter Roeck
  0 siblings, 0 replies; 255+ messages in thread
From: Guenter Roeck @ 2023-03-26 14:46 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Hans Verkuil, Mauro Carvalho Chehab, Benson Leung, Scott Chao,
	Rory Liu, Ajye Huang, Guenter Roeck, linux-media,
	chrome-platform, kernel

On Sun, Mar 26, 2023 at 7:32 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Guenter Roeck <groeck@chromium.org>

> ---
>  drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
> index 960432230bbf..3d2600af9fc1 100644
> --- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
> +++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
> @@ -326,7 +326,7 @@ static int cros_ec_cec_probe(struct platform_device *pdev)
>         return ret;
>  }
>
> -static int cros_ec_cec_remove(struct platform_device *pdev)
> +static void cros_ec_cec_remove(struct platform_device *pdev)
>  {
>         struct cros_ec_cec *cros_ec_cec = platform_get_drvdata(pdev);
>         struct device *dev = &pdev->dev;
> @@ -346,13 +346,11 @@ static int cros_ec_cec_remove(struct platform_device *pdev)
>         cec_notifier_cec_adap_unregister(cros_ec_cec->notify,
>                                          cros_ec_cec->adap);
>         cec_unregister_adapter(cros_ec_cec->adap);
> -
> -       return 0;
>  }
>
>  static struct platform_driver cros_ec_cec_driver = {
>         .probe = cros_ec_cec_probe,
> -       .remove  = cros_ec_cec_remove,
> +       .remove_new = cros_ec_cec_remove,
>         .driver = {
>                 .name = DRV_NAME,
>                 .pm = &cros_ec_cec_pm_ops,
> --
> 2.39.2
>

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 002/117] media: cec-gpio: Convert to platform remove callback returning void
  2023-03-26 14:30 ` [PATCH 002/117] media: cec-gpio: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-03-26 14:49   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:49 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab; +Cc: kernel, linux-media

[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]

Hello,

On Sun, Mar 26, 2023 at 04:30:28PM +0200, Uwe Kleine-König wrote:
> 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.

I fatfingered sending out this series and this patch is a duplicate,
please ignore this patch, 001/117 with the otherwise same subject is the
right one. (They only differ in the number, this patch is advertised as
001 in the cover letter.)

Sorry,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 001/117] media: cros-ec-cec: Don't exit early in .remove() callback
  2023-03-26 14:30 ` [PATCH 001/117] media: cros-ec-cec: Don't exit early in .remove() callback Uwe Kleine-König
@ 2023-03-26 14:52   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-03-26 14:52 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab, Benson Leung, Ajye Huang,
	Rory Liu, Scott Chao
  Cc: Guenter Roeck, chrome-platform, kernel, linux-media

[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]

Hello,

On Sun, Mar 26, 2023 at 04:30:27PM +0200, Uwe Kleine-König wrote:
> Exiting early in remove without releasing all acquired resources yields
> leaks. Note that e.g. memory allocated with devm_zalloc() is freed after
> .remove() returns, even if the return code was negative.
> 
> While blocking_notifier_chain_unregister() won't fail and so the
> change is somewhat cosmetic, platform driver's .remove callbacks are
> about to be converted to return void. To prepare that, keep the error
> message but don't return early.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

I fatfingered sending out this series and this patch is a duplicate,
please ignore this patch, 002/117 with the otherwise same subject is the
right one. (They only differ in the number, this patch is advertised as
002 in the cover letter.)

Sorry,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 082/117] media: sun8i-di: Convert to platform remove callback returning void
  2023-03-26 14:31   ` Uwe Kleine-König
@ 2023-03-26 18:17     ` Jernej Škrabec
  -1 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:17 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Chen-Yu Tsai, Samuel Holland,
	Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:31:49 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 082/117] media: sun8i-di: Convert to platform remove callback returning void
@ 2023-03-26 18:17     ` Jernej Škrabec
  0 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:17 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Chen-Yu Tsai, Samuel Holland,
	Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:31:49 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 083/117] media: sun8i_rotate: Convert to platform remove callback returning void
  2023-03-26 14:31   ` Uwe Kleine-König
@ 2023-03-26 18:18     ` Jernej Škrabec
  -1 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:18 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Chen-Yu Tsai, Samuel Holland,
	Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:31:50 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 083/117] media: sun8i_rotate: Convert to platform remove callback returning void
@ 2023-03-26 18:18     ` Jernej Škrabec
  0 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:18 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Chen-Yu Tsai, Samuel Holland,
	Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:31:50 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 081/117] media: sun8i_a83t_mipi_csi2: Convert to platform remove callback returning void
  2023-03-26 14:31   ` Uwe Kleine-König
@ 2023-03-26 18:18     ` Jernej Škrabec
  -1 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:18 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Chen-Yu Tsai, Samuel Holland,
	Hans Verkuil, Paul Kocialkowski, Sakari Ailus, Maxime Ripard,
	Uwe Kleine-König, Christophe JAILLET, Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:31:48 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 081/117] media: sun8i_a83t_mipi_csi2: Convert to platform remove callback returning void
@ 2023-03-26 18:18     ` Jernej Škrabec
  0 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:18 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Chen-Yu Tsai, Samuel Holland,
	Hans Verkuil, Paul Kocialkowski, Sakari Ailus, Maxime Ripard,
	Uwe Kleine-König, Christophe JAILLET, Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:31:48 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 080/117] media: sun6i_mipi_csi2: Convert to platform remove callback returning void
  2023-03-26 14:31   ` Uwe Kleine-König
@ 2023-03-26 18:18     ` Jernej Škrabec
  -1 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:18 UTC (permalink / raw)
  To: Paul Kocialkowski, Mauro Carvalho Chehab, Chen-Yu Tsai,
	Samuel Holland, Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:31:47 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 080/117] media: sun6i_mipi_csi2: Convert to platform remove callback returning void
@ 2023-03-26 18:18     ` Jernej Škrabec
  0 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:18 UTC (permalink / raw)
  To: Paul Kocialkowski, Mauro Carvalho Chehab, Chen-Yu Tsai,
	Samuel Holland, Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:31:47 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 078/117] media: sun4i_csi: Convert to platform remove callback returning void
  2023-03-26 14:31   ` Uwe Kleine-König
@ 2023-03-26 18:19     ` Jernej Škrabec
  -1 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:19 UTC (permalink / raw)
  To: Maxime Ripard, Mauro Carvalho Chehab, Chen-Yu Tsai,
	Samuel Holland, Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:31:45 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 078/117] media: sun4i_csi: Convert to platform remove callback returning void
@ 2023-03-26 18:19     ` Jernej Škrabec
  0 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:19 UTC (permalink / raw)
  To: Maxime Ripard, Mauro Carvalho Chehab, Chen-Yu Tsai,
	Samuel Holland, Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:31:45 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 110/117] media: sunxi-cir: Convert to platform remove callback returning void
  2023-03-26 14:32   ` Uwe Kleine-König
@ 2023-03-26 18:19     ` Jernej Škrabec
  -1 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:19 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab, Chen-Yu Tsai, Samuel Holland,
	Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:32:17 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 110/117] media: sunxi-cir: Convert to platform remove callback returning void
@ 2023-03-26 18:19     ` Jernej Škrabec
  0 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:19 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab, Chen-Yu Tsai, Samuel Holland,
	Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:32:17 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 079/117] media: sun6i_csi: Convert to platform remove callback returning void
  2023-03-26 14:31   ` Uwe Kleine-König
@ 2023-03-26 18:19     ` Jernej Škrabec
  -1 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:19 UTC (permalink / raw)
  To: Yong Deng, Paul Kocialkowski, Mauro Carvalho Chehab,
	Chen-Yu Tsai, Samuel Holland, Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:31:46 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 079/117] media: sun6i_csi: Convert to platform remove callback returning void
@ 2023-03-26 18:19     ` Jernej Škrabec
  0 siblings, 0 replies; 255+ messages in thread
From: Jernej Škrabec @ 2023-03-26 18:19 UTC (permalink / raw)
  To: Yong Deng, Paul Kocialkowski, Mauro Carvalho Chehab,
	Chen-Yu Tsai, Samuel Holland, Uwe Kleine-König
  Cc: linux-media, linux-arm-kernel, linux-sunxi, kernel

Dne nedelja, 26. marec 2023 ob 16:31:46 CEST je Uwe Kleine-König napisal(a):
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 036/117] media: dw100: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 036/117] media: dw100: " Uwe Kleine-König
@ 2023-03-27  6:56   ` Xavier Roumegue (OSS)
  0 siblings, 0 replies; 255+ messages in thread
From: Xavier Roumegue (OSS) @ 2023-03-27  6:56 UTC (permalink / raw)
  To: Uwe Kleine-König, Mauro Carvalho Chehab; +Cc: linux-media, kernel

On 3/26/23 16:31, Uwe Kleine-König wrote:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>   drivers/media/platform/nxp/dw100/dw100.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/nxp/dw100/dw100.c b/drivers/media/platform/nxp/dw100/dw100.c
> index 189d60cd5ed1..6eed4bde9611 100644
> --- a/drivers/media/platform/nxp/dw100/dw100.c
> +++ b/drivers/media/platform/nxp/dw100/dw100.c
> @@ -1633,7 +1633,7 @@ static int dw100_probe(struct platform_device *pdev)
>   	return ret;
>   }
>   
> -static int dw100_remove(struct platform_device *pdev)
> +static void dw100_remove(struct platform_device *pdev)
>   {
>   	struct dw100_device *dw_dev = platform_get_drvdata(pdev);
>   
> @@ -1649,8 +1649,6 @@ static int dw100_remove(struct platform_device *pdev)
>   	mutex_destroy(dw_dev->vfd.lock);
>   	v4l2_m2m_release(dw_dev->m2m_dev);
>   	v4l2_device_unregister(&dw_dev->v4l2_dev);
> -
> -	return 0;
>   }
>   
>   static int __maybe_unused dw100_runtime_suspend(struct device *dev)
> @@ -1692,7 +1690,7 @@ MODULE_DEVICE_TABLE(of, dw100_dt_ids);
>   
>   static struct platform_driver dw100_driver = {
>   	.probe		= dw100_probe,
> -	.remove		= dw100_remove,
> +	.remove_new	= dw100_remove,
>   	.driver		= {
>   		.name	= DRV_NAME,
>   		.pm = &dw100_pm,

Reviewed-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 047/117] media: rcar-fcp: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 047/117] media: rcar-fcp: " Uwe Kleine-König
@ 2023-03-27  7:04   ` Geert Uytterhoeven
  0 siblings, 0 replies; 255+ messages in thread
From: Geert Uytterhoeven @ 2023-03-27  7:04 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Laurent Pinchart, Mauro Carvalho Chehab, linux-media,
	linux-renesas-soc, kernel

On Sun, Mar 26, 2023 at 4:33 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 049/117] media: rcar-core: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 049/117] media: rcar-core: " Uwe Kleine-König
@ 2023-03-27  7:09   ` Geert Uytterhoeven
  2023-03-27  8:47   ` Niklas Söderlund
  1 sibling, 0 replies; 255+ messages in thread
From: Geert Uytterhoeven @ 2023-03-27  7:09 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Niklas Söderlund, Mauro Carvalho Chehab, linux-media,
	linux-renesas-soc, kernel

On Sun, Mar 26, 2023 at 4:33 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 048/117] media: rcar-isp: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 048/117] media: rcar-isp: " Uwe Kleine-König
@ 2023-03-27  7:10   ` Geert Uytterhoeven
  2023-03-27  8:48   ` Niklas Söderlund
  1 sibling, 0 replies; 255+ messages in thread
From: Geert Uytterhoeven @ 2023-03-27  7:10 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Niklas Söderlund, Mauro Carvalho Chehab, linux-media,
	linux-renesas-soc, kernel

On Sun, Mar 26, 2023 at 4:33 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 053/117] media: rcar_jpu: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 053/117] media: rcar_jpu: " Uwe Kleine-König
@ 2023-03-27  7:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 255+ messages in thread
From: Geert Uytterhoeven @ 2023-03-27  7:11 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mikhail Ulyanov, Mauro Carvalho Chehab, linux-media,
	linux-renesas-soc, kernel

On Sun, Mar 26, 2023 at 4:33 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 058/117] media: vsp1_drv: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 058/117] media: vsp1_drv: " Uwe Kleine-König
@ 2023-03-27  7:11   ` Geert Uytterhoeven
  2023-03-27  8:41   ` Kieran Bingham
  1 sibling, 0 replies; 255+ messages in thread
From: Geert Uytterhoeven @ 2023-03-27  7:11 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Laurent Pinchart, Kieran Bingham, Mauro Carvalho Chehab,
	linux-media, linux-renesas-soc, kernel

On Sun, Mar 26, 2023 at 4:33 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 051/117] media: rcar_drif: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 051/117] media: rcar_drif: " Uwe Kleine-König
@ 2023-03-27  7:12   ` Geert Uytterhoeven
  2023-03-28 13:54   ` Fabrizio Castro
  1 sibling, 0 replies; 255+ messages in thread
From: Geert Uytterhoeven @ 2023-03-27  7:12 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Fabrizio Castro, Mauro Carvalho Chehab, linux-media,
	linux-renesas-soc, kernel

On Sun, Mar 26, 2023 at 4:33 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 052/117] media: rcar_fdp1: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 052/117] media: rcar_fdp1: " Uwe Kleine-König
@ 2023-03-27  7:12   ` Geert Uytterhoeven
  2023-03-27  8:39   ` Kieran Bingham
  1 sibling, 0 replies; 255+ messages in thread
From: Geert Uytterhoeven @ 2023-03-27  7:12 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Kieran Bingham, Mauro Carvalho Chehab, linux-media,
	linux-renesas-soc, kernel

On Sun, Mar 26, 2023 at 4:33 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 054/117] media: renesas-ceu: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 054/117] media: renesas-ceu: " Uwe Kleine-König
@ 2023-03-27  7:13   ` Geert Uytterhoeven
  0 siblings, 0 replies; 255+ messages in thread
From: Geert Uytterhoeven @ 2023-03-27  7:13 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Jacopo Mondi, Mauro Carvalho Chehab, linux-media,
	linux-renesas-soc, kernel

On Sun, Mar 26, 2023 at 4:33 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 050/117] media: rcar-csi2: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 050/117] media: rcar-csi2: " Uwe Kleine-König
@ 2023-03-27  7:13   ` Geert Uytterhoeven
  2023-03-27  8:49   ` Niklas Söderlund
  1 sibling, 0 replies; 255+ messages in thread
From: Geert Uytterhoeven @ 2023-03-27  7:13 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Niklas Söderlund, Mauro Carvalho Chehab, linux-media,
	linux-renesas-soc, kernel

On Sun, Mar 26, 2023 at 4:34 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 002/117] media: cros-ec-cec: Don't exit early in .remove() callback
  2023-03-26 14:30 ` [PATCH 002/117] media: cros-ec-cec: Don't exit early in .remove() callback Uwe Kleine-König
  2023-03-26 14:45   ` Guenter Roeck
@ 2023-03-27  7:52   ` Hans Verkuil
  1 sibling, 0 replies; 255+ messages in thread
From: Hans Verkuil @ 2023-03-27  7:52 UTC (permalink / raw)
  To: Uwe Kleine-König, Mauro Carvalho Chehab, Benson Leung,
	Ajye Huang, Scott Chao, Rory Liu
  Cc: Guenter Roeck, linux-media, chrome-platform, kernel

Just ignore this reply: for some reason this patch only ended up in my
private mailbox, but not on linux-media (and therefor also not in
patchwork). This should hopefully cause patchwork to pick it up.

Regards,

	Hans

On 26/03/2023 16:30, Uwe Kleine-König wrote:
> Exiting early in remove without releasing all acquired resources yields
> leaks. Note that e.g. memory allocated with devm_zalloc() is freed after
> .remove() returns, even if the return code was negative.
> 
> While blocking_notifier_chain_unregister() won't fail and so the
> change is somewhat cosmetic, platform driver's .remove callbacks are
> about to be converted to return void. To prepare that, keep the error
> message but don't return early.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
> index 6ebedc71d67d..960432230bbf 100644
> --- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
> +++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
> @@ -332,14 +332,16 @@ static int cros_ec_cec_remove(struct platform_device *pdev)
>  	struct device *dev = &pdev->dev;
>  	int ret;
>  
> +	/*
> +	 * blocking_notifier_chain_unregister() only fails if the notifier isn't
> +	 * in the list. We know it was added to it by .probe(), so there should
> +	 * be no need for error checking. Be cautious and still check.
> +	 */
>  	ret = blocking_notifier_chain_unregister(
>  			&cros_ec_cec->cros_ec->event_notifier,
>  			&cros_ec_cec->notifier);
> -
> -	if (ret) {
> +	if (ret)
>  		dev_err(dev, "failed to unregister notifier\n");
> -		return ret;
> -	}
>  
>  	cec_notifier_cec_adap_unregister(cros_ec_cec->notify,
>  					 cros_ec_cec->adap);


^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 071/117] media: s5p_mfc: Convert to platform remove callback returning void
  2023-03-26 14:31   ` Uwe Kleine-König
@ 2023-03-27  8:34     ` Andrzej Hajda
  -1 siblings, 0 replies; 255+ messages in thread
From: Andrzej Hajda @ 2023-03-27  8:34 UTC (permalink / raw)
  To: Uwe Kleine-König, Marek Szyprowski, Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, kernel



On 26.03.2023 16:31, Uwe Kleine-König wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>

Regards
Andrzej

> ---
>   drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
> index 9d2cce124a34..e30e54935d79 100644
> --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
> +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
> @@ -1431,7 +1431,7 @@ static int s5p_mfc_probe(struct platform_device *pdev)
>   }
>   
>   /* Remove the driver */
> -static int s5p_mfc_remove(struct platform_device *pdev)
> +static void s5p_mfc_remove(struct platform_device *pdev)
>   {
>   	struct s5p_mfc_dev *dev = platform_get_drvdata(pdev);
>   	struct s5p_mfc_ctx *ctx;
> @@ -1463,7 +1463,6 @@ static int s5p_mfc_remove(struct platform_device *pdev)
>   	s5p_mfc_unconfigure_dma_memory(dev);
>   
>   	s5p_mfc_final_pm(dev);
> -	return 0;
>   }
>   
>   #ifdef CONFIG_PM_SLEEP
> @@ -1690,7 +1689,7 @@ MODULE_DEVICE_TABLE(of, exynos_mfc_match);
>   
>   static struct platform_driver s5p_mfc_driver = {
>   	.probe		= s5p_mfc_probe,
> -	.remove		= s5p_mfc_remove,
> +	.remove_new	= s5p_mfc_remove,
>   	.driver	= {
>   		.name	= S5P_MFC_NAME,
>   		.pm	= &s5p_mfc_pm_ops,


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 071/117] media: s5p_mfc: Convert to platform remove callback returning void
@ 2023-03-27  8:34     ` Andrzej Hajda
  0 siblings, 0 replies; 255+ messages in thread
From: Andrzej Hajda @ 2023-03-27  8:34 UTC (permalink / raw)
  To: Uwe Kleine-König, Marek Szyprowski, Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, kernel



On 26.03.2023 16:31, Uwe Kleine-König wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>

Regards
Andrzej

> ---
>   drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
> index 9d2cce124a34..e30e54935d79 100644
> --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
> +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
> @@ -1431,7 +1431,7 @@ static int s5p_mfc_probe(struct platform_device *pdev)
>   }
>   
>   /* Remove the driver */
> -static int s5p_mfc_remove(struct platform_device *pdev)
> +static void s5p_mfc_remove(struct platform_device *pdev)
>   {
>   	struct s5p_mfc_dev *dev = platform_get_drvdata(pdev);
>   	struct s5p_mfc_ctx *ctx;
> @@ -1463,7 +1463,6 @@ static int s5p_mfc_remove(struct platform_device *pdev)
>   	s5p_mfc_unconfigure_dma_memory(dev);
>   
>   	s5p_mfc_final_pm(dev);
> -	return 0;
>   }
>   
>   #ifdef CONFIG_PM_SLEEP
> @@ -1690,7 +1689,7 @@ MODULE_DEVICE_TABLE(of, exynos_mfc_match);
>   
>   static struct platform_driver s5p_mfc_driver = {
>   	.probe		= s5p_mfc_probe,
> -	.remove		= s5p_mfc_remove,
> +	.remove_new	= s5p_mfc_remove,
>   	.driver	= {
>   		.name	= S5P_MFC_NAME,
>   		.pm	= &s5p_mfc_pm_ops,


^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 052/117] media: rcar_fdp1: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 052/117] media: rcar_fdp1: " Uwe Kleine-König
  2023-03-27  7:12   ` Geert Uytterhoeven
@ 2023-03-27  8:39   ` Kieran Bingham
  1 sibling, 0 replies; 255+ messages in thread
From: Kieran Bingham @ 2023-03-27  8:39 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Uwe Kleine-König
  Cc: linux-media, linux-renesas-soc, kernel

Quoting Uwe Kleine-König (2023-03-26 15:31:19)
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>


Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> ---
>  drivers/media/platform/renesas/rcar_fdp1.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/renesas/rcar_fdp1.c b/drivers/media/platform/renesas/rcar_fdp1.c
> index 37ecf489d112..d80b3214dfae 100644
> --- a/drivers/media/platform/renesas/rcar_fdp1.c
> +++ b/drivers/media/platform/renesas/rcar_fdp1.c
> @@ -2396,7 +2396,7 @@ static int fdp1_probe(struct platform_device *pdev)
>         return ret;
>  }
>  
> -static int fdp1_remove(struct platform_device *pdev)
> +static void fdp1_remove(struct platform_device *pdev)
>  {
>         struct fdp1_dev *fdp1 = platform_get_drvdata(pdev);
>  
> @@ -2404,8 +2404,6 @@ static int fdp1_remove(struct platform_device *pdev)
>         video_unregister_device(&fdp1->vfd);
>         v4l2_device_unregister(&fdp1->v4l2_dev);
>         pm_runtime_disable(&pdev->dev);
> -
> -       return 0;
>  }
>  
>  static int __maybe_unused fdp1_pm_runtime_suspend(struct device *dev)
> @@ -2441,7 +2439,7 @@ MODULE_DEVICE_TABLE(of, fdp1_dt_ids);
>  
>  static struct platform_driver fdp1_pdrv = {
>         .probe          = fdp1_probe,
> -       .remove         = fdp1_remove,
> +       .remove_new     = fdp1_remove,
>         .driver         = {
>                 .name   = DRIVER_NAME,
>                 .of_match_table = fdp1_dt_ids,
> -- 
> 2.39.2
>

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 058/117] media: vsp1_drv: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 058/117] media: vsp1_drv: " Uwe Kleine-König
  2023-03-27  7:11   ` Geert Uytterhoeven
@ 2023-03-27  8:41   ` Kieran Bingham
  1 sibling, 0 replies; 255+ messages in thread
From: Kieran Bingham @ 2023-03-27  8:41 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab, Uwe Kleine-König
  Cc: linux-media, linux-renesas-soc, kernel

Quoting Uwe Kleine-König (2023-03-26 15:31:25)
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> ---
>  drivers/media/platform/renesas/vsp1/vsp1_drv.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/renesas/vsp1/vsp1_drv.c b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> index 5710152d6511..c1c28f98bd10 100644
> --- a/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> +++ b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> @@ -977,7 +977,7 @@ static int vsp1_probe(struct platform_device *pdev)
>         return ret;
>  }
>  
> -static int vsp1_remove(struct platform_device *pdev)
> +static void vsp1_remove(struct platform_device *pdev)
>  {
>         struct vsp1_device *vsp1 = platform_get_drvdata(pdev);
>  
> @@ -985,8 +985,6 @@ static int vsp1_remove(struct platform_device *pdev)
>         rcar_fcp_put(vsp1->fcp);
>  
>         pm_runtime_disable(&pdev->dev);
> -
> -       return 0;
>  }
>  
>  static const struct of_device_id vsp1_of_match[] = {
> @@ -999,7 +997,7 @@ MODULE_DEVICE_TABLE(of, vsp1_of_match);
>  
>  static struct platform_driver vsp1_platform_driver = {
>         .probe          = vsp1_probe,
> -       .remove         = vsp1_remove,
> +       .remove_new     = vsp1_remove,
>         .driver         = {
>                 .name   = "vsp1",
>                 .pm     = &vsp1_pm_ops,
> -- 
> 2.39.2
>

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 114/117] media: vimc-core: Convert to platform remove callback returning void
  2023-03-26 14:32 ` [PATCH 114/117] media: vimc-core: " Uwe Kleine-König
@ 2023-03-27  8:42   ` Kieran Bingham
  2023-03-27 15:25     ` Shuah Khan
  0 siblings, 1 reply; 255+ messages in thread
From: Kieran Bingham @ 2023-03-27  8:42 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Shuah Khan, Uwe Kleine-König
  Cc: linux-media, kernel

Quoting Uwe Kleine-König (2023-03-26 15:32:21)
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> ---
>  drivers/media/test-drivers/vimc/vimc-core.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/test-drivers/vimc/vimc-core.c b/drivers/media/test-drivers/vimc/vimc-core.c
> index e82cfa5ffbf4..af127476e920 100644
> --- a/drivers/media/test-drivers/vimc/vimc-core.c
> +++ b/drivers/media/test-drivers/vimc/vimc-core.c
> @@ -387,7 +387,7 @@ static int vimc_probe(struct platform_device *pdev)
>         return 0;
>  }
>  
> -static int vimc_remove(struct platform_device *pdev)
> +static void vimc_remove(struct platform_device *pdev)
>  {
>         struct vimc_device *vimc = platform_get_drvdata(pdev);
>  
> @@ -397,8 +397,6 @@ static int vimc_remove(struct platform_device *pdev)
>         media_device_unregister(&vimc->mdev);
>         v4l2_device_unregister(&vimc->v4l2_dev);
>         v4l2_device_put(&vimc->v4l2_dev);
> -
> -       return 0;
>  }
>  
>  static void vimc_dev_release(struct device *dev)
> @@ -412,7 +410,7 @@ static struct platform_device vimc_pdev = {
>  
>  static struct platform_driver vimc_pdrv = {
>         .probe          = vimc_probe,
> -       .remove         = vimc_remove,
> +       .remove_new     = vimc_remove,
>         .driver         = {
>                 .name   = VIMC_PDEV_NAME,
>         },
> -- 
> 2.39.2
>

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 042/117] media: camss: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 042/117] media: camss: " Uwe Kleine-König
@ 2023-03-27  8:45   ` Konrad Dybcio
  0 siblings, 0 replies; 255+ messages in thread
From: Konrad Dybcio @ 2023-03-27  8:45 UTC (permalink / raw)
  To: Uwe Kleine-König, Robert Foss, Todor Tomov, Andy Gross,
	Bjorn Andersson, Mauro Carvalho Chehab
  Cc: linux-media, linux-arm-msm, kernel



On 26.03.2023 16:31, Uwe Kleine-König wrote:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/media/platform/qcom/camss/camss.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index 9cda284f1e71..df8a507ce8ac 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
> @@ -1725,7 +1725,7 @@ void camss_delete(struct camss *camss)
>   *
>   * Always returns 0.
>   */
> -static int camss_remove(struct platform_device *pdev)
> +static void camss_remove(struct platform_device *pdev)
>  {
>  	struct camss *camss = platform_get_drvdata(pdev);
>  
> @@ -1735,8 +1735,6 @@ static int camss_remove(struct platform_device *pdev)
>  
>  	if (atomic_read(&camss->ref_count) == 0)
>  		camss_delete(camss);
> -
> -	return 0;
>  }
>  
>  static const struct of_device_id camss_dt_match[] = {
> @@ -1798,7 +1796,7 @@ static const struct dev_pm_ops camss_pm_ops = {
>  
>  static struct platform_driver qcom_camss_driver = {
>  	.probe = camss_probe,
> -	.remove = camss_remove,
> +	.remove_new = camss_remove,
>  	.driver = {
>  		.name = "qcom-camss",
>  		.of_match_table = camss_dt_match,

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 043/117] media: venus: Warn only once about problems in .remove()
  2023-03-26 14:31 ` [PATCH 043/117] media: venus: Warn only once about problems in .remove() Uwe Kleine-König
@ 2023-03-27  8:45   ` Konrad Dybcio
  0 siblings, 0 replies; 255+ messages in thread
From: Konrad Dybcio @ 2023-03-27  8:45 UTC (permalink / raw)
  To: Uwe Kleine-König, Stanimir Varbanov, Vikash Garodia,
	Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab
  Cc: linux-media, linux-arm-msm, kernel



On 26.03.2023 16:31, Uwe Kleine-König wrote:
> The only effect of returning an error code in a remove callback is that
> the driver core emits a warning. The device is unbound anyhow.
> 
> As the remove callback already emits a (quite verbose) warning when ret
> is non-zero, return zero to suppress the additional warning.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/media/platform/qcom/venus/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index 990a1519f968..403ffb92af60 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -448,7 +448,7 @@ static int venus_remove(struct platform_device *pdev)
>  	mutex_destroy(&core->lock);
>  	venus_dbgfs_deinit(core);
>  
> -	return ret;
> +	return 0;
>  }
>  
>  static void venus_core_shutdown(struct platform_device *pdev)

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 044/117] media: venus: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 044/117] media: venus: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-03-27  8:45   ` Konrad Dybcio
  0 siblings, 0 replies; 255+ messages in thread
From: Konrad Dybcio @ 2023-03-27  8:45 UTC (permalink / raw)
  To: Uwe Kleine-König, Stanimir Varbanov, Vikash Garodia,
	Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab
  Cc: linux-media, linux-arm-msm, kernel



On 26.03.2023 16:31, Uwe Kleine-König wrote:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/media/platform/qcom/venus/core.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index 403ffb92af60..2ae867cb4c48 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -416,7 +416,7 @@ static int venus_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int venus_remove(struct platform_device *pdev)
> +static void venus_remove(struct platform_device *pdev)
>  {
>  	struct venus_core *core = platform_get_drvdata(pdev);
>  	const struct venus_pm_ops *pm_ops = core->pm_ops;
> @@ -447,8 +447,6 @@ static int venus_remove(struct platform_device *pdev)
>  	mutex_destroy(&core->pm_lock);
>  	mutex_destroy(&core->lock);
>  	venus_dbgfs_deinit(core);
> -
> -	return 0;
>  }
>  
>  static void venus_core_shutdown(struct platform_device *pdev)
> @@ -891,7 +889,7 @@ MODULE_DEVICE_TABLE(of, venus_dt_match);
>  
>  static struct platform_driver qcom_venus_driver = {
>  	.probe = venus_probe,
> -	.remove = venus_remove,
> +	.remove_new = venus_remove,
>  	.driver = {
>  		.name = "qcom-venus",
>  		.of_match_table = venus_dt_match,

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 045/117] media: vdec: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 045/117] media: vdec: " Uwe Kleine-König
@ 2023-03-27  8:46   ` Konrad Dybcio
  0 siblings, 0 replies; 255+ messages in thread
From: Konrad Dybcio @ 2023-03-27  8:46 UTC (permalink / raw)
  To: Uwe Kleine-König, Stanimir Varbanov, Vikash Garodia,
	Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab
  Cc: linux-media, linux-arm-msm, kernel



On 26.03.2023 16:31, Uwe Kleine-König wrote:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/media/platform/qcom/venus/vdec.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> index 4ceaba37e2e5..d47c22015770 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -1774,7 +1774,7 @@ static int vdec_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int vdec_remove(struct platform_device *pdev)
> +static void vdec_remove(struct platform_device *pdev)
>  {
>  	struct venus_core *core = dev_get_drvdata(pdev->dev.parent);
>  
> @@ -1783,8 +1783,6 @@ static int vdec_remove(struct platform_device *pdev)
>  
>  	if (core->pm_ops->vdec_put)
>  		core->pm_ops->vdec_put(core->dev_dec);
> -
> -	return 0;
>  }
>  
>  static __maybe_unused int vdec_runtime_suspend(struct device *dev)
> @@ -1825,7 +1823,7 @@ MODULE_DEVICE_TABLE(of, vdec_dt_match);
>  
>  static struct platform_driver qcom_venus_dec_driver = {
>  	.probe = vdec_probe,
> -	.remove = vdec_remove,
> +	.remove_new = vdec_remove,
>  	.driver = {
>  		.name = "qcom-venus-decoder",
>  		.of_match_table = vdec_dt_match,

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 046/117] media: venc: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 046/117] media: venc: " Uwe Kleine-König
@ 2023-03-27  8:46   ` Konrad Dybcio
  0 siblings, 0 replies; 255+ messages in thread
From: Konrad Dybcio @ 2023-03-27  8:46 UTC (permalink / raw)
  To: Uwe Kleine-König, Stanimir Varbanov, Vikash Garodia,
	Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab
  Cc: linux-media, linux-arm-msm, kernel



On 26.03.2023 16:31, Uwe Kleine-König wrote:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/media/platform/qcom/venus/venc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> index cdb12546c4fa..6d61614656a5 100644
> --- a/drivers/media/platform/qcom/venus/venc.c
> +++ b/drivers/media/platform/qcom/venus/venc.c
> @@ -1492,7 +1492,7 @@ static int venc_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int venc_remove(struct platform_device *pdev)
> +static void venc_remove(struct platform_device *pdev)
>  {
>  	struct venus_core *core = dev_get_drvdata(pdev->dev.parent);
>  
> @@ -1501,8 +1501,6 @@ static int venc_remove(struct platform_device *pdev)
>  
>  	if (core->pm_ops->venc_put)
>  		core->pm_ops->venc_put(core->dev_enc);
> -
> -	return 0;
>  }
>  
>  static __maybe_unused int venc_runtime_suspend(struct device *dev)
> @@ -1543,7 +1541,7 @@ MODULE_DEVICE_TABLE(of, venc_dt_match);
>  
>  static struct platform_driver qcom_venus_enc_driver = {
>  	.probe = venc_probe,
> -	.remove = venc_remove,
> +	.remove_new = venc_remove,
>  	.driver = {
>  		.name = "qcom-venus-encoder",
>  		.of_match_table = venc_dt_match,

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 049/117] media: rcar-core: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 049/117] media: rcar-core: " Uwe Kleine-König
  2023-03-27  7:09   ` Geert Uytterhoeven
@ 2023-03-27  8:47   ` Niklas Söderlund
  1 sibling, 0 replies; 255+ messages in thread
From: Niklas Söderlund @ 2023-03-27  8:47 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mauro Carvalho Chehab, linux-media, linux-renesas-soc, kernel

On 2023-03-26 16:31:16 +0200, Uwe Kleine-König wrote:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/media/platform/renesas/rcar-vin/rcar-core.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-core.c b/drivers/media/platform/renesas/rcar-vin/rcar-core.c
> index 5e53d6b7036c..1398f147e5c2 100644
> --- a/drivers/media/platform/renesas/rcar-vin/rcar-core.c
> +++ b/drivers/media/platform/renesas/rcar-vin/rcar-core.c
> @@ -1442,7 +1442,7 @@ static int rcar_vin_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int rcar_vin_remove(struct platform_device *pdev)
> +static void rcar_vin_remove(struct platform_device *pdev)
>  {
>  	struct rvin_dev *vin = platform_get_drvdata(pdev);
>  
> @@ -1458,8 +1458,6 @@ static int rcar_vin_remove(struct platform_device *pdev)
>  		rvin_parallel_cleanup(vin);
>  
>  	rvin_dma_unregister(vin);
> -
> -	return 0;
>  }
>  
>  static SIMPLE_DEV_PM_OPS(rvin_pm_ops, rvin_suspend, rvin_resume);
> @@ -1472,7 +1470,7 @@ static struct platform_driver rcar_vin_driver = {
>  		.of_match_table = rvin_of_id_table,
>  	},
>  	.probe = rcar_vin_probe,
> -	.remove = rcar_vin_remove,
> +	.remove_new = rcar_vin_remove,
>  };
>  
>  module_platform_driver(rcar_vin_driver);
> -- 
> 2.39.2
> 

-- 
Kind Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 048/117] media: rcar-isp: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 048/117] media: rcar-isp: " Uwe Kleine-König
  2023-03-27  7:10   ` Geert Uytterhoeven
@ 2023-03-27  8:48   ` Niklas Söderlund
  1 sibling, 0 replies; 255+ messages in thread
From: Niklas Söderlund @ 2023-03-27  8:48 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mauro Carvalho Chehab, linux-media, linux-renesas-soc, kernel

On 2023-03-26 16:31:15 +0200, Uwe Kleine-König wrote:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/media/platform/renesas/rcar-isp.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/renesas/rcar-isp.c b/drivers/media/platform/renesas/rcar-isp.c
> index 10b3474f93a4..27fe71931a04 100644
> --- a/drivers/media/platform/renesas/rcar-isp.c
> +++ b/drivers/media/platform/renesas/rcar-isp.c
> @@ -503,7 +503,7 @@ static int risp_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int risp_remove(struct platform_device *pdev)
> +static void risp_remove(struct platform_device *pdev)
>  {
>  	struct rcar_isp *isp = platform_get_drvdata(pdev);
>  
> @@ -515,8 +515,6 @@ static int risp_remove(struct platform_device *pdev)
>  	pm_runtime_disable(&pdev->dev);
>  
>  	mutex_destroy(&isp->lock);
> -
> -	return 0;
>  }
>  
>  static struct platform_driver rcar_isp_driver = {
> @@ -525,7 +523,7 @@ static struct platform_driver rcar_isp_driver = {
>  		.of_match_table = risp_of_id_table,
>  	},
>  	.probe = risp_probe,
> -	.remove = risp_remove,
> +	.remove_new = risp_remove,
>  };
>  
>  module_platform_driver(rcar_isp_driver);
> -- 
> 2.39.2
> 

-- 
Kind Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 050/117] media: rcar-csi2: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 050/117] media: rcar-csi2: " Uwe Kleine-König
  2023-03-27  7:13   ` Geert Uytterhoeven
@ 2023-03-27  8:49   ` Niklas Söderlund
  1 sibling, 0 replies; 255+ messages in thread
From: Niklas Söderlund @ 2023-03-27  8:49 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mauro Carvalho Chehab, linux-media, linux-renesas-soc, kernel

On 2023-03-26 16:31:17 +0200, Uwe Kleine-König wrote:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/media/platform/renesas/rcar-vin/rcar-csi2.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-csi2.c b/drivers/media/platform/renesas/rcar-vin/rcar-csi2.c
> index 174aa6176f54..1632c9a53ac4 100644
> --- a/drivers/media/platform/renesas/rcar-vin/rcar-csi2.c
> +++ b/drivers/media/platform/renesas/rcar-vin/rcar-csi2.c
> @@ -1574,7 +1574,7 @@ static int rcsi2_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int rcsi2_remove(struct platform_device *pdev)
> +static void rcsi2_remove(struct platform_device *pdev)
>  {
>  	struct rcar_csi2 *priv = platform_get_drvdata(pdev);
>  
> @@ -1585,12 +1585,10 @@ static int rcsi2_remove(struct platform_device *pdev)
>  	pm_runtime_disable(&pdev->dev);
>  
>  	mutex_destroy(&priv->lock);
> -
> -	return 0;
>  }
>  
>  static struct platform_driver rcar_csi2_pdrv = {
> -	.remove	= rcsi2_remove,
> +	.remove_new = rcsi2_remove,
>  	.probe	= rcsi2_probe,
>  	.driver	= {
>  		.name	= "rcar-csi2",
> -- 
> 2.39.2
> 

-- 
Kind Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 070/117] media: jpeg-core: Convert to platform remove callback returning void
  2023-03-26 14:31   ` Uwe Kleine-König
@ 2023-03-27 12:31     ` Andrzej Pietrasiewicz
  -1 siblings, 0 replies; 255+ messages in thread
From: Andrzej Pietrasiewicz @ 2023-03-27 12:31 UTC (permalink / raw)
  To: Uwe Kleine-König, Jacek Anaszewski, Sylwester Nawrocki,
	Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, kernel

Hi Uwe,

W dniu 26.03.2023 o 16:31, Uwe Kleine-König pisze:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>

> ---
>   drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
> index 55814041b8d8..c3c7e48f1b6e 100644
> --- a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
> +++ b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
> @@ -2991,7 +2991,7 @@ static int s5p_jpeg_probe(struct platform_device *pdev)
>   	return ret;
>   }
>   
> -static int s5p_jpeg_remove(struct platform_device *pdev)
> +static void s5p_jpeg_remove(struct platform_device *pdev)
>   {
>   	struct s5p_jpeg *jpeg = platform_get_drvdata(pdev);
>   	int i;
> @@ -3008,8 +3008,6 @@ static int s5p_jpeg_remove(struct platform_device *pdev)
>   		for (i = jpeg->variant->num_clocks - 1; i >= 0; i--)
>   			clk_disable_unprepare(jpeg->clocks[i]);
>   	}
> -
> -	return 0;
>   }
>   
>   #ifdef CONFIG_PM
> @@ -3164,7 +3162,7 @@ static void *jpeg_get_drv_data(struct device *dev)
>   
>   static struct platform_driver s5p_jpeg_driver = {
>   	.probe = s5p_jpeg_probe,
> -	.remove = s5p_jpeg_remove,
> +	.remove_new = s5p_jpeg_remove,
>   	.driver = {
>   		.of_match_table	= of_match_ptr(samsung_jpeg_match),
>   		.name		= S5P_JPEG_M2M_NAME,

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 070/117] media: jpeg-core: Convert to platform remove callback returning void
@ 2023-03-27 12:31     ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 255+ messages in thread
From: Andrzej Pietrasiewicz @ 2023-03-27 12:31 UTC (permalink / raw)
  To: Uwe Kleine-König, Jacek Anaszewski, Sylwester Nawrocki,
	Mauro Carvalho Chehab
  Cc: linux-arm-kernel, linux-media, kernel

Hi Uwe,

W dniu 26.03.2023 o 16:31, Uwe Kleine-König pisze:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>

> ---
>   drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
> index 55814041b8d8..c3c7e48f1b6e 100644
> --- a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
> +++ b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
> @@ -2991,7 +2991,7 @@ static int s5p_jpeg_probe(struct platform_device *pdev)
>   	return ret;
>   }
>   
> -static int s5p_jpeg_remove(struct platform_device *pdev)
> +static void s5p_jpeg_remove(struct platform_device *pdev)
>   {
>   	struct s5p_jpeg *jpeg = platform_get_drvdata(pdev);
>   	int i;
> @@ -3008,8 +3008,6 @@ static int s5p_jpeg_remove(struct platform_device *pdev)
>   		for (i = jpeg->variant->num_clocks - 1; i >= 0; i--)
>   			clk_disable_unprepare(jpeg->clocks[i]);
>   	}
> -
> -	return 0;
>   }
>   
>   #ifdef CONFIG_PM
> @@ -3164,7 +3162,7 @@ static void *jpeg_get_drv_data(struct device *dev)
>   
>   static struct platform_driver s5p_jpeg_driver = {
>   	.probe = s5p_jpeg_probe,
> -	.remove = s5p_jpeg_remove,
> +	.remove_new = s5p_jpeg_remove,
>   	.driver = {
>   		.of_match_table	= of_match_ptr(samsung_jpeg_match),
>   		.name		= S5P_JPEG_M2M_NAME,

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 114/117] media: vimc-core: Convert to platform remove callback returning void
  2023-03-27  8:42   ` Kieran Bingham
@ 2023-03-27 15:25     ` Shuah Khan
  0 siblings, 0 replies; 255+ messages in thread
From: Shuah Khan @ 2023-03-27 15:25 UTC (permalink / raw)
  To: Kieran Bingham, Mauro Carvalho Chehab, Uwe Kleine-König
  Cc: linux-media, kernel, Shuah Khan

On 3/27/23 02:42, Kieran Bingham wrote:
> Quoting Uwe Kleine-König (2023-03-26 15:32:21)
>> 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.
>>
>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> 

Looks good to me.

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>

Mauro,
How would like to handle this patch in this 100+ patch series? I can
send pull request for it as usual. It might be easier for you to pull
this in with my Reviewed-by ? Let me know.

thanks,
-- Shuah


^ permalink raw reply	[flat|nested] 255+ messages in thread

* RE: [PATCH 051/117] media: rcar_drif: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 051/117] media: rcar_drif: " Uwe Kleine-König
  2023-03-27  7:12   ` Geert Uytterhoeven
@ 2023-03-28 13:54   ` Fabrizio Castro
  1 sibling, 0 replies; 255+ messages in thread
From: Fabrizio Castro @ 2023-03-28 13:54 UTC (permalink / raw)
  To: Uwe Kleine-König, Mauro Carvalho Chehab
  Cc: linux-media, linux-renesas-soc, 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 (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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>


> ---
>  drivers/media/platform/renesas/rcar_drif.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/platform/renesas/rcar_drif.c
> b/drivers/media/platform/renesas/rcar_drif.c
> index 3fec41f6e964..3a92f4535c18 100644
> --- a/drivers/media/platform/renesas/rcar_drif.c
> +++ b/drivers/media/platform/renesas/rcar_drif.c
> @@ -1433,19 +1433,17 @@ static int rcar_drif_probe(struct
> platform_device *pdev)
>  }
> 
>  /* DRIF channel remove */
> -static int rcar_drif_remove(struct platform_device *pdev)
> +static void rcar_drif_remove(struct platform_device *pdev)
>  {
>  	struct rcar_drif *ch = platform_get_drvdata(pdev);
>  	struct rcar_drif_sdr *sdr = ch->sdr;
> 
>  	/* Channel 0 will be the SDR instance */
>  	if (ch->num)
> -		return 0;
> +		return;
> 
>  	/* SDR instance */
>  	rcar_drif_sdr_remove(sdr);
> -
> -	return 0;
>  }
> 
>  /* FIXME: Implement suspend/resume support */
> @@ -1476,7 +1474,7 @@ static struct platform_driver rcar_drif_driver =
> {
>  		.pm = &rcar_drif_pm_ops,
>  		},
>  	.probe = rcar_drif_probe,
> -	.remove = rcar_drif_remove,
> +	.remove_new = rcar_drif_remove,
>  };
> 
>  module_platform_driver(rcar_drif_driver);
> --
> 2.39.2


^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 069/117] media: g2d: Convert to platform remove callback returning void
       [not found]   ` <CGME20230403095327eucas1p1095d54fc1e1b89d61d9e974b3cbea853@eucas1p1.samsung.com>
@ 2023-04-03  9:53       ` Lukasz Stelmach
  0 siblings, 0 replies; 255+ messages in thread
From: Lukasz Stelmach @ 2023-04-03  9:53 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mauro Carvalho Chehab, linux-arm-kernel, linux-media, kernel,
	Marek Szyprowski

[-- Attachment #1: Type: text/plain, Size: 2029 bytes --]

It was <2023-03-26 nie 16:31>, when Uwe Kleine-König wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/media/platform/samsung/s5p-g2d/g2d.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>

Reviewed-by: Łukasz Stelmach <l.stelmach@samsung.com>

> diff --git a/drivers/media/platform/samsung/s5p-g2d/g2d.c b/drivers/media/platform/samsung/s5p-g2d/g2d.c
> index dd8864779a7c..89aeba47ed07 100644
> --- a/drivers/media/platform/samsung/s5p-g2d/g2d.c
> +++ b/drivers/media/platform/samsung/s5p-g2d/g2d.c
> @@ -740,7 +740,7 @@ static int g2d_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int g2d_remove(struct platform_device *pdev)
> +static void g2d_remove(struct platform_device *pdev)
>  {
>  	struct g2d_dev *dev = platform_get_drvdata(pdev);
>  
> @@ -753,7 +753,6 @@ static int g2d_remove(struct platform_device *pdev)
>  	clk_put(dev->gate);
>  	clk_unprepare(dev->clk);
>  	clk_put(dev->clk);
> -	return 0;
>  }
>  
>  static struct g2d_variant g2d_drvdata_v3x = {
> @@ -778,7 +777,7 @@ MODULE_DEVICE_TABLE(of, exynos_g2d_match);
>  
>  static struct platform_driver g2d_pdrv = {
>  	.probe		= g2d_probe,
> -	.remove		= g2d_remove,
> +	.remove_new	= g2d_remove,
>  	.driver		= {
>  		.name = G2D_NAME,
>  		.of_match_table = exynos_g2d_match,

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 069/117] media: g2d: Convert to platform remove callback returning void
@ 2023-04-03  9:53       ` Lukasz Stelmach
  0 siblings, 0 replies; 255+ messages in thread
From: Lukasz Stelmach @ 2023-04-03  9:53 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mauro Carvalho Chehab, linux-arm-kernel, linux-media, kernel,
	Marek Szyprowski


[-- Attachment #1.1: Type: text/plain, Size: 2029 bytes --]

It was <2023-03-26 nie 16:31>, when Uwe Kleine-König wrote:
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/media/platform/samsung/s5p-g2d/g2d.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>

Reviewed-by: Łukasz Stelmach <l.stelmach@samsung.com>

> diff --git a/drivers/media/platform/samsung/s5p-g2d/g2d.c b/drivers/media/platform/samsung/s5p-g2d/g2d.c
> index dd8864779a7c..89aeba47ed07 100644
> --- a/drivers/media/platform/samsung/s5p-g2d/g2d.c
> +++ b/drivers/media/platform/samsung/s5p-g2d/g2d.c
> @@ -740,7 +740,7 @@ static int g2d_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int g2d_remove(struct platform_device *pdev)
> +static void g2d_remove(struct platform_device *pdev)
>  {
>  	struct g2d_dev *dev = platform_get_drvdata(pdev);
>  
> @@ -753,7 +753,6 @@ static int g2d_remove(struct platform_device *pdev)
>  	clk_put(dev->gate);
>  	clk_unprepare(dev->clk);
>  	clk_put(dev->clk);
> -	return 0;
>  }
>  
>  static struct g2d_variant g2d_drvdata_v3x = {
> @@ -778,7 +777,7 @@ MODULE_DEVICE_TABLE(of, exynos_g2d_match);
>  
>  static struct platform_driver g2d_pdrv = {
>  	.probe		= g2d_probe,
> -	.remove		= g2d_remove,
> +	.remove_new	= g2d_remove,
>  	.driver		= {
>  		.name = G2D_NAME,
>  		.of_match_table = exynos_g2d_match,

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 018/117] media: atmel-isi: Convert to platform remove callback returning void
  2023-03-26 14:30   ` Uwe Kleine-König
@ 2023-04-03 11:32     ` Nicolas Ferre
  -1 siblings, 0 replies; 255+ messages in thread
From: Nicolas Ferre @ 2023-04-03 11:32 UTC (permalink / raw)
  To: Uwe Kleine-König, Eugen Hristev, Mauro Carvalho Chehab,
	Alexandre Belloni, Claudiu Beznea, Balamanikandan Gunasundar
  Cc: linux-media, linux-arm-kernel, kernel

On 26/03/2023 at 16:30, Uwe Kleine-König wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks. Best regards,
   Nicolas

> ---
>   drivers/media/platform/atmel/atmel-isi.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/atmel/atmel-isi.c b/drivers/media/platform/atmel/atmel-isi.c
> index 4d15814e4481..b063f980f9e0 100644
> --- a/drivers/media/platform/atmel/atmel-isi.c
> +++ b/drivers/media/platform/atmel/atmel-isi.c
> @@ -1317,7 +1317,7 @@ static int atmel_isi_probe(struct platform_device *pdev)
>          return ret;
>   }
> 
> -static int atmel_isi_remove(struct platform_device *pdev)
> +static void atmel_isi_remove(struct platform_device *pdev)
>   {
>          struct atmel_isi *isi = platform_get_drvdata(pdev);
> 
> @@ -1329,8 +1329,6 @@ static int atmel_isi_remove(struct platform_device *pdev)
>          v4l2_async_nf_unregister(&isi->notifier);
>          v4l2_async_nf_cleanup(&isi->notifier);
>          v4l2_device_unregister(&isi->v4l2_dev);
> -
> -       return 0;
>   }
> 
>   #ifdef CONFIG_PM
> @@ -1368,7 +1366,7 @@ static struct platform_driver atmel_isi_driver = {
>                  .pm     = &atmel_isi_dev_pm_ops,
>          },
>          .probe          = atmel_isi_probe,
> -       .remove         = atmel_isi_remove,
> +       .remove_new     = atmel_isi_remove,
>   };
> 
>   module_platform_driver(atmel_isi_driver);
> --
> 2.39.2
> 

-- 
Nicolas Ferre


^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 018/117] media: atmel-isi: Convert to platform remove callback returning void
@ 2023-04-03 11:32     ` Nicolas Ferre
  0 siblings, 0 replies; 255+ messages in thread
From: Nicolas Ferre @ 2023-04-03 11:32 UTC (permalink / raw)
  To: Uwe Kleine-König, Eugen Hristev, Mauro Carvalho Chehab,
	Alexandre Belloni, Claudiu Beznea, Balamanikandan Gunasundar
  Cc: linux-media, linux-arm-kernel, kernel

On 26/03/2023 at 16:30, Uwe Kleine-König wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks. Best regards,
   Nicolas

> ---
>   drivers/media/platform/atmel/atmel-isi.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/atmel/atmel-isi.c b/drivers/media/platform/atmel/atmel-isi.c
> index 4d15814e4481..b063f980f9e0 100644
> --- a/drivers/media/platform/atmel/atmel-isi.c
> +++ b/drivers/media/platform/atmel/atmel-isi.c
> @@ -1317,7 +1317,7 @@ static int atmel_isi_probe(struct platform_device *pdev)
>          return ret;
>   }
> 
> -static int atmel_isi_remove(struct platform_device *pdev)
> +static void atmel_isi_remove(struct platform_device *pdev)
>   {
>          struct atmel_isi *isi = platform_get_drvdata(pdev);
> 
> @@ -1329,8 +1329,6 @@ static int atmel_isi_remove(struct platform_device *pdev)
>          v4l2_async_nf_unregister(&isi->notifier);
>          v4l2_async_nf_cleanup(&isi->notifier);
>          v4l2_device_unregister(&isi->v4l2_dev);
> -
> -       return 0;
>   }
> 
>   #ifdef CONFIG_PM
> @@ -1368,7 +1366,7 @@ static struct platform_driver atmel_isi_driver = {
>                  .pm     = &atmel_isi_dev_pm_ops,
>          },
>          .probe          = atmel_isi_probe,
> -       .remove         = atmel_isi_remove,
> +       .remove_new     = atmel_isi_remove,
>   };
> 
>   module_platform_driver(atmel_isi_driver);
> --
> 2.39.2
> 

-- 
Nicolas Ferre


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 005/117] media: ao-cec: Convert to platform remove callback returning void
  2023-03-26 14:30   ` Uwe Kleine-König
  (?)
@ 2023-04-03 20:39     ` Martin Blumenstingl
  -1 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:39 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab,
	Kevin Hilman, Jerome Brunet, linux-media, linux-amlogic,
	linux-arm-kernel, kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 005/117] media: ao-cec: Convert to platform remove callback returning void
@ 2023-04-03 20:39     ` Martin Blumenstingl
  0 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:39 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab,
	Kevin Hilman, Jerome Brunet, linux-media, linux-amlogic,
	linux-arm-kernel, kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 005/117] media: ao-cec: Convert to platform remove callback returning void
@ 2023-04-03 20:39     ` Martin Blumenstingl
  0 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:39 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab,
	Kevin Hilman, Jerome Brunet, linux-media, linux-amlogic,
	linux-arm-kernel, kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 004/117] media: ao-cec-g12a: Convert to platform remove callback returning void
  2023-03-26 14:30   ` Uwe Kleine-König
  (?)
@ 2023-04-03 20:39     ` Martin Blumenstingl
  -1 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:39 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab,
	Kevin Hilman, Jerome Brunet, linux-media, linux-amlogic,
	linux-arm-kernel, kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 004/117] media: ao-cec-g12a: Convert to platform remove callback returning void
@ 2023-04-03 20:39     ` Martin Blumenstingl
  0 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:39 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab,
	Kevin Hilman, Jerome Brunet, linux-media, linux-amlogic,
	linux-arm-kernel, kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 004/117] media: ao-cec-g12a: Convert to platform remove callback returning void
@ 2023-04-03 20:39     ` Martin Blumenstingl
  0 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:39 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Neil Armstrong, Hans Verkuil, Mauro Carvalho Chehab,
	Kevin Hilman, Jerome Brunet, linux-media, linux-amlogic,
	linux-arm-kernel, kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 014/117] media: ge2d: Convert to platform remove callback returning void
  2023-03-26 14:30   ` Uwe Kleine-König
  (?)
@ 2023-04-03 20:40     ` Martin Blumenstingl
  -1 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:40 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Neil Armstrong, Mauro Carvalho Chehab, Kevin Hilman,
	Jerome Brunet, linux-media, linux-amlogic, linux-arm-kernel,
	kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 014/117] media: ge2d: Convert to platform remove callback returning void
@ 2023-04-03 20:40     ` Martin Blumenstingl
  0 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:40 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Neil Armstrong, Mauro Carvalho Chehab, Kevin Hilman,
	Jerome Brunet, linux-media, linux-amlogic, linux-arm-kernel,
	kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 014/117] media: ge2d: Convert to platform remove callback returning void
@ 2023-04-03 20:40     ` Martin Blumenstingl
  0 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:40 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Neil Armstrong, Mauro Carvalho Chehab, Kevin Hilman,
	Jerome Brunet, linux-media, linux-amlogic, linux-arm-kernel,
	kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 106/117] media: meson-ir-tx: Convert to platform remove callback returning void
  2023-03-26 14:32   ` Uwe Kleine-König
  (?)
@ 2023-04-03 20:40     ` Martin Blumenstingl
  -1 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:40 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Sean Young, Mauro Carvalho Chehab, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, linux-media, linux-arm-kernel, linux-amlogic,
	kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 106/117] media: meson-ir-tx: Convert to platform remove callback returning void
@ 2023-04-03 20:40     ` Martin Blumenstingl
  0 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:40 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Sean Young, Mauro Carvalho Chehab, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, linux-media, linux-arm-kernel, linux-amlogic,
	kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 106/117] media: meson-ir-tx: Convert to platform remove callback returning void
@ 2023-04-03 20:40     ` Martin Blumenstingl
  0 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:40 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Sean Young, Mauro Carvalho Chehab, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, linux-media, linux-arm-kernel, linux-amlogic,
	kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 107/117] media: meson-ir: Convert to platform remove callback returning void
  2023-03-26 14:32   ` Uwe Kleine-König
  (?)
@ 2023-04-03 20:41     ` Martin Blumenstingl
  -1 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:41 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Sean Young, Mauro Carvalho Chehab, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, linux-media, linux-arm-kernel, linux-amlogic,
	kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 107/117] media: meson-ir: Convert to platform remove callback returning void
@ 2023-04-03 20:41     ` Martin Blumenstingl
  0 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:41 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Sean Young, Mauro Carvalho Chehab, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, linux-media, linux-arm-kernel, linux-amlogic,
	kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 107/117] media: meson-ir: Convert to platform remove callback returning void
@ 2023-04-03 20:41     ` Martin Blumenstingl
  0 siblings, 0 replies; 255+ messages in thread
From: Martin Blumenstingl @ 2023-04-03 20:41 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Sean Young, Mauro Carvalho Chehab, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, linux-media, linux-arm-kernel, linux-amlogic,
	kernel

On Sun, Mar 26, 2023 at 4:32 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 010/117] media: tegra_cec: Convert to platform remove callback returning void
  2023-03-26 14:30 ` [PATCH 010/117] media: tegra_cec: " Uwe Kleine-König
@ 2023-04-04 10:38   ` Thierry Reding
  0 siblings, 0 replies; 255+ messages in thread
From: Thierry Reding @ 2023-04-04 10:38 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Hans Verkuil, Mauro Carvalho Chehab, Jonathan Hunter,
	linux-tegra, linux-media, kernel

[-- Attachment #1: Type: text/plain, Size: 891 bytes --]

On Sun, Mar 26, 2023 at 04:30:37PM +0200, Uwe Kleine-König wrote:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/media/cec/platform/tegra/tegra_cec.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 035/117] media: vde: Convert to platform remove callback returning void
  2023-03-26 14:31 ` [PATCH 035/117] media: vde: " Uwe Kleine-König
@ 2023-04-04 10:39   ` Thierry Reding
  0 siblings, 0 replies; 255+ messages in thread
From: Thierry Reding @ 2023-04-04 10:39 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Dmitry Osipenko, Mauro Carvalho Chehab, Jonathan Hunter,
	linux-media, linux-tegra, kernel

[-- Attachment #1: Type: text/plain, Size: 892 bytes --]

On Sun, Mar 26, 2023 at 04:31:02PM +0200, Uwe Kleine-König wrote:
> 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.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/media/platform/nvidia/tegra-vde/vde.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 000/117] media: Convert to platform remove callback returning void
  2023-03-26 14:30 ` Uwe Kleine-König
@ 2023-04-17  6:02   ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-04-17  6:02 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: linux-aspeed, Alim Akhtar, Hans Verkuil, Benson Leung,
	Ajye Huang, Rory Liu, Scott Chao, Neil Armstrong, Kevin Hilman,
	Marek Szyprowski, Ettore Chimenti, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Sean Young, Sakari Ailus, Ricardo Ribalda,
	Laurent Pinchart, Yang Yingliang, Thierry Reding,
	Jonathan Hunter, Antti Palosaari, Michael Tretter, Ming Qian,
	Zhou Peng, Eddie James, Joel Stanley, Eugen Hristev,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Maxime Ripard,
	Philipp Zabel, Bin Liu, Matthias Brugger, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Moudy Ho, Qiheng Lin, Tiffany Lin,
	Yunfei Dong, Dmitry Osipenko, Xavier Roumegue, Mirela Rabulea,
	Shawn Guo, Sascha Hauer, Rui Miguel Silva, Robert Foss,
	Todor Tomov, Andy Gross, Bjorn Andersson, Stanimir Varbanov,
	Vikash Garodia, Niklas Söderlund, Fabrizio Castro,
	Kieran Bingham, Mikhail Ulyanov, Jacopo Mondi, Lad Prabhakar,
	Nathan Chancellor, Yang Li, Dan Carpenter, Jacob Chen,
	Ezequiel Garcia, Heiko Stuebner, Dafna Hirschfeld,
	Krzysztof Kozlowski, Colin Ian King, Sylwester Nawrocki,
	Sylwester Nawrocki, Łukasz Stelmach, Andrzej Pietrasiewicz,
	Jacek Anaszewski, Andrzej Hajda, Fabien Dessenne,
	Patrice Chotard, Hugues Fruchet, Jean-Christophe Trotin,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Yong Deng,
	Paul Kocialkowski, Christophe JAILLET, Lad, Prabhakar,
	Benoit Parrot, Hyun Kwon, Michal Simek, ye xingchen,
	Eduardo Valentin, Sean Wang, Daniel W. S. Almeida, Shuah Khan,
	Daniel Almeida, Hans Verkuil, Guenter Roeck, Fabio Estevam,
	linux-stm32, Jerome Brunet, chrome-platform, linux-samsung-soc,
	Konrad Dybcio, openbmc, Kieran Bingham, linux-rockchip,
	NXP Linux Team, linux-sunxi, linux-media, Martin Blumenstingl,
	linux-arm-msm, linux-mediatek, linux-tegra, linux-amlogic,
	linux-arm-kernel, AngeloGioacchino Del Regno, Andrew Jeffery,
	linux-renesas-soc, kernel

[-- Attachment #1: Type: text/plain, Size: 1863 bytes --]

Hello Mauro

On Sun, Mar 26, 2023 at 04:30:25PM +0200, Uwe Kleine-König wrote:
> Hello,
> 
> this series adapts the platform drivers below drivers/pci to use the

copy&paste failure here: s/pci/media/ of course.

> .remove_new() callback. Compared to the traditional .remove() callback
> .remove_new() returns no value. This is a good thing because the driver core
> doesn't (and cannot) cope for errors during remove. The only effect of a
> non-zero return value in .remove() is that the driver core emits a warning. The
> device is removed anyhow and an early return from .remove() usually yields a
> resource leak.
> 
> By changing the remove callback to return void driver authors cannot
> reasonably assume any more that there is some kind of cleanup later.
> 
> Only three drivers needed some preparation first to make sure they
> return 0 unconditionally in their remove callback. Then all drivers
> could be trivially converted without side effects to .remove_new().
> 
> The changes to the individual drivers are all orthogonal. If I need to
> resend some patches because of some review feedback, I'd like to only
> send the patches that actually needed changes, so please pick up the
> remaining patches that don't need changing to reduce the amount of mail.

I didn't hear anything back about application of this series. Is there a
blocker somewhere?

Apart from the three preparatory patches that are a precondition to the
conversion of the respective drivers, the patches are all pairwise
orthogonal. So from my POV the best would be to apply all patches that
still apply (which might be all), I will care for the fallout later
then.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 000/117] media: Convert to platform remove callback returning void
@ 2023-04-17  6:02   ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-04-17  6:02 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: linux-aspeed, Alim Akhtar, Hans Verkuil, Benson Leung,
	Ajye Huang, Rory Liu, Scott Chao, Neil Armstrong, Kevin Hilman,
	Marek Szyprowski, Ettore Chimenti, Alain Volmat, Maxime Coquelin,
	Alexandre Torgue, Sean Young, Sakari Ailus, Ricardo Ribalda,
	Laurent Pinchart, Yang Yingliang, Thierry Reding,
	Jonathan Hunter, Antti Palosaari, Michael Tretter, Ming Qian,
	Zhou Peng, Eddie James, Joel Stanley, Eugen Hristev,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Maxime Ripard,
	Philipp Zabel, Bin Liu, Matthias Brugger, Minghsiu Tsai,
	Houlong Wei, Andrew-CT Chen, Moudy Ho, Qiheng Lin, Tiffany Lin,
	Yunfei Dong, Dmitry Osipenko, Xavier Roumegue, Mirela Rabulea,
	Shawn Guo, Sascha Hauer, Rui Miguel Silva, Robert Foss,
	Todor Tomov, Andy Gross, Bjorn Andersson, Stanimir Varbanov,
	Vikash Garodia, Niklas Söderlund, Fabrizio Castro,
	Kieran Bingham, Mikhail Ulyanov, Jacopo Mondi, Lad Prabhakar,
	Nathan Chancellor, Yang Li, Dan Carpenter, Jacob Chen,
	Ezequiel Garcia, Heiko Stuebner, Dafna Hirschfeld,
	Krzysztof Kozlowski, Colin Ian King, Sylwester Nawrocki,
	Sylwester Nawrocki, Łukasz Stelmach, Andrzej Pietrasiewicz,
	Jacek Anaszewski, Andrzej Hajda, Fabien Dessenne,
	Patrice Chotard, Hugues Fruchet, Jean-Christophe Trotin,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Yong Deng,
	Paul Kocialkowski, Christophe JAILLET, Lad, Prabhakar,
	Benoit Parrot, Hyun Kwon, Michal Simek, ye xingchen,
	Eduardo Valentin, Sean Wang, Daniel W. S. Almeida, Shuah Khan,
	Daniel Almeida, Hans Verkuil, Guenter Roeck, Fabio Estevam,
	linux-stm32, Jerome Brunet, chrome-platform, linux-samsung-soc,
	Konrad Dybcio, openbmc, Kieran Bingham, linux-rockchip,
	NXP Linux Team, linux-sunxi, linux-media, Martin Blumenstingl,
	linux-arm-msm, linux-mediatek, linux-tegra, linux-amlogic,
	linux-arm-kernel, AngeloGioacchino Del Regno, Andrew Jeffery,
	linux-renesas-soc, kernel


[-- Attachment #1.1: Type: text/plain, Size: 1863 bytes --]

Hello Mauro

On Sun, Mar 26, 2023 at 04:30:25PM +0200, Uwe Kleine-König wrote:
> Hello,
> 
> this series adapts the platform drivers below drivers/pci to use the

copy&paste failure here: s/pci/media/ of course.

> .remove_new() callback. Compared to the traditional .remove() callback
> .remove_new() returns no value. This is a good thing because the driver core
> doesn't (and cannot) cope for errors during remove. The only effect of a
> non-zero return value in .remove() is that the driver core emits a warning. The
> device is removed anyhow and an early return from .remove() usually yields a
> resource leak.
> 
> By changing the remove callback to return void driver authors cannot
> reasonably assume any more that there is some kind of cleanup later.
> 
> Only three drivers needed some preparation first to make sure they
> return 0 unconditionally in their remove callback. Then all drivers
> could be trivially converted without side effects to .remove_new().
> 
> The changes to the individual drivers are all orthogonal. If I need to
> resend some patches because of some review feedback, I'd like to only
> send the patches that actually needed changes, so please pick up the
> remaining patches that don't need changing to reduce the amount of mail.

I didn't hear anything back about application of this series. Is there a
blocker somewhere?

Apart from the three preparatory patches that are a precondition to the
conversion of the respective drivers, the patches are all pairwise
orthogonal. So from my POV the best would be to apply all patches that
still apply (which might be all), I will care for the fallout later
then.

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] 255+ messages in thread

* Re: [PATCH 000/117] media: Convert to platform remove callback returning void
  2023-04-17  6:02   ` Uwe Kleine-König
@ 2023-04-17  6:19     ` Laurent Pinchart
  -1 siblings, 0 replies; 255+ messages in thread
From: Laurent Pinchart @ 2023-04-17  6:19 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mauro Carvalho Chehab, linux-aspeed, Alim Akhtar, Hans Verkuil,
	Benson Leung, Ajye Huang, Rory Liu, Scott Chao, Neil Armstrong,
	Kevin Hilman, Marek Szyprowski, Ettore Chimenti, Alain Volmat,
	Maxime Coquelin, Alexandre Torgue, Sean Young, Sakari Ailus,
	Ricardo Ribalda, Yang Yingliang, Thierry Reding, Jonathan Hunter,
	Antti Palosaari, Michael Tretter, Ming Qian, Zhou Peng,
	Eddie James, Joel Stanley, Eugen Hristev, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Maxime Ripard, Philipp Zabel,
	Bin Liu, Matthias Brugger, Minghsiu Tsai, Houlong Wei,
	Andrew-CT Chen, Moudy Ho, Qiheng Lin, Tiffany Lin, Yunfei Dong,
	Dmitry Osipenko, Xavier Roumegue, Mirela Rabulea, Shawn Guo,
	Sascha Hauer, Rui Miguel Silva, Robert Foss, Todor Tomov,
	Andy Gross, Bjorn Andersson, Stanimir Varbanov, Vikash Garodia,
	Niklas Söderlund, Fabrizio Castro, Kieran Bingham,
	Mikhail Ulyanov, Jacopo Mondi, Lad Prabhakar, Nathan Chancellor,
	Yang Li, Dan Carpenter, Jacob Chen, Ezequiel Garcia,
	Heiko Stuebner, Dafna Hirschfeld, Krzysztof Kozlowski,
	Colin Ian King, Sylwester Nawrocki, Sylwester Nawrocki,
	Łukasz Stelmach, Andrzej Pietrasiewicz, Jacek Anaszewski,
	Andrzej Hajda, Fabien Dessenne, Patrice Chotard, Hugues Fruchet,
	Jean-Christophe Trotin, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Yong Deng, Paul Kocialkowski, Christophe JAILLET,
	Lad, Prabhakar, Benoit Parrot, Hyun Kwon, Michal Simek,
	ye xingchen, Eduardo Valentin, Sean Wang, Daniel W. S. Almeida,
	Shuah Khan, Daniel Almeida, Hans Verkuil, Guenter Roeck,
	Fabio Estevam, linux-stm32, Jerome Brunet, chrome-platform,
	linux-samsung-soc, Konrad Dybcio, openbmc, Kieran Bingham,
	linux-rockchip, NXP Linux Team, linux-sunxi, linux-media,
	Martin Blumenstingl, linux-arm-msm, linux-mediatek, linux-tegra,
	linux-amlogic, linux-arm-kernel, AngeloGioacchino Del Regno,
	Andrew Jeffery, linux-renesas-soc, kernel

Hi Uwe,

On Mon, Apr 17, 2023 at 08:02:03AM +0200, Uwe Kleine-König wrote:
> Hello Mauro
> 
> On Sun, Mar 26, 2023 at 04:30:25PM +0200, Uwe Kleine-König wrote:
> > Hello,
> > 
> > this series adapts the platform drivers below drivers/pci to use the
> 
> copy&paste failure here: s/pci/media/ of course.
> 
> > .remove_new() callback. Compared to the traditional .remove() callback
> > .remove_new() returns no value. This is a good thing because the driver core
> > doesn't (and cannot) cope for errors during remove. The only effect of a
> > non-zero return value in .remove() is that the driver core emits a warning. The
> > device is removed anyhow and an early return from .remove() usually yields a
> > resource leak.
> > 
> > By changing the remove callback to return void driver authors cannot
> > reasonably assume any more that there is some kind of cleanup later.
> > 
> > Only three drivers needed some preparation first to make sure they
> > return 0 unconditionally in their remove callback. Then all drivers
> > could be trivially converted without side effects to .remove_new().
> > 
> > The changes to the individual drivers are all orthogonal. If I need to
> > resend some patches because of some review feedback, I'd like to only
> > send the patches that actually needed changes, so please pick up the
> > remaining patches that don't need changing to reduce the amount of mail.
> 
> I didn't hear anything back about application of this series. Is there a
> blocker somewhere?

I think the series got applied to the master branch of
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git.
It should thus appear in v6.4.

The corresponding series for staging media drivers has also been applied
to the same branch as far as I can tell.

> Apart from the three preparatory patches that are a precondition to the
> conversion of the respective drivers, the patches are all pairwise
> orthogonal. So from my POV the best would be to apply all patches that
> still apply (which might be all), I will care for the fallout later
> then.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 000/117] media: Convert to platform remove callback returning void
@ 2023-04-17  6:19     ` Laurent Pinchart
  0 siblings, 0 replies; 255+ messages in thread
From: Laurent Pinchart @ 2023-04-17  6:19 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mauro Carvalho Chehab, linux-aspeed, Alim Akhtar, Hans Verkuil,
	Benson Leung, Ajye Huang, Rory Liu, Scott Chao, Neil Armstrong,
	Kevin Hilman, Marek Szyprowski, Ettore Chimenti, Alain Volmat,
	Maxime Coquelin, Alexandre Torgue, Sean Young, Sakari Ailus,
	Ricardo Ribalda, Yang Yingliang, Thierry Reding, Jonathan Hunter,
	Antti Palosaari, Michael Tretter, Ming Qian, Zhou Peng,
	Eddie James, Joel Stanley, Eugen Hristev, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Maxime Ripard, Philipp Zabel,
	Bin Liu, Matthias Brugger, Minghsiu Tsai, Houlong Wei,
	Andrew-CT Chen, Moudy Ho, Qiheng Lin, Tiffany Lin, Yunfei Dong,
	Dmitry Osipenko, Xavier Roumegue, Mirela Rabulea, Shawn Guo,
	Sascha Hauer, Rui Miguel Silva, Robert Foss, Todor Tomov,
	Andy Gross, Bjorn Andersson, Stanimir Varbanov, Vikash Garodia,
	Niklas Söderlund, Fabrizio Castro, Kieran Bingham,
	Mikhail Ulyanov, Jacopo Mondi, Lad Prabhakar, Nathan Chancellor,
	Yang Li, Dan Carpenter, Jacob Chen, Ezequiel Garcia,
	Heiko Stuebner, Dafna Hirschfeld, Krzysztof Kozlowski,
	Colin Ian King, Sylwester Nawrocki, Sylwester Nawrocki,
	Łukasz Stelmach, Andrzej Pietrasiewicz, Jacek Anaszewski,
	Andrzej Hajda, Fabien Dessenne, Patrice Chotard, Hugues Fruchet,
	Jean-Christophe Trotin, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Yong Deng, Paul Kocialkowski, Christophe JAILLET,
	Lad, Prabhakar, Benoit Parrot, Hyun Kwon, Michal Simek,
	ye xingchen, Eduardo Valentin, Sean Wang, Daniel W. S. Almeida,
	Shuah Khan, Daniel Almeida, Hans Verkuil, Guenter Roeck,
	Fabio Estevam, linux-stm32, Jerome Brunet, chrome-platform,
	linux-samsung-soc, Konrad Dybcio, openbmc, Kieran Bingham,
	linux-rockchip, NXP Linux Team, linux-sunxi, linux-media,
	Martin Blumenstingl, linux-arm-msm, linux-mediatek, linux-tegra,
	linux-amlogic, linux-arm-kernel, AngeloGioacchino Del Regno,
	Andrew Jeffery, linux-renesas-soc, kernel

Hi Uwe,

On Mon, Apr 17, 2023 at 08:02:03AM +0200, Uwe Kleine-König wrote:
> Hello Mauro
> 
> On Sun, Mar 26, 2023 at 04:30:25PM +0200, Uwe Kleine-König wrote:
> > Hello,
> > 
> > this series adapts the platform drivers below drivers/pci to use the
> 
> copy&paste failure here: s/pci/media/ of course.
> 
> > .remove_new() callback. Compared to the traditional .remove() callback
> > .remove_new() returns no value. This is a good thing because the driver core
> > doesn't (and cannot) cope for errors during remove. The only effect of a
> > non-zero return value in .remove() is that the driver core emits a warning. The
> > device is removed anyhow and an early return from .remove() usually yields a
> > resource leak.
> > 
> > By changing the remove callback to return void driver authors cannot
> > reasonably assume any more that there is some kind of cleanup later.
> > 
> > Only three drivers needed some preparation first to make sure they
> > return 0 unconditionally in their remove callback. Then all drivers
> > could be trivially converted without side effects to .remove_new().
> > 
> > The changes to the individual drivers are all orthogonal. If I need to
> > resend some patches because of some review feedback, I'd like to only
> > send the patches that actually needed changes, so please pick up the
> > remaining patches that don't need changing to reduce the amount of mail.
> 
> I didn't hear anything back about application of this series. Is there a
> blocker somewhere?

I think the series got applied to the master branch of
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git.
It should thus appear in v6.4.

The corresponding series for staging media drivers has also been applied
to the same branch as far as I can tell.

> Apart from the three preparatory patches that are a precondition to the
> conversion of the respective drivers, the patches are all pairwise
> orthogonal. So from my POV the best would be to apply all patches that
> still apply (which might be all), I will care for the fallout later
> then.

-- 
Regards,

Laurent Pinchart

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 000/117] media: Convert to platform remove callback returning void
  2023-04-17  6:19     ` Laurent Pinchart
@ 2023-04-17  7:30       ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-04-17  7:30 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Heiko Stuebner, Eddie James, Hans Verkuil, Alim Akhtar,
	Dmitry Osipenko, linux-stm32, Marek Szyprowski,
	linux-samsung-soc, Robert Foss, Dafna Hirschfeld, Samuel Holland,
	Kevin Hilman, Michal Simek, Antti Palosaari, NXP Linux Team,
	Jerome Brunet, linux-sunxi, ye xingchen, Sascha Hauer,
	Łukasz Stelmach, Eugen Hristev, Shuah Khan, Hyun Kwon,
	Andrew Jeffery, Michael Tretter, Moudy Ho, kernel, Hans Verkuil,
	Claudiu Beznea, Ming Qian, Andrew-CT Chen, Alexandre Belloni,
	Sylwester Nawrocki, linux-aspeed, Yunfei Dong, Lad, Prabhakar,
	Thierry Reding, Guenter Roeck, chrome-platform, Jonathan Hunter,
	linux-rockchip, Fabien Dessenne, Ezequiel Garcia, Alain Volmat,
	Andrzej Pietrasiewicz, Colin Ian King, linux-media, Jacopo Mondi,
	Rory Liu, Martin Blumenstingl, linux-arm-msm, Sean Wang,
	Maxime Ripard, Fabrizio Castro, linux-amlogic, linux-arm-kernel,
	Neil Armstrong, Zhou Peng, Paul Kocialkowski, Maxime Coquelin,
	linux-mediatek, Jacek Anaszewski, Dan Carpenter, Sean Young,
	Xavier Roumegue, Ettore Chimenti, Vikash Garodia, linux-tegra,
	Eduardo Valentin, Andrzej Hajda, Fabio Estevam,
	Jean-Christophe Trotin, Stanimir Varbanov, Kieran Bingham,
	Jernej Skrabec, Chen-Yu Tsai, Jacob Chen, Joel Stanley,
	Yang Yingliang, Patrice Chotard, Bin Liu, Nathan Chancellor,
	Sylwester Nawrocki, Mauro Carvalho Chehab, Benson Leung,
	Daniel W. S. Almeida, Qiheng Lin, Konrad Dybcio, Kieran Bingham,
	Yang Li, Sakari Ailus, Ricardo Ribalda, Shawn Guo, Minghsiu Tsai,
	Daniel Almeida, Alexandre Torgue, Todor Tomov, Mirela Rabulea,
	Ajye Huang, Scott Chao, linux-renesas-soc, Hugues Fruchet,
	openbmc, Andy Gross, Mikhail Ulyanov, Lad Prabhakar,
	Benoit Parrot, Rui Miguel Silva, Christophe JAILLET, Yong Deng,
	Matthias Brugger, Tiffany Lin, AngeloGioacchino Del Regno,
	Bjorn Andersson, Nicolas Ferre, Houlong Wei, Krzysztof Kozlowski,
	Philipp Zabel, Niklas Söderlund

[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]

Hello Laurent,

On Mon, Apr 17, 2023 at 09:19:28AM +0300, Laurent Pinchart wrote:
> On Mon, Apr 17, 2023 at 08:02:03AM +0200, Uwe Kleine-König wrote:
> > On Sun, Mar 26, 2023 at 04:30:25PM +0200, Uwe Kleine-König wrote:
> > > Hello,
> > > 
> > > this series adapts the platform drivers below drivers/pci to use the
> > 
> > copy&paste failure here: s/pci/media/ of course.
> > 
> > > .remove_new() callback. Compared to the traditional .remove() callback
> > > .remove_new() returns no value. This is a good thing because the driver core
> > > doesn't (and cannot) cope for errors during remove. The only effect of a
> > > non-zero return value in .remove() is that the driver core emits a warning. The
> > > device is removed anyhow and an early return from .remove() usually yields a
> > > resource leak.
> > > 
> > > By changing the remove callback to return void driver authors cannot
> > > reasonably assume any more that there is some kind of cleanup later.
> > > 
> > > Only three drivers needed some preparation first to make sure they
> > > return 0 unconditionally in their remove callback. Then all drivers
> > > could be trivially converted without side effects to .remove_new().
> > > 
> > > The changes to the individual drivers are all orthogonal. If I need to
> > > resend some patches because of some review feedback, I'd like to only
> > > send the patches that actually needed changes, so please pick up the
> > > remaining patches that don't need changing to reduce the amount of mail.
> > 
> > I didn't hear anything back about application of this series. Is there a
> > blocker somewhere?
> 
> I think the series got applied to the master branch of
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git.
> It should thus appear in v6.4.

I guess that linux-stable.git is a copy&paste failure (and it's not
there). I don't see the series in the master branch of
git://linuxtv.org/media_tree.git either.

.. a bit later ...

ah, it's in git://linuxtv.org/mchehab/media-next.git

I guess I was just to quick and probably the series will be included in
today's next.

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 000/117] media: Convert to platform remove callback returning void
@ 2023-04-17  7:30       ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-04-17  7:30 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Heiko Stuebner, Eddie James, Hans Verkuil, Alim Akhtar,
	Dmitry Osipenko, linux-stm32, Marek Szyprowski,
	linux-samsung-soc, Robert Foss, Dafna Hirschfeld, Samuel Holland,
	Kevin Hilman, Michal Simek, Antti Palosaari, NXP Linux Team,
	Jerome Brunet, linux-sunxi, ye xingchen, Sascha Hauer,
	Łukasz Stelmach, Eugen Hristev, Shuah Khan, Hyun Kwon,
	Andrew Jeffery, Michael Tretter, Moudy Ho, kernel, Hans Verkuil,
	Claudiu Beznea, Ming Qian, Andrew-CT Chen, Alexandre Belloni,
	Sylwester Nawrocki, linux-aspeed, Yunfei Dong, Lad, Prabhakar,
	Thierry Reding, Guenter Roeck, chrome-platform, Jonathan Hunter,
	linux-rockchip, Fabien Dessenne, Ezequiel Garcia, Alain Volmat,
	Andrzej Pietrasiewicz, Colin Ian King, linux-media, Jacopo Mondi,
	Rory Liu, Martin Blumenstingl, linux-arm-msm, Sean Wang,
	Maxime Ripard, Fabrizio Castro, linux-amlogic, linux-arm-kernel,
	Neil Armstrong, Zhou Peng, Paul Kocialkowski, Maxime Coquelin,
	linux-mediatek, Jacek Anaszewski, Dan Carpenter, Sean Young,
	Xavier Roumegue, Ettore Chimenti, Vikash Garodia, linux-tegra,
	Eduardo Valentin, Andrzej Hajda, Fabio Estevam,
	Jean-Christophe Trotin, Stanimir Varbanov, Kieran Bingham,
	Jernej Skrabec, Chen-Yu Tsai, Jacob Chen, Joel Stanley,
	Yang Yingliang, Patrice Chotard, Bin Liu, Nathan Chancellor,
	Sylwester Nawrocki, Mauro Carvalho Chehab, Benson Leung,
	Daniel W. S. Almeida, Qiheng Lin, Konrad Dybcio, Kieran Bingham,
	Yang Li, Sakari Ailus, Ricardo Ribalda, Shawn Guo, Minghsiu Tsai,
	Daniel Almeida, Alexandre Torgue, Todor Tomov, Mirela Rabulea,
	Ajye Huang, Scott Chao, linux-renesas-soc, Hugues Fruchet,
	openbmc, Andy Gross, Mikhail Ulyanov, Lad Prabhakar,
	Benoit Parrot, Rui Miguel Silva, Christophe JAILLET, Yong Deng,
	Matthias Brugger, Tiffany Lin, AngeloGioacchino Del Regno,
	Bjorn Andersson, Nicolas Ferre, Houlong Wei, Krzysztof Kozlowski,
	Philipp Zabel, Niklas Söderlund


[-- Attachment #1.1: Type: text/plain, Size: 2324 bytes --]

Hello Laurent,

On Mon, Apr 17, 2023 at 09:19:28AM +0300, Laurent Pinchart wrote:
> On Mon, Apr 17, 2023 at 08:02:03AM +0200, Uwe Kleine-König wrote:
> > On Sun, Mar 26, 2023 at 04:30:25PM +0200, Uwe Kleine-König wrote:
> > > Hello,
> > > 
> > > this series adapts the platform drivers below drivers/pci to use the
> > 
> > copy&paste failure here: s/pci/media/ of course.
> > 
> > > .remove_new() callback. Compared to the traditional .remove() callback
> > > .remove_new() returns no value. This is a good thing because the driver core
> > > doesn't (and cannot) cope for errors during remove. The only effect of a
> > > non-zero return value in .remove() is that the driver core emits a warning. The
> > > device is removed anyhow and an early return from .remove() usually yields a
> > > resource leak.
> > > 
> > > By changing the remove callback to return void driver authors cannot
> > > reasonably assume any more that there is some kind of cleanup later.
> > > 
> > > Only three drivers needed some preparation first to make sure they
> > > return 0 unconditionally in their remove callback. Then all drivers
> > > could be trivially converted without side effects to .remove_new().
> > > 
> > > The changes to the individual drivers are all orthogonal. If I need to
> > > resend some patches because of some review feedback, I'd like to only
> > > send the patches that actually needed changes, so please pick up the
> > > remaining patches that don't need changing to reduce the amount of mail.
> > 
> > I didn't hear anything back about application of this series. Is there a
> > blocker somewhere?
> 
> I think the series got applied to the master branch of
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git.
> It should thus appear in v6.4.

I guess that linux-stable.git is a copy&paste failure (and it's not
there). I don't see the series in the master branch of
git://linuxtv.org/media_tree.git either.

.. a bit later ...

ah, it's in git://linuxtv.org/mchehab/media-next.git

I guess I was just to quick and probably the series will be included in
today's next.

Thanks
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] 255+ messages in thread

* Re: [PATCH 000/117] media: Convert to platform remove callback returning void
  2023-04-17  7:30       ` Uwe Kleine-König
@ 2023-04-17  7:35         ` Laurent Pinchart
  -1 siblings, 0 replies; 255+ messages in thread
From: Laurent Pinchart @ 2023-04-17  7:35 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Heiko Stuebner, Eddie James, Hans Verkuil, Alim Akhtar,
	Dmitry Osipenko, linux-stm32, Marek Szyprowski,
	linux-samsung-soc, Robert Foss, Dafna Hirschfeld, Samuel Holland,
	Kevin Hilman, Michal Simek, Antti Palosaari, NXP Linux Team,
	Jerome Brunet, linux-sunxi, ye xingchen, Sascha Hauer,
	Łukasz Stelmach, Eugen Hristev, Shuah Khan, Hyun Kwon,
	Andrew Jeffery, Michael Tretter, Moudy Ho, kernel, Hans Verkuil,
	Claudiu Beznea, Ming Qian, Andrew-CT Chen, Alexandre Belloni,
	Sylwester Nawrocki, linux-aspeed, Yunfei Dong, Lad, Prabhakar,
	Thierry Reding, Guenter Roeck, chrome-platform, Jonathan Hunter,
	linux-rockchip, Fabien Dessenne, Ezequiel Garcia, Alain Volmat,
	Andrzej Pietrasiewicz, Colin Ian King, linux-media, Jacopo Mondi,
	Rory Liu, Martin Blumenstingl, linux-arm-msm, Sean Wang,
	Maxime Ripard, Fabrizio Castro, linux-amlogic, linux-arm-kernel,
	Neil Armstrong, Zhou Peng, Paul Kocialkowski, Maxime Coquelin,
	linux-mediatek, Jacek Anaszewski, Dan Carpenter, Sean Young,
	Xavier Roumegue, Ettore Chimenti, Vikash Garodia, linux-tegra,
	Eduardo Valentin, Andrzej Hajda, Fabio Estevam,
	Jean-Christophe Trotin, Stanimir Varbanov, Kieran Bingham,
	Jernej Skrabec, Chen-Yu Tsai, Jacob Chen, Joel Stanley,
	Yang Yingliang, Patrice Chotard, Bin Liu, Nathan Chancellor,
	Sylwester Nawrocki, Mauro Carvalho Chehab, Benson Leung,
	Daniel W. S. Almeida, Qiheng Lin, Konrad Dybcio, Kieran Bingham,
	Yang Li, Sakari Ailus, Ricardo Ribalda, Shawn Guo, Minghsiu Tsai,
	Daniel Almeida, Alexandre Torgue, Todor Tomov, Mirela Rabulea,
	Ajye Huang, Scott Chao, linux-renesas-soc, Hugues Fruchet,
	openbmc, Andy Gross, Mikhail Ulyanov, Lad Prabhakar,
	Benoit Parrot, Rui Miguel Silva, Christophe JAILLET, Yong Deng,
	Matthias Brugger, Tiffany Lin, AngeloGioacchino Del Regno,
	Bjorn Andersson, Nicolas Ferre, Houlong Wei, Krzysztof Kozlowski,
	Philipp Zabel, Niklas Söderlund

On Mon, Apr 17, 2023 at 09:30:49AM +0200, Uwe Kleine-König wrote:
> Hello Laurent,
> 
> On Mon, Apr 17, 2023 at 09:19:28AM +0300, Laurent Pinchart wrote:
> > On Mon, Apr 17, 2023 at 08:02:03AM +0200, Uwe Kleine-König wrote:
> > > On Sun, Mar 26, 2023 at 04:30:25PM +0200, Uwe Kleine-König wrote:
> > > > Hello,
> > > > 
> > > > this series adapts the platform drivers below drivers/pci to use the
> > > 
> > > copy&paste failure here: s/pci/media/ of course.
> > > 
> > > > .remove_new() callback. Compared to the traditional .remove() callback
> > > > .remove_new() returns no value. This is a good thing because the driver core
> > > > doesn't (and cannot) cope for errors during remove. The only effect of a
> > > > non-zero return value in .remove() is that the driver core emits a warning. The
> > > > device is removed anyhow and an early return from .remove() usually yields a
> > > > resource leak.
> > > > 
> > > > By changing the remove callback to return void driver authors cannot
> > > > reasonably assume any more that there is some kind of cleanup later.
> > > > 
> > > > Only three drivers needed some preparation first to make sure they
> > > > return 0 unconditionally in their remove callback. Then all drivers
> > > > could be trivially converted without side effects to .remove_new().
> > > > 
> > > > The changes to the individual drivers are all orthogonal. If I need to
> > > > resend some patches because of some review feedback, I'd like to only
> > > > send the patches that actually needed changes, so please pick up the
> > > > remaining patches that don't need changing to reduce the amount of mail.
> > > 
> > > I didn't hear anything back about application of this series. Is there a
> > > blocker somewhere?
> > 
> > I think the series got applied to the master branch of
> > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git.
> > It should thus appear in v6.4.
> 
> I guess that linux-stable.git is a copy&paste failure (and it's not
> there). I don't see the series in the master branch of
> git://linuxtv.org/media_tree.git either.

Oops sorry. It was a copy & paste mistake indeed, I meant

git://linuxtv.org/media_stage.git

> .. a bit later ...
> 
> ah, it's in git://linuxtv.org/mchehab/media-next.git
> 
> I guess I was just to quick and probably the series will be included in
> today's next.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 000/117] media: Convert to platform remove callback returning void
@ 2023-04-17  7:35         ` Laurent Pinchart
  0 siblings, 0 replies; 255+ messages in thread
From: Laurent Pinchart @ 2023-04-17  7:35 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Heiko Stuebner, Eddie James, Hans Verkuil, Alim Akhtar,
	Dmitry Osipenko, linux-stm32, Marek Szyprowski,
	linux-samsung-soc, Robert Foss, Dafna Hirschfeld, Samuel Holland,
	Kevin Hilman, Michal Simek, Antti Palosaari, NXP Linux Team,
	Jerome Brunet, linux-sunxi, ye xingchen, Sascha Hauer,
	Łukasz Stelmach, Eugen Hristev, Shuah Khan, Hyun Kwon,
	Andrew Jeffery, Michael Tretter, Moudy Ho, kernel, Hans Verkuil,
	Claudiu Beznea, Ming Qian, Andrew-CT Chen, Alexandre Belloni,
	Sylwester Nawrocki, linux-aspeed, Yunfei Dong, Lad, Prabhakar,
	Thierry Reding, Guenter Roeck, chrome-platform, Jonathan Hunter,
	linux-rockchip, Fabien Dessenne, Ezequiel Garcia, Alain Volmat,
	Andrzej Pietrasiewicz, Colin Ian King, linux-media, Jacopo Mondi,
	Rory Liu, Martin Blumenstingl, linux-arm-msm, Sean Wang,
	Maxime Ripard, Fabrizio Castro, linux-amlogic, linux-arm-kernel,
	Neil Armstrong, Zhou Peng, Paul Kocialkowski, Maxime Coquelin,
	linux-mediatek, Jacek Anaszewski, Dan Carpenter, Sean Young,
	Xavier Roumegue, Ettore Chimenti, Vikash Garodia, linux-tegra,
	Eduardo Valentin, Andrzej Hajda, Fabio Estevam,
	Jean-Christophe Trotin, Stanimir Varbanov, Kieran Bingham,
	Jernej Skrabec, Chen-Yu Tsai, Jacob Chen, Joel Stanley,
	Yang Yingliang, Patrice Chotard, Bin Liu, Nathan Chancellor,
	Sylwester Nawrocki, Mauro Carvalho Chehab, Benson Leung,
	Daniel W. S. Almeida, Qiheng Lin, Konrad Dybcio, Kieran Bingham,
	Yang Li, Sakari Ailus, Ricardo Ribalda, Shawn Guo, Minghsiu Tsai,
	Daniel Almeida, Alexandre Torgue, Todor Tomov, Mirela Rabulea,
	Ajye Huang, Scott Chao, linux-renesas-soc, Hugues Fruchet,
	openbmc, Andy Gross, Mikhail Ulyanov, Lad Prabhakar,
	Benoit Parrot, Rui Miguel Silva, Christophe JAILLET, Yong Deng,
	Matthias Brugger, Tiffany Lin, AngeloGioacchino Del Regno,
	Bjorn Andersson, Nicolas Ferre, Houlong Wei, Krzysztof Kozlowski,
	Philipp Zabel, Niklas Söderlund

On Mon, Apr 17, 2023 at 09:30:49AM +0200, Uwe Kleine-König wrote:
> Hello Laurent,
> 
> On Mon, Apr 17, 2023 at 09:19:28AM +0300, Laurent Pinchart wrote:
> > On Mon, Apr 17, 2023 at 08:02:03AM +0200, Uwe Kleine-König wrote:
> > > On Sun, Mar 26, 2023 at 04:30:25PM +0200, Uwe Kleine-König wrote:
> > > > Hello,
> > > > 
> > > > this series adapts the platform drivers below drivers/pci to use the
> > > 
> > > copy&paste failure here: s/pci/media/ of course.
> > > 
> > > > .remove_new() callback. Compared to the traditional .remove() callback
> > > > .remove_new() returns no value. This is a good thing because the driver core
> > > > doesn't (and cannot) cope for errors during remove. The only effect of a
> > > > non-zero return value in .remove() is that the driver core emits a warning. The
> > > > device is removed anyhow and an early return from .remove() usually yields a
> > > > resource leak.
> > > > 
> > > > By changing the remove callback to return void driver authors cannot
> > > > reasonably assume any more that there is some kind of cleanup later.
> > > > 
> > > > Only three drivers needed some preparation first to make sure they
> > > > return 0 unconditionally in their remove callback. Then all drivers
> > > > could be trivially converted without side effects to .remove_new().
> > > > 
> > > > The changes to the individual drivers are all orthogonal. If I need to
> > > > resend some patches because of some review feedback, I'd like to only
> > > > send the patches that actually needed changes, so please pick up the
> > > > remaining patches that don't need changing to reduce the amount of mail.
> > > 
> > > I didn't hear anything back about application of this series. Is there a
> > > blocker somewhere?
> > 
> > I think the series got applied to the master branch of
> > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git.
> > It should thus appear in v6.4.
> 
> I guess that linux-stable.git is a copy&paste failure (and it's not
> there). I don't see the series in the master branch of
> git://linuxtv.org/media_tree.git either.

Oops sorry. It was a copy & paste mistake indeed, I meant

git://linuxtv.org/media_stage.git

> .. a bit later ...
> 
> ah, it's in git://linuxtv.org/mchehab/media-next.git
> 
> I guess I was just to quick and probably the series will be included in
> today's next.

-- 
Regards,

Laurent Pinchart

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 255+ messages in thread

* RE: [PATCH 000/117] media: Convert to platform remove callback returning void
  2023-04-17  7:30       ` Uwe Kleine-König
@ 2023-04-17  7:57         ` Biju Das
  -1 siblings, 0 replies; 255+ messages in thread
From: Biju Das @ 2023-04-17  7:57 UTC (permalink / raw)
  To: Uwe Kleine-König, Laurent Pinchart
  Cc: Heiko Stuebner, Eddie James, Hans Verkuil, Alim Akhtar,
	Dmitry Osipenko, linux-stm32, Marek Szyprowski,
	linux-samsung-soc, Robert Foss, Dafna Hirschfeld, Samuel Holland,
	Kevin Hilman, Michal Simek, Antti Palosaari, NXP Linux Team,
	Jerome Brunet, linux-sunxi, ye xingchen, Sascha Hauer,
	Łukasz Stelmach, Eugen Hristev, Shuah Khan, Hyun Kwon,
	Andrew Jeffery, Michael Tretter, Moudy Ho, kernel, Hans Verkuil,
	Claudiu Beznea, Ming Qian, Andrew-CT Chen, Alexandre Belloni,
	Sylwester Nawrocki, linux-aspeed, Yunfei Dong, Lad, Prabhakar,
	Thierry Reding, Guenter Roeck, chrome-platform, Jonathan Hunter,
	linux-rockchip, Fabien Dessenne, Ezequiel Garcia, Alain Volmat,
	Andrzej Pietrasiewicz, Colin Ian King, linux-media, Jacopo Mondi,
	Rory Liu, Martin Blumenstingl, linux-arm-msm, Sean Wang,
	Maxime Ripard, Fabrizio Castro, linux-amlogic, linux-arm-kernel,
	Neil Armstrong, Zhou Peng, Paul Kocialkowski, Maxime Coquelin,
	linux-mediatek, Jacek Anaszewski, Dan Carpenter, Sean Young,
	Xavier Roumegue, Ettore Chimenti, Vikash Garodia, linux-tegra,
	Eduardo Valentin, Andrzej Hajda, Fabio Estevam,
	Jean-Christophe Trotin, Stanimir Varbanov, Kieran Bingham,
	Jernej Skrabec, Chen-Yu Tsai, Jacob Chen, Joel Stanley,
	Yang Yingliang, Patrice Chotard, Bin Liu, Nathan Chancellor,
	Sylwester Nawrocki, Mauro Carvalho Chehab, Benson Leung,
	Daniel W. S. Almeida, Qiheng Lin, Konrad Dybcio, Kieran Bingham,
	Yang Li, Sakari Ailus, Ricardo Ribalda, Shawn Guo, Minghsiu Tsai,
	Daniel Almeida, Alexandre Torgue, Todor Tomov, Mirela Rabulea,
	Ajye Huang, Scott Chao, linux-renesas-soc, Hugues Fruchet,
	openbmc, Andy Gross, Mikhail Ulyanov, Prabhakar Mahadev Lad,
	Benoit Parrot, Rui Miguel Silva, Christophe JAILLET, Yong Deng,
	Matthias Brugger, Tiffany Lin, AngeloGioacchino Del Regno,
	Bjorn Andersson, Nicolas Ferre, Houlong Wei, Krzysztof Kozlowski,
	Philipp Zabel, Niklas Söderlund

Hi Uwe,

> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Sent: Monday, April 17, 2023 8:31 AM
> To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Heiko Stuebner <heiko@sntech.de>; Eddie James <eajames@linux.ibm.com>;
> Hans Verkuil <hverkuil@xs4all.nl>; Alim Akhtar <alim.akhtar@samsung.com>;
> Dmitry Osipenko <digetx@gmail.com>; linux-stm32@st-md-
> mailman.stormreply.com; Marek Szyprowski <m.szyprowski@samsung.com>; linux-
> samsung-soc@vger.kernel.org; Robert Foss <rfoss@kernel.org>; Dafna
> Hirschfeld <dafna@fastmail.com>; Samuel Holland <samuel@sholland.org>; Kevin
> Hilman <khilman@baylibre.com>; Michal Simek <michal.simek@xilinx.com>; Antti
> Palosaari <crope@iki.fi>; NXP Linux Team <linux-imx@nxp.com>; Jerome Brunet
> <jbrunet@baylibre.com>; linux-sunxi@lists.linux.dev; ye xingchen
> <ye.xingchen@zte.com.cn>; Sascha Hauer <s.hauer@pengutronix.de>; Łukasz
> Stelmach <l.stelmach@samsung.com>; Eugen Hristev
> <eugen.hristev@collabora.com>; Shuah Khan <skhan@linuxfoundation.org>; Hyun
> Kwon <hyun.kwon@xilinx.com>; Andrew Jeffery <andrew@aj.id.au>; Michael
> Tretter <m.tretter@pengutronix.de>; Moudy Ho <moudy.ho@mediatek.com>;
> kernel@pengutronix.de; Hans Verkuil <hverkuil-cisco@xs4all.nl>; Claudiu
> Beznea <claudiu.beznea@microchip.com>; Ming Qian <ming.qian@nxp.com>;
> Andrew-CT Chen <andrew-ct.chen@mediatek.com>; Alexandre Belloni
> <alexandre.belloni@bootlin.com>; Sylwester Nawrocki
> <s.nawrocki@samsung.com>; linux-aspeed@lists.ozlabs.org; Yunfei Dong
> <yunfei.dong@mediatek.com>; Lad, Prabhakar <prabhakar.csengg@gmail.com>;
> Thierry Reding <thierry.reding@gmail.com>; Guenter Roeck
> <groeck@chromium.org>; chrome-platform@lists.linux.dev; Jonathan Hunter
> <jonathanh@nvidia.com>; linux-rockchip@lists.infradead.org; Fabien Dessenne
> <fabien.dessenne@foss.st.com>; Ezequiel Garcia
> <ezequiel@vanguardiasur.com.ar>; Alain Volmat <alain.volmat@foss.st.com>;
> Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>; Colin Ian King
> <colin.i.king@gmail.com>; linux-media@vger.kernel.org; Jacopo Mondi
> <jacopo@jmondi.org>; Rory Liu <hellojacky0226@hotmail.com>; Martin
> Blumenstingl <martin.blumenstingl@googlemail.com>; linux-arm-
> msm@vger.kernel.org; Sean Wang <sean.wang@mediatek.com>; Maxime Ripard
> <mripard@kernel.org>; Fabrizio Castro <fabrizio.castro.jz@renesas.com>;
> linux-amlogic@lists.infradead.org; linux-arm-kernel@lists.infradead.org;
> Neil Armstrong <neil.armstrong@linaro.org>; Zhou Peng <eagle.zhou@nxp.com>;
> Paul Kocialkowski <paul.kocialkowski@bootlin.com>; Maxime Coquelin
> <mcoquelin.stm32@gmail.com>; linux-mediatek@lists.infradead.org; Jacek
> Anaszewski <jacek.anaszewski@gmail.com>; Dan Carpenter <error27@gmail.com>;
> Sean Young <sean@mess.org>; Xavier Roumegue <xavier.roumegue@oss.nxp.com>;
> Ettore Chimenti <ek5.chimenti@gmail.com>; Vikash Garodia
> <quic_vgarodia@quicinc.com>; linux-tegra@vger.kernel.org; Eduardo Valentin
> <edubezval@gmail.com>; Andrzej Hajda <andrzej.hajda@intel.com>; Fabio
> Estevam <festevam@gmail.com>; Jean-Christophe Trotin <jean-
> christophe.trotin@foss.st.com>; Stanimir Varbanov
> <stanimir.k.varbanov@gmail.com>; Kieran Bingham
> <kieran.bingham@ideasonboard.com>; Jernej Skrabec
> <jernej.skrabec@gmail.com>; Chen-Yu Tsai <wens@csie.org>; Jacob Chen <jacob-
> chen@iotwrt.com>; Joel Stanley <joel@jms.id.au>; Yang Yingliang
> <yangyingliang@huawei.com>; Patrice Chotard <patrice.chotard@foss.st.com>;
> Bin Liu <bin.liu@mediatek.com>; Nathan Chancellor <nathan@kernel.org>;
> Sylwester Nawrocki <sylvester.nawrocki@gmail.com>; Mauro Carvalho Chehab
> <mchehab@kernel.org>; Benson Leung <bleung@chromium.org>; Daniel W. S.
> Almeida <dwlsalmeida@gmail.com>; Qiheng Lin <linqiheng@huawei.com>; Konrad
> Dybcio <konrad.dybcio@linaro.org>; Kieran Bingham
> <kieran.bingham+renesas@ideasonboard.com>; Yang Li
> <yang.lee@linux.alibaba.com>; Sakari Ailus <sakari.ailus@linux.intel.com>;
> Ricardo Ribalda <ribalda@chromium.org>; Shawn Guo <shawnguo@kernel.org>;
> Minghsiu Tsai <minghsiu.tsai@mediatek.com>; Daniel Almeida
> <daniel.almeida@collabora.com>; Alexandre Torgue
> <alexandre.torgue@foss.st.com>; Todor Tomov <todor.too@gmail.com>; Mirela
> Rabulea <mirela.rabulea@nxp.com>; Ajye Huang <ajye_huang@compal.corp-
> partner.google.com>; Scott Chao <scott_chao@wistron.corp-
> partner.google.com>; linux-renesas-soc@vger.kernel.org; Hugues Fruchet
> <hugues.fruchet@foss.st.com>; openbmc@lists.ozlabs.org; Andy Gross
> <agross@kernel.org>; Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>;
> Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>; Benoit
> Parrot <bparrot@ti.com>; Rui Miguel Silva <rmfrfs@gmail.com>; Christophe
> JAILLET <christophe.jaillet@wanadoo.fr>; Yong Deng <yong.deng@magewell.com>;
> Matthias Brugger <matthias.bgg@gmail.com>; Tiffany Lin
> <tiffany.lin@mediatek.com>; AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com>; Bjorn Andersson
> <andersson@kernel.org>; Nicolas Ferre <nicolas.ferre@microchip.com>; Houlong
> Wei <houlong.wei@mediatek.com>; Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org>; Philipp Zabel <p.zabel@pengutronix.de>;
> Niklas Söderlund <niklas.soderlund@ragnatech.se>
> Subject: Re: [PATCH 000/117] media: Convert to platform remove callback
> returning void
> 
> Hello Laurent,
> 
> On Mon, Apr 17, 2023 at 09:19:28AM +0300, Laurent Pinchart wrote:
> > On Mon, Apr 17, 2023 at 08:02:03AM +0200, Uwe Kleine-König wrote:
> > > On Sun, Mar 26, 2023 at 04:30:25PM +0200, Uwe Kleine-König wrote:
> > > > Hello,
> > > >
> > > > this series adapts the platform drivers below drivers/pci to use
> > > > the
> > >
> > > copy&paste failure here: s/pci/media/ of course.
> > >
> > > > .remove_new() callback. Compared to the traditional .remove()
> > > > callback
> > > > .remove_new() returns no value. This is a good thing because the
> > > > driver core doesn't (and cannot) cope for errors during remove.
> > > > The only effect of a non-zero return value in .remove() is that
> > > > the driver core emits a warning. The device is removed anyhow and
> > > > an early return from .remove() usually yields a resource leak.
> > > >
> > > > By changing the remove callback to return void driver authors
> > > > cannot reasonably assume any more that there is some kind of cleanup
> later.
> > > >
> > > > Only three drivers needed some preparation first to make sure they
> > > > return 0 unconditionally in their remove callback. Then all
> > > > drivers could be trivially converted without side effects to
> .remove_new().
> > > >
> > > > The changes to the individual drivers are all orthogonal. If I
> > > > need to resend some patches because of some review feedback, I'd
> > > > like to only send the patches that actually needed changes, so
> > > > please pick up the remaining patches that don't need changing to
> reduce the amount of mail.
> > >
> > > I didn't hear anything back about application of this series. Is
> > > there a blocker somewhere?
> >
> > I think the series got applied to the master branch of
> > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git.
> > It should thus appear in v6.4.
> 
> I guess that linux-stable.git is a copy&paste failure (and it's not there).
> I don't see the series in the master branch of
> git://linuxtv.org/media_tree.git either.
> 
> .. a bit later ...
> 
> ah, it's in git://linuxtv.org/mchehab/media-next.git
> 
> I guess I was just to quick and probably the series will be included in
> today's next.

I believe patchwork <patchwork@linuxtv.org> will send notification to
author and along with people who applied tags for that patch.

I normally get notification from patchwork <patchwork@linuxtv.org>
When the state of patch changes.

Cheers,
Biju

^ permalink raw reply	[flat|nested] 255+ messages in thread

* RE: [PATCH 000/117] media: Convert to platform remove callback returning void
@ 2023-04-17  7:57         ` Biju Das
  0 siblings, 0 replies; 255+ messages in thread
From: Biju Das @ 2023-04-17  7:57 UTC (permalink / raw)
  To: Uwe Kleine-König, Laurent Pinchart
  Cc: Heiko Stuebner, Eddie James, Hans Verkuil, Alim Akhtar,
	Dmitry Osipenko, linux-stm32, Marek Szyprowski,
	linux-samsung-soc, Robert Foss, Dafna Hirschfeld, Samuel Holland,
	Kevin Hilman, Michal Simek, Antti Palosaari, NXP Linux Team,
	Jerome Brunet, linux-sunxi, ye xingchen, Sascha Hauer,
	Łukasz Stelmach, Eugen Hristev, Shuah Khan, Hyun Kwon,
	Andrew Jeffery, Michael Tretter, Moudy Ho, kernel, Hans Verkuil,
	Claudiu Beznea, Ming Qian, Andrew-CT Chen, Alexandre Belloni,
	Sylwester Nawrocki, linux-aspeed, Yunfei Dong, Lad, Prabhakar,
	Thierry Reding, Guenter Roeck, chrome-platform, Jonathan Hunter,
	linux-rockchip, Fabien Dessenne, Ezequiel Garcia, Alain Volmat,
	Andrzej Pietrasiewicz, Colin Ian King, linux-media, Jacopo Mondi,
	Rory Liu, Martin Blumenstingl, linux-arm-msm, Sean Wang,
	Maxime Ripard, Fabrizio Castro, linux-amlogic, linux-arm-kernel,
	Neil Armstrong, Zhou Peng, Paul Kocialkowski, Maxime Coquelin,
	linux-mediatek, Jacek Anaszewski, Dan Carpenter, Sean Young,
	Xavier Roumegue, Ettore Chimenti, Vikash Garodia, linux-tegra,
	Eduardo Valentin, Andrzej Hajda, Fabio Estevam,
	Jean-Christophe Trotin, Stanimir Varbanov, Kieran Bingham,
	Jernej Skrabec, Chen-Yu Tsai, Jacob Chen, Joel Stanley,
	Yang Yingliang, Patrice Chotard, Bin Liu, Nathan Chancellor,
	Sylwester Nawrocki, Mauro Carvalho Chehab, Benson Leung,
	Daniel W. S. Almeida, Qiheng Lin, Konrad Dybcio, Kieran Bingham,
	Yang Li, Sakari Ailus, Ricardo Ribalda, Shawn Guo, Minghsiu Tsai,
	Daniel Almeida, Alexandre Torgue, Todor Tomov, Mirela Rabulea,
	Ajye Huang, Scott Chao, linux-renesas-soc, Hugues Fruchet,
	openbmc, Andy Gross, Mikhail Ulyanov, Prabhakar Mahadev Lad,
	Benoit Parrot, Rui Miguel Silva, Christophe JAILLET, Yong Deng,
	Matthias Brugger, Tiffany Lin, AngeloGioacchino Del Regno,
	Bjorn Andersson, Nicolas Ferre, Houlong Wei, Krzysztof Kozlowski,
	Philipp Zabel, Niklas Söderlund

Hi Uwe,

> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Sent: Monday, April 17, 2023 8:31 AM
> To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Heiko Stuebner <heiko@sntech.de>; Eddie James <eajames@linux.ibm.com>;
> Hans Verkuil <hverkuil@xs4all.nl>; Alim Akhtar <alim.akhtar@samsung.com>;
> Dmitry Osipenko <digetx@gmail.com>; linux-stm32@st-md-
> mailman.stormreply.com; Marek Szyprowski <m.szyprowski@samsung.com>; linux-
> samsung-soc@vger.kernel.org; Robert Foss <rfoss@kernel.org>; Dafna
> Hirschfeld <dafna@fastmail.com>; Samuel Holland <samuel@sholland.org>; Kevin
> Hilman <khilman@baylibre.com>; Michal Simek <michal.simek@xilinx.com>; Antti
> Palosaari <crope@iki.fi>; NXP Linux Team <linux-imx@nxp.com>; Jerome Brunet
> <jbrunet@baylibre.com>; linux-sunxi@lists.linux.dev; ye xingchen
> <ye.xingchen@zte.com.cn>; Sascha Hauer <s.hauer@pengutronix.de>; Łukasz
> Stelmach <l.stelmach@samsung.com>; Eugen Hristev
> <eugen.hristev@collabora.com>; Shuah Khan <skhan@linuxfoundation.org>; Hyun
> Kwon <hyun.kwon@xilinx.com>; Andrew Jeffery <andrew@aj.id.au>; Michael
> Tretter <m.tretter@pengutronix.de>; Moudy Ho <moudy.ho@mediatek.com>;
> kernel@pengutronix.de; Hans Verkuil <hverkuil-cisco@xs4all.nl>; Claudiu
> Beznea <claudiu.beznea@microchip.com>; Ming Qian <ming.qian@nxp.com>;
> Andrew-CT Chen <andrew-ct.chen@mediatek.com>; Alexandre Belloni
> <alexandre.belloni@bootlin.com>; Sylwester Nawrocki
> <s.nawrocki@samsung.com>; linux-aspeed@lists.ozlabs.org; Yunfei Dong
> <yunfei.dong@mediatek.com>; Lad, Prabhakar <prabhakar.csengg@gmail.com>;
> Thierry Reding <thierry.reding@gmail.com>; Guenter Roeck
> <groeck@chromium.org>; chrome-platform@lists.linux.dev; Jonathan Hunter
> <jonathanh@nvidia.com>; linux-rockchip@lists.infradead.org; Fabien Dessenne
> <fabien.dessenne@foss.st.com>; Ezequiel Garcia
> <ezequiel@vanguardiasur.com.ar>; Alain Volmat <alain.volmat@foss.st.com>;
> Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>; Colin Ian King
> <colin.i.king@gmail.com>; linux-media@vger.kernel.org; Jacopo Mondi
> <jacopo@jmondi.org>; Rory Liu <hellojacky0226@hotmail.com>; Martin
> Blumenstingl <martin.blumenstingl@googlemail.com>; linux-arm-
> msm@vger.kernel.org; Sean Wang <sean.wang@mediatek.com>; Maxime Ripard
> <mripard@kernel.org>; Fabrizio Castro <fabrizio.castro.jz@renesas.com>;
> linux-amlogic@lists.infradead.org; linux-arm-kernel@lists.infradead.org;
> Neil Armstrong <neil.armstrong@linaro.org>; Zhou Peng <eagle.zhou@nxp.com>;
> Paul Kocialkowski <paul.kocialkowski@bootlin.com>; Maxime Coquelin
> <mcoquelin.stm32@gmail.com>; linux-mediatek@lists.infradead.org; Jacek
> Anaszewski <jacek.anaszewski@gmail.com>; Dan Carpenter <error27@gmail.com>;
> Sean Young <sean@mess.org>; Xavier Roumegue <xavier.roumegue@oss.nxp.com>;
> Ettore Chimenti <ek5.chimenti@gmail.com>; Vikash Garodia
> <quic_vgarodia@quicinc.com>; linux-tegra@vger.kernel.org; Eduardo Valentin
> <edubezval@gmail.com>; Andrzej Hajda <andrzej.hajda@intel.com>; Fabio
> Estevam <festevam@gmail.com>; Jean-Christophe Trotin <jean-
> christophe.trotin@foss.st.com>; Stanimir Varbanov
> <stanimir.k.varbanov@gmail.com>; Kieran Bingham
> <kieran.bingham@ideasonboard.com>; Jernej Skrabec
> <jernej.skrabec@gmail.com>; Chen-Yu Tsai <wens@csie.org>; Jacob Chen <jacob-
> chen@iotwrt.com>; Joel Stanley <joel@jms.id.au>; Yang Yingliang
> <yangyingliang@huawei.com>; Patrice Chotard <patrice.chotard@foss.st.com>;
> Bin Liu <bin.liu@mediatek.com>; Nathan Chancellor <nathan@kernel.org>;
> Sylwester Nawrocki <sylvester.nawrocki@gmail.com>; Mauro Carvalho Chehab
> <mchehab@kernel.org>; Benson Leung <bleung@chromium.org>; Daniel W. S.
> Almeida <dwlsalmeida@gmail.com>; Qiheng Lin <linqiheng@huawei.com>; Konrad
> Dybcio <konrad.dybcio@linaro.org>; Kieran Bingham
> <kieran.bingham+renesas@ideasonboard.com>; Yang Li
> <yang.lee@linux.alibaba.com>; Sakari Ailus <sakari.ailus@linux.intel.com>;
> Ricardo Ribalda <ribalda@chromium.org>; Shawn Guo <shawnguo@kernel.org>;
> Minghsiu Tsai <minghsiu.tsai@mediatek.com>; Daniel Almeida
> <daniel.almeida@collabora.com>; Alexandre Torgue
> <alexandre.torgue@foss.st.com>; Todor Tomov <todor.too@gmail.com>; Mirela
> Rabulea <mirela.rabulea@nxp.com>; Ajye Huang <ajye_huang@compal.corp-
> partner.google.com>; Scott Chao <scott_chao@wistron.corp-
> partner.google.com>; linux-renesas-soc@vger.kernel.org; Hugues Fruchet
> <hugues.fruchet@foss.st.com>; openbmc@lists.ozlabs.org; Andy Gross
> <agross@kernel.org>; Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>;
> Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>; Benoit
> Parrot <bparrot@ti.com>; Rui Miguel Silva <rmfrfs@gmail.com>; Christophe
> JAILLET <christophe.jaillet@wanadoo.fr>; Yong Deng <yong.deng@magewell.com>;
> Matthias Brugger <matthias.bgg@gmail.com>; Tiffany Lin
> <tiffany.lin@mediatek.com>; AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com>; Bjorn Andersson
> <andersson@kernel.org>; Nicolas Ferre <nicolas.ferre@microchip.com>; Houlong
> Wei <houlong.wei@mediatek.com>; Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org>; Philipp Zabel <p.zabel@pengutronix.de>;
> Niklas Söderlund <niklas.soderlund@ragnatech.se>
> Subject: Re: [PATCH 000/117] media: Convert to platform remove callback
> returning void
> 
> Hello Laurent,
> 
> On Mon, Apr 17, 2023 at 09:19:28AM +0300, Laurent Pinchart wrote:
> > On Mon, Apr 17, 2023 at 08:02:03AM +0200, Uwe Kleine-König wrote:
> > > On Sun, Mar 26, 2023 at 04:30:25PM +0200, Uwe Kleine-König wrote:
> > > > Hello,
> > > >
> > > > this series adapts the platform drivers below drivers/pci to use
> > > > the
> > >
> > > copy&paste failure here: s/pci/media/ of course.
> > >
> > > > .remove_new() callback. Compared to the traditional .remove()
> > > > callback
> > > > .remove_new() returns no value. This is a good thing because the
> > > > driver core doesn't (and cannot) cope for errors during remove.
> > > > The only effect of a non-zero return value in .remove() is that
> > > > the driver core emits a warning. The device is removed anyhow and
> > > > an early return from .remove() usually yields a resource leak.
> > > >
> > > > By changing the remove callback to return void driver authors
> > > > cannot reasonably assume any more that there is some kind of cleanup
> later.
> > > >
> > > > Only three drivers needed some preparation first to make sure they
> > > > return 0 unconditionally in their remove callback. Then all
> > > > drivers could be trivially converted without side effects to
> .remove_new().
> > > >
> > > > The changes to the individual drivers are all orthogonal. If I
> > > > need to resend some patches because of some review feedback, I'd
> > > > like to only send the patches that actually needed changes, so
> > > > please pick up the remaining patches that don't need changing to
> reduce the amount of mail.
> > >
> > > I didn't hear anything back about application of this series. Is
> > > there a blocker somewhere?
> >
> > I think the series got applied to the master branch of
> > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git.
> > It should thus appear in v6.4.
> 
> I guess that linux-stable.git is a copy&paste failure (and it's not there).
> I don't see the series in the master branch of
> git://linuxtv.org/media_tree.git either.
> 
> .. a bit later ...
> 
> ah, it's in git://linuxtv.org/mchehab/media-next.git
> 
> I guess I was just to quick and probably the series will be included in
> today's next.

I believe patchwork <patchwork@linuxtv.org> will send notification to
author and along with people who applied tags for that patch.

I normally get notification from patchwork <patchwork@linuxtv.org>
When the state of patch changes.

Cheers,
Biju

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 000/117] media: Convert to platform remove callback returning void
  2023-04-17  7:57         ` Biju Das
@ 2023-04-17  8:54           ` Uwe Kleine-König
  -1 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-04-17  8:54 UTC (permalink / raw)
  To: Biju Das
  Cc: Laurent Pinchart, Heiko Stuebner, Eddie James, Hans Verkuil,
	Alim Akhtar, Dmitry Osipenko, linux-stm32, Jerome Brunet,
	linux-samsung-soc, Robert Foss, Sean Young, Samuel Holland,
	Kevin Hilman, Michal Simek, Antti Palosaari, NXP Linux Team,
	linux-sunxi, ye xingchen, Sascha Hauer, Łukasz Stelmach,
	Eugen Hristev, Shuah Khan, Andrzej Pietrasiewicz, Hyun Kwon,
	Andrew Jeffery, Michael Tretter, Benoit Parrot, Moudy Ho, kernel,
	Hans Verkuil, Claudiu Beznea, Ming Qian, Andrew-CT Chen,
	Alexandre Belloni, Sylwester Nawrocki, linux-aspeed, Yunfei Dong,
	Lad, Prabhakar, Thierry Reding, Guenter Roeck, chrome-platform,
	Jonathan Hunter, linux-rockchip, Fabien Dessenne,
	Ezequiel Garcia, Alain Volmat, Marek Szyprowski, Colin Ian King,
	linux-media, Jacopo Mondi, Rory Liu, Martin Blumenstingl,
	linux-arm-msm, Sean Wang, Fabrizio Castro, Maxime Ripard,
	linux-amlogic, linux-arm-kernel, Neil Armstrong, Zhou Peng,
	Paul Kocialkowski, Maxime Coquelin, Christophe JAILLET,
	Jacek Anaszewski, Dan Carpenter, Dafna Hirschfeld,
	Xavier Roumegue, Ettore Chimenti, Vikash Garodia,
	Matthias Brugger, Andrzej Hajda, Fabio Estevam,
	Jean-Christophe Trotin, Stanimir Varbanov, Kieran Bingham,
	Jernej Skrabec, Chen-Yu Tsai, Jacob Chen, Joel Stanley,
	Yang Yingliang, Patrice Chotard, Bin Liu, Nathan Chancellor,
	Sylwester Nawrocki, Mauro Carvalho Chehab, Benson Leung,
	Daniel W. S. Almeida, Qiheng Lin, Konrad Dybcio, Kieran Bingham,
	Yang Li, Sakari Ailus, Ricardo Ribalda, Shawn Guo, Minghsiu Tsai,
	Daniel Almeida, Alexandre Torgue, Todor Tomov, Mirela Rabulea,
	Ajye Huang, Scott Chao, linux-renesas-soc, Hugues Fruchet,
	openbmc, Andy Gross, Mikhail Ulyanov, Prabhakar Mahadev Lad,
	Eduardo Valentin, Rui Miguel Silva, linux-mediatek, Yong Deng,
	linux-tegra, Tiffany Lin, AngeloGioacchino Del Regno,
	Bjorn Andersson, Nicolas Ferre, Houlong Wei, Krzysztof Kozlowski,
	Philipp Zabel, Niklas Söderlund

[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]

On Mon, Apr 17, 2023 at 07:57:57AM +0000, Biju Das wrote:
> Hi Uwe,
> > > I think the series got applied to the master branch of
> > > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git.
> > > It should thus appear in v6.4.
> > 
> > I guess that linux-stable.git is a copy&paste failure (and it's not there).
> > I don't see the series in the master branch of
> > git://linuxtv.org/media_tree.git either.
> > 
> > .. a bit later ...
> > 
> > ah, it's in git://linuxtv.org/mchehab/media-next.git
> > 
> > I guess I was just to quick and probably the series will be included in
> > today's next.
> 
> I believe patchwork <patchwork@linuxtv.org> will send notification to
> author and along with people who applied tags for that patch.

Indeed, I got such a notification on Apr 11. But even if I had that on
my radar when asking and considered such notifications reliable in
general, I would have asked, as the patches didn't apprear in next up to
now.

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 255+ messages in thread

* Re: [PATCH 000/117] media: Convert to platform remove callback returning void
@ 2023-04-17  8:54           ` Uwe Kleine-König
  0 siblings, 0 replies; 255+ messages in thread
From: Uwe Kleine-König @ 2023-04-17  8:54 UTC (permalink / raw)
  To: Biju Das
  Cc: Laurent Pinchart, Heiko Stuebner, Eddie James, Hans Verkuil,
	Alim Akhtar, Dmitry Osipenko, linux-stm32, Jerome Brunet,
	linux-samsung-soc, Robert Foss, Sean Young, Samuel Holland,
	Kevin Hilman, Michal Simek, Antti Palosaari, NXP Linux Team,
	linux-sunxi, ye xingchen, Sascha Hauer, Łukasz Stelmach,
	Eugen Hristev, Shuah Khan, Andrzej Pietrasiewicz, Hyun Kwon,
	Andrew Jeffery, Michael Tretter, Benoit Parrot, Moudy Ho, kernel,
	Hans Verkuil, Claudiu Beznea, Ming Qian, Andrew-CT Chen,
	Alexandre Belloni, Sylwester Nawrocki, linux-aspeed, Yunfei Dong,
	Lad, Prabhakar, Thierry Reding, Guenter Roeck, chrome-platform,
	Jonathan Hunter, linux-rockchip, Fabien Dessenne,
	Ezequiel Garcia, Alain Volmat, Marek Szyprowski, Colin Ian King,
	linux-media, Jacopo Mondi, Rory Liu, Martin Blumenstingl,
	linux-arm-msm, Sean Wang, Fabrizio Castro, Maxime Ripard,
	linux-amlogic, linux-arm-kernel, Neil Armstrong, Zhou Peng,
	Paul Kocialkowski, Maxime Coquelin, Christophe JAILLET,
	Jacek Anaszewski, Dan Carpenter, Dafna Hirschfeld,
	Xavier Roumegue, Ettore Chimenti, Vikash Garodia,
	Matthias Brugger, Andrzej Hajda, Fabio Estevam,
	Jean-Christophe Trotin, Stanimir Varbanov, Kieran Bingham,
	Jernej Skrabec, Chen-Yu Tsai, Jacob Chen, Joel Stanley,
	Yang Yingliang, Patrice Chotard, Bin Liu, Nathan Chancellor,
	Sylwester Nawrocki, Mauro Carvalho Chehab, Benson Leung,
	Daniel W. S. Almeida, Qiheng Lin, Konrad Dybcio, Kieran Bingham,
	Yang Li, Sakari Ailus, Ricardo Ribalda, Shawn Guo, Minghsiu Tsai,
	Daniel Almeida, Alexandre Torgue, Todor Tomov, Mirela Rabulea,
	Ajye Huang, Scott Chao, linux-renesas-soc, Hugues Fruchet,
	openbmc, Andy Gross, Mikhail Ulyanov, Prabhakar Mahadev Lad,
	Eduardo Valentin, Rui Miguel Silva, linux-mediatek, Yong Deng,
	linux-tegra, Tiffany Lin, AngeloGioacchino Del Regno,
	Bjorn Andersson, Nicolas Ferre, Houlong Wei, Krzysztof Kozlowski,
	Philipp Zabel, Niklas Söderlund


[-- Attachment #1.1: Type: text/plain, Size: 1167 bytes --]

On Mon, Apr 17, 2023 at 07:57:57AM +0000, Biju Das wrote:
> Hi Uwe,
> > > I think the series got applied to the master branch of
> > > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git.
> > > It should thus appear in v6.4.
> > 
> > I guess that linux-stable.git is a copy&paste failure (and it's not there).
> > I don't see the series in the master branch of
> > git://linuxtv.org/media_tree.git either.
> > 
> > .. a bit later ...
> > 
> > ah, it's in git://linuxtv.org/mchehab/media-next.git
> > 
> > I guess I was just to quick and probably the series will be included in
> > today's next.
> 
> I believe patchwork <patchwork@linuxtv.org> will send notification to
> author and along with people who applied tags for that patch.

Indeed, I got such a notification on Apr 11. But even if I had that on
my radar when asking and considered such notifications reliable in
general, I would have asked, as the patches didn't apprear in next up to
now.

Thanks
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] 255+ messages in thread

end of thread, other threads:[~2023-05-02  7:27 UTC | newest]

Thread overview: 255+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-26 14:30 [PATCH 000/117] media: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-26 14:30 ` Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 001/117] media: cec-gpio: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 001/117] media: cros-ec-cec: Don't exit early in .remove() callback Uwe Kleine-König
2023-03-26 14:52   ` Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 002/117] media: cec-gpio: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-26 14:49   ` Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 002/117] media: cros-ec-cec: Don't exit early in .remove() callback Uwe Kleine-König
2023-03-26 14:45   ` Guenter Roeck
2023-03-27  7:52   ` Hans Verkuil
2023-03-26 14:30 ` [PATCH 003/117] media: cros-ec-cec: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-26 14:46   ` Guenter Roeck
2023-03-26 14:30 ` [PATCH 004/117] media: ao-cec-g12a: " Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-04-03 20:39   ` Martin Blumenstingl
2023-04-03 20:39     ` Martin Blumenstingl
2023-04-03 20:39     ` Martin Blumenstingl
2023-03-26 14:30 ` [PATCH 005/117] media: ao-cec: " Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-04-03 20:39   ` Martin Blumenstingl
2023-04-03 20:39     ` Martin Blumenstingl
2023-04-03 20:39     ` Martin Blumenstingl
2023-03-26 14:30 ` [PATCH 006/117] media: s5p_cec: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 007/117] media: seco-cec: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 008/117] media: stih-cec: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 009/117] media: stm32-cec: " Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 010/117] media: tegra_cec: " Uwe Kleine-König
2023-04-04 10:38   ` Thierry Reding
2023-03-26 14:30 ` [PATCH 011/117] media: rtl2832_sdr: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 012/117] media: zd1301_demod: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 013/117] media: allegro-core: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 014/117] media: ge2d: " Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-04-03 20:40   ` Martin Blumenstingl
2023-04-03 20:40     ` Martin Blumenstingl
2023-04-03 20:40     ` Martin Blumenstingl
2023-03-26 14:30 ` [PATCH 015/117] media: vpu_core: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 016/117] media: vpu_drv: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 017/117] media: aspeed-video: " Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 018/117] media: atmel-isi: " Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-04-03 11:32   ` Nicolas Ferre
2023-04-03 11:32     ` Nicolas Ferre
2023-03-26 14:30 ` [PATCH 019/117] media: cdns-csi2rx: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 020/117] media: cdns-csi2tx: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 021/117] media: coda-common: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 022/117] media: pxa_camera: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 023/117] media: m2m-deinterlace: " Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 024/117] media: marvell: Simplify remove callback Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 025/117] media: marvell: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 026/117] media: mtk_jpeg_core: " Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 027/117] media: mtk_mdp_core: " Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 028/117] media: mtk-mdp3-core: " Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 029/117] media: mtk_vcodec_dec_drv: " Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 030/117] media: mtk_vcodec_enc_drv: " Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 031/117] media: mtk_vpu: " Uwe Kleine-König
2023-03-26 14:30   ` Uwe Kleine-König
2023-03-26 14:30 ` [PATCH 032/117] media: microchip-csi2dc: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 033/117] media: microchip-sama5d2-isc: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 034/117] media: microchip-sama7g5-isc: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 035/117] media: vde: " Uwe Kleine-König
2023-04-04 10:39   ` Thierry Reding
2023-03-26 14:31 ` [PATCH 036/117] media: dw100: " Uwe Kleine-König
2023-03-27  6:56   ` Xavier Roumegue (OSS)
2023-03-26 14:31 ` [PATCH 037/117] media: mxc-jpeg: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 038/117] media: imx-mipi-csis: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 039/117] media: imx-pxp: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 040/117] media: imx7-media-csi: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 041/117] media: mx2_emmaprp: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 042/117] media: camss: " Uwe Kleine-König
2023-03-27  8:45   ` Konrad Dybcio
2023-03-26 14:31 ` [PATCH 043/117] media: venus: Warn only once about problems in .remove() Uwe Kleine-König
2023-03-27  8:45   ` Konrad Dybcio
2023-03-26 14:31 ` [PATCH 044/117] media: venus: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-27  8:45   ` Konrad Dybcio
2023-03-26 14:31 ` [PATCH 045/117] media: vdec: " Uwe Kleine-König
2023-03-27  8:46   ` Konrad Dybcio
2023-03-26 14:31 ` [PATCH 046/117] media: venc: " Uwe Kleine-König
2023-03-27  8:46   ` Konrad Dybcio
2023-03-26 14:31 ` [PATCH 047/117] media: rcar-fcp: " Uwe Kleine-König
2023-03-27  7:04   ` Geert Uytterhoeven
2023-03-26 14:31 ` [PATCH 048/117] media: rcar-isp: " Uwe Kleine-König
2023-03-27  7:10   ` Geert Uytterhoeven
2023-03-27  8:48   ` Niklas Söderlund
2023-03-26 14:31 ` [PATCH 049/117] media: rcar-core: " Uwe Kleine-König
2023-03-27  7:09   ` Geert Uytterhoeven
2023-03-27  8:47   ` Niklas Söderlund
2023-03-26 14:31 ` [PATCH 050/117] media: rcar-csi2: " Uwe Kleine-König
2023-03-27  7:13   ` Geert Uytterhoeven
2023-03-27  8:49   ` Niklas Söderlund
2023-03-26 14:31 ` [PATCH 051/117] media: rcar_drif: " Uwe Kleine-König
2023-03-27  7:12   ` Geert Uytterhoeven
2023-03-28 13:54   ` Fabrizio Castro
2023-03-26 14:31 ` [PATCH 052/117] media: rcar_fdp1: " Uwe Kleine-König
2023-03-27  7:12   ` Geert Uytterhoeven
2023-03-27  8:39   ` Kieran Bingham
2023-03-26 14:31 ` [PATCH 053/117] media: rcar_jpu: " Uwe Kleine-König
2023-03-27  7:11   ` Geert Uytterhoeven
2023-03-26 14:31 ` [PATCH 054/117] media: renesas-ceu: " Uwe Kleine-König
2023-03-27  7:13   ` Geert Uytterhoeven
2023-03-26 14:31 ` [PATCH 055/117] media: rzg2l-core: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 056/117] media: rzg2l-csi2: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 057/117] media: sh_vou: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 058/117] media: vsp1_drv: " Uwe Kleine-König
2023-03-27  7:11   ` Geert Uytterhoeven
2023-03-27  8:41   ` Kieran Bingham
2023-03-26 14:31 ` [PATCH 059/117] media: rga: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 060/117] media: rkisp1-dev: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 061/117] media: gsc-core: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 062/117] media: fimc-core: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 063/117] media: fimc-is-i2c: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 064/117] media: fimc-is: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 065/117] media: fimc-lite: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 066/117] media: media-dev: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 067/117] media: mipi-csis: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 068/117] media: camif-core: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 069/117] media: g2d: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
     [not found]   ` <CGME20230403095327eucas1p1095d54fc1e1b89d61d9e974b3cbea853@eucas1p1.samsung.com>
2023-04-03  9:53     ` Lukasz Stelmach
2023-04-03  9:53       ` Lukasz Stelmach
2023-03-26 14:31 ` [PATCH 070/117] media: jpeg-core: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-27 12:31   ` Andrzej Pietrasiewicz
2023-03-27 12:31     ` Andrzej Pietrasiewicz
2023-03-26 14:31 ` [PATCH 071/117] media: s5p_mfc: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-27  8:34   ` Andrzej Hajda
2023-03-27  8:34     ` Andrzej Hajda
2023-03-26 14:31 ` [PATCH 072/117] media: bdisp-v4l2: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 073/117] media: c8sectpfe-core: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 074/117] media: delta-v4l2: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 075/117] media: hva-v4l2: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 076/117] media: dma2d: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 077/117] media: stm32-dcmi: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 078/117] media: sun4i_csi: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 18:19   ` Jernej Škrabec
2023-03-26 18:19     ` Jernej Škrabec
2023-03-26 14:31 ` [PATCH 079/117] media: sun6i_csi: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 18:19   ` Jernej Škrabec
2023-03-26 18:19     ` Jernej Škrabec
2023-03-26 14:31 ` [PATCH 080/117] media: sun6i_mipi_csi2: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 18:18   ` Jernej Škrabec
2023-03-26 18:18     ` Jernej Škrabec
2023-03-26 14:31 ` [PATCH 081/117] media: sun8i_a83t_mipi_csi2: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 18:18   ` Jernej Škrabec
2023-03-26 18:18     ` Jernej Škrabec
2023-03-26 14:31 ` [PATCH 082/117] media: sun8i-di: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 18:17   ` Jernej Škrabec
2023-03-26 18:17     ` Jernej Škrabec
2023-03-26 14:31 ` [PATCH 083/117] media: sun8i_rotate: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 18:18   ` Jernej Škrabec
2023-03-26 18:18     ` Jernej Škrabec
2023-03-26 14:31 ` [PATCH 084/117] media: am437x-vpfe: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 085/117] media: cal: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 086/117] media: vpif: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 087/117] media: vpif_capture: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 088/117] media: vpif_display: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 089/117] media: omap_vout: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 090/117] media: isp: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 091/117] media: vpe: " Uwe Kleine-König
2023-03-26 14:31 ` [PATCH 092/117] media: hantro_drv: " Uwe Kleine-König
2023-03-26 14:31   ` Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 093/117] media: via-camera: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 094/117] media: video-mux: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 095/117] media: xilinx-csi2rxss: " Uwe Kleine-König
2023-03-26 14:32   ` Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 096/117] media: xilinx-tpg: " Uwe Kleine-König
2023-03-26 14:32   ` Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 097/117] media: xilinx-vipp: " Uwe Kleine-König
2023-03-26 14:32   ` Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 098/117] media: xilinx-vtc: " Uwe Kleine-König
2023-03-26 14:32   ` Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 099/117] media: radio-si476x: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 100/117] media: radio-timb: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 101/117] media: radio-wl1273: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 102/117] media: radio-platform-si4713: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 103/117] media: gpio-ir-recv: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 104/117] media: img-ir-core: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 105/117] media: ir-hix5hd2: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 106/117] media: meson-ir-tx: " Uwe Kleine-König
2023-03-26 14:32   ` Uwe Kleine-König
2023-03-26 14:32   ` Uwe Kleine-König
2023-04-03 20:40   ` Martin Blumenstingl
2023-04-03 20:40     ` Martin Blumenstingl
2023-04-03 20:40     ` Martin Blumenstingl
2023-03-26 14:32 ` [PATCH 107/117] media: meson-ir: " Uwe Kleine-König
2023-03-26 14:32   ` Uwe Kleine-König
2023-03-26 14:32   ` Uwe Kleine-König
2023-04-03 20:41   ` Martin Blumenstingl
2023-04-03 20:41     ` Martin Blumenstingl
2023-04-03 20:41     ` Martin Blumenstingl
2023-03-26 14:32 ` [PATCH 108/117] media: mtk-cir: " Uwe Kleine-König
2023-03-26 14:32   ` Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 109/117] media: st_rc: " Uwe Kleine-König
2023-03-26 14:32   ` Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 110/117] media: sunxi-cir: " Uwe Kleine-König
2023-03-26 14:32   ` Uwe Kleine-König
2023-03-26 18:19   ` Jernej Škrabec
2023-03-26 18:19     ` Jernej Škrabec
2023-03-26 14:32 ` [PATCH 111/117] media: vicodec-core: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 112/117] media: vidtv_bridge: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 113/117] media: vim2m: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 114/117] media: vimc-core: " Uwe Kleine-König
2023-03-27  8:42   ` Kieran Bingham
2023-03-27 15:25     ` Shuah Khan
2023-03-26 14:32 ` [PATCH 115/117] media: visl-core: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 116/117] media: vivid-core: " Uwe Kleine-König
2023-03-26 14:32 ` [PATCH 117/117] media: it913x: " Uwe Kleine-König
2023-04-17  6:02 ` [PATCH 000/117] media: " Uwe Kleine-König
2023-04-17  6:02   ` Uwe Kleine-König
2023-04-17  6:19   ` Laurent Pinchart
2023-04-17  6:19     ` Laurent Pinchart
2023-04-17  7:30     ` Uwe Kleine-König
2023-04-17  7:30       ` Uwe Kleine-König
2023-04-17  7:35       ` Laurent Pinchart
2023-04-17  7:35         ` Laurent Pinchart
2023-04-17  7:57       ` Biju Das
2023-04-17  7:57         ` Biju Das
2023-04-17  8:54         ` Uwe Kleine-König
2023-04-17  8:54           ` Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.