[PATCH 1/2] lib: sbi_illegal_insn: Constify illegal_insn_table

Samuel Holland samuel at sholland.org
Sun May 29 11:25:29 PDT 2022


This table does not need to be modified at runtime.

Signed-off-by: Samuel Holland <samuel at sholland.org>
---

 lib/sbi/sbi_illegal_insn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/sbi/sbi_illegal_insn.c b/lib/sbi/sbi_illegal_insn.c
index bfe7d61..39ef990 100644
--- a/lib/sbi/sbi_illegal_insn.c
+++ b/lib/sbi/sbi_illegal_insn.c
@@ -80,7 +80,7 @@ static int system_opcode_insn(ulong insn, struct sbi_trap_regs *regs)
 	return 0;
 }
 
-static illegal_insn_func illegal_insn_table[32] = {
+static const illegal_insn_func illegal_insn_table[32] = {
 	truly_illegal_insn, /* 0 */
 	truly_illegal_insn, /* 1 */
 	truly_illegal_insn, /* 2 */
-- 
2.35.1




More information about the opensbi mailing list