Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: pcm: Fix sparse warning wrt PCM format type

The PCM format type is with __bitwise, hence it needs the explicit
cast with __force. It's ugly, but there is a reason for that cost...

This fixes the sparse warning:
sound/core/oss/pcm_oss.c:1854:55: warning: incorrect type in argument 1 (different base types)

Signed-off-by: Takashi Iwai <tiwai@suse.de>

+1 -1
+1 -1
sound/core/oss/pcm_oss.c
··· 1851 1851 format_mask = hw_param_mask_c(params, SNDRV_PCM_HW_PARAM_FORMAT); 1852 1852 for (fmt = 0; fmt < 32; ++fmt) { 1853 1853 if (snd_mask_test(format_mask, fmt)) { 1854 - int f = snd_pcm_oss_format_to(fmt); 1854 + int f = snd_pcm_oss_format_to((__force snd_pcm_format_t)fmt); 1855 1855 if (f >= 0) 1856 1856 formats |= f; 1857 1857 }