From owner-svn-src-stable@FreeBSD.ORG Tue May 22 02:11:09 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 567DD106564A; Tue, 22 May 2012 02:11:09 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F30D8FC08; Tue, 22 May 2012 02:11:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4M2B9wh082554; Tue, 22 May 2012 02:11:09 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4M2B9sW082552; Tue, 22 May 2012 02:11:09 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201205220211.q4M2B9sW082552@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 22 May 2012 02:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235768 - stable/9/sys/dev/sound/pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2012 02:11:09 -0000 Author: pfg Date: Tue May 22 02:11:08 2012 New Revision: 235768 URL: http://svn.freebsd.org/changeset/base/235768 Log: MFC: r233362 Don't cast a bus address to a uint8_t pointer just to add an offset to it. Instead, add the offset directly to the bus address. Approved by: jhb (mentor) Modified: stable/9/sys/dev/sound/pci/emu10kx.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/emu10kx.c ============================================================================== --- stable/9/sys/dev/sound/pci/emu10kx.c Tue May 22 01:28:32 2012 (r235767) +++ stable/9/sys/dev/sound/pci/emu10kx.c Tue May 22 02:11:08 2012 (r235768) @@ -1137,7 +1137,7 @@ emu_memalloc(struct emu_mem *mem, uint32 ofs = 0; for (idx = start; idx < start + blksz; idx++) { mem->bmap[idx >> 3] |= 1 << (idx & 7); - tmp = (uint32_t) (u_long) ((uint8_t *) blk->buf_addr + ofs); + tmp = (uint32_t) (blk->buf_addr + ofs); mem->ptb_pages[idx] = (tmp << 1) | idx; ofs += EMUPAGESIZE; }