qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 18/33] target-i386: fix coding standards in x86_cpu_h


From: Paolo Bonzini
Subject: [Qemu-devel] [PULL 18/33] target-i386: fix coding standards in x86_cpu_handle_mmu_fault
Date: Thu, 5 Jun 2014 16:22:08 +0200

Signed-off-by: Paolo Bonzini <address@hidden>
---
 target-i386/helper.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/target-i386/helper.c b/target-i386/helper.c
index d10de26..7b3819b 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -670,8 +670,9 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
             is_dirty = is_write && !(pde & PG_DIRTY_MASK);
             if (!(pde & PG_ACCESSED_MASK) || is_dirty) {
                 pde |= PG_ACCESSED_MASK;
-                if (is_dirty)
+                if (is_dirty) {
                     pde |= PG_DIRTY_MASK;
+                }
                 stl_phys_notdirty(cs->as, pde_addr, pde);
             }
             /* align to page_size */
@@ -731,8 +732,9 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
             is_dirty = is_write && !(pte & PG_DIRTY_MASK);
             if (!(pte & PG_ACCESSED_MASK) || is_dirty) {
                 pte |= PG_ACCESSED_MASK;
-                if (is_dirty)
+                if (is_dirty) {
                     pte |= PG_DIRTY_MASK;
+                }
                 stl_phys_notdirty(cs->as, pte_addr, pte);
             }
             page_size = 4096;
@@ -785,12 +787,13 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
             is_dirty = is_write && !(pde & PG_DIRTY_MASK);
             if (!(pde & PG_ACCESSED_MASK) || is_dirty) {
                 pde |= PG_ACCESSED_MASK;
-                if (is_dirty)
+                if (is_dirty) {
                     pde |= PG_DIRTY_MASK;
+                }
                 stl_phys_notdirty(cs->as, pde_addr, pde);
             }
 
-            pte = pde & ~( (page_size - 1) & ~0xfff); /* align to page_size */
+            pte = pde & ~((page_size - 1) & ~0xfff); /* align to page_size */
             ptep = pte;
             virt_addr = addr & ~(page_size - 1);
         } else {
@@ -841,8 +844,9 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
             is_dirty = is_write && !(pte & PG_DIRTY_MASK);
             if (!(pte & PG_ACCESSED_MASK) || is_dirty) {
                 pte |= PG_ACCESSED_MASK;
-                if (is_dirty)
+                if (is_dirty) {
                     pte |= PG_DIRTY_MASK;
+                }
                 stl_phys_notdirty(cs->as, pte_addr, pte);
             }
             page_size = 4096;
-- 
1.8.3.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]