diff options
author | jhb <jhb@FreeBSD.org> | 2012-03-23 12:34:39 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2012-03-23 12:34:39 +0000 |
commit | 4f32ea5880ddb4f1fc189a46b13c16b96a706ac7 (patch) | |
tree | b5a4e911a48dd19f2442b22997c5ad04acd743d6 /sys/dev | |
parent | 758ec7e7c3c7d702ea6475f9ceee11fd3c1efa13 (diff) | |
download | FreeBSD-src-4f32ea5880ddb4f1fc189a46b13c16b96a706ac7.zip FreeBSD-src-4f32ea5880ddb4f1fc189a46b13c16b96a706ac7.tar.gz |
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.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/sound/pci/emu10kx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c index 7939515..d92fa44 100644 --- a/sys/dev/sound/pci/emu10kx.c +++ b/sys/dev/sound/pci/emu10kx.c @@ -1137,7 +1137,7 @@ emu_memalloc(struct emu_mem *mem, uint32_t sz, bus_addr_t * addr, const char *ow 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; } |