[PATCH 00/59] dma: Convert to platform remove callback returning void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

this series convert nearly all platform drivers below drivers/dma to use
.remove_new(). The motivation is to get rid of an integer return code
that is (mostly) ignored by the platform driver core and error prone on
the driver side.

See commit 5c5a7680e67b ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

There are 4 drivers I didn't convert in this series:

	drivers/dma/milbeaut-hdmac.c
	drivers/dma/milbeaut-xdmac.c
	drivers/dma/uniphier-mdmac.c
	drivers/dma/uniphier-xdmac.c

These all might return early in .remove() if dmaengine_terminate_sync()
fails. I only looked deeper into the first one, and this shows exactly
the error that is easy to make with .remove() returning an int: When
returning early from .remove(), some cleanup (here:
dma_async_device_unregister()) is skipped. So the dma device stays
known, but the device is still unregistered and the devm allocated stuff
(here e.g. *mdev) is freed. So it can probably easily happen, that
something tries to use the dma device and this will likely result in an
oops.

I don't know enough about the dma framework to address this properly,
maybe someone else knows what to do?

There are no interdependencies between the patches. As there are still
quite a few drivers to convert, I'm happy about every patch that makes
it in. So even if there is a merge conflict with one patch until you
apply or I picked a wrong subject prefix, please apply the remainder of
this series anyhow.

Best regards
Uwe


