[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 29/32] target/ppc/mmu-radix64.c: Drop a local variable
From: |
BALATON Zoltan |
Subject: |
[PATCH v5 29/32] target/ppc/mmu-radix64.c: Drop a local variable |
Date: |
Thu, 09 May 2024 22:26:04 +0200 (CEST) |
The value is only used once so no need to introduce a local variable
for it.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
---
target/ppc/mmu-radix64.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c
index 8daf71d2db..395ce3b782 100644
--- a/target/ppc/mmu-radix64.c
+++ b/target/ppc/mmu-radix64.c
@@ -185,7 +185,6 @@ static bool ppc_radix64_check_prot(PowerPCCPU *cpu,
MMUAccessType access_type,
int mmu_idx, bool partition_scoped)
{
CPUPPCState *env = &cpu->env;
- int need_prot;
/* Check Page Attributes (pte58:59) */
if ((pte & R_PTE_ATT) == R_PTE_ATT_NI_IO && access_type == MMU_INST_FETCH)
{
@@ -210,8 +209,8 @@ static bool ppc_radix64_check_prot(PowerPCCPU *cpu,
MMUAccessType access_type,
}
/* Check if requested access type is allowed */
- need_prot = prot_for_access_type(access_type);
- if (need_prot & ~*prot) { /* Page Protected for that Access */
+ if (prot_for_access_type(access_type) & ~*prot) {
+ /* Page Protected for that Access */
*fault_cause |= access_type == MMU_INST_FETCH ? SRR1_NOEXEC_GUARD :
DSISR_PROTFAULT;
return true;
--
2.30.9
- [PATCH v5 18/32] target/ppc/mmu_common.c: Don't use mmu_ctx_t in mmubooke206_get_physical_address(), (continued)
- [PATCH v5 18/32] target/ppc/mmu_common.c: Don't use mmu_ctx_t in mmubooke206_get_physical_address(), BALATON Zoltan, 2024/05/09
- [PATCH v5 20/32] target/ppc/mmu_common.c: Remove BookE from direct store handling, BALATON Zoltan, 2024/05/09
- [PATCH v5 19/32] target/ppc: Remove pp_check() and reuse ppc_hash32_pp_prot(), BALATON Zoltan, 2024/05/09
- [PATCH v5 22/32] target/ppc/mmu_common.c: Eliminate get_physical_address_wtlb(), BALATON Zoltan, 2024/05/09
- [PATCH v5 17/32] target/ppc/mmu_common.c: Don't use mmu_ctx_t in mmubooke_get_physical_address(), BALATON Zoltan, 2024/05/09
- [PATCH v5 21/32] target/ppc/mmu_common.c: Split off BookE handling from ppc_jumbo_xlate(), BALATON Zoltan, 2024/05/09
- [PATCH v5 25/32] target/ppc/mmu_common.c: Simplify ppc_booke_xlate() part 2, BALATON Zoltan, 2024/05/09
- [PATCH v5 24/32] target/ppc/mmu_common.c: Simplify ppc_booke_xlate() part 1, BALATON Zoltan, 2024/05/09
- [PATCH v5 26/32] target/ppc: Remove id_tlbs flag from CPU env, BALATON Zoltan, 2024/05/09
- [PATCH v5 28/32] target/ppc/mmu-hash32.c: Drop a local variable, BALATON Zoltan, 2024/05/09
- [PATCH v5 29/32] target/ppc/mmu-radix64.c: Drop a local variable,
BALATON Zoltan <=
- [PATCH v5 32/32] target/ppc/mmu_common.c: Remove work around for spurious warnings, BALATON Zoltan, 2024/05/09
- [PATCH v5 30/32] target/ppc: Add a function to check for page protection bit, BALATON Zoltan, 2024/05/09
- [PATCH v5 31/32] target/ppc: Move out BookE and related MMU functions from mmu_common.c, BALATON Zoltan, 2024/05/09
- [PATCH v5 27/32] target/ppc: Split off common embedded TLB init, BALATON Zoltan, 2024/05/09
- Re: [PATCH v5 00/32] Misc PPC exception and BookE MMU clean ups, BALATON Zoltan, 2024/05/10