From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Manuel Lauss <manuel.lauss@gmail.com>
Cc: alsa-devel@alsa-project.org, linux-sh@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>,
kernel test robot <lkp@intel.com>
Subject: [PATCH] ASoC: sh: dma-sh7760: Use %pad and %zu to format dma_addr_t and size_t
Date: Mon, 25 Sep 2023 14:56:46 +0200 [thread overview]
Message-ID: <20230925125646.3681807-1-geert+renesas@glider.be> (raw)
sound/soc/sh/dma-sh7760.c: In function ‘camelot_prepare’:
./include/linux/kern_levels.h:5:25: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
sound/soc/sh/dma-sh7760.c:198:9: note: in expansion of macro ‘pr_debug’
198 | pr_debug("PCM data: addr 0x%08lx len %d\n",
| ^~~~~~~~
Fix this by using "%pad" and taking the address to format the DMA
address. While at it, use "%zu" to format size_t.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309250903.XNAjFuxy-lkp@intel.com/
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
sound/soc/sh/dma-sh7760.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c
index 121e48f984c50cab..85fe126233528252 100644
--- a/sound/soc/sh/dma-sh7760.c
+++ b/sound/soc/sh/dma-sh7760.c
@@ -195,9 +195,9 @@ static int camelot_prepare(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, 0)->id];
- pr_debug("PCM data: addr 0x%08lx len %d\n",
- (u32)runtime->dma_addr, runtime->dma_bytes);
-
+ pr_debug("PCM data: addr %pad len %zu\n", &runtime->dma_addr,
+ runtime->dma_bytes);
+
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
BRGREG(BRGATXSAR) = (unsigned long)runtime->dma_area;
BRGREG(BRGATXTCR) = runtime->dma_bytes;
--
2.34.1
next reply other threads:[~2023-09-25 12:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 12:56 Geert Uytterhoeven [this message]
2023-09-26 7:38 ` [PATCH] ASoC: sh: dma-sh7760: Use %pad and %zu to format dma_addr_t and size_t Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230925125646.3681807-1-geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-sh@vger.kernel.org \
--cc=lkp@intel.com \
--cc=manuel.lauss@gmail.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).