From bef6f008b9811d961fd311c102f1a22dc28278a1 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 7 Jul 2023 21:40:52 +0100 Subject: accel/tcg: Return bool from page_check_range Replace the 0/-1 result with true/false. Invert the sense of the test of all callers. Document the function. Signed-off-by: Richard Henderson Message-Id: <20230707204054.8792-25-richard.henderson@linaro.org> --- target/sparc/ldst_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/sparc') diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index 981a47d8bb..78b03308ae 100644 --- a/target/sparc/ldst_helper.c +++ b/target/sparc/ldst_helper.c @@ -1191,7 +1191,7 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr, case ASI_PNFL: /* Primary no-fault LE */ case ASI_SNF: /* Secondary no-fault */ case ASI_SNFL: /* Secondary no-fault LE */ - if (page_check_range(addr, size, PAGE_READ) == -1) { + if (!page_check_range(addr, size, PAGE_READ)) { ret = 0; break; } -- cgit v1.2.3