diff mbox series

[v2,13/14] hw/net/smc91c111: Use qemu_log_mask(UNIMP) instead of fprintf

Message ID 20180622134036.23182-14-f4bug@amsat.org
State New
Headers show
Series hw/arm: use qemu_log_mask instead of fprintf | expand

Commit Message

Philippe Mathieu-Daudé June 22, 2018, 1:40 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/net/smc91c111.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Comments

Thomas Huth June 22, 2018, 7:53 p.m. UTC | #1
On 22.06.2018 15:40, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/net/smc91c111.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
> index 9094c0b47c..d2fd2040e8 100644
> --- a/hw/net/smc91c111.c
> +++ b/hw/net/smc91c111.c
> @@ -362,10 +362,14 @@ static void smc91c111_writeb(void *opaque, hwaddr offset,
>              SET_HIGH(gpr, value);
>              return;
>          case 12: /* Control */
> -            if (value & 1)
> -                fprintf(stderr, "smc91c111:EEPROM store not implemented\n");
> -            if (value & 2)
> -                fprintf(stderr, "smc91c111:EEPROM reload not implemented\n");
> +            if (value & 1) {
> +                qemu_log_mask(LOG_UNIMP,
> +                              "smc91c111: EEPROM store not implemented\n");
> +            }
> +            if (value & 2) {
> +                qemu_log_mask(LOG_UNIMP,
> +                              "smc91c111: EEPROM reload not implemented\n");
> +            }
>              value &= ~3;
>              SET_LOW(ctr, value);
>              return;

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
index 9094c0b47c..d2fd2040e8 100644
--- a/hw/net/smc91c111.c
+++ b/hw/net/smc91c111.c
@@ -362,10 +362,14 @@  static void smc91c111_writeb(void *opaque, hwaddr offset,
             SET_HIGH(gpr, value);
             return;
         case 12: /* Control */
-            if (value & 1)
-                fprintf(stderr, "smc91c111:EEPROM store not implemented\n");
-            if (value & 2)
-                fprintf(stderr, "smc91c111:EEPROM reload not implemented\n");
+            if (value & 1) {
+                qemu_log_mask(LOG_UNIMP,
+                              "smc91c111: EEPROM store not implemented\n");
+            }
+            if (value & 2) {
+                qemu_log_mask(LOG_UNIMP,
+                              "smc91c111: EEPROM reload not implemented\n");
+            }
             value &= ~3;
             SET_LOW(ctr, value);
             return;