2022-06-09 19:14:47

by Martin Povišer

[permalink] [raw]
Subject: [PATCH] dmaengine: apple-admac: Fix compile warning

Fix a warning of bad format specifier:

drivers/dma/apple-admac.c: In function 'admac_cyclic_write_one_desc':
drivers/dma/apple-admac.c:209:26: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'long unsigned int' [-Wformat=]
209 | dev_dbg(ad->dev, "ch%d descriptor: addr=0x%pad len=0x%zx flags=0x%x\n",

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Martin Povišer <[email protected]>
---

Follow-up to the recent ADMAC series, feel free to squash:
https://lore.kernel.org/asahi/[email protected]/T/#t

drivers/dma/apple-admac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/apple-admac.c b/drivers/dma/apple-admac.c
index 2425069c186d..c502f8c3aca7 100644
--- a/drivers/dma/apple-admac.c
+++ b/drivers/dma/apple-admac.c
@@ -206,7 +206,7 @@ static void admac_cyclic_write_one_desc(struct admac_data *ad, int channo,
/* If happens means we have buggy code */
WARN_ON_ONCE(addr + tx->period_len > tx->buf_end);

- dev_dbg(ad->dev, "ch%d descriptor: addr=0x%pad len=0x%zx flags=0x%x\n",
+ dev_dbg(ad->dev, "ch%d descriptor: addr=0x%pad len=0x%zx flags=0x%lx\n",
channo, &addr, tx->period_len, FLAG_DESC_NOTIFY);

writel_relaxed(addr, ad->base + REG_DESC_WRITE(channo));
--
2.33.0


2022-06-10 12:04:13

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH] dmaengine: apple-admac: Fix compile warning

On 09-06-22, 20:43, Martin Povišer wrote:
> Fix a warning of bad format specifier:

Patch title should describe the change and not the effect..
>
> drivers/dma/apple-admac.c: In function 'admac_cyclic_write_one_desc':
> drivers/dma/apple-admac.c:209:26: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'long unsigned int' [-Wformat=]
> 209 | dev_dbg(ad->dev, "ch%d descriptor: addr=0x%pad len=0x%zx flags=0x%x\n",
>
> Reported-by: kernel test robot <[email protected]>
> Signed-off-by: Martin Povišer <[email protected]>
> ---
>
> Follow-up to the recent ADMAC series, feel free to squash:
> https://lore.kernel.org/asahi/[email protected]/T/#t
>
> drivers/dma/apple-admac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/apple-admac.c b/drivers/dma/apple-admac.c
> index 2425069c186d..c502f8c3aca7 100644
> --- a/drivers/dma/apple-admac.c
> +++ b/drivers/dma/apple-admac.c
> @@ -206,7 +206,7 @@ static void admac_cyclic_write_one_desc(struct admac_data *ad, int channo,
> /* If happens means we have buggy code */
> WARN_ON_ONCE(addr + tx->period_len > tx->buf_end);
>
> - dev_dbg(ad->dev, "ch%d descriptor: addr=0x%pad len=0x%zx flags=0x%x\n",
> + dev_dbg(ad->dev, "ch%d descriptor: addr=0x%pad len=0x%zx flags=0x%lx\n",
> channo, &addr, tx->period_len, FLAG_DESC_NOTIFY);
>
> writel_relaxed(addr, ad->base + REG_DESC_WRITE(channo));
> --
> 2.33.0

--
~Vinod