summaryrefslogtreecommitdiff
path: root/arch/riscv/mm
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2021-11-18 14:24:14 +0300
committerPalmer Dabbelt <palmer@rivosinc.com>2022-01-06 04:52:29 +0300
commitef127bca1129d3d15f909f9215b9431a2f67555a (patch)
tree3e29bc1108febb2e804c22b9021f80ddfc999677 /arch/riscv/mm
parentc07935cb3ccf37acc5df079074ba20a720716f7a (diff)
downloadlinux-ef127bca1129d3d15f909f9215b9431a2f67555a.tar.xz
riscv: extable: make fixup_exception() return bool
The return values of fixup_exception() and riscv_bpf_fixup_exception() represent a boolean condition rather than an error code, so it's better to return `bool` rather than `int`. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/mm')
-rw-r--r--arch/riscv/mm/extable.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/riscv/mm/extable.c b/arch/riscv/mm/extable.c
index cbb0db11b28f..d41bf38e37e9 100644
--- a/arch/riscv/mm/extable.c
+++ b/arch/riscv/mm/extable.c
@@ -11,17 +11,17 @@
#include <linux/module.h>
#include <linux/uaccess.h>
-int fixup_exception(struct pt_regs *regs)
+bool fixup_exception(struct pt_regs *regs)
{
const struct exception_table_entry *fixup;
fixup = search_exception_tables(regs->epc);
if (!fixup)
- return 0;
+ return false;
if (regs->epc >= BPF_JIT_REGION_START && regs->epc < BPF_JIT_REGION_END)
return rv_bpf_fixup_exception(fixup, regs);
regs->epc = (unsigned long)&fixup->fixup + fixup->fixup;
- return 1;
+ return true;
}