22 Mar
2017
22 Mar
'17
9:12 a.m.
-----Original Message----- From: Takashi Iwai [mailto:tiwai@suse.de] Sent: Wednesday, March 22, 2017 12:51 AM To: Yang, Libin libin.yang@intel.com Cc: alsa-devel@alsa-project.org; Lin, Mengdong mengdong.lin@intel.com; infernix@infernix.net Subject: Re: [alsa-devel] [PATCH] ALSA: hda - set intel audio clock to a properly value
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).
Get it. I will use (A != B)
Regards, Libin
Takashi