Skip to content

Commit

Permalink
ALSA: bebob: Fix bit flag quirk constants
Browse files Browse the repository at this point in the history
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: 93cd12d ("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>
  • Loading branch information
Colin Ian King authored and Takashi Iwai committed Jun 16, 2021
1 parent 80b9c1b commit 36d1a67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/firewire/bebob/bebob.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ struct snd_bebob_spec {
};

enum snd_bebob_quirk {
SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC,
SND_BEBOB_QUIRK_WRONG_DBC,
SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC = (1 << 0),
SND_BEBOB_QUIRK_WRONG_DBC = (1 << 1),
};

struct snd_bebob {
Expand Down

0 comments on commit 36d1a67

Please sign in to comment.