From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-sound@vger.kernel.org, broonie@kernel.org,
lgirdwood@gmail.com, pierre-louis.bossart@linux.dev,
ranjani.sridharan@linux.intel.com,
yung-chuan.liao@linux.intel.com, peter.ujfalusi@linux.intel.com,
sound-open-firmware@alsa-project.org
Cc: linux-kernel@vger.kernel.org, perex@perex.cz, tiwai@suse.com,
kai.vehmanen@linux.intel.com,
Ben Dooks <ben.dooks@codethink.co.uk>
Subject: [PATCH] ASoC: SOF: sof-audio: pcm_id is __le32
Date: Tue, 10 Mar 2026 10:27:35 +0000 [thread overview]
Message-ID: <20260310102735.106277-1-ben.dooks@codethink.co.uk> (raw)
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
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
sound/soc/sof/sof-audio.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index 36082e764bf9..e044a102eeb5 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -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, ...) \
--
2.37.2.352.g3c44437643
reply other threads:[~2026-03-10 10:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260310102735.106277-1-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=broonie@kernel.org \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=ranjani.sridharan@linux.intel.com \
--cc=sound-open-firmware@alsa-project.org \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.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
all inboxes | Powered by JetHome®