From owner-svn-src-all@FreeBSD.ORG Wed Apr 28 17:26:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5605B106564A; Wed, 28 Apr 2010 17:26:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 456A68FC29; Wed, 28 Apr 2010 17:26:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3SHQ6Z8095647; Wed, 28 Apr 2010 17:26:06 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3SHQ6xN095645; Wed, 28 Apr 2010 17:26:06 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004281726.o3SHQ6xN095645@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 28 Apr 2010 17:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207330 - head/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2010 17:26:06 -0000 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. 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); }