Skip to content

Commit 53d1ae7

Browse files
bjdooks-cttiwai
authored andcommitted
ALSA: pcm: fix __le32 cast warning in snd_pcm_set_sync_per_card
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> Link: https://patch.msgid.link/20260617102943.893950-1-ben.dooks@codethink.co.uk Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 9e6febe commit 53d1ae7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/core/pcm_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ void snd_pcm_set_sync_per_card(struct snd_pcm_substream *substream,
545545
struct snd_pcm_hw_params *params,
546546
const unsigned char *id, unsigned int len)
547547
{
548-
*(__u32 *)params->sync = cpu_to_le32(substream->pcm->card->number);
548+
*(__le32 *)params->sync = cpu_to_le32(substream->pcm->card->number);
549549
len = min(12, len);
550550
memcpy(params->sync + 4, id, len);
551551
memset(params->sync + 4 + len, 0, 12 - len);

0 commit comments

Comments
 (0)