From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org CDB576070B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752189AbeFFNEk (ORCPT + 25 others); Wed, 6 Jun 2018 09:04:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:47225 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751864AbeFFNEj (ORCPT ); Wed, 6 Jun 2018 09:04:39 -0400 Date: Wed, 06 Jun 2018 15:04:37 +0200 Message-ID: From: Takashi Iwai To: "Julia Lawall" Cc: , , Subject: Re: unnecessary test? In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. thanks, Takashi