hw/input/tsc2005: Use qemu_log_mask(GUEST_ERROR) instead of fprintf

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 20180624040609.17572-3-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2018-06-26 17:50:40 +01:00 committed by Peter Maydell
parent c2e846bba5
commit 56112168ab

View file

@ -19,6 +19,7 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qemu/log.h"
#include "hw/hw.h" #include "hw/hw.h"
#include "qemu/timer.h" #include "qemu/timer.h"
#include "ui/console.h" #include "ui/console.h"
@ -208,9 +209,10 @@ static void tsc2005_write(TSC2005State *s, int reg, uint16_t data)
} }
s->nextprecision = (data >> 13) & 1; s->nextprecision = (data >> 13) & 1;
s->timing[0] = data & 0x1fff; s->timing[0] = data & 0x1fff;
if ((s->timing[0] >> 11) == 3) if ((s->timing[0] >> 11) == 3) {
fprintf(stderr, "%s: illegal conversion clock setting\n", qemu_log_mask(LOG_GUEST_ERROR,
__func__); "tsc2005_write: illegal conversion clock setting\n");
}
break; break;
case 0xd: /* CFR1 */ case 0xd: /* CFR1 */
s->timing[1] = data & 0xf07; s->timing[1] = data & 0xf07;
@ -221,8 +223,9 @@ static void tsc2005_write(TSC2005State *s, int reg, uint16_t data)
break; break;
default: default:
fprintf(stderr, "%s: write into read-only register %x\n", qemu_log_mask(LOG_GUEST_ERROR,
__func__, reg); "%s: write into read-only register 0x%x\n",
__func__, reg);
} }
} }