Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp791592imm; Wed, 6 Jun 2018 06:07:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJNU2objE9gjBhmlgBVWV2HmwXqSaqSEKbkxY5qvLurdMN/gSBGJZPgyXCcLRrcwZogaZZp X-Received: by 2002:a17:902:b40f:: with SMTP id x15-v6mr3256240plr.270.1528290461304; Wed, 06 Jun 2018 06:07:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528290461; cv=none; d=google.com; s=arc-20160816; b=ra5nf+9+gAex8sC3JSTOgDcI1kIlsvc8NXuDRxjkkM+oLKJAq7aMbkVs0KKINjjrpe cBRtizw2mcW2m4hxiUPJ66Ib1XLyBNoRnpQTUN3gq9uIGkTjcR2ksYjGNQzprOdfgQqZ ExBDRfpD0zaIPcyb3E1FgMK/7BS9vIH4ciQZTD+qMLqELmoI+rr9nggbua55dJSGJJoF 6RiEm1DnzxTJZfdO2vObjLv0VXW60koOGZ8RxXAaJ2K83ZIdy/w5fecTU+4MsbFPqFrz zph9Vt7Uc59xEt06+13kpH29Cj5mAZOb8yuttwC5RYdsgAIw6sJNufsADKIvn4iRB8+d BSNQ== 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 :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=2iJ+cs1NlfHjC1PZGUIOAIPgZ4ZuHulltHeDSmVfudU=; b=in+iMKpudwlkiejFJFEk5lEpaIxik0MnBPKZKaWoocMYcSPV7mf0y1USUvpdd07Iev iobK87S0abbFNdtBv1PxFvfYyMzCifgHrQCQp4BDl6u2KT+V1/0gvq6cEZE3u2zSGh/h 1lrlE7mA7+vU3fFwl7XOIpt9O5JYglMirawcRavpQUllGcxZcm8PqojYtf5vXULlq6s0 jXMgcU+1U3DTLOzDo7Fq8AJdkkES71oBhyRroNFT7ktNb9yhviQxzQgW+fHIW3oXxO6Y BX6X0POVNTeEDEFZFsOxXAU5KmryLLOio5axpFY9dh1pcckCJ2OemvdF8QMfJ/JTnS/V U6BQ== 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 p29-v6si26700365pgc.199.2018.06.06.06.07.26; Wed, 06 Jun 2018 06:07:41 -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 S1752109AbeFFNGg (ORCPT + 99 others); Wed, 6 Jun 2018 09:06:36 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:45104 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864AbeFFNGf (ORCPT ); Wed, 6 Jun 2018 09:06:35 -0400 X-IronPort-AV: E=Sophos;i="5.49,483,1520895600"; d="scan'208";a="330612869" Received: from 115-178-117-63.flets.shareline.jp (HELO [10.5.3.74]) ([115.178.117.63]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2018 15:06:32 +0200 Date: Wed, 6 Jun 2018 22:06:28 +0900 (JST) From: Julia Lawall X-X-Sender: jll@hadrien To: Takashi Iwai cc: perex@perex.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: unnecessary test? In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 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, 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. julia > > > thanks, > > Takashi >