hw/arm: Fix bad print format specifiers
PATCH 1/1 hw/arm: Fix bad print format specifiers
We should use printf format specifier "%u" instead of "%i" for argument of type "unsigned int".
Reported-by Euler Robot <[email protected]>
Signed-off-by Alex Chen <[email protected]>
--- hw/arm/pxa2xx.c | 2 +- hw/arm/spitz.c | 2 +- hw/arm/tosa.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
hw/arm/pxa2xx.c +1 -1
@@ -675,7 +675,7 @@ static void pxa2xx_ssp_write(void *opaque, hwaddr addr,if (value &SSCR0_MOD )printf ("%s: Attempt to use network mode\n" , __func__);if (s->enable &&SSCR0_DSS (value) <4 ) -printf ("%s: Wrong data size: %i bits\n" , __func__, +printf ("%s: Wrong data size: %u bits\n" , __func__,SSCR0_DSS (value));if (!(value &SSCR0_SSE )) { s->sssr =0 ;
hw/arm/spitz.c +1 -1
@@ -586,7 +586,7 @@ struct SpitzLCDTG {static void spitz_bl_update (SpitzLCDTG *s) {if (s->bl_power && s->bl_intensity) -zaurus_printf ("LCD Backlight now at %i/63\n" , s->bl_intensity); +zaurus_printf ("LCD Backlight now at %u/63\n" , s->bl_intensity);else zaurus_printf ("LCD Backlight now off\n" ); }
hw/arm/tosa.c +1 -1
@@ -150,7 +150,7 @@ static void tosa_gpio_setup(PXA2xxState *cpu,static uint32_t tosa_ssp_tansfer (SSISlave *dev,uint32_t value) { -fprintf (stderr,"TG: %d %02x\n" , value >>5 , value &0x1f ); +fprintf (stderr,"TG: %u %02x\n" , value >>5 , value &0x1f );return 0 ; }
Signature · 1 line
2.19.1
Kindly ping.
Quoted 50 lines · AlexChen
We should use printf format specifier "%u" instead of "%i" for argument of type "unsigned int".
Reported-by Euler Robot <[email protected]>Signed-off-by Alex Chen <[email protected]>--- hw/arm/pxa2xx.c | 2 +- hw/arm/spitz.c | 2 +- hw/arm/tosa.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)hw/arm/pxa2xx.c +1
-1@@ -675,7 +675,7 @@ static void pxa2xx_ssp_write(void *opaque, hwaddr addr,if (value &SSCR0_MOD )printf ("%s: Attempt to use network mode\n" , __func__);if (s->enable &&SSCR0_DSS (value) <4 ) -printf ("%s: Wrong data size: %i bits\n" , __func__, +printf ("%s: Wrong data size: %u bits\n" , __func__,SSCR0_DSS (value));if (!(value &SSCR0_SSE )) { s->sssr =0 ;hw/arm/spitz.c +1
-1@@ -586,7 +586,7 @@ struct SpitzLCDTG {static void spitz_bl_update (SpitzLCDTG *s) {if (s->bl_power && s->bl_intensity) -zaurus_printf ("LCD Backlight now at %i/63\n" , s->bl_intensity); +zaurus_printf ("LCD Backlight now at %u/63\n" , s->bl_intensity);else zaurus_printf ("LCD Backlight now off\n" ); }hw/arm/tosa.c +1
-1@@ -150,7 +150,7 @@ static void tosa_gpio_setup(PXA2xxState *cpu,static uint32_t tosa_ssp_tansfer (SSISlave *dev,uint32_t value) { -fprintf (stderr,"TG: %d %02x\n" , value >>5 , value &0x1f ); +fprintf (stderr,"TG: %u %02x\n" , value >>5 , value &0x1f );return 0 ; }
Peter Maydell
AppliedQuoted 11 lines · AlexChen
We should use printf format specifier "%u" instead of "%i" for argument of type "unsigned int".
Reported-by Euler Robot <[email protected]>Signed-off-by Alex Chen <[email protected]>--- hw/arm/pxa2xx.c | 2 +- hw/arm/spitz.c | 2 +- hw/arm/tosa.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Applied to target-arm.next for 5.2, thanks.
-- PMM