Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2012 02:11:09 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r235768 - stable/9/sys/dev/sound/pci
Message-ID:  <201205220211.q4M2B9sW082552@svn.freebsd.org>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205220211.q4M2B9sW082552>