mirror of
https://github.com/qemu/qemu.git
synced 2025-08-09 01:50:43 +00:00
hw/core/register.c: Don't use '#' flag of printf format
Fix code style. Don't use '#' flag of printf format ('%#') in format strings, use '0x' prefix instead Signed-off-by: Xinhao Zhang <zhangxinhao1@huawei.com> Signed-off-by: Kai Deng <dengkai1@huawei.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20201116140148.2850128-1-zhangxinhao1@huawei.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
dfc973ecc1
commit
b3d2a4296f
@ -80,7 +80,7 @@ void register_write(RegisterInfo *reg, uint64_t val, uint64_t we,
|
|||||||
|
|
||||||
if (!ac || !ac->name) {
|
if (!ac || !ac->name) {
|
||||||
qemu_log_mask(LOG_GUEST_ERROR, "%s: write to undefined device state "
|
qemu_log_mask(LOG_GUEST_ERROR, "%s: write to undefined device state "
|
||||||
"(written value: %#" PRIx64 ")\n", prefix, val);
|
"(written value: 0x%" PRIx64 ")\n", prefix, val);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,14 +89,14 @@ void register_write(RegisterInfo *reg, uint64_t val, uint64_t we,
|
|||||||
test = (old_val ^ val) & ac->rsvd;
|
test = (old_val ^ val) & ac->rsvd;
|
||||||
if (test) {
|
if (test) {
|
||||||
qemu_log_mask(LOG_GUEST_ERROR, "%s: change of value in reserved bit"
|
qemu_log_mask(LOG_GUEST_ERROR, "%s: change of value in reserved bit"
|
||||||
"fields: %#" PRIx64 ")\n", prefix, test);
|
"fields: 0x%" PRIx64 ")\n", prefix, test);
|
||||||
}
|
}
|
||||||
|
|
||||||
test = val & ac->unimp;
|
test = val & ac->unimp;
|
||||||
if (test) {
|
if (test) {
|
||||||
qemu_log_mask(LOG_UNIMP,
|
qemu_log_mask(LOG_UNIMP,
|
||||||
"%s:%s writing %#" PRIx64 " to unimplemented bits:" \
|
"%s:%s writing 0x%" PRIx64 " to unimplemented bits:" \
|
||||||
" %#" PRIx64 "\n",
|
" 0x%" PRIx64 "\n",
|
||||||
prefix, reg->access->name, val, ac->unimp);
|
prefix, reg->access->name, val, ac->unimp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ void register_write(RegisterInfo *reg, uint64_t val, uint64_t we,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
qemu_log("%s:%s: write of value %#" PRIx64 "\n", prefix, ac->name,
|
qemu_log("%s:%s: write of value 0x%" PRIx64 "\n", prefix, ac->name,
|
||||||
new_val);
|
new_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ uint64_t register_read(RegisterInfo *reg, uint64_t re, const char* prefix,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
qemu_log("%s:%s: read of value %#" PRIx64 "\n", prefix,
|
qemu_log("%s:%s: read of value 0x%" PRIx64 "\n", prefix,
|
||||||
ac->name, ret);
|
ac->name, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ void register_write_memory(void *opaque, hwaddr addr,
|
|||||||
|
|
||||||
if (!reg) {
|
if (!reg) {
|
||||||
qemu_log_mask(LOG_GUEST_ERROR, "%s: write to unimplemented register " \
|
qemu_log_mask(LOG_GUEST_ERROR, "%s: write to unimplemented register " \
|
||||||
"at address: %#" PRIx64 "\n", reg_array->prefix, addr);
|
"at address: 0x%" PRIx64 "\n", reg_array->prefix, addr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ uint64_t register_read_memory(void *opaque, hwaddr addr,
|
|||||||
|
|
||||||
if (!reg) {
|
if (!reg) {
|
||||||
qemu_log_mask(LOG_GUEST_ERROR, "%s: read to unimplemented register " \
|
qemu_log_mask(LOG_GUEST_ERROR, "%s: read to unimplemented register " \
|
||||||
"at address: %#" PRIx64 "\n", reg_array->prefix, addr);
|
"at address: 0x%" PRIx64 "\n", reg_array->prefix, addr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user