qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 02/24] hw/arm: Fix bad print format specifiers
Date: Mon, 23 Nov 2020 11:42:53 +0000	[thread overview]
Message-ID: <20201123114315.13372-3-peter.maydell@linaro.org> (raw)
In-Reply-To: <20201123114315.13372-1-peter.maydell@linaro.org>

From: AlexChen <alex.chen@huawei.com>

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 | 2 +-
 hw/arm/spitz.c  | 2 +-
 hw/arm/tosa.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c
index 591776ba887..1a98f3bd5cd 100644
--- a/hw/arm/pxa2xx.c
+++ b/hw/arm/pxa2xx.c
@@ -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;
diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c
index 32bdeacfd36..772662f1494 100644
--- a/hw/arm/spitz.c
+++ b/hw/arm/spitz.c
@@ -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");
 }
diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c
index fe88ed89fee..66b244aeffd 100644
--- a/hw/arm/tosa.c
+++ b/hw/arm/tosa.c
@@ -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;
 }
 
-- 
2.20.1



  parent reply	other threads:[~2020-11-23 11:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 11:42 [PULL 00/24] target-arm queue Peter Maydell
2020-11-23 11:42 ` [PULL 01/24] target/arm: fix stage 2 page-walks in 32-bit emulation Peter Maydell
2020-11-23 11:42 ` Peter Maydell [this message]
2020-11-23 11:42 ` [PULL 03/24] hw/intc: fix heap-buffer-overflow in rxicu_realize() Peter Maydell
2020-11-23 11:42 ` [PULL 04/24] MAINTAINERS: Cover system/arm/cpu-features.rst with ARM TCG CPUs Peter Maydell
2020-11-23 11:42 ` [PULL 05/24] MAINTAINERS: Cover system/arm/aspeed.rst with ASPEED BMC machines Peter Maydell
2020-11-23 11:42 ` [PULL 06/24] MAINTAINERS: Cover system/arm/nuvoton.rst with Nuvoton NPCM7xx Peter Maydell
2020-11-23 11:42 ` [PULL 07/24] MAINTAINERS: Fix system/arm/orangepi.rst path Peter Maydell
2020-11-23 11:42 ` [PULL 08/24] MAINTAINERS: Cover system/arm/sbsa.rst with SBSA-REF machine Peter Maydell
2020-11-23 11:43 ` [PULL 09/24] MAINTAINERS: Cover system/arm/sx1.rst with OMAP machines Peter Maydell
2020-11-23 11:43 ` [PULL 10/24] docs/system: Deprecate raspi2/raspi3 machine aliases Peter Maydell
2020-11-23 11:43 ` [PULL 11/24] docs/system/arm: Document the various raspi boards Peter Maydell
2020-11-23 11:43 ` [PULL 12/24] docs/system/arm: Document OpenPOWER Witherspoon BMC model Front LEDs Peter Maydell
2020-11-23 11:43 ` [PULL 13/24] docs/system/arm: Document the Sharp Zaurus SL-6000 Peter Maydell
2020-11-23 11:43 ` [PULL 14/24] target/arm: Make SYS_HEAPINFO work with RAM that doesn't start at 0 Peter Maydell
2020-11-23 11:43 ` [PULL 15/24] linux-user/arm: Deliver SIGTRAP for UDF patterns used as breakpoints Peter Maydell
2020-11-23 11:43 ` [PULL 16/24] docs: Move virtio-net-failover.rst into the system manual Peter Maydell
2020-11-23 11:43 ` [PULL 17/24] docs: Move cpu-hotplug.rst " Peter Maydell
2020-11-23 11:43 ` [PULL 18/24] docs: Move virtio-pmem.rst " Peter Maydell
2020-11-23 11:43 ` [PULL 19/24] docs/system/virtio-pmem.rst: Fix minor style issues Peter Maydell
2020-11-23 11:43 ` [PULL 20/24] docs: Split out 'pc' machine model docs into their own file Peter Maydell
2020-11-23 11:43 ` [PULL 21/24] docs: Move microvm.rst into the system manual Peter Maydell
2020-11-23 11:43 ` [PULL 22/24] docs: Move pr-manager.rst " Peter Maydell
2020-11-23 11:43 ` [PULL 23/24] docs: Split qemu-pr-helper documentation into tools manual Peter Maydell
2020-11-23 11:43 ` [PULL 24/24] docs/system/pr-manager.rst: Fix minor docs nits Peter Maydell
2020-11-23 17:03 ` [PULL 00/24] target-arm queue Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201123114315.13372-3-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).