[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH 02/11] hw/input/tsc2005: Use qemu_log_mask(GUEST_E
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-trivial] [PATCH 02/11] hw/input/tsc2005: Use qemu_log_mask(GUEST_ERROR) instead of fprintf |
Date: |
Thu, 21 Jun 2018 15:02:15 -0300 |
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/input/tsc2005.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/hw/input/tsc2005.c b/hw/input/tsc2005.c
index 7990954b6c..8e1d6b6f21 100644
--- a/hw/input/tsc2005.c
+++ b/hw/input/tsc2005.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/log.h"
#include "hw/hw.h"
#include "qemu/timer.h"
#include "ui/console.h"
@@ -208,9 +209,11 @@ static void tsc2005_write(TSC2005State *s, int reg,
uint16_t data)
}
s->nextprecision = (data >> 13) & 1;
s->timing[0] = data & 0x1fff;
- if ((s->timing[0] >> 11) == 3)
- fprintf(stderr, "%s: illegal conversion clock setting\n",
- __func__);
+ if ((s->timing[0] >> 11) == 3) {
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: illegal conversion clock setting\n",
+ __func__);
+ }
break;
case 0xd: /* CFR1 */
s->timing[1] = data & 0xf07;
@@ -221,8 +224,9 @@ static void tsc2005_write(TSC2005State *s, int reg,
uint16_t data)
break;
default:
- fprintf(stderr, "%s: write into read-only register %x\n",
- __func__, reg);
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: write into read-only register 0x%x\n",
+ __func__, reg);
}
}
--
2.18.0.rc2
- [Qemu-trivial] [PATCH 00/11] hw/arm: use qemu_log_mask instead of fprintf, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 01/11] hw/input/pckbd: Use qemu_log_mask(GUEST_ERROR) instead of fprintf, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 02/11] hw/input/tsc2005: Use qemu_log_mask(GUEST_ERROR) instead of fprintf,
Philippe Mathieu-Daudé <=
- [Qemu-trivial] [PATCH 03/11] hw/dma/omap_dma: Use qemu_log_mask(UNIMP) instead of printf, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 04/11] hw/dma/omap_dma: Use qemu_log_mask(GUEST_ERROR) instead of fprintf, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 05/11] hw/ssi/omap_spi: Use qemu_log_mask(GUEST_ERROR) instead of fprintf, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 07/11] hw/i2c/omap_i2c: Use qemu_log_mask(UNIMP) instead of fprintf, Philippe Mathieu-Daudé, 2018/06/21
- [Qemu-trivial] [PATCH 06/11] hw/sd/omap_mmc: Use qemu_log_mask(UNIMP) instead of printf, Philippe Mathieu-Daudé, 2018/06/21