Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Oct 2010 21:30:28 +0100
From:      Rui Paulo <rpaulo@freebsd.org>
To:        Jung-uk Kim <jkim@FreeBSD.org>
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
Message-ID:  <F670176F-BA62-44ED-9CC5-06C36A191258@freebsd.org>
In-Reply-To: <201010131546.10130.jkim@FreeBSD.org>
References:  <201010131439.o9DEdssc090571@svn.freebsd.org> <201010131546.10130.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F670176F-BA62-44ED-9CC5-06C36A191258>