From: Takashi Iwai Subject: Re: unnecessary test? Date: Wed, 06 Jun 2018 15:09:45 +0200 Message-ID: References: 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 110AB266F0F for ; Wed, 6 Jun 2018 15:09:46 +0200 (CEST) In-Reply-To: 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: Julia Lawall Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org On Wed, 06 Jun 2018 15:06:28 +0200, Julia Lawall wrote: > > > > On Wed, 6 Jun 2018, Takashi Iwai wrote: > > > On Wed, 06 Jun 2018 14:39:05 +0200, > > Julia Lawall wrote: > > > > > > In the file sound/pci/ctxfi/cthw20k1.c, the function daio_mgr_dao_init > > > contains: > > > > > > set_field(&ctl->spoctl, SPOCTL_OS << (idx*8), > > > ((conf >> 3) & 0x1) ? 2 : 2); /* Raw */ > > > > > > Could the second argument just be 2? It's true that the preceeding call > > > contains conf >> ..., but in a more useful way, so perhaps it could be > > > useful for uniformity? > > > > I guess this is a typo of "2 : 0". The code seems toggling the > > control bit depending on the S/PDIF passthru mode. It might be > > reversed, but I bet 1 for non-audio from a common sense. > > > > Ditto for cthw20k1.c. This one is likely 1, not 2, though. > > OK, should I send a patch? I have no way to test it. Me neither :) Feel free to submit the patch. The SPDIF output seems very rarely used on these devices (otherwise people must have noticed it), so the chance to break anything must be small. thanks, Takashi