[PATCH 5/8] target/riscv: Remove redundant parentheses

Weiwei Li posted 8 patches 2 years, 10 months ago
There is a newer version of this series
[PATCH 5/8] target/riscv: Remove redundant parentheses
Posted by Weiwei Li 2 years, 10 months ago
Remove redundant parentheses in get_physical_address.

Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn>
Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn>
---
 target/riscv/cpu_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c
index 3862e7b677..de2d4a8c1d 100644
--- a/target/riscv/cpu_helper.c
+++ b/target/riscv/cpu_helper.c
@@ -1050,7 +1050,7 @@ restart:
             if ((pte & PTE_R) || ((pte & PTE_X) && mxr)) {
                 *prot |= PAGE_READ;
             }
-            if ((pte & PTE_X)) {
+            if (pte & PTE_X) {
                 *prot |= PAGE_EXEC;
             }
             /* add write permission on stores or if the page is already dirty,
-- 
2.25.1
Re: [PATCH 5/8] target/riscv: Remove redundant parentheses
Posted by Richard Henderson 2 years, 10 months ago
On 3/24/23 05:38, Weiwei Li wrote:
> Remove redundant parentheses in get_physical_address.
> 
> Signed-off-by: Weiwei Li<liweiwei@iscas.ac.cn>
> Signed-off-by: Junqiang Wang<wangjunqiang@iscas.ac.cn>
> ---
>   target/riscv/cpu_helper.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~