summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorRichard Henderson2022-10-11 05:18:59 +0200
committerPeter Maydell2022-10-20 12:27:49 +0200
commit6b72c5424a4a725bc0bacd09bd83f7e8be649345 (patch)
tree4d8483b5680c02d715dacd92a884130c1b557a82 /target
parenttarget/arm: Split out get_phys_addr_twostage (diff)
downloadqemu-6b72c5424a4a725bc0bacd09bd83f7e8be649345.tar.gz
qemu-6b72c5424a4a725bc0bacd09bd83f7e8be649345.tar.xz
qemu-6b72c5424a4a725bc0bacd09bd83f7e8be649345.zip
target/arm: Use bool consistently for get_phys_addr subroutines
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> Message-id: 20221011031911.2408754-13-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-rw-r--r--target/arm/ptw.c7
1 files 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,