qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] target/riscv: Remove redundant check in pmp_is_locked


From: Alistair Francis
Subject: Re: [PATCH 1/2] target/riscv: Remove redundant check in pmp_is_locked
Date: Mon, 3 Jul 2023 12:42:33 +1000

On Wed, Jun 28, 2023 at 11:34 PM Ruibo Lu <reaperlu@hust.edu.cn> wrote:
>
> the check of top PMP is redundant and will not influence the return
> value, so consider remove it
>
> Signed-off-by: Ruibo Lu <reaperlu@hust.edu.cn>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  target/riscv/pmp.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c
> index 9d8db493e6..1a9279ba88 100644
> --- a/target/riscv/pmp.c
> +++ b/target/riscv/pmp.c
> @@ -49,11 +49,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.41.0
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]