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

Re: [Xen-devel] [PATCH v2] arm/traps: coding style fixes



On Tue, 11 Sep 2018, Andrii Anisov wrote:
> From: Andrii Anisov <andrii_anisov@xxxxxxxx>
> 
> Signed-off-by: Andrii Anisov <andrii_anisov@xxxxxxxx>


Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>

> ---
>  xen/arch/arm/traps.c | 21 +++++++++++++--------
>  1 file changed, 13 insertions(+), 8 deletions(-)
> 
> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
> index 9ae64ae..7bfdda8 100644
> --- a/xen/arch/arm/traps.c
> +++ b/xen/arch/arm/traps.c
> @@ -244,7 +244,8 @@ static register_t *select_user_reg(struct cpu_user_regs 
> *regs, int reg)
>       */
>  #define REGOFFS(R) offsetof(struct cpu_user_regs, R)
>  
> -    switch ( reg ) {
> +    switch ( reg )
> +    {
>      case 0 ... 7: /* Unbanked registers */
>          BUILD_BUG_ON(REGOFFS(r0) + 7*sizeof(register_t) != REGOFFS(r7));
>          return &regs->r0 + reg;
> @@ -422,7 +423,7 @@ static vaddr_t exception_handler32(vaddr_t offset)
>  {
>      uint32_t sctlr = READ_SYSREG32(SCTLR_EL1);
>  
> -    if (sctlr & SCTLR_V)
> +    if ( sctlr & SCTLR_V )
>          return 0xffff0000 + offset;
>      else /* always have security exceptions */
>          return READ_SYSREG(VBAR_EL1) + offset;
> @@ -1340,7 +1341,7 @@ static void do_trap_brk(struct cpu_user_regs *regs, 
> const union hsr hsr)
>       */
>      BUG_ON(!hyp_mode(regs));
>  
> -    switch (hsr.brk.comment)
> +    switch ( hsr.brk.comment )
>      {
>      case BRK_BUG_FRAME_IMM:
>          if ( do_bug_frame(regs, regs->pc) )
> @@ -1429,7 +1430,9 @@ static void do_debug_trap(struct cpu_user_regs *regs, 
> unsigned int code)
>  {
>      uint32_t reg;
>      uint32_t domid = current->domain->domain_id;
> -    switch ( code ) {
> +
> +    switch ( code )
> +    {
>      case 0xe0 ... 0xef:
>          reg = code - 0xe0;
>          printk("DOM%d: R%d = 0x%"PRIregister" at 0x%"PRIvaddr"\n",
> @@ -1823,8 +1826,8 @@ void dump_guest_s1_walk(struct domain *d, vaddr_t addr)
>             offset, mfn_to_maddr(mfn), second[offset]);
>  
>  done:
> -    if (second) unmap_domain_page(second);
> -    if (first) unmap_domain_page(first);
> +    if ( second ) unmap_domain_page(second);
> +    if ( first ) unmap_domain_page(first);
>  }
>  
>  /*
> @@ -2071,7 +2074,8 @@ void do_trap_guest_sync(struct cpu_user_regs *regs)
>  
>      enter_hypervisor_head(regs);
>  
> -    switch (hsr.ec) {
> +    switch ( hsr.ec )
> +    {
>      case HSR_EC_WFI_WFE:
>          /*
>           * HCR_EL2.TWI, HCR_EL2.TWE
> @@ -2270,7 +2274,8 @@ void leave_hypervisor_tail(void)
>      while (1)
>      {
>          local_irq_disable();
> -        if (!softirq_pending(smp_processor_id())) {
> +        if ( !softirq_pending(smp_processor_id()) )
> +        {
>              vgic_sync_to_lrs();
>  
>              /*
> -- 
> 2.7.4
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.