]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/ppc/mmu-radix64.c: Drop a local variable
authorBALATON Zoltan <balaton@eik.bme.hu>
Sun, 12 May 2024 23:28:06 +0000 (01:28 +0200)
committerNicholas Piggin <npiggin@gmail.com>
Thu, 23 May 2024 23:43:12 +0000 (09:43 +1000)
The value is only used once so no need to introduce a local variable
for it.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
target/ppc/mmu-radix64.c

index fefa55a5f1cd0e944c7b2edc601c50fc53309905..c1e4f0033519cc9b08c11e7c98c98ec8c6a174d5 100644 (file)
@@ -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;