[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 12/24] target/arm: Use bool consistently for get_phys_addr sub
From: |
Richard Henderson |
Subject: |
[PATCH v4 12/24] target/arm: Use bool consistently for get_phys_addr subroutines |
Date: |
Mon, 10 Oct 2022 20:18:59 -0700 |
The return type of the functions is already bool, but in a few
instances we used an integer type with the return statement.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/ptw.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index dd6556560a..6c5ed56a10 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -2432,7 +2432,7 @@ static bool get_phys_addr_disabled(CPUARMState *env,
target_ulong address,
result->f.lg_page_size = TARGET_PAGE_BITS;
result->cacheattrs.shareability = shareability;
result->cacheattrs.attrs = memattr;
- return 0;
+ return false;
}
static bool get_phys_addr_twostage(CPUARMState *env, S1Translate *ptw,
@@ -2443,9 +2443,8 @@ static bool get_phys_addr_twostage(CPUARMState *env,
S1Translate *ptw,
{
hwaddr ipa;
int s1_prot;
- int ret;
bool is_secure = ptw->in_secure;
- bool ipa_secure, s2walk_secure;
+ bool ret, ipa_secure, s2walk_secure;
ARMCacheAttrs cacheattrs1;
bool is_el0;
uint64_t hcr;
@@ -2520,7 +2519,7 @@ static bool get_phys_addr_twostage(CPUARMState *env,
S1Translate *ptw,
&& (ipa_secure
|| !(env->cp15.vtcr_el2 & (VTCR_NSA | VTCR_NSW))));
- return 0;
+ return false;
}
static bool get_phys_addr_with_struct(CPUARMState *env, S1Translate *ptw,
--
2.34.1
- [PATCH v4 00/24] target/arm: Implement FEAT_HAFDBS, Richard Henderson, 2022/10/10
- [PATCH v4 03/24] target/arm: Use probe_access_full for BTI, Richard Henderson, 2022/10/10
- [PATCH v4 05/24] target/arm: Move ARMMMUIdx_Stage2 to a real tlb mmu_idx, Richard Henderson, 2022/10/10
- [PATCH v4 04/24] target/arm: Add ARMMMUIdx_Phys_{S,NS}, Richard Henderson, 2022/10/10
- [PATCH v4 06/24] target/arm: Restrict tlb flush from vttbr_write to vmid change, Richard Henderson, 2022/10/10
- [PATCH v4 02/24] target/arm: Use probe_access_full for MTE, Richard Henderson, 2022/10/10
- [PATCH v4 12/24] target/arm: Use bool consistently for get_phys_addr subroutines,
Richard Henderson <=
- [PATCH v4 13/24] target/arm: Add ptw_idx to S1Translate, Richard Henderson, 2022/10/10
- [PATCH v4 11/24] target/arm: Split out get_phys_addr_twostage, Richard Henderson, 2022/10/10
- [PATCH v4 07/24] target/arm: Split out S1Translate type, Richard Henderson, 2022/10/10
- [PATCH v4 01/24] target/arm: Enable TARGET_PAGE_ENTRY_EXTRA, Richard Henderson, 2022/10/10
- [PATCH v4 14/24] target/arm: Add isar predicates for FEAT_HAFDBS, Richard Henderson, 2022/10/10
- [PATCH v4 18/24] target/arm: Remove loop from get_phys_addr_lpae, Richard Henderson, 2022/10/10
- [PATCH v4 19/24] target/arm: Fix fault reporting in get_phys_addr_lpae, Richard Henderson, 2022/10/10