From owner-svn-src-head@FreeBSD.ORG Wed Oct 6 00:03:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id F0AED1065679; Wed, 6 Oct 2010 00:03:08 +0000 (UTC) Date: Wed, 6 Oct 2010 00:03:08 +0000 From: Alexander Best To: Jung-uk Kim Message-ID: <20101006000308.GA50596@freebsd.org> References: <201004281726.o3SHQ6xN095645@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201004281726.o3SHQ6xN095645@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r207330 - head/sys/dev/sound/pcm 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, 06 Oct 2010 00:03:09 -0000 On Wed Apr 28 10, Jung-uk Kim wrote: > Author: jkim > Date: Wed Apr 28 17:26:05 2010 > New Revision: 207330 > URL: http://svn.freebsd.org/changeset/base/207330 > > Log: > Remove dead code. Calculated greatest common divisor was not used at all. > On top of that, LLVM+Clang mis-compiles this code because of its register > allocator bug. for future references: the bug jkim was refering to was http://llvm.org/bugs/show_bug.cgi?id=6941. it's been fixed now so even with this dead code in buffer.c no problems should occur when compiled with clang. cheers. alex > > Analyzed by: Andrew Reilly (areilly at bigpond dot net dot au) > Reviewed by: ariff, rdivacky > MFC after: 3 days > > Modified: > head/sys/dev/sound/pcm/buffer.c > > Modified: head/sys/dev/sound/pcm/buffer.c > ============================================================================== > --- head/sys/dev/sound/pcm/buffer.c Wed Apr 28 15:38:01 2010 (r207329) > +++ head/sys/dev/sound/pcm/buffer.c Wed Apr 28 17:26:05 2010 (r207330) > @@ -568,7 +568,6 @@ sndbuf_updateprevtotal(struct snd_dbuf * > unsigned int > snd_xbytes(unsigned int v, unsigned int from, unsigned int to) > { > - unsigned int w, x, y; > > if (from == to) > return v; > @@ -576,16 +575,6 @@ snd_xbytes(unsigned int v, unsigned int > if (from == 0 || to == 0 || v == 0) > return 0; > > - x = from; > - y = to; > - while (y != 0) { > - w = x % y; > - x = y; > - y = w; > - } > - from /= x; > - to /= x; > - > return (unsigned int)(((u_int64_t)v * to) / from); > } > -- a13x