Skip to content

dma: mv_xor: convert to devm resource management

Rosen Penev dmaengine lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 0 repliesNew
  2. v13 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9dmaengine: mv_xor: initialize chan state before requesting IRQdrivers/dma/mv_xor.c+12 -120 replies
2/9dmaengine: mv_xor: fix use-after-free in probe error pathdrivers/dma/mv_xor.c+11 -00 replies
3/9dmaengine: mv_xor: bound maximum channels for Armada 37xxdrivers/dma/mv_xor.c+2 -10 replies
4/9dmaengine: mv_xor: abort channel before freeing resources on timeoutdrivers/dma/mv_xor.c+17 -40 replies
5/9dmaengine: mv_xor: use devm_clk_get_optional_enableddrivers/dma/mv_xor.c+3 -110 replies
6/9dmaengine: mv_xor: switch to of_irq_get()drivers/dma/mv_xor.c+4 -80 replies
7/9dmaengine: mv_xor: use devm for dma pool and irqdrivers/dma/mv_xor.c+7 -160 replies
8/9dmaengine: mv_xor: allocate dummy buffers with dmam_alloc_coherentdrivers/dma/mv_xor.c drivers/dma/mv_xor.h+18 -360 replies
9/9dmaengine: mv_xor: add missing platform remove functiondrivers/dma/mv_xor.c+11 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCHv2 0/9] dma: mv_xor: convert to devm resource management

Convert the mv_xor driver to use managed device resources (devm) to simplify error handling and removal paths.

Patch 5 replaces the open-coded clock acquire/enable/disable/put with devm_clk_get_optional_enabled, eliminating manual clock cleanup in the probe error path.

Patch 6 adds the missing platform remove callback so that channels, DMA devices, and IRQs are properly cleaned up on driver unbind.

Patch 7 converts DMA pool allocation and IRQ requests to their devm counterparts, allowing removal of the err_free_irq and err_free_dma error labels.

v2: add more sashiko fixes.

Rosen Penev (9):
dmaengine: mv_xor: initialize chan state before requesting IRQ
dmaengine: mv_xor: fix use-after-free in probe error path
dmaengine: mv_xor: bound maximum channels for Armada 37xx
dmaengine: mv_xor: abort channel before freeing resources on timeout
dmaengine: mv_xor: use devm_clk_get_optional_enabled
dmaengine: mv_xor: switch to of_irq_get()
dmaengine: mv_xor: use devm for dma pool and irq
dmaengine: mv_xor: allocate dummy buffers with dmam_alloc_coherent
dmaengine: mv_xor: add missing platform remove function

 drivers/dma/mv_xor.c | 161 +++++++++++++++++++++----------------------
 drivers/dma/mv_xor.h |   4 +-
 2 files changed, 81 insertions(+), 84 deletions(-)

--
2.54.0