From 986222f0f994671190a94836a373fd64992cd271 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lo=C3=AFc=20Lefort?= Date: Thu, 13 Mar 2025 20:30:11 +0100 Subject: [PATCH] target/riscv: pmp: remove redundant check in pmp_is_locked MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Remove useless check in pmp_is_locked, the function will return 0 in either case. Signed-off-by: Loïc Lefort Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Reviewed-by: LIU Zhiwei Message-ID: <20250313193011.720075-6-loic@rivosinc.com> Signed-off-by: Alistair Francis --- target/riscv/pmp.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index 4070e21ea3..5af295e410 100644 --- a/target/riscv/pmp.c +++ b/target/riscv/pmp.c @@ -59,11 +59,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; } -- 2.39.5