hw/arm/exynos: Convert fprintf to qemu_log_mask/error_report

qemu_log_mask() and error_report() are preferred over fprintf() for
logging errors.  Also remove square brackets [] and additional new line
characters in printed messages.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20170313184750.429-2-krzk@kernel.org
[PMM: wrapped long line]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Krzysztof Kozlowski 2017-04-20 17:32:28 +01:00 committed by Peter Maydell
parent 68115ed5fc
commit f2ad5140fa
4 changed files with 25 additions and 20 deletions

View file

@ -21,6 +21,7 @@
*/
#include "qemu/osdep.h"
#include "qemu/log.h"
#include "hw/sysbus.h"
#include "qemu/timer.h"
#include "qemu-common.h"
@ -252,9 +253,9 @@ static uint64_t exynos4210_pwm_read(void *opaque, hwaddr offset,
break;
default:
fprintf(stderr,
"[exynos4210.pwm: bad read offset " TARGET_FMT_plx "]\n",
offset);
qemu_log_mask(LOG_GUEST_ERROR,
"exynos4210.pwm: bad read offset " TARGET_FMT_plx,
offset);
break;
}
return value;
@ -343,9 +344,9 @@ static void exynos4210_pwm_write(void *opaque, hwaddr offset,
break;
default:
fprintf(stderr,
"[exynos4210.pwm: bad write offset " TARGET_FMT_plx "]\n",
offset);
qemu_log_mask(LOG_GUEST_ERROR,
"exynos4210.pwm: bad write offset " TARGET_FMT_plx,
offset);
break;
}