Skip to content

dmaengine: introduce sg_nents_for_dma() and convert users

Andy Shevchenko dmaengine linux-arm-kernel linux-arm-msm lkml 4 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest13 patches 2 repliesApplied
  2. v413 patches 4 repliesApplied
  3. v313 patches 4 repliesApplied
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v213 patches9 repliesSuperseded

Changes in v5 from the cover letter

- fixed W=1 warning (Vinod)
- make W=1 the whole folder in allyesconfig and allmodconfig configurations

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/13scatterlist: introduce sg_nents_for_dma() helperinclude/linux/scatterlist.h lib/scatterlist.c+28 -00 replies
2/13dmaengine: altera-msgdma: use sg_nents_for_dma() helperdrivers/dma/altera-msgdma.c+2 -40 replies
3/13dmaengine: axi-dmac: use sg_nents_for_dma() helperdrivers/dma/dma-axi-dmac.c+1 -41 reply
4/13dmaengine: bcm2835-dma: use sg_nents_for_dma() helperdrivers/dma/bcm2835-dma.c+1 -180 replies
5/13dmaengine: dw-axi-dmac: use sg_nents_for_dma() helperdrivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c+2 -40 replies
6/13dmaengine: k3dma: use sg_nents_for_dma() helperdrivers/dma/k3dma.c+2 -70 replies
7/13dmaengine: lgm: use sg_nents_for_dma() helperdrivers/dma/lgm/lgm-dma.c+2 -70 replies
8/13dmaengine: pxa-dma: use sg_nents_for_dma() helperdrivers/dma/pxa_dma.c+2 -30 replies
9/13dmaengine: qcom: adm: use sg_nents_for_dma() helperdrivers/dma/qcom/qcom_adm.c+4 -50 replies
10/13dmaengine: qcom: bam_dma: use sg_nents_for_dma() helperdrivers/dma/qcom/bam_dma.c+2 -70 replies
11/13dmaengine: sa11x0: use sg_nents_for_dma() helperdrivers/dma/sa11x0-dma.c+2 -40 replies
12/13dmaengine: sh: use sg_nents_for_dma() helperdrivers/dma/sh/shdma-base.c+2 -30 replies
13/13dmaengine: xilinx: xdma: use sg_nents_for_dma() helperdrivers/dma/xilinx/xdma.c+2 -40 replies

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchBjorn AnderssonNuno Sá
1/13R-b
2/13R-b
3/13R-b R-b
4/13R-b
5/13R-b
6/13R-b
7/13R-b
8/13R-b
9/13R-b
10/13R-b
11/13R-b
12/13R-b
13/13R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 00/13] dmaengine: introduce sg_nents_for_dma() and convert users

A handful of the DMAengine drivers use same routine to calculate the number of SG entries needed for the given DMA transfer. Provide a common helper for them and convert.

I left the new helper on SG level of API because brief grepping shows potential candidates outside of DMA engine, e.g.:

drivers/crypto/chelsio/chcr_algo.c:154: nents += DIV_ROUND_UP(less, entlen); drivers/spi/spi-stm32.c:1495: /* Count the number of entries needed */

Changelog v5:
- fixed W=1 warning (Vinod)
- make W=1 the whole folder in allyesconfig and allmodconfig configurations

v4: <[email protected]>

Changelog v4:
- fixed compilation errors (Vinod)

v3: <[email protected]>

Changelog v3:
- added missed EXPORT_SYMBOL() (Bjorn)
- left the return type as signed int (as agreed with Bjorn)
- collected tags (Bjorn)

v2: <[email protected]>

Changelog v2:
- dropped outdated patches (only 9 years passed :-)
- rebased on top of the current kernel
- left API SG wide It might

v1: https://patchwork.kernel.org/project/linux-dmaengine/patch/[email protected]/

*** BLURB HERE ***

Andy Shevchenko (13):
scatterlist: introduce sg_nents_for_dma() helper
dmaengine: altera-msgdma: use sg_nents_for_dma() helper
dmaengine: axi-dmac: use sg_nents_for_dma() helper
dmaengine: bcm2835-dma: use sg_nents_for_dma() helper
dmaengine: dw-axi-dmac: use sg_nents_for_dma() helper
dmaengine: k3dma: use sg_nents_for_dma() helper
dmaengine: lgm: use sg_nents_for_dma() helper
dmaengine: pxa-dma: use sg_nents_for_dma() helper
dmaengine: qcom: adm: use sg_nents_for_dma() helper
dmaengine: qcom: bam_dma: use sg_nents_for_dma() helper
dmaengine: sa11x0: use sg_nents_for_dma() helper
dmaengine: sh: use sg_nents_for_dma() helper
dmaengine: xilinx: xdma: use sg_nents_for_dma() helper

 drivers/dma/altera-msgdma.c                   |  6 ++---
 drivers/dma/bcm2835-dma.c                     | 19 +-------------
 drivers/dma/dma-axi-dmac.c                    |  5 +---
 .../dma/dw-axi-dmac/dw-axi-dmac-platform.c    |  6 ++---
 drivers/dma/k3dma.c                           |  9 ++-----
 drivers/dma/lgm/lgm-dma.c                     |  9 ++-----
 drivers/dma/pxa_dma.c                         |  5 ++--
 drivers/dma/qcom/bam_dma.c                    |  9 ++-----
 drivers/dma/qcom/qcom_adm.c                   |  9 +++----
 drivers/dma/sa11x0-dma.c                      |  6 ++---
 drivers/dma/sh/shdma-base.c                   |  5 ++--
 drivers/dma/xilinx/xdma.c                     |  6 ++---
 include/linux/scatterlist.h                   |  2 ++
 lib/scatterlist.c                             | 26 +++++++++++++++++++
 14 files changed, 52 insertions(+), 70 deletions(-)
Signature · 1 line
2.50.1