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

ALSA: bebob: Fix bit flag quirk constants

The quirking bit-flags are currently set as contiguous integer enum values
and so currently SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC is zero and so
he quirking never getting set or tested correctly for this quirk. Fix this
by setting the quirking constants as shifted bit values.

Addresses-Coverity: ("Bitwise-and with zero")
Fixes: 93cd12d6e88a ("ALSA: bebob: code refactoring for model-dependent quirks")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210615142048.59900-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Colin Ian King and committed by
Takashi Iwai
36d1a672 80b9c1be

+2 -2
+2 -2
sound/firewire/bebob/bebob.h
··· 76 76 }; 77 77 78 78 enum snd_bebob_quirk { 79 - SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC, 80 - SND_BEBOB_QUIRK_WRONG_DBC, 79 + SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC = (1 << 0), 80 + SND_BEBOB_QUIRK_WRONG_DBC = (1 << 1), 81 81 }; 82 82 83 83 struct snd_bebob {