From 4f32ea5880ddb4f1fc189a46b13c16b96a706ac7 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 23 Mar 2012 12:34:39 +0000 Subject: [PATCH] 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. --- sys/dev/sound/pci/emu10kx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c index 7939515ce578..d92fa448be08 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; }