提交 c1950a4e 编写于 作者: P Peter Maydell 提交者: Blue Swirl

hw/sh_serial: Use TARGET_PRIxPHYS rather than %x for physaddr

Switch a format string from %x to TARGET_PRIxPHYS so that it will
continue to work even if target_phys_addr_t is changed
to 64 bits in the future.
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Reviewed-by: NAndreas Färber <afaerber@suse.de>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 cdb30d44
......@@ -186,7 +186,8 @@ static void sh_serial_write(void *opaque, target_phys_addr_t offs,
}
}
fprintf(stderr, "sh_serial: unsupported write to 0x%02x\n", offs);
fprintf(stderr, "sh_serial: unsupported write to 0x%02"
TARGET_PRIxPHYS "\n", offs);
abort();
}
......@@ -287,7 +288,8 @@ static uint64_t sh_serial_read(void *opaque, target_phys_addr_t offs,
#endif
if (ret & ~((1 << 16) - 1)) {
fprintf(stderr, "sh_serial: unsupported read from 0x%02x\n", offs);
fprintf(stderr, "sh_serial: unsupported read from 0x%02"
TARGET_PRIxPHYS "\n", offs);
abort();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册