From owner-svn-src-head@FreeBSD.ORG Wed Oct 13 20:30:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C9E3106566B; Wed, 13 Oct 2010 20:30:33 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id 3DD0C8FC0A; Wed, 13 Oct 2010 20:30:33 +0000 (UTC) Received: from d.earth.lavabit.com (d.earth.lavabit.com [192.168.111.13]) by karen.lavabit.com (Postfix) with ESMTP id 8BC2211B99F; Wed, 13 Oct 2010 15:30:32 -0500 (CDT) Received: from rui-macbook.lan (bl16-140-224.dsl.telepac.pt [188.81.140.224]) by lavabit.com with ESMTP id DWBS3EJCA1CQ; Wed, 13 Oct 2010 15:30:32 -0500 References: <201010131439.o9DEdssc090571@svn.freebsd.org> <201010131546.10130.jkim@FreeBSD.org> In-Reply-To: <201010131546.10130.jkim@FreeBSD.org> Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii Message-Id: Content-Transfer-Encoding: quoted-printable From: Rui Paulo Date: Wed, 13 Oct 2010 21:30:28 +0100 To: Jung-uk Kim X-Mailer: Apple Mail (2.1081) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@FreeBSD.org Subject: Re: svn commit: r213779 - head/sys/dev/sound/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2010 20:30:33 -0000 On 13 Oct 2010, at 20:46, Jung-uk Kim wrote: > On Wednesday 13 October 2010 10:39 am, Rui Paulo wrote: >> Author: rpaulo >> Date: Wed Oct 13 14:39:54 2010 >> New Revision: 213779 >> URL: http://svn.freebsd.org/changeset/base/213779 >>=20 >> Log: >> Fix a brain-o: wrong case statement semantics. >>=20 >> Found with: clang >>=20 >> Modified: >> head/sys/dev/sound/pci/envy24ht.c >> head/sys/dev/sound/pci/spicds.c >>=20 >> Modified: head/sys/dev/sound/pci/envy24ht.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- = head/sys/dev/sound/pci/envy24ht.c Wed Oct 13 >> 14:37:52 2010 (r213778) +++ head/sys/dev/sound/pci/envy24ht.c = Wed >> Oct 13 14:39:54 2010 (r213779) @@ -2236,7 +2236,8 @@ >> envy24ht_putcfg(struct sc_info *sc) >> else >> printf("not implemented\n"); >> switch (sc->adcn) { >> - case 0x01 || 0x02: >> + case 0x01: >> + case 0x02: >> printf(" ADC #: "); >> printf("%d\n", sc->adcn); >> break; >>=20 >> Modified: head/sys/dev/sound/pci/spicds.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/sys/dev/sound/pci/spicds.c = Wed Oct 13 14:37:52 >> 2010 (r213778) +++ head/sys/dev/sound/pci/spicds.c Wed Oct 13 >> 14:39:54 2010 (r213779) @@ -283,7 +283,8 @@ spicds_set(struct >> spicds_info *codec, in case SPICDS_TYPE_WM8770: >> left =3D left + 27; >> break; >> - case SPICDS_TYPE_AK4381 || SPICDS_TYPE_AK4396: >> + case SPICDS_TYPE_AK4381: >> + case SPICDS_TYPE_AK4396: >> left =3D left * 255 / 100; >> break; >> default: >=20 > Although it was rediscovered by clang, spicds.c patch actually known=20= > to fix a problem. Please see kern/146758. I read the PR and the mailing list posts, but I don't see what problem = does "case SPICDS_TYPE_AK4381 || SPICDS_TYPE_AK4396:" fix. Regards, -- Rui Paulo