[alsa-devel] [PATCH] ALSA: hda - set intel audio clock to a properly value
Takashi Iwai
tiwai at suse.de
Tue Mar 21 17:51:15 CET 2017
On Tue, 21 Mar 2017 17:11:27 +0100,
Yang, Libin wrote:
>
> >> + * Any deviation may result in undefined behavior.
> >> + */
> >> + if (((val & AZX_MLCTL_SPA) >> AZX_MLCTL_SPA_SHIFT) ^
> >> + ((val & AZX_MLCTL_CPA) >> AZX_MLCTL_CPA_SHIFT))
> >
> >Should it be better with "==" instead of XOR here?
>
> AZX_MLCTL_SPA bit value should be the same with AZX_MLCTL_CPA bit
> value before operation. If they are different, we should not touch this
> register. So if XOR is true, we should return directly.
I meant that (A != B) is more understandable than (A ^ B).
Takashi
More information about the Alsa-devel
mailing list