Message ID | 20250225160052.39564-6-loic@rivosinc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | target/riscv: Smepmp fixes to match specification | expand |
On 2/25/25 1:00 PM, Loïc Lefort wrote: > Remove useless check in pmp_is_locked, the function will return 0 in either > case. > > Signed-off-by: Loïc Lefort <loic@rivosinc.com> > --- Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> > target/riscv/pmp.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c > index e4fee10d93..81c8bd71ce 100644 > --- a/target/riscv/pmp.c > +++ b/target/riscv/pmp.c > @@ -58,11 +58,6 @@ static inline int pmp_is_locked(CPURISCVState *env, uint32_t pmp_index) > return 1; > } > > - /* Top PMP has no 'next' to check */ > - if ((pmp_index + 1u) >= MAX_RISCV_PMPS) { > - return 0; > - } > - > return 0; > } >
diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index e4fee10d93..81c8bd71ce 100644 --- a/target/riscv/pmp.c +++ b/target/riscv/pmp.c @@ -58,11 +58,6 @@ static inline int pmp_is_locked(CPURISCVState *env, uint32_t pmp_index) return 1; } - /* Top PMP has no 'next' to check */ - if ((pmp_index + 1u) >= MAX_RISCV_PMPS) { - return 0; - } - return 0; }
Remove useless check in pmp_is_locked, the function will return 0 in either case. Signed-off-by: Loïc Lefort <loic@rivosinc.com> --- target/riscv/pmp.c | 5 ----- 1 file changed, 5 deletions(-)