RISC-V: Add a missing "," in riscv_excp_names
authorPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 5 Mar 2020 16:46:20 +0000 (08:46 -0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 5 Mar 2020 20:01:43 +0000 (12:01 -0800)
This would almost certainly cause the exception names to be reported
incorrectly.  Coverity 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.

Fixes: ab67a1d07a ("target/riscv: Add support for the new execption numbers")
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
target/riscv/cpu.c

index c47d10b739b3056ce0bdb84a4c15f594977aa7ed..c0b70231004cae0915df71f48e180dd7c28ed691 100644 (file)
@@ -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[] = {