Skip to contentSkip to conversation

RISC-V: Add a missing "," in riscv_excp_names

PATCH In review Palmer Dabbelt 2 participants 4 messages Mar 5, 2020 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RISC-V: Add a missing "," in riscv_excp_names

THis would almost certainly cause the exception names to be reported incorrectly. Covarity found the issue (CID 1420223). As per Peter's suggestion, I've also added a comma at the end of the list to avoid the issue reappearing in the future.

---
 target/riscv/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/riscv/cpu.c +2 -2
index c47d10b739..c0b7023100 100644
@@ -66,7 +66,7 @@ const char * const riscv_excp_names[] = {
     "exec_page_fault",
     "load_page_fault",
     "reserved",
-    "store_page_fault"
+    "store_page_fault",
     "reserved",
     "reserved",
     "reserved",
@@ -74,7 +74,7 @@ const char * const riscv_excp_names[] = {
     "guest_exec_page_fault",
     "guest_load_page_fault",
     "reserved",
-    "guest_store_page_fault"
+    "guest_store_page_fault",
 };
 
 const char * const riscv_intr_names[] = {
Signature · 1 line
2.25.0.265.gbab2e86ba0-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Palmer Dabbelt

THis would almost certainly cause the exception names to be reported incorrectly. Covarity found the issue (CID 1420223). As per Peter's

"This", "Coverity" typos.

Quoted 31 lines

suggestion, I've also added a comma at the end of the list to avoid the issue reappearing in the future.

---
  target/riscv/cpu.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
target/riscv/cpu.c +2 -2
index c47d10b739..c0b7023100 100644
@@ -66,7 +66,7 @@ const char * const riscv_excp_names[] = {
      "exec_page_fault",
      "load_page_fault",
      "reserved",
-    "store_page_fault"
+    "store_page_fault",
      "reserved",
      "reserved",
      "reserved",
@@ -74,7 +74,7 @@ const char * const riscv_excp_names[] = {
      "guest_exec_page_fault",
      "guest_load_page_fault",
      "reserved",
-    "guest_store_page_fault"
+    "guest_store_page_fault",
  };
 
  const char * const riscv_intr_names[] = {
#2 lore raw

Cc'ing qemu-trivial@ in case there is a pending PR in progress, it might get merged quicker.

Quoted 41 lines · Philippe Mathieu-Daudé
Quoted 2 lines · Palmer Dabbelt

THis would almost certainly cause the exception names to be reported incorrectly. Covarity found the issue (CID 1420223). As per Peter's

"This", "Coverity" typos.

Quoted 31 lines

suggestion, I've also added a comma at the end of the list to avoid the issue reappearing in the future.

---
  target/riscv/cpu.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
target/riscv/cpu.c +2 -2
index c47d10b739..c0b7023100 100644
@@ -66,7 +66,7 @@ const char * const riscv_excp_names[] = {
      "exec_page_fault",
      "load_page_fault",
      "reserved",
-    "store_page_fault"
+    "store_page_fault",
      "reserved",
      "reserved",
      "reserved",
@@ -74,7 +74,7 @@ const char * const riscv_excp_names[] = {
      "guest_exec_page_fault",
      "guest_load_page_fault",
      "reserved",
-    "guest_store_page_fault"
+    "guest_store_page_fault",
  };
 
  const char * const riscv_intr_names[] = {
#3 lore raw
Quoted 13 lines · On Thu, 05 Mar 2020 09:20:31 PST (-0800), [email protected] wrote:

Cc'ing qemu-trivial@ in case there is a pending PR in progress, it might get merged quicker.

Quoted 9 lines · Philippe Mathieu-Daudé
Quoted 2 lines · Palmer Dabbelt

THis would almost certainly cause the exception names to be reported incorrectly. Covarity found the issue (CID 1420223). As per Peter's

"This", "Coverity" typos.

Thanks. I guess I'll just send the PR, as there's really no reason to block this on the other RISC-V stuff. It'll just be a single patch PR, so if the patch goes in some other way then it should be easy to drop. I usually don't like rushing these sorts of things, but this one seems pretty safe.

Quoted 32 lines
Quoted 32 lines
Quoted 32 lines

suggestion, I've also added a comma at the end of the list to avoid the issue reappearing in the future.

---
  target/riscv/cpu.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
target/riscv/cpu.c +2 -2
index c47d10b739..c0b7023100 100644
@@ -66,7 +66,7 @@ const char * const riscv_excp_names[] = {
      "exec_page_fault",
      "load_page_fault",
      "reserved",
-    "store_page_fault"
+    "store_page_fault",
      "reserved",
      "reserved",
      "reserved",
@@ -74,7 +74,7 @@ const char * const riscv_excp_names[] = {
      "guest_exec_page_fault",
      "guest_load_page_fault",
      "reserved",
-    "guest_store_page_fault"
+    "guest_store_page_fault",
  };
 
  const char * const riscv_intr_names[] = {