Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp795993imm; Wed, 6 Jun 2018 06:11:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJFLTGOZYTCiwFh9wsq8/O/NnjefA1ilfFRxedC2hjpu1eTmKfLLRtoTIXL8nDKl8s2FA5l X-Received: by 2002:a63:5fc1:: with SMTP id t184-v6mr2565431pgb.132.1528290670316; Wed, 06 Jun 2018 06:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528290670; cv=none; d=google.com; s=arc-20160816; b=Pw/RMSt7kQ5noqY3vwU0QMxp8pcBt2vTmFEJ6aRnuxRPyZ1sXir3oKajQg3WA2H6Qh kR0f3OAn+GtNUgXk3b1NscXZT+okuk4opT9eE1cIMxmAY7VSQ1YNwYpV55BESLVVparb W4nl/t6sZYUmBfREoTcTHlhYZTSwZXmuG9QaqCVw+4MJzkV1/JzIL+hDm9ujcq5xkVIg oBTgcG1/h6lbJARsZJsSHSk2dqQ8wuzHTmD+gQIy4GepJUilkJ4/B/Pe2KcOgjv7snJZ Qz6lbbwbaqsy7PvLjvp7Yo8uf+LAq7sae4haOQcTK5Hft32y4Z7sJ4Evx4qaLtmvQx6o iVhg== 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=C5n+iXGB2z+kHCWB9GHUdFsfdNfXo7/Pjum1u+Hg7s4=; b=crsSj0g0tJ4/3i3cAiSqqJbV4+UbVgvZXaxEd93bpoIb0AkY2ozuPl/8HVp59clLEf iRFAzK1QWTia/BIAbNMy3xh/TMHXc6K3apB8MeyO8q01IkH3BU3kuh1PJLpItGq5FAR0 eH0/m5i8d1k7YKMUXBjKmiH+hDRyW32fDsu2DPD5kDIYSMySbfk8niwPTe4aXB5MQTLY 96AMgKeGiSlq1XMFGceK203rgE1hykqrF9eBR+EMO18bECd0XasEL2BFQAg0bL7qoT7O WtqeqFlCC3Us32r0JSt7Ptps+V7oPuip22c4fBUCzYW3A3cLYNxnogSd0CLuQJm5r7A0 8Ejw== 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 h62-v6si40720927pgc.548.2018.06.06.06.10.55; Wed, 06 Jun 2018 06:11:10 -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 S1752189AbeFFNJu (ORCPT + 99 others); Wed, 6 Jun 2018 09:09:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:47934 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751856AbeFFNJs (ORCPT ); Wed, 6 Jun 2018 09:09:48 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 739EEAD53; Wed, 6 Jun 2018 13:09:46 +0000 (UTC) Date: Wed, 06 Jun 2018 15:09:45 +0200 Message-ID: From: Takashi Iwai To: Julia Lawall Cc: perex@perex.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org 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 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