mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Kees Cook <kees@kernel.org>,
	Ben Dooks <ben.dooks@codethink.co.uk>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: pcm: fix __le32 cast warning in snd_pcm_set_sync_per_card
Date: Wed, 17 Jun 2026 11:29:43 +0100	[thread overview]
Message-ID: <20260617102943.893950-1-ben.dooks@codethink.co.uk> (raw)

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


             reply	other threads:[~2026-06-17 10:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 10:29 Ben Dooks [this message]
2026-06-18 10:34 ` Takashi Iwai

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=20260617102943.893950-1-ben.dooks@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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®