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

Rosen Penev posted 2 patches 1 month, 1 week ago
[PATCH dmaengine 1/2] dmaengine: at_hdmac: fix formats under 64-bit
Posted by Rosen Penev 1 month, 1 week ago
size_t formats under 32-bit evaluate to the same thing and GCC does not
warn against it. Not the case with 64-bit.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/dma/at_hdmac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 2d147712cbc6..7d226453961f 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -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);
-- 
2.51.2
Re: [PATCH dmaengine 1/2] dmaengine: at_hdmac: fix formats under 64-bit
Posted by Eugen Hristev 4 weeks ago

On 11/6/25 04:24, Rosen Penev wrote:
> size_t formats under 32-bit evaluate to the same thing and GCC does not
> warn against it. Not the case with 64-bit.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

Reviewed-by: Eugen Hristev <eugen.hristev@linaro.org>

> ---
>  drivers/dma/at_hdmac.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
> index 2d147712cbc6..7d226453961f 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -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);