Commit 10560637 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Mark Brown

ASoC: sh: dma-sh7760: Use %pad and %zu to format dma_addr_t and size_t

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: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309250903.XNAjFuxy-lkp@intel.com/Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230925125646.3681807-1-geert+renesas@glider.beSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent c3518350
...@@ -195,9 +195,9 @@ static int camelot_prepare(struct snd_soc_component *component, ...@@ -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 snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, 0)->id]; struct camelot_pcm *cam = &cam_pcm_data[asoc_rtd_to_cpu(rtd, 0)->id];
pr_debug("PCM data: addr 0x%08lx len %d\n", pr_debug("PCM data: addr %pad len %zu\n", &runtime->dma_addr,
(u32)runtime->dma_addr, runtime->dma_bytes); runtime->dma_bytes);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
BRGREG(BRGATXSAR) = (unsigned long)runtime->dma_area; BRGREG(BRGATXSAR) = (unsigned long)runtime->dma_area;
BRGREG(BRGATXTCR) = runtime->dma_bytes; BRGREG(BRGATXTCR) = runtime->dma_bytes;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment