diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2009-07-02 19:32:07 +0900 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-09 16:06:39 -0500 |
commit | d56dd6cf031075bef985c831146691fdeec8af5c (patch) | |
tree | 53d56051c2a09096e239a34316c798b7a59649f8 /ioport.c | |
parent | 329939776005fad213086e54b038ccd39054e2bc (diff) |
use constant IOPORTS_MASK instead of 0xffff.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ioport.c')
-rw-r--r-- | ioport.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -94,7 +94,7 @@ static uint32_t default_ioport_readw(void *opaque, uint32_t address) { uint32_t data; data = ioport_read(0, address); - address = (address + 1) & (MAX_IOPORTS - 1); + address = (address + 1) & IOPORTS_MASK; data |= ioport_read(0, address) << 8; return data; } @@ -102,7 +102,7 @@ static uint32_t default_ioport_readw(void *opaque, uint32_t address) static void default_ioport_writew(void *opaque, uint32_t address, uint32_t data) { ioport_write(0, address, data & 0xff); - address = (address + 1) & (MAX_IOPORTS - 1); + address = (address + 1) & IOPORTS_MASK; ioport_write(0, address, (data >> 8) & 0xff); } |