summary refs log tree commit diff stats
path: root/hw/xen/xen-mapcache.c
diff options
context:
space:
mode:
authorManos Pitsidianakis <manos.pitsidianakis@linaro.org>2024-01-29 18:09:42 +0200
committerPeter Maydell <peter.maydell@linaro.org>2024-02-02 13:51:59 +0000
commitd0e16850eed350b1eac562f52bf81f2341923b4c (patch)
tree540306737599d4722db7aaabeed8d6cf6981e50d /hw/xen/xen-mapcache.c
parent9a1f02a3549b1e4d97233a99c9c96ca0a061d047 (diff)
downloadfocaccia-qemu-d0e16850eed350b1eac562f52bf81f2341923b4c.tar.gz
focaccia-qemu-d0e16850eed350b1eac562f52bf81f2341923b4c.zip
hw/xen: convert stderr prints to error/warn reports
According to the QEMU Coding Style document:

> Do not use printf(), fprintf() or monitor_printf(). Instead, use
> error_report() or error_vreport() from error-report.h. This ensures the
> error is reported in the right place (current monitor or stderr), and in
> a uniform format.
> Use error_printf() & friends to print additional information.

This commit changes fprintfs that report warnings and errors to the
appropriate report functions.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 42a8953553cf68e8bacada966f93af4fbce45919.1706544115.git.manos.pitsidianakis@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/xen/xen-mapcache.c')
-rw-r--r--hw/xen/xen-mapcache.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c
index 336c212376..4f956d048e 100644
--- a/hw/xen/xen-mapcache.c
+++ b/hw/xen/xen-mapcache.c
@@ -347,9 +347,8 @@ tryagain:
         MapCacheRev *reventry = g_new0(MapCacheRev, 1);
         entry->lock++;
         if (entry->lock == 0) {
-            fprintf(stderr,
-                    "mapcache entry lock overflow: "HWADDR_FMT_plx" -> %p\n",
-                    entry->paddr_index, entry->vaddr_base);
+            error_report("mapcache entry lock overflow: "HWADDR_FMT_plx" -> %p",
+                         entry->paddr_index, entry->vaddr_base);
             abort();
         }
         reventry->dma = dma;