]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
hw/arm: Fix bad print format specifiers
authorAlexChen <alex.chen@huawei.com>
Mon, 2 Nov 2020 09:55:23 +0000 (17:55 +0800)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 23 Nov 2020 10:41:58 +0000 (10:41 +0000)
We should use printf format specifier "%u" instead of "%i" for
argument of type "unsigned int".

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Alex Chen <alex.chen@huawei.com>
Message-id: 5F9FD78B.8000300@huawei.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/pxa2xx.c
hw/arm/spitz.c
hw/arm/tosa.c

index 591776ba887c588b3f59fd370ae61655f25542ea..1a98f3bd5cdc589537d0c48ee1eadaca13cb9a24 100644 (file)
@@ -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;
index 32bdeacfd36d98ed58a31288cef5f9880cbc8fd7..772662f149401a1db31dec540f8362b8f8889b8e 100644 (file)
@@ -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");
 }
index fe88ed89feef6f5da5fa8a5caf1a9b467d380338..66b244aeffd30755fb9a1e5ea867207a2d90492f 100644 (file)
@@ -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;
 }