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.
This commit is contained in:
jhb 2012-03-23 12:34:39 +00:00
parent 758ec7e7c3
commit 4f32ea5880

View File

@ -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;
}