qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Peter Maydell <peter.maydell@linaro.org>, Thomas Huth <thuth@redhat.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	qemu-arm@nongnu.org, "Jason Wang" <jasowang@redhat.com>
Subject: [Qemu-devel] [PATCH v2 11/14] hw/net/stellaris_enet: Use qemu_log_mask(GUEST_ERROR) instead of hw_error
Date: Fri, 22 Jun 2018 10:40:33 -0300	[thread overview]
Message-ID: <20180622134036.23182-12-f4bug@amsat.org> (raw)
In-Reply-To: <20180622134036.23182-1-f4bug@amsat.org>

hw_error() finally calls abort(), but there is no need to abort here.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/net/stellaris_enet.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c
index 04bd10ada3..f8edebdecd 100644
--- a/hw/net/stellaris_enet.c
+++ b/hw/net/stellaris_enet.c
@@ -9,6 +9,7 @@
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
 #include "net/net.h"
+#include "qemu/log.h"
 #include <zlib.h>
 
 //#define DEBUG_STELLARIS_ENET 1
@@ -343,7 +344,9 @@ static uint64_t stellaris_enet_read(void *opaque, hwaddr offset,
     case 0x3c: /* Undocuented: Timestamp? */
         return 0;
     default:
-        hw_error("stellaris_enet_read: Bad offset %x\n", (int)offset);
+        qemu_log_mask(LOG_GUEST_ERROR, "stellaris_enet_rd%d: Illegal register"
+                                       " 0x02%" HWADDR_PRIx "\n",
+                      size << 2, offset);
         return 0;
     }
 }
@@ -442,7 +445,9 @@ static void stellaris_enet_write(void *opaque, hwaddr offset,
         /* Ignored.  */
         break;
     default:
-        hw_error("stellaris_enet_write: Bad offset %x\n", (int)offset);
+        qemu_log_mask(LOG_GUEST_ERROR, "stellaris_enet_wr%d: Illegal register"
+                                       " 0x02%" HWADDR_PRIx " = 0x%lx\n",
+                      size << 2, offset, value);
     }
 }
 
-- 
2.18.0.rc2

  parent reply	other threads:[~2018-06-22 13:41 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-22 13:40 [Qemu-devel] [PATCH v2 00/14] hw/arm: use qemu_log_mask instead of fprintf Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 01/14] hw/input/pckbd: Use qemu_log_mask(GUEST_ERROR) " Philippe Mathieu-Daudé
2018-06-22 19:24   ` Thomas Huth
2018-06-24  3:48     ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 03/14] hw/dma/omap_dma: Use qemu_log_mask(UNIMP) instead of printf Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 04/14] hw/dma/omap_dma: Use qemu_log_mask(GUEST_ERROR) instead of fprintf Philippe Mathieu-Daudé
2018-06-22 19:34   ` Thomas Huth
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 05/14] hw/ssi/omap_spi: " Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 06/14] hw/sd/omap_mmc: Use qemu_log_mask(UNIMP) instead of printf Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 07/14] hw/i2c/omap_i2c: Use qemu_log_mask(UNIMP) instead of fprintf Philippe Mathieu-Daudé
2018-06-22 19:38   ` Thomas Huth
2018-06-22 20:10     ` Philippe Mathieu-Daudé
2018-06-25  6:08       ` Thomas Huth
2018-06-25 12:52         ` Philippe Mathieu-Daudé
2018-06-25 14:30           ` Thomas Huth
2018-06-25 15:07             ` Philippe Mathieu-Daudé
2018-06-25 15:32               ` Thomas Huth
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 08/14] hw/arm/omap1: Use qemu_log_mask(GUEST_ERROR) " Philippe Mathieu-Daudé
2018-06-22 13:48   ` Philippe Mathieu-Daudé
2018-06-22 19:41   ` Thomas Huth
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 09/14] hw/arm/omap: " Philippe Mathieu-Daudé
2018-06-22 19:44   ` Thomas Huth
2018-06-22 20:13     ` Philippe Mathieu-Daudé
2018-06-25  6:10       ` Thomas Huth
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 10/14] hw/arm/stellaris: Use qemu_log_mask(UNIMP) " Philippe Mathieu-Daudé
2018-06-22 13:40 ` Philippe Mathieu-Daudé [this message]
2018-06-22 19:50   ` [Qemu-devel] [PATCH v2 11/14] hw/net/stellaris_enet: Use qemu_log_mask(GUEST_ERROR) instead of hw_error Thomas Huth
2018-06-22 20:15     ` Philippe Mathieu-Daudé
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 12/14] hw/net/smc91c111: " Philippe Mathieu-Daudé
2018-06-22 19:52   ` Thomas Huth
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 13/14] hw/net/smc91c111: Use qemu_log_mask(UNIMP) instead of fprintf Philippe Mathieu-Daudé
2018-06-22 19:53   ` Thomas Huth
2018-06-22 13:40 ` [Qemu-devel] [PATCH v2 14/14] hw/arm/stellaris: Fix gptm_write() error message Philippe Mathieu-Daudé
2018-06-22 19:55   ` Thomas Huth
2018-06-22 20:16     ` Philippe Mathieu-Daudé
     [not found] ` <20180622134036.23182-3-f4bug@amsat.org>
2018-06-22 19:30   ` [Qemu-devel] [PATCH v2 02/14] hw/input/tsc2005: Use qemu_log_mask(GUEST_ERROR) instead of fprintf Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180622134036.23182-12-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=jasowang@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).