You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ALSA: pcm_format_to_bits strong-typed conversion
Add a function to handle conversion from snd_pcm_format_t to bitwise with proper typing. Change such conversions to use this function and silence sparse warnings. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -1133,4 +1133,10 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,
|
||||
unsigned long private_value,
|
||||
struct snd_pcm_chmap **info_ret);
|
||||
|
||||
/* Strong-typed conversion of pcm_format to bitwise */
|
||||
static inline u64 pcm_format_to_bits(snd_pcm_format_t pcm_format)
|
||||
{
|
||||
return 1ULL << (__force int) pcm_format;
|
||||
}
|
||||
|
||||
#endif /* __SOUND_PCM_H */
|
||||
|
||||
Reference in New Issue
Block a user