Skip to content

Commit 46b770f

Browse files
ranj063tiwai
authored andcommitted
ALSA: uapi: Fix sparse warning
Fix the following sparse warning generated due to 64-bit compat type having fields defined explicitly with __s32: sound/soc/sof/sof-audio.c:46:31: warning: incorrect type in assignment (different base types) sound/soc/sof/sof-audio.c:46:31: expected restricted snd_pcm_state_t [usertype] state sound/soc/sof/sof-audio.c:46:31: got signed int [usertype] state Fixes: 80fe743 ("ALSA: add new 32-bit layout for snd_pcm_mmap_status/control") Reported-by: Pierre-Louis Bossart <[email protected]> Suggested-by: Takashi Iwai <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 7faa26c commit 46b770f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/uapi/sound/asound.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,13 +564,13 @@ typedef char __pad_after_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
564564
#endif
565565

566566
struct __snd_pcm_mmap_status64 {
567-
__s32 state; /* RO: state - SNDRV_PCM_STATE_XXXX */
567+
snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */
568568
__u32 pad1; /* Needed for 64 bit alignment */
569569
__pad_before_uframe __pad1;
570570
snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */
571571
__pad_after_uframe __pad2;
572572
struct __snd_timespec64 tstamp; /* Timestamp */
573-
__s32 suspended_state; /* RO: suspended stream state */
573+
snd_pcm_state_t suspended_state;/* RO: suspended stream state */
574574
__u32 pad3; /* Needed for 64 bit alignment */
575575
struct __snd_timespec64 audio_tstamp; /* sample counter or wall clock */
576576
};

0 commit comments

Comments
 (0)