Skip to contentSkip to conversation

ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...)

PATCH Superseded BALATON Zoltan 5 participants 8 messages Mar 8, 2018 – Mar 9, 2018

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...)

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.

---
 hw/ppc/ppc440_pcix.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
hw/ppc/ppc440_pcix.c +6 -4
index ab2626a..fbffe82 100644
@@ -286,8 +286,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%lx\n", __func__,
+                      (unsigned long)addr);
         break;
     }
 }
@@ -377,8 +378,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%lx\n", __func__,
+                      (unsigned long)addr);
         val = 0;
     }
 
Signature · 1 line
2.7.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 26 lines · BALATON Zoltan

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.

---
 hw/ppc/ppc440_pcix.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
hw/ppc/ppc440_pcix.c +3 -2
index ab2626a..fbffe82 100644
@@ -286,8 +286,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%lx\n", __func__,
+                      (unsigned long)addr);
         break;
     }
 }

hw/ppc/ppc440_pcix.c static uint64_t ppc440_pcix_reg_read4(void *opaque, hwaddr addr, · line 385

Quoted 10 lines
hw/ppc/ppc440_pcix.c +3 -2
@@ -377,8 +378,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%lx\n", __func__,
+                      (unsigned long)addr);
         val = 0;
     }
#2 lore raw

PATCH v2 1/1 ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...)

In reply to BALATON Zoltan

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.

---
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 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
hw/ppc/ppc440_pcix.c +6 -4
index ab2626a..1dc5d7f 100644
@@ -286,8 +286,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 +378,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;
     }
 
Signature · 1 line
2.7.6
Reviewed-by on v2 1/1
#3 lore raw
Quoted 8 lines · BALATON Zoltan

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.

---
v2: Use defined format string for printing hwaddr instead of casting.

Thanks.

Quoted 34 lines

I guess this does not invalidate the R-b tag of v1 so I've added that too.

 hw/ppc/ppc440_pcix.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
hw/ppc/ppc440_pcix.c +6 -4
index ab2626a..1dc5d7f 100644
@@ -286,8 +286,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 +378,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;
     }
 
Applied
#4 lore raw
In reply to BALATON Zoltan
Quoted 6 lines · BALATON Zoltan

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.

Applied, thanks.

Quoted 35 lines

---
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 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
hw/ppc/ppc440_pcix.c +6 -4
index ab2626a..1dc5d7f 100644
@@ -286,8 +286,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 +378,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;
     }
 
Signature · 4 lines
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
#5 lore raw
Quoted 9 lines · David Gibson
Quoted 6 lines · BALATON Zoltan

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.

Applied, thanks.

Wait.. I've taken it out again. Under some configurations (exercised by Travis) qemu_log_mask() is undeclared here you're using it. See
https://travis-ci.org/dgibson/qemu/jobs/351093986 for some more information.

Quoted 37 lines
Quoted 36 lines

---
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 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
hw/ppc/ppc440_pcix.c +6 -4
index ab2626a..1dc5d7f 100644
@@ -286,8 +286,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 +378,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;
     }
 
Signature · 4 lines
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
#6 lore raw
Quoted 9 lines · David Gibson
Quoted 8 lines · David Gibson
Quoted 6 lines · BALATON Zoltan

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.

Quoted 6 lines
Quoted 1 line

Applied, thanks.

Wait.. I've taken it out again. Under some configurations (exercised by Travis) qemu_log_mask() is undeclared here you're using it. See
https://travis-ci.org/dgibson/qemu/jobs/351093986 for some more information.

Ah, that one again. There's a patch in Stefan's tracing tree that makes that a fails-everywhere rather than only-some-configs, but he hasn't done the pullreq for 2.12 yet I think.

You need a #include "qemu/log.h".

thanks
-- PMM

#7 lore raw
Quoted 17 lines · Peter Maydell
Quoted 9 lines · David Gibson
Quoted 8 lines · David Gibson
Quoted 6 lines · BALATON Zoltan

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.

Quoted 6 lines
Quoted 1 line

Applied, thanks.

Wait.. I've taken it out again. Under some configurations (exercised by Travis) qemu_log_mask() is undeclared here you're using it. See
https://travis-ci.org/dgibson/qemu/jobs/351093986 for some more information.

Quoted 5 lines

Ah, that one again. There's a patch in Stefan's tracing tree that makes that a fails-everywhere rather than only-some-configs, but he hasn't done the pullreq for 2.12 yet I think.

You need a #include "qemu/log.h".

OK, thanks. Should I send a v3 with this or can you patch up when applying v2?

Regards,
BALATON Zoltan