* [PATCH] ASoC: pcm: fix __le32 cast warning in snd_pcm_set_sync_per_card
@ 2026-06-17 10:29 Ben Dooks
2026-06-18 10:34 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2026-06-17 10:29 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Kees Cook, Ben Dooks, linux-sound,
linux-kernel
In snd_pcm_set_sync_per_card() the le32 value is written to an u32
instead of an __le32 pointer. Fix the following warning by fixing
the type:
sound/soc/soc-pcm.c:2166:9: warning: incorrect type in argument 7 (different base types)
sound/soc/soc-pcm.c:2166:9: expected int
sound/soc/soc-pcm.c:2166:9: got restricted snd_pcm_format_t
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
sound/core/pcm_lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index fe597f7d522d..4d665b4148d7 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -545,7 +545,7 @@ void snd_pcm_set_sync_per_card(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
const unsigned char *id, unsigned int len)
{
- *(__u32 *)params->sync = cpu_to_le32(substream->pcm->card->number);
+ *(__le32 *)params->sync = cpu_to_le32(substream->pcm->card->number);
len = min(12, len);
memcpy(params->sync + 4, id, len);
memset(params->sync + 4 + len, 0, 12 - len);
--
2.37.2.352.g3c44437643
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: pcm: fix __le32 cast warning in snd_pcm_set_sync_per_card
2026-06-17 10:29 [PATCH] ASoC: pcm: fix __le32 cast warning in snd_pcm_set_sync_per_card Ben Dooks
@ 2026-06-18 10:34 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-06-18 10:34 UTC (permalink / raw)
To: Ben Dooks
Cc: Jaroslav Kysela, Takashi Iwai, Kees Cook, linux-sound,
linux-kernel
On Wed, 17 Jun 2026 12:29:43 +0200,
Ben Dooks wrote:
>
> In snd_pcm_set_sync_per_card() the le32 value is written to an u32
> instead of an __le32 pointer. Fix the following warning by fixing
> the type:
>
> sound/soc/soc-pcm.c:2166:9: warning: incorrect type in argument 7 (different base types)
> sound/soc/soc-pcm.c:2166:9: expected int
> sound/soc/soc-pcm.c:2166:9: got restricted snd_pcm_format_t
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Applied now (with the correction of the subject prefix -- it's ALSA
core, not ASoC-specific).
thanks,
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-18 10:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-17 10:29 [PATCH] ASoC: pcm: fix __le32 cast warning in snd_pcm_set_sync_per_card Ben Dooks
2026-06-18 10:34 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox