Skip to contentSkip to conversation

dmaengine: at_hdmac: support COMPILE_TEST

PATCH Applied Rosen Penev 3 participants 6 messages Nov 6, 2025 – Nov 22, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover dmaengine: at_hdmac: support COMPILE_TEST

First commit fixes compilation under 64-bit and second actually enables it.

Rosen Penev (2):
dmaengine: at_hdmac: fix formats under 64-bit
dmaengine: at_hdmac: add COMPILE_TEST support

 drivers/dma/Kconfig    | 2 +-
 drivers/dma/at_hdmac.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

--
2.51.2

#1 lore raw

PATCH 1/2 dmaengine: at_hdmac: fix formats under 64-bit

size_t formats under 32-bit evaluate to the same thing and GCC does not warn against it. Not the case with 64-bit.

---
 drivers/dma/at_hdmac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/dma/at_hdmac.c +3 -3
index 2d147712cbc6..7d226453961f 100644
@@ -887,7 +887,7 @@ atc_prep_dma_interleaved(struct dma_chan *chan,
 	first = xt->sgl;
 
 	dev_info(chan2dev(chan),
-		 "%s: src=%pad, dest=%pad, numf=%d, frame_size=%d, flags=0x%lx\n",
+		 "%s: src=%pad, dest=%pad, numf=%zu, frame_size=%zu, flags=0x%lx\n",
 		__func__, &xt->src_start, &xt->dst_start, xt->numf,
 		xt->frame_size, flags);
 
@@ -1174,7 +1174,7 @@ atc_prep_dma_memset_sg(struct dma_chan *chan,
 	int			i;
 	int			ret;
 
-	dev_vdbg(chan2dev(chan), "%s: v0x%x l0x%zx f0x%lx\n", __func__,
+	dev_vdbg(chan2dev(chan), "%s: v0x%x l0x%x f0x%lx\n", __func__,
 		 value, sg_len, flags);
 
 	if (unlikely(!sgl || !sg_len)) {
@@ -1503,7 +1503,7 @@ atc_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
 	unsigned int		periods = buf_len / period_len;
 	unsigned int		i;
 
-	dev_vdbg(chan2dev(chan), "prep_dma_cyclic: %s buf@%pad - %d (%d/%d)\n",
+	dev_vdbg(chan2dev(chan), "prep_dma_cyclic: %s buf@%pad - %d (%zu/%zu)\n",
 			direction == DMA_MEM_TO_DEV ? "TO DEVICE" : "FROM DEVICE",
 			&buf_addr,
 			periods, buf_len, period_len);
Signature · 1 line
2.51.2
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH dmaengine 1/2] dmaengine: at_hdmac: fix formats under 64-bit

Quoted 4 lines · Rosen Penev

size_t formats under 32-bit evaluate to the same thing and GCC does not warn against it. Not the case with 64-bit.

Quoted 35 lines
---
 drivers/dma/at_hdmac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/dma/at_hdmac.c +3 -3
index 2d147712cbc6..7d226453961f 100644
@@ -887,7 +887,7 @@ atc_prep_dma_interleaved(struct dma_chan *chan,
 	first = xt->sgl;
 
 	dev_info(chan2dev(chan),
-		 "%s: src=%pad, dest=%pad, numf=%d, frame_size=%d, flags=0x%lx\n",
+		 "%s: src=%pad, dest=%pad, numf=%zu, frame_size=%zu, flags=0x%lx\n",
 		__func__, &xt->src_start, &xt->dst_start, xt->numf,
 		xt->frame_size, flags);
 
@@ -1174,7 +1174,7 @@ atc_prep_dma_memset_sg(struct dma_chan *chan,
 	int			i;
 	int			ret;
 
-	dev_vdbg(chan2dev(chan), "%s: v0x%x l0x%zx f0x%lx\n", __func__,
+	dev_vdbg(chan2dev(chan), "%s: v0x%x l0x%x f0x%lx\n", __func__,
 		 value, sg_len, flags);
 
 	if (unlikely(!sgl || !sg_len)) {
@@ -1503,7 +1503,7 @@ atc_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
 	unsigned int		periods = buf_len / period_len;
 	unsigned int		i;
 
-	dev_vdbg(chan2dev(chan), "prep_dma_cyclic: %s buf@%pad - %d (%d/%d)\n",
+	dev_vdbg(chan2dev(chan), "prep_dma_cyclic: %s buf@%pad - %d (%zu/%zu)\n",
 			direction == DMA_MEM_TO_DEV ? "TO DEVICE" : "FROM DEVICE",
 			&buf_addr,
 			periods, buf_len, period_len);
#3 lore raw

PATCH 2/2 dmaengine: at_hdmac: add COMPILE_TEST support

In reply to Rosen Penev

Allows the buildbot to detect potential issues with the code on various platforms.

---
 drivers/dma/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/Kconfig +1 -1
index 8cb36305be6d..243d3959ba79 100644
@@ -102,7 +102,7 @@ config ARM_DMA350
 
 config AT_HDMAC
 	tristate "Atmel AHB DMA support"
-	depends on ARCH_AT91
+	depends on ARCH_AT91 || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
Signature · 1 line
2.51.2
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH dmaengine 2/2] dmaengine: at_hdmac: add COMPILE_TEST support

Quoted 4 lines · Rosen Penev

Allows the buildbot to detect potential issues with the code on various platforms.

Quoted 17 lines
---
 drivers/dma/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/Kconfig +1 -1
index 8cb36305be6d..243d3959ba79 100644
@@ -102,7 +102,7 @@ config ARM_DMA350
 
 config AT_HDMAC
 	tristate "Atmel AHB DMA support"
-	depends on ARCH_AT91
+	depends on ARCH_AT91 || COMPILE_TEST
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
maintainer Applied
#5 lore raw
In reply to Rosen Penev
Quoted 8 lines · Rosen Penev

First commit fixes compilation under 64-bit and second actually enables it.

Rosen Penev (2):
dmaengine: at_hdmac: fix formats under 64-bit
dmaengine: at_hdmac: add COMPILE_TEST support

[...]

Applied, thanks!

[1/2] dmaengine: at_hdmac: fix formats under 64-bit

      commit: 938eae912ac52f8e9e5f2463e2db30cfe6f895d5
[2/2] dmaengine: at_hdmac: add COMPILE_TEST support
      commit: 5d8c5bea0da97809813b5f702700019cfffb6085

Best regards,

Signature · 1 line
~Vinod