diff options
author | Jisheng Zhang <jszhang@kernel.org> | 2021-11-18 19:24:14 +0800 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2022-01-05 17:52:29 -0800 |
commit | ef127bca1129d3d15f909f9215b9431a2f67555a (patch) | |
tree | 3e29bc1108febb2e804c22b9021f80ddfc999677 /arch/riscv/net | |
parent | c07935cb3ccf37acc5df079074ba20a720716f7a (diff) | |
download | linux-stable-ef127bca1129d3d15f909f9215b9431a2f67555a.tar.gz linux-stable-ef127bca1129d3d15f909f9215b9431a2f67555a.tar.bz2 linux-stable-ef127bca1129d3d15f909f9215b9431a2f67555a.zip |
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/net')
-rw-r--r-- | arch/riscv/net/bpf_jit_comp64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c index 2ca345c7b0bf..7714081cbb64 100644 --- a/arch/riscv/net/bpf_jit_comp64.c +++ b/arch/riscv/net/bpf_jit_comp64.c @@ -459,8 +459,8 @@ static int emit_call(bool fixed, u64 addr, struct rv_jit_context *ctx) #define BPF_FIXUP_OFFSET_MASK GENMASK(26, 0) #define BPF_FIXUP_REG_MASK GENMASK(31, 27) -int rv_bpf_fixup_exception(const struct exception_table_entry *ex, - struct pt_regs *regs) +bool rv_bpf_fixup_exception(const struct exception_table_entry *ex, + struct pt_regs *regs) { off_t offset = FIELD_GET(BPF_FIXUP_OFFSET_MASK, ex->fixup); int regs_offset = FIELD_GET(BPF_FIXUP_REG_MASK, ex->fixup); @@ -468,7 +468,7 @@ int rv_bpf_fixup_exception(const struct exception_table_entry *ex, *(unsigned long *)((void *)regs + pt_regmap[regs_offset]) = 0; regs->epc = (unsigned long)&ex->fixup - offset; - return 1; + return true; } /* For accesses to BTF pointers, add an entry to the exception table */ |