* [PATCH-for-7.0 0/2] misc: Fix misleading hexadecimal format
@ 2022-03-23 11:47 Philippe Mathieu-Daudé
2022-03-23 11:47 ` [PATCH-for-7.0 1/2] block: " Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-23 11:47 UTC (permalink / raw)
To: qemu-devel
Cc: Fam Zheng, Kevin Wolf, Vladimir Sementsov-Ogievskiy, qemu-block,
Michael S. Tsirkin, Richard Henderson,
Philippe Mathieu-Daudé,
Eduardo Habkost, Hanna Reitz, Stefan Hajnoczi, Paolo Bonzini,
Denis V. Lunev
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Fix 0x%d misleading format reported here:
https://lore.kernel.org/qemu-devel/dab530d9-53d2-3d7d-c9ac-44906ba9b386@linaro.org/
Philippe Mathieu-Daudé (2):
block: Fix misleading hexadecimal format
hw: Fix misleading hexadecimal format
block/parallels-ext.c | 2 +-
hw/i386/sgx.c | 2 +-
hw/i386/trace-events | 6 +++---
hw/misc/trace-events | 4 ++--
hw/scsi/trace-events | 4 ++--
5 files changed, 9 insertions(+), 9 deletions(-)
--
2.35.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH-for-7.0 1/2] block: Fix misleading hexadecimal format
2022-03-23 11:47 [PATCH-for-7.0 0/2] misc: Fix misleading hexadecimal format Philippe Mathieu-Daudé
@ 2022-03-23 11:47 ` Philippe Mathieu-Daudé
2022-03-23 11:55 ` Hanna Reitz
` (2 more replies)
2022-03-23 11:47 ` [PATCH-for-7.0 2/2] hw: " Philippe Mathieu-Daudé
2022-03-24 10:49 ` [PATCH-for-7.0 0/2] misc: " Stefan Hajnoczi
2 siblings, 3 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-23 11:47 UTC (permalink / raw)
To: qemu-devel
Cc: Fam Zheng, Kevin Wolf, Vladimir Sementsov-Ogievskiy, qemu-block,
Michael S. Tsirkin, Richard Henderson,
Philippe Mathieu-Daudé,
Eduardo Habkost, Hanna Reitz, Stefan Hajnoczi, Paolo Bonzini,
Denis V. Lunev
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
"0x%u" format is very misleading, replace by "0x%x".
Found running:
$ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/
Inspired-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
block/parallels-ext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/parallels-ext.c b/block/parallels-ext.c
index cb22a427d7..5122f67ac2 100644
--- a/block/parallels-ext.c
+++ b/block/parallels-ext.c
@@ -261,7 +261,7 @@ static int parallels_parse_format_extension(BlockDriverState *bs,
break;
default:
- error_setg(errp, "Unknown feature: 0x%" PRIu64, fh.magic);
+ error_setg(errp, "Unknown feature: 0x%" PRIx64, fh.magic);
goto fail;
}
--
2.35.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH-for-7.0 2/2] hw: Fix misleading hexadecimal format
2022-03-23 11:47 [PATCH-for-7.0 0/2] misc: Fix misleading hexadecimal format Philippe Mathieu-Daudé
2022-03-23 11:47 ` [PATCH-for-7.0 1/2] block: " Philippe Mathieu-Daudé
@ 2022-03-23 11:47 ` Philippe Mathieu-Daudé
2022-03-23 12:10 ` Daniel P. Berrangé
2022-03-24 10:49 ` [PATCH-for-7.0 0/2] misc: " Stefan Hajnoczi
2 siblings, 1 reply; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-23 11:47 UTC (permalink / raw)
To: qemu-devel
Cc: Fam Zheng, Kevin Wolf, Vladimir Sementsov-Ogievskiy, qemu-block,
Michael S. Tsirkin, Richard Henderson,
Philippe Mathieu-Daudé,
Eduardo Habkost, Hanna Reitz, Stefan Hajnoczi, Paolo Bonzini,
Denis V. Lunev
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
"0x%u" format is very misleading, replace by "0x%x".
Found running:
$ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' hw/
Inspired-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/i386/sgx.c | 2 +-
hw/i386/trace-events | 6 +++---
hw/misc/trace-events | 4 ++--
hw/scsi/trace-events | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/i386/sgx.c b/hw/i386/sgx.c
index a2b318dd93..a44d66ba2a 100644
--- a/hw/i386/sgx.c
+++ b/hw/i386/sgx.c
@@ -315,7 +315,7 @@ void pc_machine_init_sgx_epc(PCMachineState *pcms)
}
if ((sgx_epc->base + sgx_epc->size) < sgx_epc->base) {
- error_report("Size of all 'sgx-epc' =0x%"PRIu64" causes EPC to wrap",
+ error_report("Size of all 'sgx-epc' =0x%"PRIx64" causes EPC to wrap",
sgx_epc->size);
exit(EXIT_FAILURE);
}
diff --git a/hw/i386/trace-events b/hw/i386/trace-events
index 5bf7e52bf5..e49814dd64 100644
--- a/hw/i386/trace-events
+++ b/hw/i386/trace-events
@@ -33,15 +33,15 @@ vtd_fault_disabled(void) "Fault processing disabled for context entry"
vtd_replay_ce_valid(const char *mode, uint8_t bus, uint8_t dev, uint8_t fn, uint16_t domain, uint64_t hi, uint64_t lo) "%s: replay valid context device %02"PRIx8":%02"PRIx8".%02"PRIx8" domain 0x%"PRIx16" hi 0x%"PRIx64" lo 0x%"PRIx64
vtd_replay_ce_invalid(uint8_t bus, uint8_t dev, uint8_t fn) "replay invalid context device %02"PRIx8":%02"PRIx8".%02"PRIx8
vtd_page_walk_level(uint64_t addr, uint32_t level, uint64_t start, uint64_t end) "walk (base=0x%"PRIx64", level=%"PRIu32") iova range 0x%"PRIx64" - 0x%"PRIx64
-vtd_page_walk_one(uint16_t domain, uint64_t iova, uint64_t gpa, uint64_t mask, int perm) "domain 0x%"PRIu16" iova 0x%"PRIx64" -> gpa 0x%"PRIx64" mask 0x%"PRIx64" perm %d"
+vtd_page_walk_one(uint16_t domain, uint64_t iova, uint64_t gpa, uint64_t mask, int perm) "domain 0x%"PRIx16" iova 0x%"PRIx64" -> gpa 0x%"PRIx64" mask 0x%"PRIx64" perm %d"
vtd_page_walk_one_skip_map(uint64_t iova, uint64_t mask, uint64_t translated) "iova 0x%"PRIx64" mask 0x%"PRIx64" translated 0x%"PRIx64
vtd_page_walk_one_skip_unmap(uint64_t iova, uint64_t mask) "iova 0x%"PRIx64" mask 0x%"PRIx64
vtd_page_walk_skip_read(uint64_t iova, uint64_t next) "Page walk skip iova 0x%"PRIx64" - 0x%"PRIx64" due to unable to read"
vtd_page_walk_skip_reserve(uint64_t iova, uint64_t next) "Page walk skip iova 0x%"PRIx64" - 0x%"PRIx64" due to rsrv set"
vtd_switch_address_space(uint8_t bus, uint8_t slot, uint8_t fn, bool on) "Device %02x:%02x.%x switching address space (iommu enabled=%d)"
vtd_as_unmap_whole(uint8_t bus, uint8_t slot, uint8_t fn, uint64_t iova, uint64_t size) "Device %02x:%02x.%x start 0x%"PRIx64" size 0x%"PRIx64
-vtd_translate_pt(uint16_t sid, uint64_t addr) "source id 0x%"PRIu16", iova 0x%"PRIx64
-vtd_pt_enable_fast_path(uint16_t sid, bool success) "sid 0x%"PRIu16" %d"
+vtd_translate_pt(uint16_t sid, uint64_t addr) "source id 0x%"PRIx16", iova 0x%"PRIx64
+vtd_pt_enable_fast_path(uint16_t sid, bool success) "sid 0x%"PRIx16" %d"
vtd_irq_generate(uint64_t addr, uint64_t data) "addr 0x%"PRIx64" data 0x%"PRIx64
vtd_reg_read(uint64_t addr, uint64_t size) "addr 0x%"PRIx64" size 0x%"PRIx64
vtd_reg_write(uint64_t addr, uint64_t size, uint64_t val) "addr 0x%"PRIx64" size 0x%"PRIx64" value 0x%"PRIx64
diff --git a/hw/misc/trace-events b/hw/misc/trace-events
index bd52cfc110..4e0c7973a4 100644
--- a/hw/misc/trace-events
+++ b/hw/misc/trace-events
@@ -1,7 +1,7 @@
# See docs/devel/tracing.rst for syntax documentation.
# allwinner-cpucfg.c
-allwinner_cpucfg_cpu_reset(uint8_t cpu_id, uint32_t reset_addr) "id %u, reset_addr 0x%" PRIu32
+allwinner_cpucfg_cpu_reset(uint8_t cpu_id, uint32_t reset_addr) "id %u, reset_addr 0x%" PRIx32
allwinner_cpucfg_read(uint64_t offset, uint64_t data, unsigned size) "offset 0x%" PRIx64 " data 0x%" PRIx64 " size %" PRIu32
allwinner_cpucfg_write(uint64_t offset, uint64_t data, unsigned size) "offset 0x%" PRIx64 " data 0x%" PRIx64 " size %" PRIu32
@@ -93,7 +93,7 @@ imx7_gpr_write(uint64_t offset, uint64_t value) "addr 0x%08" PRIx64 "value 0x%08
# mos6522.c
mos6522_set_counter(int index, unsigned int val) "T%d.counter=%d"
-mos6522_get_next_irq_time(uint16_t latch, int64_t d, int64_t delta) "latch=%d counter=0x%"PRId64 " delta_next=0x%"PRId64
+mos6522_get_next_irq_time(uint16_t latch, int64_t d, int64_t delta) "latch=%d counter=0x%"PRIx64 " delta_next=0x%"PRIx64
mos6522_set_sr_int(void) "set sr_int"
mos6522_write(uint64_t addr, const char *name, uint64_t val) "reg=0x%"PRIx64 " [%s] val=0x%"PRIx64
mos6522_read(uint64_t addr, const char *name, unsigned val) "reg=0x%"PRIx64 " [%s] val=0x%x"
diff --git a/hw/scsi/trace-events b/hw/scsi/trace-events
index ae8551f279..20fb0dc162 100644
--- a/hw/scsi/trace-events
+++ b/hw/scsi/trace-events
@@ -249,7 +249,7 @@ lsi_bad_phase_interrupt(void) "Phase mismatch interrupt"
lsi_bad_selection(uint32_t id) "Selected absent target %"PRIu32
lsi_do_dma_unavailable(void) "DMA no data available"
lsi_do_dma(uint64_t addr, int len) "DMA addr=0x%"PRIx64" len=%d"
-lsi_queue_command(uint32_t tag) "Queueing tag=0x%"PRId32
+lsi_queue_command(uint32_t tag) "Queueing tag=0x%"PRIx32
lsi_add_msg_byte_error(void) "MSG IN data too long"
lsi_add_msg_byte(uint8_t data) "MSG IN 0x%02x"
lsi_reselect(int id) "Reselected target %d"
@@ -267,7 +267,7 @@ lsi_do_msgout_noop(void) "MSG: No Operation"
lsi_do_msgout_extended(uint8_t msg, uint8_t len) "Extended message 0x%x (len %d)"
lsi_do_msgout_ignored(const char *msg) "%s (ignored)"
lsi_do_msgout_simplequeue(uint8_t select_tag) "SIMPLE queue tag=0x%x"
-lsi_do_msgout_abort(uint32_t tag) "MSG: ABORT TAG tag=0x%"PRId32
+lsi_do_msgout_abort(uint32_t tag) "MSG: ABORT TAG tag=0x%"PRIx32
lsi_do_msgout_clearqueue(uint32_t tag) "MSG: CLEAR QUEUE tag=0x%"PRIx32
lsi_do_msgout_busdevicereset(uint32_t tag) "MSG: BUS DEVICE RESET tag=0x%"PRIx32
lsi_do_msgout_select(int id) "Select LUN %d"
--
2.35.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH-for-7.0 1/2] block: Fix misleading hexadecimal format
2022-03-23 11:47 ` [PATCH-for-7.0 1/2] block: " Philippe Mathieu-Daudé
@ 2022-03-23 11:55 ` Hanna Reitz
2022-03-23 12:05 ` Daniel P. Berrangé
2022-03-23 12:12 ` Denis V. Lunev
2 siblings, 0 replies; 8+ messages in thread
From: Hanna Reitz @ 2022-03-23 11:55 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Fam Zheng, Kevin Wolf, Vladimir Sementsov-Ogievskiy, qemu-block,
Michael S. Tsirkin, Richard Henderson,
Philippe Mathieu-Daudé,
Eduardo Habkost, Stefan Hajnoczi, Paolo Bonzini, Denis V. Lunev
On 23.03.22 12:47, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> "0x%u" format is very misleading, replace by "0x%x".
>
> Found running:
>
> $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/
>
> Inspired-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> block/parallels-ext.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH-for-7.0 1/2] block: Fix misleading hexadecimal format
2022-03-23 11:47 ` [PATCH-for-7.0 1/2] block: " Philippe Mathieu-Daudé
2022-03-23 11:55 ` Hanna Reitz
@ 2022-03-23 12:05 ` Daniel P. Berrangé
2022-03-23 12:12 ` Denis V. Lunev
2 siblings, 0 replies; 8+ messages in thread
From: Daniel P. Berrangé @ 2022-03-23 12:05 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Fam Zheng, Kevin Wolf, Vladimir Sementsov-Ogievskiy, qemu-block,
Michael S. Tsirkin, Richard Henderson, qemu-devel,
Philippe Mathieu-Daudé,
Eduardo Habkost, Hanna Reitz, Stefan Hajnoczi, Denis V. Lunev,
Paolo Bonzini
On Wed, Mar 23, 2022 at 12:47:17PM +0100, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> "0x%u" format is very misleading, replace by "0x%x".
>
> Found running:
>
> $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/
>
> Inspired-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> block/parallels-ext.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH-for-7.0 2/2] hw: Fix misleading hexadecimal format
2022-03-23 11:47 ` [PATCH-for-7.0 2/2] hw: " Philippe Mathieu-Daudé
@ 2022-03-23 12:10 ` Daniel P. Berrangé
0 siblings, 0 replies; 8+ messages in thread
From: Daniel P. Berrangé @ 2022-03-23 12:10 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Fam Zheng, Kevin Wolf, Vladimir Sementsov-Ogievskiy, qemu-block,
Michael S. Tsirkin, Richard Henderson, qemu-devel,
Philippe Mathieu-Daudé,
Eduardo Habkost, Hanna Reitz, Stefan Hajnoczi, Denis V. Lunev,
Paolo Bonzini
On Wed, Mar 23, 2022 at 12:47:18PM +0100, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> "0x%u" format is very misleading, replace by "0x%x".
>
> Found running:
>
> $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' hw/
>
> Inspired-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/i386/sgx.c | 2 +-
> hw/i386/trace-events | 6 +++---
> hw/misc/trace-events | 4 ++--
> hw/scsi/trace-events | 4 ++--
> 4 files changed, 8 insertions(+), 8 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH-for-7.0 1/2] block: Fix misleading hexadecimal format
2022-03-23 11:47 ` [PATCH-for-7.0 1/2] block: " Philippe Mathieu-Daudé
2022-03-23 11:55 ` Hanna Reitz
2022-03-23 12:05 ` Daniel P. Berrangé
@ 2022-03-23 12:12 ` Denis V. Lunev
2 siblings, 0 replies; 8+ messages in thread
From: Denis V. Lunev @ 2022-03-23 12:12 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Fam Zheng, Vladimir Sementsov-Ogievskiy, qemu-block,
Stefan Hajnoczi, Michael S. Tsirkin, Paolo Bonzini,
Richard Henderson, Kevin Wolf, Marcel Apfelbaum, Hanna Reitz,
Eduardo Habkost, Philippe Mathieu-Daudé
On 23.03.2022 14:47, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> "0x%u" format is very misleading, replace by "0x%x".
>
> Found running:
>
> $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/
>
> Inspired-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> block/parallels-ext.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/parallels-ext.c b/block/parallels-ext.c
> index cb22a427d7..5122f67ac2 100644
> --- a/block/parallels-ext.c
> +++ b/block/parallels-ext.c
> @@ -261,7 +261,7 @@ static int parallels_parse_format_extension(BlockDriverState *bs,
> break;
>
> default:
> - error_setg(errp, "Unknown feature: 0x%" PRIu64, fh.magic);
> + error_setg(errp, "Unknown feature: 0x%" PRIx64, fh.magic);
> goto fail;
> }
>
Reviewed-by: Denis V. Lunev <den@openvz.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH-for-7.0 0/2] misc: Fix misleading hexadecimal format
2022-03-23 11:47 [PATCH-for-7.0 0/2] misc: Fix misleading hexadecimal format Philippe Mathieu-Daudé
2022-03-23 11:47 ` [PATCH-for-7.0 1/2] block: " Philippe Mathieu-Daudé
2022-03-23 11:47 ` [PATCH-for-7.0 2/2] hw: " Philippe Mathieu-Daudé
@ 2022-03-24 10:49 ` Stefan Hajnoczi
2 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2022-03-24 10:49 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Fam Zheng, Kevin Wolf, Vladimir Sementsov-Ogievskiy, qemu-block,
Michael S. Tsirkin, Richard Henderson, qemu-devel,
Philippe Mathieu-Daudé,
Eduardo Habkost, Hanna Reitz, Paolo Bonzini, Denis V. Lunev
[-- Attachment #1: Type: text/plain, Size: 749 bytes --]
On Wed, Mar 23, 2022 at 12:47:16PM +0100, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> Fix 0x%d misleading format reported here:
> https://lore.kernel.org/qemu-devel/dab530d9-53d2-3d7d-c9ac-44906ba9b386@linaro.org/
>
> Philippe Mathieu-Daudé (2):
> block: Fix misleading hexadecimal format
> hw: Fix misleading hexadecimal format
>
> block/parallels-ext.c | 2 +-
> hw/i386/sgx.c | 2 +-
> hw/i386/trace-events | 6 +++---
> hw/misc/trace-events | 4 ++--
> hw/scsi/trace-events | 4 ++--
> 5 files changed, 9 insertions(+), 9 deletions(-)
>
> --
> 2.35.1
>
Nice fix, thank you!
Applied to my block tree:
https://gitlab.com/stefanha/qemu/commits/block
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-03-24 10:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23 11:47 [PATCH-for-7.0 0/2] misc: Fix misleading hexadecimal format Philippe Mathieu-Daudé
2022-03-23 11:47 ` [PATCH-for-7.0 1/2] block: " Philippe Mathieu-Daudé
2022-03-23 11:55 ` Hanna Reitz
2022-03-23 12:05 ` Daniel P. Berrangé
2022-03-23 12:12 ` Denis V. Lunev
2022-03-23 11:47 ` [PATCH-for-7.0 2/2] hw: " Philippe Mathieu-Daudé
2022-03-23 12:10 ` Daniel P. Berrangé
2022-03-24 10:49 ` [PATCH-for-7.0 0/2] misc: " Stefan Hajnoczi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.