diff mbox series

[PULL,04/18] hw/gpio/omap_gpio: Replace fprintf() by qemu_log_mask(GUEST_ERROR)

Message ID 20200911193330.1148942-5-laurent@vivier.eu
State New
Headers show
Series Trivial branch for 5.2 patches | expand

Commit Message

Laurent Vivier Sept. 11, 2020, 7:33 p.m. UTC
From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Replace fprintf() by qemu_log_mask(LOG_GUEST_ERROR).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200901104234.92159-2-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/gpio/omap_gpio.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c
index f662c4cb9588..e25084b40c95 100644
--- a/hw/gpio/omap_gpio.c
+++ b/hw/gpio/omap_gpio.c
@@ -392,8 +392,10 @@  static void omap2_gpio_module_write(void *opaque, hwaddr addr,
         break;
 
     case 0x10:	/* GPIO_SYSCONFIG */
-        if (((value >> 3) & 3) == 3)
-            fprintf(stderr, "%s: bad IDLEMODE value\n", __func__);
+        if (((value >> 3) & 3) == 3) {
+            qemu_log_mask(LOG_GUEST_ERROR,
+                          "%s: Illegal IDLEMODE value: 3\n", __func__);
+        }
         if (value & 2)
             omap2_gpio_module_reset(s);
         s->config[0] = value & 0x1d;