Skip to contentSkip to conversation

xen: arm: fixup a couple of coding style issues

PATCH In review Ian Campbell 2 participants 3 messages Mar 18, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 2/2 xen: arm: fixup a couple of coding style issues

The if in domain.c was only syntactically valid because the macro happened to contain enclosing braces.

---
 xen/arch/arm/domain.c |    2 +-
 xen/arch/arm/traps.c  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
xen/arch/arm/domain.c +1 -1
index 0f83e81..8f91c2e 100644
@@ -257,7 +257,7 @@ static void continue_new_vcpu(struct vcpu *prev)
 
     if ( is_idle_vcpu(current) )
         reset_stack_and_jump(idle_loop);
-    else if is_32bit_domain(current->domain)
+    else if ( is_32bit_domain(current->domain) )
         /* check_wakeup_from_wait(); */
         reset_stack_and_jump(return_to_new_vcpu32);
     else
xen/arch/arm/traps.c +2 -2
index 563cc62..5d66bc4 100644
@@ -1563,12 +1563,12 @@ asmlinkage void do_trap_hypervisor(struct cpu_user_regs *regs)
         advance_pc(regs, hsr);
         break;
     case HSR_EC_CP15_32:
-        if ( ! is_32bit_domain(current->domain) )
+        if ( !is_32bit_domain(current->domain) )
             goto bad_trap;
         do_cp15_32(regs, hsr);
         break;
     case HSR_EC_CP15_64:
-        if ( ! is_32bit_domain(current->domain) )
+        if ( !is_32bit_domain(current->domain) )
             goto bad_trap;
         do_cp15_64(regs, hsr);
         break;
Signature · 1 line
1.7.10.4
Acked-by on v2 2/2
#1 lore raw
Quoted 4 lines · Ian Campbell

The if in domain.c was only syntactically valid because the macro happened to contain enclosing braces.

Quoted 38 lines
---
 xen/arch/arm/domain.c |    2 +-
 xen/arch/arm/traps.c  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
xen/arch/arm/domain.c +1 -1
index 0f83e81..8f91c2e 100644
@@ -257,7 +257,7 @@ static void continue_new_vcpu(struct vcpu *prev)
 
     if ( is_idle_vcpu(current) )
         reset_stack_and_jump(idle_loop);
-    else if is_32bit_domain(current->domain)
+    else if ( is_32bit_domain(current->domain) )
         /* check_wakeup_from_wait(); */
         reset_stack_and_jump(return_to_new_vcpu32);
     else
xen/arch/arm/traps.c +2 -2
index 563cc62..5d66bc4 100644
@@ -1563,12 +1563,12 @@ asmlinkage void do_trap_hypervisor(struct cpu_user_regs *regs)
         advance_pc(regs, hsr);
         break;
     case HSR_EC_CP15_32:
-        if ( ! is_32bit_domain(current->domain) )
+        if ( !is_32bit_domain(current->domain) )
             goto bad_trap;
         do_cp15_32(regs, hsr);
         break;
     case HSR_EC_CP15_64:
-        if ( ! is_32bit_domain(current->domain) )
+        if ( !is_32bit_domain(current->domain) )
             goto bad_trap;
         do_cp15_64(regs, hsr);
         break;
Signature · 1 line
Julien Grall