Date: Fri, 23 Mar 2012 12:34:39 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r233362 - head/sys/dev/sound/pci Message-ID: <201203231234.q2NCYd26076516@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Mar 23 12:34:39 2012 New Revision: 233362 URL: http://svn.freebsd.org/changeset/base/233362 Log: 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. Modified: head/sys/dev/sound/pci/emu10kx.c Modified: head/sys/dev/sound/pci/emu10kx.c ============================================================================== --- head/sys/dev/sound/pci/emu10kx.c Fri Mar 23 12:13:31 2012 (r233361) +++ head/sys/dev/sound/pci/emu10kx.c Fri Mar 23 12:34:39 2012 (r233362) @@ -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?201203231234.q2NCYd26076516>