Skip to contentSkip to conversation

misc: Trivial format string fixes

PATCH In review Philippe Mathieu-Daudé 5 participants 22 messages Nov 3, 2020 – Nov 23, 2020

lore
Share & tools
lore
#0 lore raw

cover misc: Trivial format string fixes

IIUC qemu-trivial@ doesn't queue patches during freeze, so it might be easier if patches are queued by respective subsystem maintainers.

Philippe Mathieu-Daudé (4):
hw/display/cirrus_vga: Remove debugging code commented out hw/display/cirrus_vga: Fix hexadecimal format string specifier hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier migration/ram: Fix hexadecimal format string specifier

 hw/display/cirrus_vga.c | 20 +-------------------
 migration/ram.c         |  2 +-
 hw/ppc/trace-events     |  2 +-
 3 files changed, 3 insertions(+), 21 deletions(-)
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/4 hw/display/cirrus_vga: Remove debugging code commented out

Commit ec87f206d70 ("cirrus: replace debug printf with trace points") forgot to remove this code once replaced. Do it now.

---
 hw/display/cirrus_vga.c | 18 ------------------
 1 file changed, 18 deletions(-)
hw/display/cirrus_vga.c +0 -18
index 722b9e7004c..e14096deb46 100644
@@ -2532,9 +2532,6 @@ static uint64_t cirrus_vga_ioport_read(void *opaque, hwaddr addr,
 	case 0x3c5:
 	    val = cirrus_vga_read_sr(c);
             break;
-#ifdef DEBUG_VGA_REG
-	    printf("vga: read SR%x = 0x%02x\n", s->sr_index, val);
-#endif
 	    break;
 	case 0x3c6:
 	    val = cirrus_read_hidden_dac(c);
@@ -2560,9 +2557,6 @@ static uint64_t cirrus_vga_ioport_read(void *opaque, hwaddr addr,
 	    break;
 	case 0x3cf:
 	    val = cirrus_vga_read_gr(c, s->gr_index);
-#ifdef DEBUG_VGA_REG
-	    printf("vga: read GR%x = 0x%02x\n", s->gr_index, val);
-#endif
 	    break;
 	case 0x3b4:
 	case 0x3d4:
@@ -2571,9 +2565,6 @@ static uint64_t cirrus_vga_ioport_read(void *opaque, hwaddr addr,
 	case 0x3b5:
 	case 0x3d5:
             val = cirrus_vga_read_cr(c, s->cr_index);
-#ifdef DEBUG_VGA_REG
-	    printf("vga: read CR%x = 0x%02x\n", s->cr_index, val);
-#endif
 	    break;
 	case 0x3ba:
 	case 0x3da:
@@ -2645,9 +2636,6 @@ static void cirrus_vga_ioport_write(void *opaque, hwaddr addr, uint64_t val,
 	s->sr_index = val;
 	break;
     case 0x3c5:
-#ifdef DEBUG_VGA_REG
-	printf("vga: write SR%x = 0x%02" PRIu64 "\n", s->sr_index, val);
-#endif
 	cirrus_vga_write_sr(c, val);
         break;
     case 0x3c6:
@@ -2670,9 +2658,6 @@ static void cirrus_vga_ioport_write(void *opaque, hwaddr addr, uint64_t val,
 	s->gr_index = val;
 	break;
     case 0x3cf:
-#ifdef DEBUG_VGA_REG
-	printf("vga: write GR%x = 0x%02" PRIu64 "\n", s->gr_index, val);
-#endif
 	cirrus_vga_write_gr(c, s->gr_index, val);
 	break;
     case 0x3b4:
@@ -2681,9 +2666,6 @@ static void cirrus_vga_ioport_write(void *opaque, hwaddr addr, uint64_t val,
 	break;
     case 0x3b5:
     case 0x3d5:
-#ifdef DEBUG_VGA_REG
-	printf("vga: write CR%x = 0x%02"PRIu64"\n", s->cr_index, val);
-#endif
 	cirrus_vga_write_cr(c, val);
 	break;
     case 0x3ba:
Signature · 1 line
2.26.2
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH-for-5.2 1/4] hw/display/cirrus_vga: Remove debugging code commented out

Quoted 4 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:

Commit ec87f206d70 ("cirrus: replace debug printf with trace points") forgot to remove this code once replaced. Do it now.

Quoted 71 lines
---
 hw/display/cirrus_vga.c | 18 ------------------
 1 file changed, 18 deletions(-)
hw/display/cirrus_vga.c +0 -18
index 722b9e7004c..e14096deb46 100644
@@ -2532,9 +2532,6 @@ static uint64_t cirrus_vga_ioport_read(void *opaque, hwaddr addr,
 	case 0x3c5:
 	    val = cirrus_vga_read_sr(c);
             break;
-#ifdef DEBUG_VGA_REG
-	    printf("vga: read SR%x = 0x%02x\n", s->sr_index, val);
-#endif
 	    break;
 	case 0x3c6:
 	    val = cirrus_read_hidden_dac(c);
@@ -2560,9 +2557,6 @@ static uint64_t cirrus_vga_ioport_read(void *opaque, hwaddr addr,
 	    break;
 	case 0x3cf:
 	    val = cirrus_vga_read_gr(c, s->gr_index);
-#ifdef DEBUG_VGA_REG
-	    printf("vga: read GR%x = 0x%02x\n", s->gr_index, val);
-#endif
 	    break;
 	case 0x3b4:
 	case 0x3d4:
@@ -2571,9 +2565,6 @@ static uint64_t cirrus_vga_ioport_read(void *opaque, hwaddr addr,
 	case 0x3b5:
 	case 0x3d5:
             val = cirrus_vga_read_cr(c, s->cr_index);
-#ifdef DEBUG_VGA_REG
-	    printf("vga: read CR%x = 0x%02x\n", s->cr_index, val);
-#endif
 	    break;
 	case 0x3ba:
 	case 0x3da:
@@ -2645,9 +2636,6 @@ static void cirrus_vga_ioport_write(void *opaque, hwaddr addr, uint64_t val,
 	s->sr_index = val;
 	break;
     case 0x3c5:
-#ifdef DEBUG_VGA_REG
-	printf("vga: write SR%x = 0x%02" PRIu64 "\n", s->sr_index, val);
-#endif
 	cirrus_vga_write_sr(c, val);
         break;
     case 0x3c6:
@@ -2670,9 +2658,6 @@ static void cirrus_vga_ioport_write(void *opaque, hwaddr addr, uint64_t val,
 	s->gr_index = val;
 	break;
     case 0x3cf:
-#ifdef DEBUG_VGA_REG
-	printf("vga: write GR%x = 0x%02" PRIu64 "\n", s->gr_index, val);
-#endif
 	cirrus_vga_write_gr(c, s->gr_index, val);
 	break;
     case 0x3b4:
@@ -2681,9 +2666,6 @@ static void cirrus_vga_ioport_write(void *opaque, hwaddr addr, uint64_t val,
 	break;
     case 0x3b5:
     case 0x3d5:
-#ifdef DEBUG_VGA_REG
-	printf("vga: write CR%x = 0x%02"PRIu64"\n", s->cr_index, val);
-#endif
 	cirrus_vga_write_cr(c, val);
 	break;
     case 0x3ba:
Signature · 1 line
2.26.2
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
#3 lore raw

PATCH 2/4 hw/display/cirrus_vga: Fix hexadecimal format string specifier

In reply to Philippe Mathieu-Daudé

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

---
 hw/display/cirrus_vga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/display/cirrus_vga.c +1 -1
index e14096deb46..fdca6ca659f 100644
@@ -2105,7 +2105,7 @@ static void cirrus_vga_mem_write(void *opaque,
     } else {
         qemu_log_mask(LOG_GUEST_ERROR,
                       "cirrus: mem_writeb 0x" TARGET_FMT_plx " "
-                      "value 0x%02" PRIu64 "\n", addr, mem_value);
+                      "value 0x%02" PRIx64 "\n", addr, mem_value);
     }
 }
 
Signature · 1 line
2.26.2
Reviewed-by on v1 2/4
#4 lore raw

Re: [PATCH-for-5.2 2/4] hw/display/cirrus_vga: Fix hexadecimal format string specifier

Quoted 6 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

Oh that's nice, one my regex wouldn't find.

Quoted 20 lines
---
 hw/display/cirrus_vga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/display/cirrus_vga.c +1 -1
index e14096deb46..fdca6ca659f 100644
@@ -2105,7 +2105,7 @@ static void cirrus_vga_mem_write(void *opaque,
     } else {
         qemu_log_mask(LOG_GUEST_ERROR,
                       "cirrus: mem_writeb 0x" TARGET_FMT_plx " "
-                      "value 0x%02" PRIu64 "\n", addr, mem_value);
+                      "value 0x%02" PRIx64 "\n", addr, mem_value);
     }
 }
 
Signature · 1 line
2.26.2
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
#5 lore raw

Re: [PATCH-for-5.2 2/4] hw/display/cirrus_vga: Fix hexadecimal format string specifier

In reply to Philippe Mathieu-Daudé

Hi Gerd,

Quoted 16 lines · Philippe Mathieu-Daudé

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

---
 hw/display/cirrus_vga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/display/cirrus_vga.c +0 -0
index e14096deb46..fdca6ca659f 100644

hw/display/cirrus_vga.c static void cirrus_vga_mem_write(void *opaque, · line 2111

Quoted 8 lines
hw/display/cirrus_vga.c +1 -1
@@ -2105,7 +2105,7 @@ static void cirrus_vga_mem_write(void *opaque,
     } else {
         qemu_log_mask(LOG_GUEST_ERROR,
                       "cirrus: mem_writeb 0x" TARGET_FMT_plx " "
-                      "value 0x%02" PRIu64 "\n", addr, mem_value);
+                      "value 0x%02" PRIx64 "\n", addr, mem_value);
     }
 }
 

This patch (and previous one) missed your latest ui pull request. As there is no qemu-trivial@ pull request during freeze/rc, can you queue these patches via your tree?

Thanks,

Phil.

#6 lore raw

PATCH 3/4 hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier

In reply to Philippe Mathieu-Daudé

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

---
 hw/ppc/trace-events | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/trace-events +1 -1
index dcc06d49b5a..6d8d095aa28 100644
@@ -19,7 +19,7 @@ spapr_update_dt_failed_size(unsigned cbold, unsigned cbnew, unsigned magic) "Old
 spapr_update_dt_failed_check(unsigned cbold, unsigned cbnew, unsigned magic) "Old blob %u bytes, new blob %u bytes, magic 0x%x"
 
 # spapr_tpm_proxy.c
-spapr_h_tpm_comm(const char *device_path, uint64_t operation) "tpm_device_path=%s operation=0x%"PRIu64
+spapr_h_tpm_comm(const char *device_path, uint64_t operation) "tpm_device_path=%s operation=0x%"PRIx64
 spapr_tpm_execute(uint64_t data_in, uint64_t data_in_sz, uint64_t data_out, uint64_t data_out_sz) "data_in=0x%"PRIx64", data_in_sz=%"PRIu64", data_out=0x%"PRIx64", data_out_sz=%"PRIu64
 
 # spapr_iommu.c
Signature · 1 line
2.26.2
Reviewed-by on v1 3/4
#7 lore raw

Re: [PATCH-for-5.2 3/4] hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier

Quoted 7 lines · On Tue, 3 Nov 2020 12:25:57 +0100 Philippe Mathieu-Daudé <[email protected]>…

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

---

Quoted 16 lines
 hw/ppc/trace-events | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/trace-events +1 -1
index dcc06d49b5a..6d8d095aa28 100644
@@ -19,7 +19,7 @@ spapr_update_dt_failed_size(unsigned cbold, unsigned cbnew, unsigned magic) "Old
 spapr_update_dt_failed_check(unsigned cbold, unsigned cbnew, unsigned magic) "Old blob %u bytes, new blob %u bytes, magic 0x%x"
 
 # spapr_tpm_proxy.c
-spapr_h_tpm_comm(const char *device_path, uint64_t operation) "tpm_device_path=%s operation=0x%"PRIu64
+spapr_h_tpm_comm(const char *device_path, uint64_t operation) "tpm_device_path=%s operation=0x%"PRIx64
 spapr_tpm_execute(uint64_t data_in, uint64_t data_in_sz, uint64_t data_out, uint64_t data_out_sz) "data_in=0x%"PRIx64", data_in_sz=%"PRIu64", data_out=0x%"PRIx64", data_out_sz=%"PRIu64
 
 # spapr_iommu.c
Acked-by on v1 3/4
#8 lore raw

Re: [PATCH-for-5.2 3/4] hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier

In reply to Philippe Mathieu-Daudé
Quoted 6 lines · Philippe Mathieu-Daudé

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

Quoted 17 lines
---
 hw/ppc/trace-events | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/trace-events +1 -1
index dcc06d49b5a..6d8d095aa28 100644
@@ -19,7 +19,7 @@ spapr_update_dt_failed_size(unsigned cbold, unsigned cbnew, unsigned magic) "Old
 spapr_update_dt_failed_check(unsigned cbold, unsigned cbnew, unsigned magic) "Old blob %u bytes, new blob %u bytes, magic 0x%x"
 
 # spapr_tpm_proxy.c
-spapr_h_tpm_comm(const char *device_path, uint64_t operation) "tpm_device_path=%s operation=0x%"PRIu64
+spapr_h_tpm_comm(const char *device_path, uint64_t operation) "tpm_device_path=%s operation=0x%"PRIx64
 spapr_tpm_execute(uint64_t data_in, uint64_t data_in_sz, uint64_t data_out, uint64_t data_out_sz) "data_in=0x%"PRIx64", data_in_sz=%"PRIu64", data_out=0x%"PRIx64", data_out_sz=%"PRIu64
 
 # spapr_iommu.c
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#9 lore raw

Re: [PATCH-for-5.2 3/4] hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier

Hi David,

Quoted 9 lines · David Gibson
Quoted 6 lines · Philippe Mathieu-Daudé

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

As there is no qemu-trivial@ pull request during freeze/rc, can you queue this patch via your ppc tree?

Thanks,

Phil.

Quoted 19 lines
Quoted 18 lines
---
 hw/ppc/trace-events | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/trace-events +1 -1
index dcc06d49b5a..6d8d095aa28 100644
@@ -19,7 +19,7 @@ spapr_update_dt_failed_size(unsigned cbold, unsigned cbnew, unsigned magic) "Old
 spapr_update_dt_failed_check(unsigned cbold, unsigned cbnew, unsigned magic) "Old blob %u bytes, new blob %u bytes, magic 0x%x"
 
 # spapr_tpm_proxy.c
-spapr_h_tpm_comm(const char *device_path, uint64_t operation) "tpm_device_path=%s operation=0x%"PRIu64
+spapr_h_tpm_comm(const char *device_path, uint64_t operation) "tpm_device_path=%s operation=0x%"PRIx64
 spapr_tpm_execute(uint64_t data_in, uint64_t data_in_sz, uint64_t data_out, uint64_t data_out_sz) "data_in=0x%"PRIx64", data_in_sz=%"PRIu64", data_out=0x%"PRIx64", data_out_sz=%"PRIu64
 
 # spapr_iommu.c
#10 lore raw

Re: [PATCH-for-5.2 3/4] hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier

Quoted 8 lines · Philippe Mathieu-Daudé

Hi David,

Quoted 5 lines · David Gibson
Quoted 4 lines · Philippe Mathieu-Daudé

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

As there is no qemu-trivial@ pull request during freeze/rc, can you queue this patch via your ppc tree?

Done, applied to ppc-for-6.0.

Quoted 26 lines

Thanks,

Phil.

Quoted 19 lines
Quoted 18 lines
---
 hw/ppc/trace-events | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/trace-events +1 -1
index dcc06d49b5a..6d8d095aa28 100644
@@ -19,7 +19,7 @@ spapr_update_dt_failed_size(unsigned cbold, unsigned cbnew, unsigned magic) "Old
 spapr_update_dt_failed_check(unsigned cbold, unsigned cbnew, unsigned magic) "Old blob %u bytes, new blob %u bytes, magic 0x%x"
 
 # spapr_tpm_proxy.c
-spapr_h_tpm_comm(const char *device_path, uint64_t operation) "tpm_device_path=%s operation=0x%"PRIu64
+spapr_h_tpm_comm(const char *device_path, uint64_t operation) "tpm_device_path=%s operation=0x%"PRIx64
 spapr_tpm_execute(uint64_t data_in, uint64_t data_in_sz, uint64_t data_out, uint64_t data_out_sz) "data_in=0x%"PRIx64", data_in_sz=%"PRIu64", data_out=0x%"PRIx64", data_out_sz=%"PRIu64
 
 # spapr_iommu.c
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#11 lore raw

PATCH 4/4 migration/ram: Fix hexadecimal format string specifier

In reply to Philippe Mathieu-Daudé

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

---
 migration/ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/ram.c +1 -1
index 2da2b622ab2..23dcfb3ac38 100644
@@ -3729,7 +3729,7 @@ int ram_dirty_bitmap_reload(MigrationState *s, RAMBlock *block)
     }
 
     if (end_mark != RAMBLOCK_RECV_BITMAP_ENDING) {
-        error_report("%s: ramblock '%s' end mark incorrect: 0x%"PRIu64,
+        error_report("%s: ramblock '%s' end mark incorrect: 0x%"PRIx64,
                      __func__, block->idstr, end_mark);
         ret = -EINVAL;
         goto out;
Signature · 1 line
2.26.2
Reviewed-by on v1 4/4
#12 lore raw

Re: [PATCH-for-5.2 4/4] migration/ram: Fix hexadecimal format string specifier

Quoted 6 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

Quoted 20 lines
---
 migration/ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/ram.c +1 -1
index 2da2b622ab2..23dcfb3ac38 100644
@@ -3729,7 +3729,7 @@ int ram_dirty_bitmap_reload(MigrationState *s, RAMBlock *block)
     }
 
     if (end_mark != RAMBLOCK_RECV_BITMAP_ENDING) {
-        error_report("%s: ramblock '%s' end mark incorrect: 0x%"PRIu64,
+        error_report("%s: ramblock '%s' end mark incorrect: 0x%"PRIx64,
                      __func__, block->idstr, end_mark);
         ret = -EINVAL;
         goto out;
Signature · 1 line
2.26.2
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
#13 lore raw

Re: [PATCH-for-5.2 4/4] migration/ram: Fix hexadecimal format string specifier

Hi David, Juan.

Quoted 9 lines · Dr. David Alan Gilbert
Quoted 6 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

As there is no qemu-trivial@ pull request during freeze/rc, can you queue this patch via your migration tree?

Thanks,

Phil.

Quoted 21 lines
Quoted 21 lines
---
 migration/ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/ram.c +1 -1
index 2da2b622ab2..23dcfb3ac38 100644
@@ -3729,7 +3729,7 @@ int ram_dirty_bitmap_reload(MigrationState *s, RAMBlock *block)
     }
 
     if (end_mark != RAMBLOCK_RECV_BITMAP_ENDING) {
-        error_report("%s: ramblock '%s' end mark incorrect: 0x%"PRIu64,
+        error_report("%s: ramblock '%s' end mark incorrect: 0x%"PRIx64,
                      __func__, block->idstr, end_mark);
         ret = -EINVAL;
         goto out;
Signature · 1 line
2.26.2
#14 lore raw

Re: [PATCH-for-5.2 4/4] migration/ram: Fix hexadecimal format string specifier

Quoted 8 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:

Hi David, Juan.

Quoted 5 lines · Dr. David Alan Gilbert
Quoted 4 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

As there is no qemu-trivial@ pull request during freeze/rc, can you queue this patch via your migration tree?

Yep, will do.

Dave

Quoted 26 lines

Thanks,

Phil.

Quoted 21 lines
Quoted 21 lines
---
 migration/ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/ram.c +1 -1
index 2da2b622ab2..23dcfb3ac38 100644
@@ -3729,7 +3729,7 @@ int ram_dirty_bitmap_reload(MigrationState *s, RAMBlock *block)
     }
 
     if (end_mark != RAMBLOCK_RECV_BITMAP_ENDING) {
-        error_report("%s: ramblock '%s' end mark incorrect: 0x%"PRIu64,
+        error_report("%s: ramblock '%s' end mark incorrect: 0x%"PRIx64,
                      __func__, block->idstr, end_mark);
         ret = -EINVAL;
         goto out;
Signature · 1 line
2.26.2
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
#15 lore raw

Re: [PATCH-for-5.2 4/4] migration/ram: Fix hexadecimal format string specifier

Quoted 12 lines · * Dr. David Alan Gilbert ([email protected]) wrote:
Quoted 11 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:

Hi David, Juan.

Quoted 8 lines · Dr. David Alan Gilbert
Quoted 6 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:

The '%u' conversion specifier is for decimal notation. When prefixing a format with '0x', we want the hexadecimal specifier ('%x').

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

As there is no qemu-trivial@ pull request during freeze/rc, can you queue this patch via your migration tree?

Yep, will do.

Queued

Quoted 32 lines

Dave

Quoted 26 lines

Thanks,

Phil.

Quoted 21 lines
Quoted 21 lines
---
 migration/ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/ram.c +1 -1
index 2da2b622ab2..23dcfb3ac38 100644
@@ -3729,7 +3729,7 @@ int ram_dirty_bitmap_reload(MigrationState *s, RAMBlock *block)
     }
 
     if (end_mark != RAMBLOCK_RECV_BITMAP_ENDING) {
-        error_report("%s: ramblock '%s' end mark incorrect: 0x%"PRIu64,
+        error_report("%s: ramblock '%s' end mark incorrect: 0x%"PRIx64,
                      __func__, block->idstr, end_mark);
         ret = -EINVAL;
         goto out;
Signature · 1 line
2.26.2
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
#16 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 20 lines · Philippe Mathieu-Daudé

IIUC qemu-trivial@ doesn't queue patches during freeze,

so it might be easier if patches are queued by respective

subsystem maintainers.

Philippe Mathieu-Daudé (4):

hw/display/cirrus_vga: Remove debugging code commented out

hw/display/cirrus_vga: Fix hexadecimal format string specifier

hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier

migration/ram: Fix hexadecimal format string specifier

Quoted 10 lines
  hw/display/cirrus_vga.c | 20 +-------------------
  migration/ram.c         |  2 +-
  hw/ppc/trace-events     |  2 +-
  3 files changed, 3 insertions(+), 21 deletions(-)

There's at least one more easy fix:

hw/misc/trace-events:106:mos6522_get_next_irq_time(uint16_t latch, int64_t d, int64_t delta) "latch=%d counter=0x%"PRId64 " delta_next=0x%"PRId64

but I have no idea how to test this.

-Dov

#17 lore raw
Quoted 33 lines · Dov Murik
Quoted 20 lines · Philippe Mathieu-Daudé

IIUC qemu-trivial@ doesn't queue patches during freeze,

so it might be easier if patches are queued by respective

subsystem maintainers.

Philippe Mathieu-Daudé (4):

   hw/display/cirrus_vga: Remove debugging code commented out

   hw/display/cirrus_vga: Fix hexadecimal format string specifier

   hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier

   migration/ram: Fix hexadecimal format string specifier

Quoted 10 lines

  hw/display/cirrus_vga.c | 20 +-------------------

  migration/ram.c         |  2 +-

  hw/ppc/trace-events     |  2 +-

  3 files changed, 3 insertions(+), 21 deletions(-)
Quoted 8 lines

There's at least one more easy fix:

hw/misc/trace-events:106:mos6522_get_next_irq_time(uint16_t latch, int64_t d, int64_t delta) "latch=%d counter=0x%"PRId64 " delta_next=0x%"PRId64

but I have no idea how to test this.

-Dov

... and one more in hw/usb/u2f-passthru.c:348 :

        error_report("%s: Bad written size (req 0x%zu, val 0x%zd)",
                     TYPE_U2F_PASSTHRU, sizeof(host_packet), written);

Again, I have no idea how to test/trigger these areas in the code.

-Dov

#18 lore raw
Quoted 35 lines · Dov Murik
Quoted 33 lines · Dov Murik
Quoted 30 lines · Philippe Mathieu-Daudé

IIUC qemu-trivial@ doesn't queue patches during freeze,

so it might be easier if patches are queued by respective

subsystem maintainers.

Philippe Mathieu-Daudé (4):

   hw/display/cirrus_vga: Remove debugging code commented out

   hw/display/cirrus_vga: Fix hexadecimal format string specifier

   hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier

   migration/ram: Fix hexadecimal format string specifier

  hw/display/cirrus_vga.c | 20 +-------------------

  migration/ram.c         |  2 +-

  hw/ppc/trace-events     |  2 +-

  3 files changed, 3 insertions(+), 21 deletions(-)
Quoted 5 lines
Quoted 5 lines

There's at least one more easy fix:

hw/misc/trace-events:106:mos6522_get_next_irq_time(uint16_t latch, int64_t d, int64_t delta) "latch=%d counter=0x%"PRId64 " delta_next=0x%"PRId64

Indeed.

Quoted 10 lines
Quoted 5 lines

but I have no idea how to test this.

-Dov

... and one more in hw/usb/u2f-passthru.c:348 :

        error_report("%s: Bad written size (req 0x%zu, val 0x%zd)", TYPE_U2F_PASSTHRU, sizeof(host_packet), written);

'written' is signed, so this format looks correct...

Quoted 5 lines

Again, I have no idea how to test/trigger these areas in the code.

-Dov

#19 lore raw
Quoted 50 lines · On Tue, 3 Nov 2020 15:28:11 +0100 Philippe Mathieu-Daudé <[email protected]>…
Quoted 35 lines · Dov Murik
Quoted 33 lines · Dov Murik
Quoted 30 lines · Philippe Mathieu-Daudé

IIUC qemu-trivial@ doesn't queue patches during freeze,

so it might be easier if patches are queued by respective

subsystem maintainers.

Philippe Mathieu-Daudé (4):

   hw/display/cirrus_vga: Remove debugging code commented out

   hw/display/cirrus_vga: Fix hexadecimal format string specifier

   hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier

   migration/ram: Fix hexadecimal format string specifier

  hw/display/cirrus_vga.c | 20 +-------------------

  migration/ram.c         |  2 +-

  hw/ppc/trace-events     |  2 +-

  3 files changed, 3 insertions(+), 21 deletions(-)
Quoted 5 lines
Quoted 5 lines

There's at least one more easy fix:

hw/misc/trace-events:106:mos6522_get_next_irq_time(uint16_t latch, int64_t d, int64_t delta) "latch=%d counter=0x%"PRId64 " delta_next=0x%"PRId64

Indeed.

Quoted 6 lines
Quoted 5 lines

but I have no idea how to test this.

-Dov

Quoted 7 lines
Quoted 4 lines

... and one more in hw/usb/u2f-passthru.c:348 :

        error_report("%s: Bad written size (req 0x%zu, val 0x%zd)", TYPE_U2F_PASSTHRU, sizeof(host_packet), written);

'written' is signed, so this format looks correct...

Irrespective of the sign, u and d shouldn't be used behind 0x

Quoted 7 lines
Quoted 5 lines

Again, I have no idea how to test/trigger these areas in the code.

-Dov

#20 lore raw
Quoted 55 lines · Greg Kurz
Quoted 52 lines · On Tue, 3 Nov 2020 15:28:11 +0100 Philippe Mathieu-Daudé <[email protected]>…
Quoted 35 lines · Dov Murik
Quoted 33 lines · Dov Murik
Quoted 30 lines · Philippe Mathieu-Daudé

IIUC qemu-trivial@ doesn't queue patches during freeze,

so it might be easier if patches are queued by respective

subsystem maintainers.

Philippe Mathieu-Daudé (4):

   hw/display/cirrus_vga: Remove debugging code commented out

   hw/display/cirrus_vga: Fix hexadecimal format string specifier

   hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier

   migration/ram: Fix hexadecimal format string specifier

  hw/display/cirrus_vga.c | 20 +-------------------

  migration/ram.c         |  2 +-

  hw/ppc/trace-events     |  2 +-

  3 files changed, 3 insertions(+), 21 deletions(-)
Quoted 5 lines
Quoted 5 lines

There's at least one more easy fix:

hw/misc/trace-events:106:mos6522_get_next_irq_time(uint16_t latch, int64_t d, int64_t delta) "latch=%d counter=0x%"PRId64 " delta_next=0x%"PRId64

Indeed.

Quoted 8 lines
Quoted 5 lines

but I have no idea how to test this.

-Dov

... and one more in hw/usb/u2f-passthru.c:348 :

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

        error_report("%s: Bad written size (req 0x%zu, val 0x%zd)", TYPE_U2F_PASSTHRU, sizeof(host_packet), written);

'written' is signed, so this format looks correct...

Irrespective of the sign, u and d shouldn't be used behind 0x

Ah yes you are right =) Long day... So '0x%zx' in both cases.

Quoted 9 lines
Quoted 8 lines
Quoted 6 lines

Again, I have no idea how to test/trigger these areas in the code.

-Dov

#21 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 50 lines · Philippe Mathieu-Daudé
Quoted 35 lines · Dov Murik
Quoted 33 lines · Dov Murik
Quoted 30 lines · Philippe Mathieu-Daudé

IIUC qemu-trivial@ doesn't queue patches during freeze,

so it might be easier if patches are queued by respective

subsystem maintainers.

Philippe Mathieu-Daudé (4):

   hw/display/cirrus_vga: Remove debugging code commented out

   hw/display/cirrus_vga: Fix hexadecimal format string specifier

   hw/ppc/spapr_tpm_proxy: Fix hexadecimal format string specifier

   migration/ram: Fix hexadecimal format string specifier

   hw/display/cirrus_vga.c | 20 +-------------------
   migration/ram.c         |  2 +-
   hw/ppc/trace-events     |  2 +-
   3 files changed, 3 insertions(+), 21 deletions(-)
Quoted 5 lines
Quoted 5 lines

There's at least one more easy fix:

hw/misc/trace-events:106:mos6522_get_next_irq_time(uint16_t latch, int64_t d, int64_t delta) "latch=%d counter=0x%"PRId64 " delta_next=0x%"PRId64

Indeed.

Quoted 6 lines
Quoted 5 lines

but I have no idea how to test this.

-Dov

Quoted 7 lines
Quoted 4 lines

... and one more in hw/usb/u2f-passthru.c:348 :

        error_report("%s: Bad written size (req 0x%zu, val 0x%zd)", TYPE_U2F_PASSTHRU, sizeof(host_packet), written);

'written' is signed, so this format looks correct...

If we keep the %zu and %zd format specifiers, then I suggest removing the "0x" literal prefixes.

Quoted 7 lines
Quoted 5 lines

Again, I have no idea how to test/trigger these areas in the code.

-Dov