diff options
author | Bo Gan <ganboing@gmail.com> | 2024-03-05 18:35:36 -0800 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2024-03-11 10:36:39 +0530 |
commit | a17600c186e80bca6d8641757d7ff1ccbf8fface (patch) | |
tree | 6df0e6c7bc77c217ceba254774005c0e139d043f /lib | |
parent | 2471cf2e6ce1429bad3b000941f95957be8da9c0 (diff) | |
download | opensbi-a17600c186e80bca6d8641757d7ff1ccbf8fface.zip opensbi-a17600c186e80bca6d8641757d7ff1ccbf8fface.tar.gz opensbi-a17600c186e80bca6d8641757d7ff1ccbf8fface.tar.bz2 |
lib: sbi: change prototype of sbi_trap_redirect
sbi_trap_redirect now uses const pointer to `trap`.
This ensures the caller that we never change `trap` in sbi_trap_redirect.
Signed-off-by: Bo Gan <ganboing@gmail.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbi/sbi_trap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_trap.c b/lib/sbi/sbi_trap.c index 145db4b..1024981 100644 --- a/lib/sbi/sbi_trap.c +++ b/lib/sbi/sbi_trap.c @@ -84,7 +84,7 @@ static void __noreturn sbi_trap_error(const char *msg, int rc, * @return 0 on success and negative error code on failure */ int sbi_trap_redirect(struct sbi_trap_regs *regs, - struct sbi_trap_info *trap) + const struct sbi_trap_info *trap) { ulong hstatus, vsstatus, prev_mode; #if __riscv_xlen == 32 |