All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...)
@ 2018-03-13 11:26 BALATON Zoltan
  2018-03-14  1:11 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: BALATON Zoltan @ 2018-03-13 11:26 UTC (permalink / raw)
  To: qemu-devel, qemu-ppc; +Cc: David Gibson, Thomas Huth

Using log unimp is more appropriate for these messages and this also
silences them by default so they won't clobber make check output when
tests are added for this board.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
v3: Include qemu/log.h to avoid undeclared function warning
v2: Use defined format string for printing hwaddr instead of casting.
I guess this does not invalidate the R-b tag of v1 so I've added that too.

 hw/ppc/ppc440_pcix.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c
index ab2626a..b1307e6 100644
--- a/hw/ppc/ppc440_pcix.c
+++ b/hw/ppc/ppc440_pcix.c
@@ -21,6 +21,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
+#include "qemu/log.h"
 #include "hw/hw.h"
 #include "hw/ppc/ppc.h"
 #include "hw/ppc/ppc4xx.h"
@@ -286,8 +287,9 @@ static void ppc440_pcix_reg_write4(void *opaque, hwaddr addr,
         break;
 
     default:
-        error_report("%s: unhandled PCI internal register 0x%lx", __func__,
-                     (unsigned long)addr);
+        qemu_log_mask(LOG_UNIMP,
+                      "%s: unhandled PCI internal register 0x%"HWADDR_PRIx"\n",
+                      __func__, addr);
         break;
     }
 }
@@ -377,8 +379,9 @@ static uint64_t ppc440_pcix_reg_read4(void *opaque, hwaddr addr,
         break;
 
     default:
-        error_report("%s: invalid PCI internal register 0x%lx", __func__,
-                     (unsigned long)addr);
+        qemu_log_mask(LOG_UNIMP,
+                      "%s: invalid PCI internal register 0x%" HWADDR_PRIx "\n",
+                      __func__, addr);
         val = 0;
     }
 
-- 
2.7.6

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH v3] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...)
  2018-03-13 11:26 [Qemu-devel] [PATCH v3] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...) BALATON Zoltan
@ 2018-03-14  1:11 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2018-03-14  1:11 UTC (permalink / raw)
  To: BALATON Zoltan; +Cc: qemu-devel, qemu-ppc, Thomas Huth

[-- Attachment #1: Type: text/plain, Size: 2156 bytes --]

On Tue, Mar 13, 2018 at 12:26:56PM +0100, BALATON Zoltan wrote:
1;5002;0c> Using log unimp is more appropriate for these messages and this also
> silences them by default so they won't clobber make check output when
> tests are added for this board.
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> Reviewed-by: Thomas Huth <thuth@redhat.com>

Applied, thanks.

> ---
> v3: Include qemu/log.h to avoid undeclared function warning
> v2: Use defined format string for printing hwaddr instead of casting.
> I guess this does not invalidate the R-b tag of v1 so I've added that too.
> 
>  hw/ppc/ppc440_pcix.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c
> index ab2626a..b1307e6 100644
> --- a/hw/ppc/ppc440_pcix.c
> +++ b/hw/ppc/ppc440_pcix.c
> @@ -21,6 +21,7 @@
>  
>  #include "qemu/osdep.h"
>  #include "qemu/error-report.h"
> +#include "qemu/log.h"
>  #include "hw/hw.h"
>  #include "hw/ppc/ppc.h"
>  #include "hw/ppc/ppc4xx.h"
> @@ -286,8 +287,9 @@ static void ppc440_pcix_reg_write4(void *opaque, hwaddr addr,
>          break;
>  
>      default:
> -        error_report("%s: unhandled PCI internal register 0x%lx", __func__,
> -                     (unsigned long)addr);
> +        qemu_log_mask(LOG_UNIMP,
> +                      "%s: unhandled PCI internal register 0x%"HWADDR_PRIx"\n",
> +                      __func__, addr);
>          break;
>      }
>  }
> @@ -377,8 +379,9 @@ static uint64_t ppc440_pcix_reg_read4(void *opaque, hwaddr addr,
>          break;
>  
>      default:
> -        error_report("%s: invalid PCI internal register 0x%lx", __func__,
> -                     (unsigned long)addr);
> +        qemu_log_mask(LOG_UNIMP,
> +                      "%s: invalid PCI internal register 0x%" HWADDR_PRIx "\n",
> +                      __func__, addr);
>          val = 0;
>      }
>  

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-14  1:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13 11:26 [Qemu-devel] [PATCH v3] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...) BALATON Zoltan
2018-03-14  1:11 ` David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.