xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Anisov <andrii.anisov@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Andrii Anisov <andrii_anisov@epam.com>
Subject: [PATCH v2] arm/traps: coding style fixes
Date: Tue, 11 Sep 2018 18:48:02 +0300	[thread overview]
Message-ID: <1536680882-5319-1-git-send-email-andrii.anisov@gmail.com> (raw)

From: Andrii Anisov <andrii_anisov@epam.com>

Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
---
 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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2018-09-11 15:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 15:48 Andrii Anisov [this message]
2018-09-27 23:42 ` [PATCH v2] arm/traps: coding style fixes Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1536680882-5319-1-git-send-email-andrii.anisov@gmail.com \
    --to=andrii.anisov@gmail.com \
    --cc=andrii_anisov@epam.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).