qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org,
	"Peter Maydell" <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH 2/2] hw/gpio/max7310: Replace disabled printf() by qemu_log_mask(UNIMP)
Date: Tue,  1 Sep 2020 12:42:34 +0200	[thread overview]
Message-ID: <20200901104234.92159-3-f4bug@amsat.org> (raw)
In-Reply-To: <20200901104234.92159-1-f4bug@amsat.org>

Replace disabled printf() by qemu_log_mask(UNIMP).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/gpio/max7310.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/hw/gpio/max7310.c b/hw/gpio/max7310.c
index 7f5de189acf..c58a1996418 100644
--- a/hw/gpio/max7310.c
+++ b/hw/gpio/max7310.c
@@ -11,6 +11,7 @@
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
 #include "migration/vmstate.h"
+#include "qemu/log.h"
 #include "qemu/module.h"
 
 #define TYPE_MAX7310 "max7310"
@@ -69,9 +70,8 @@ static uint8_t max7310_rx(I2CSlave *i2c)
         return 0xff;
 
     default:
-#ifdef VERBOSE
-        printf("%s: unknown register %02x\n", __func__, s->command);
-#endif
+        qemu_log_mask(LOG_UNIMP, "%s: Unsupported register 0x02%" PRIx8 "\n",
+                      __func__, s->command);
         break;
     }
     return 0xff;
@@ -123,9 +123,8 @@ static int max7310_tx(I2CSlave *i2c, uint8_t data)
     case 0x00:	/* Input port - ignore writes */
         break;
     default:
-#ifdef VERBOSE
-        printf("%s: unknown register %02x\n", __func__, s->command);
-#endif
+        qemu_log_mask(LOG_UNIMP, "%s: Unsupported register 0x02%" PRIx8 "\n",
+                      __func__, s->command);
         return 1;
     }
 
-- 
2.26.2



  parent reply	other threads:[~2020-09-01 10:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01 10:42 [PATCH 0/2] hw/gpio: Replace printf() calls by qemu_log_mask() Philippe Mathieu-Daudé
2020-09-01 10:42 ` [PATCH 1/2] hw/gpio/omap_gpio: Replace fprintf() by qemu_log_mask(GUEST_ERROR) Philippe Mathieu-Daudé
2020-09-02  9:15   ` Laurent Vivier
2020-09-09 13:27   ` Laurent Vivier
2020-09-01 10:42 ` Philippe Mathieu-Daudé [this message]
2020-09-02  9:17   ` [PATCH 2/2] hw/gpio/max7310: Replace disabled printf() by qemu_log_mask(UNIMP) Laurent Vivier
2020-09-09 13:30   ` Laurent Vivier

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=20200901104234.92159-3-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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).