ALSA: pcm: Use a macro for parameter masks to reduce the needed cast
authorTakashi Iwai <tiwai@suse.de>
Thu, 6 Feb 2020 16:39:43 +0000 (17:39 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 10 Feb 2020 07:27:51 +0000 (08:27 +0100)
commitf9b0c053a29fdc0ad58e816554216523b29930f8
treeab6f7a219197f2a110b8e46314d8be9ac6b41c68
parentba71d227f4a250d7975e8296fed3aac9cb6105c9
ALSA: pcm: Use a macro for parameter masks to reduce the needed cast

The parameter bit mask needs often explicit cast with __force,
e.g. for the PCM subformat type.  Instead of adding __force at each
place, which is error prone, this patch introduces a new macro and
replaces the all bit shift with it.  This fixes the sparse warnings
like the following:
  sound/core/pcm_native.c:2508:30: warning: restricted snd_pcm_access_t degrades to integer

No functional changes, just sparse warning fixes.

Link: https://lore.kernel.org/r/20200206163945.6797-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_native.c