From: Takashi Iwai Subject: Re: [PATCH] ALSA: hda - set intel audio clock to a properly value Date: Tue, 21 Mar 2017 17:51:15 +0100 Message-ID: References: <1488867622-21765-1-git-send-email-libin.yang@intel.com> <96A12704CE18D347B625EE2D4A099D19524713F9@SHSMSX103.ccr.corp.intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 3DB99267334 for ; Tue, 21 Mar 2017 17:51:17 +0100 (CET) In-Reply-To: <96A12704CE18D347B625EE2D4A099D19524713F9@SHSMSX103.ccr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: "Yang, Libin" Cc: "Lin, Mengdong" , "alsa-devel@alsa-project.org" , "infernix@infernix.net" List-Id: alsa-devel@alsa-project.org 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