Uwe Kleine-König (59):
  dma: altera-msgdma: Convert to platform remove callback returning void
  dma: apple-admac: Convert to platform remove callback returning void
  dma: at_hdmac: Convert to platform remove callback returning void
  dma: at_xdmac: Convert to platform remove callback returning void
  dma: bcm-sba-raid: Convert to platform remove callback returning void
  dma: bcm2835-dma: Convert to platform remove callback returning void
  dma: bestcomm: bestcomm: Convert to platform remove callback returning
    void
  dma: dma-axi-dmac: Convert to platform remove callback returning void
  dma: dma-jz4780: Convert to platform remove callback returning void
  dma: dw-axi-dmac: dw-axi-dmac-platform: Convert to platform remove
    callback returning void
  dma: dw: platform: Convert to platform remove callback returning void
  dma: fsl-edma-main: Convert to platform remove callback returning void
  dma: fsl-qdma: Convert to platform remove callback returning void
  dma: fsl_raid: Convert to platform remove callback returning void
  dma: fsldma: Convert to platform remove callback returning void
  dma: idma64: Convert to platform remove callback returning void
  dma: img-mdc-dma: Convert to platform remove callback returning void
  dma: imx-dma: Convert to platform remove callback returning void
  dma: imx-sdma: Convert to platform remove callback returning void
  dma: k3dma: Convert to platform remove callback returning void
  dma: mcf-edma-main: Convert to platform remove callback returning void
  dma: mediatek: mtk-cqdma: Convert to platform remove callback
    returning void
  dma: mediatek: mtk-hsdma: Convert to platform remove callback
    returning void
  dma: mediatek: mtk-uart-apdma: Convert to platform remove callback
    returning void
  dma: mmp_pdma: Convert to platform remove callback returning void
  dma: mmp_tdma: Convert to platform remove callback returning void
  dma: moxart-dma: Convert to platform remove callback returning void
  dma: mpc512x_dma: Convert to platform remove callback returning void
  dma: mv_xor_v2: Convert to platform remove callback returning void
  dma: nbpfaxi: Convert to platform remove callback returning void
  dma: owl-dma: Convert to platform remove callback returning void
  dma: ppc4xx: adma: Convert to platform remove callback returning void
  dma: pxa_dma: Convert to platform remove callback returning void
  dma: qcom: bam_dma: Convert to platform remove callback returning void
  dma: qcom: hidma: Convert to platform remove callback returning void
  dma: qcom: qcom_adm: Convert to platform remove callback returning
    void
  dma: sa11x0-dma: Convert to platform remove callback returning void
  dma: sf-pdma: sf-pdma: Convert to platform remove callback returning
    void
  dma: sh: rcar-dmac: Convert to platform remove callback returning void
  dma: sh: rz-dmac: Convert to platform remove callback returning void
  dma: sh: shdmac: Convert to platform remove callback returning void
  dma: sh: usb-dmac: Convert to platform remove callback returning void
  dma: sprd-dma: Convert to platform remove callback returning void
  dma: st_fdma: Convert to platform remove callback returning void
  dma: sun4i-dma: Convert to platform remove callback returning void
  dma: sun6i-dma: Convert to platform remove callback returning void
  dma: tegra186-gpc-dma: Convert to platform remove callback returning
    void
  dma: tegra20-apb-dma: Convert to platform remove callback returning
    void
  dma: tegra210-adma: Convert to platform remove callback returning void
  dma: ti: cppi41: Convert to platform remove callback returning void
  dma: ti: edma: Convert to platform remove callback returning void
  dma: ti: omap-dma: Convert to platform remove callback returning void
  dma: timb_dma: Convert to platform remove callback returning void
  dma: txx9dmac: Convert to platform remove callback returning void
  dma: xgene-dma: Convert to platform remove callback returning void
  dma: xilinx: xdma: Convert to platform remove callback returning void
  dma: xilinx: xilinx_dma: Convert to platform remove callback returning
    void
  dma: xilinx: xilinx_dpdma: Convert to platform remove callback
    returning void
  dma: xilinx: zynqmp_dma: Convert to platform remove callback returning
    void

 drivers/dma/altera-msgdma.c                    |  6 ++----
 drivers/dma/apple-admac.c                      |  6 ++----
 drivers/dma/at_hdmac.c                         |  6 ++----
 drivers/dma/at_xdmac.c                         |  6 ++----
 drivers/dma/bcm-sba-raid.c                     |  6 ++----
 drivers/dma/bcm2835-dma.c                      |  6 ++----
 drivers/dma/bestcomm/bestcomm.c                |  6 ++----
 drivers/dma/dma-axi-dmac.c                     |  6 ++----
 drivers/dma/dma-jz4780.c                       |  6 ++----
 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c |  6 ++----
 drivers/dma/dw/platform.c                      |  6 ++----
 drivers/dma/fsl-edma-main.c                    |  6 ++----
 drivers/dma/fsl-qdma.c                         |  5 ++---
 drivers/dma/fsl_raid.c                         |  6 ++----
 drivers/dma/fsldma.c                           |  6 ++----
 drivers/dma/idma64.c                           |  6 ++----
 drivers/dma/img-mdc-dma.c                      |  6 ++----
 drivers/dma/imx-dma.c                          |  6 ++----
 drivers/dma/imx-sdma.c                         |  5 ++---
 drivers/dma/k3dma.c                            |  5 ++---
 drivers/dma/mcf-edma-main.c                    |  6 ++----
 drivers/dma/mediatek/mtk-cqdma.c               |  6 ++----
 drivers/dma/mediatek/mtk-hsdma.c               |  6 ++----
 drivers/dma/mediatek/mtk-uart-apdma.c          |  6 ++----
 drivers/dma/mmp_pdma.c                         |  5 ++---
 drivers/dma/mmp_tdma.c                         |  6 ++----
 drivers/dma/moxart-dma.c                       |  6 ++----
 drivers/dma/mpc512x_dma.c                      |  6 ++----
 drivers/dma/mv_xor_v2.c                        |  6 ++----
 drivers/dma/nbpfaxi.c                          |  6 ++----
 drivers/dma/owl-dma.c                          |  6 ++----
 drivers/dma/ppc4xx/adma.c                      |  5 ++---
 drivers/dma/pxa_dma.c                          |  5 ++---
 drivers/dma/qcom/bam_dma.c                     |  6 ++----
 drivers/dma/qcom/hidma.c                       |  6 ++----
 drivers/dma/qcom/qcom_adm.c                    |  6 ++----
 drivers/dma/sa11x0-dma.c                       |  6 ++----
 drivers/dma/sf-pdma/sf-pdma.c                  |  6 ++----
 drivers/dma/sh/rcar-dmac.c                     |  6 ++----
 drivers/dma/sh/rz-dmac.c                       |  6 ++----
 drivers/dma/sh/shdmac.c                        |  6 ++----
 drivers/dma/sh/usb-dmac.c                      |  6 ++----
 drivers/dma/sprd-dma.c                         |  5 ++---
 drivers/dma/st_fdma.c                          |  6 ++----
 drivers/dma/sun4i-dma.c                        |  6 ++----
 drivers/dma/sun6i-dma.c                        |  6 ++----
 drivers/dma/tegra186-gpc-dma.c                 |  6 ++----
 drivers/dma/tegra20-apb-dma.c                  |  6 ++----
 drivers/dma/tegra210-adma.c                    |  6 ++----
 drivers/dma/ti/cppi41.c                        |  5 ++---
 drivers/dma/ti/edma.c                          |  6 ++----
 drivers/dma/ti/omap-dma.c                      |  6 ++----
 drivers/dma/timb_dma.c                         |  5 ++---
 drivers/dma/txx9dmac.c                         | 10 ++++------
 drivers/dma/xgene-dma.c                        |  6 ++----
 drivers/dma/xilinx/xdma.c                      |  6 ++----
 drivers/dma/xilinx/xilinx_dma.c                |  6 ++----
 drivers/dma/xilinx/xilinx_dpdma.c              |  6 ++----
 drivers/dma/xilinx/zynqmp_dma.c                |  6 ++----
 59 files changed, 120 insertions(+), 229 deletions(-)


base-commit: 29e400e3ea486bf942b214769fc9778098114113
-- 
2.40.1




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux