Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp789068imm; Wed, 6 Jun 2018 06:05:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJKkGD7ETyGcQYJAhG7Me80OU5Coj4zbsbIe35DigQpT9PdLn7VU6gOdGqmk5eawXaIiyPf X-Received: by 2002:a65:61d1:: with SMTP id j17-v6mr2545858pgv.447.1528290350483; Wed, 06 Jun 2018 06:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528290350; cv=none; d=google.com; s=arc-20160816; b=zc6i3H7jIorJSzc8ysSvP7L5HnQJKH0q0AeI3QZLDYby/4ghKEy0QMk18QpysuFL61 wGoIXwLkUcB+9c0LYPL0WQi7vz/m4KXSMQ3gY8774J0BvikGYZjsVMOyi5xL3NeiMxcQ WOGm/5ThwYvOm9lh45hBsW5JnXTNuZZXj4RTlS4YHIxrM7TutR4mME6wsLDC8TRAIdKJ Z31zdxEyNHmItkDzxbcc3Lyr3e5L3cRhHEagmw/7w30ekPO828+GcEWy26UPRfKuvdHE SCVwHPPdf9i2h0dbIo1tmTlffUommMxNZOv+e0UnTfmQQHsGPTNh5HZJPtZDowmvtlre 1Usg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date :arc-authentication-results; bh=b2iCzh0vjsE0Xgb1ZdPZpX+wPwGDhH5I9JVdtuSjVIA=; b=ttXJMRB5p07jxN6kzP4AfD6NIWLfaBEqKj1jJAxc21qqelZPwebPYLeSKnFMhk1h8p Cv/dGTvg7rnCSQ40HTDoUZyGTBNTE8EUS3TK7+gQxkmP/JlHEbh9A6b1FgPXuDpwxhMG rFfCQa43T+WSRJS7ai3V7sdAkgqdKL4YBOwo6Di4NvxNoid5aZhT4RlAV8JbbrnfCN+o LNUxgrA2Bgi310tdguBQC0aWkPqWQgROMRVP3VgeztlKN2R7JS5Y4bp1mtjMAcGt7m/d qF118e9AWH1yqTUCo8hd5o8Ez2R4I/jnyibAUFi/Dlwfnd8JEM3JsrmSKBaIjZruX1cQ dacw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17-v6si12171180pgv.160.2018.06.06.06.05.33; Wed, 06 Jun 2018 06:05:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752178AbeFFNEk (ORCPT + 99 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 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0BECCAD53; Wed, 6 Jun 2018 13:04:38 +0000 (UTC) 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 Precedence: bulk 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