Skip to contentSkip to conversation

ASoC: sh: dma-sh7760: fix a debug printf

PATCH In review Dan Carpenter 2 participants 3 messages Nov 17, 2016

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

PATCH 1/1 ASoC: sh: dma-sh7760: fix a debug printf

We intended to print a hex here, but the code will print a base 10 with an x on the end.

sound/soc/sh/dma-sh7760.c +1 -1
index 8fad444..c28ee1a 100644
@@ -204,7 +204,7 @@ static int camelot_prepare(struct snd_pcm_substream *substream)
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct camelot_pcm *cam = &cam_pcm_data[rtd->cpu_dai->id];
 
-	pr_debug("PCM data: addr 0x%08ulx len %d\n",
+	pr_debug("PCM data: addr 0x%08lx len %d\n",
 		 (u32)runtime->dma_addr, runtime->dma_bytes);
  
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
#1 lore raw

Hi,

sound/soc/sh/dma-sh7760.c static int camelot_prepare(struct snd_pcm_substream *substream) · line 208

Quoted 3 lines · Dan Carpenter
sound/soc/sh/dma-sh7760.c +1 -1
-       pr_debug("PCM data: addr 0x%08ulx len %d\n",
+       pr_debug("PCM data: addr 0x%08lx len %d\n",
                 (u32)runtime->dma_addr, runtime->dma_bytes);

While there, why not using %pad as suggested by
Documentation/printk-formats.txt?

Regards,
Bojan

#2 lore raw
Quoted 11 lines · bojan prtvar

Hi,

sound/soc/sh/dma-sh7760.c static int camelot_prepare(struct snd_pcm_substream *substream) · line 208

Quoted 3 lines · Dan Carpenter
sound/soc/sh/dma-sh7760.c +1 -1
-       pr_debug("PCM data: addr 0x%08ulx len %d\n",
+       pr_debug("PCM data: addr 0x%08lx len %d\n",
                 (u32)runtime->dma_addr, runtime->dma_bytes);

While there, why not using %pad as suggested by
Documentation/printk-formats.txt?

Oh crap. I never even compiled this stuff... I'm really sorry it's
been a while since I screwed up like this. Sorry about this.

That sounds like a good idea but I don't have a cross compiler set up so I'm going to leave it alone for now.

regards,
dan carpenter