Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp764016imm; Wed, 6 Jun 2018 05:44:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI5geUnmZtXxd4nJSidNQ9xi3rgnA7MbiwiqPIZ5Lq0XOdN2rufDkC5EBVKl4ZvPx9OgcYM X-Received: by 2002:a17:902:7248:: with SMTP id c8-v6mr3145443pll.128.1528289091441; Wed, 06 Jun 2018 05:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528289091; cv=none; d=google.com; s=arc-20160816; b=I6Pvo5fJ+e6aAfdK4LaJD3NA+Rlg/OV7XAbZTHvP4OnIlA8KFP3B/0dh8yd10gBG+H XTtRBbOHn5jXqNysXHYaGtfOc38eKpSY2IJgGYQ3gJrny/ZOFdfG6kUdrbGIyFFIu4j5 rhzkna1JeErIlsyxQOYZAWDLlVMFtcNaU5lSCIlZ+g/KuzHMMFffA4uPyQk2ryOIul2l lGALIDjWSgzDVNTbhOyU29ecXkFII4ARHPdu+LjnOkRRiUkWnsVkjWZ7qlB6OZHY/07+ mJhB1IpoGuS7/HTkgJ1FrPvoCg597TG6WnOGDGqPu3JcRqNtsoBtLq6m/cfVifgmu9kh grsQ== 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=9mw5eGODRTP38pFwPakasCzvLrElWzRRPT17l5/j+tI=; b=JC/JeEX5XZ5t//bcZ/2RyR/kucnsHs9XA4Nja2rSP214EL/tCU1xB/4efb+5BeMp2y ISuhNmcPNMsFw1fNRcaGXc/N0fivC2dIUeoiP2ZlqXipyKxfTD0HHsabOZblnGz40y8e 05nqRDuqtJ2f9tgNJFZXv0f/XnucTBrjpEjtNg8E/MYqI7/EUSfoYKjf6q4deqowjSmW U+3q9UUYd9/06+waJi2h7cUQ3gg1+MUYC53ThmXgyOCGD0yu0x+1I9pnJbAdG52LBvyL Ntis0BGKDjEIWXXAf1qEGL1TyAoM4iqgfi6AijylBVWjp4mdDgyHuJ1BXEN8++zdSr/H atEg== 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 c2-v6si28450039pgp.147.2018.06.06.05.44.37; Wed, 06 Jun 2018 05:44:51 -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 S1752548AbeFFMn3 (ORCPT + 99 others); Wed, 6 Jun 2018 08:43:29 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:26479 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752186AbeFFMn1 (ORCPT ); Wed, 6 Jun 2018 08:43:27 -0400 X-IronPort-AV: E=Sophos;i="5.49,483,1520895600"; d="scan'208";a="267845016" Received: from 115-178-117-63.flets.shareline.jp (HELO [10.5.3.74]) ([115.178.117.63]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2018 14:43:24 +0200 Date: Wed, 6 Jun 2018 21:43:21 +0900 (JST) From: Julia Lawall X-X-Sender: jll@hadrien To: perex@perex.cz cc: tiwai@suse.com, 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, 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? There is similar code in daio_mgr_dao_init in sound/pci/ctxfi/cthw20k2.c: set_field(&ctl->txctl[idx], ATXCTL_RAW, ((conf >> 3) & 0x1) ? 0 : 0); julia