* [PATCH 1/2] target/riscv: Remove redundant check in pmp_is_locked
@ 2023-06-28 10:36 Ruibo Lu
2023-06-28 13:21 ` Weiwei Li
2023-07-03 2:42 ` Alistair Francis
0 siblings, 2 replies; 3+ messages in thread
From: Ruibo Lu @ 2023-06-28 10:36 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-riscv, luruibo2000, alistair.francis, liweiwei
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] target/riscv: Remove redundant check in pmp_is_locked
2023-06-28 10:36 [PATCH 1/2] target/riscv: Remove redundant check in pmp_is_locked Ruibo Lu
@ 2023-06-28 13:21 ` Weiwei Li
2023-07-03 2:42 ` Alistair Francis
1 sibling, 0 replies; 3+ messages in thread
From: Weiwei Li @ 2023-06-28 13:21 UTC (permalink / raw)
To: Ruibo Lu, qemu-devel; +Cc: liweiwei, qemu-riscv, luruibo2000, alistair.francis
On 2023/6/28 18:36, Ruibo Lu 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: Weiwei Li <liweiwei@iscas.ac.cn>
Weiwei Li
> 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;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] target/riscv: Remove redundant check in pmp_is_locked
2023-06-28 10:36 [PATCH 1/2] target/riscv: Remove redundant check in pmp_is_locked Ruibo Lu
2023-06-28 13:21 ` Weiwei Li
@ 2023-07-03 2:42 ` Alistair Francis
1 sibling, 0 replies; 3+ messages in thread
From: Alistair Francis @ 2023-07-03 2:42 UTC (permalink / raw)
To: Ruibo Lu; +Cc: qemu-devel, qemu-riscv, luruibo2000, alistair.francis, liweiwei
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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-03 2:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-28 10:36 [PATCH 1/2] target/riscv: Remove redundant check in pmp_is_locked Ruibo Lu
2023-06-28 13:21 ` Weiwei Li
2023-07-03 2:42 ` Alistair Francis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).