Skip to contentSkip to conversation

ASoC: SOF: sof-audio: pcm_id is __le32

PATCH Superseded Ben Dooks 1 participant 1 message Mar 10

Subsystems (3)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 ASoC: SOF: sof-audio: pcm_id is __le32

The pcm_id value is __le32 so convert it before passing to the dev_dbg function to be printed. Picked up by sparse prototype for variadic and printf function checking.

Fixes a large number of sparse warnings, such as:

sound/soc/sof/pcm.c:84:25: warning: incorrect type in argument 4 (different base types)
sound/soc/sof/pcm.c:84:25: expected unsigned int
sound/soc/sof/pcm.c:84:25: got restricted __le32 [usertype] pcm_id

---
 sound/soc/sof/sof-audio.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/sof/sof-audio.h +2 -1
index 36082e764bf9..e044a102eeb5 100644
@@ -641,7 +641,8 @@ void snd_sof_pcm_init_elapsed_work(struct work_struct *work);
  */
 #define spcm_dbg(__spcm, __dir, __fmt, ...)					\
 	dev_dbg((__spcm)->scomp->dev, "pcm%u (%s), dir %d: " __fmt,		\
-		(__spcm)->pcm.pcm_id, (__spcm)->pcm.pcm_name, __dir,		\
+		le32_to_cpu((__spcm)->pcm.pcm_id),				\
+		(__spcm)->pcm.pcm_name, __dir,					\
 		##__VA_ARGS__)
 
 #define spcm_dbg_ratelimited(__spcm, __dir, __fmt, ...)				\
Signature · 1 line
2.37.2.352.g3c44437643