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

[Xen-devel] [PATCH] x86: fix some coding style issues in tboot.c



x86: fix some coding style issues in tboot.c

Signed-off-by: Gang Wei <gang.wei@xxxxxxxxx>

diff -r fdcd30bf37b4 xen/arch/x86/tboot.c
--- a/xen/arch/x86/tboot.c      Wed Dec 28 10:10:59 2011 +0800
+++ b/xen/arch/x86/tboot.c      Wed Dec 28 10:29:58 2011 +0800
@@ -110,7 +110,8 @@
 
     /* new tboot_shared (w/ GAS support, integrity, etc.) is not backwards
        compatible */
-    if ( tboot_shared->version < 4 ) {
+    if ( tboot_shared->version < 4 )
+    {
         printk("unsupported version of tboot (%u)\n", tboot_shared->version);
         return;
     }
@@ -188,8 +189,10 @@
 
         if ( !mfn_valid(mfn) )
             continue;
-        if ( is_page_in_use(page) && !is_xen_heap_page(page) ) {
-            if ( page->count_info & PGC_page_table ) {
+        if ( is_page_in_use(page) && !is_xen_heap_page(page) )
+        {
+            if ( page->count_info & PGC_page_table )
+            {
                 void *pg = map_domain_page(mfn);
                 vmac_update(pg, PAGE_SIZE, ctx);
                 unmap_domain_page(pg);
@@ -283,7 +286,8 @@
                               + 3 * PAGE_SIZE)) )
             continue; /* skip tboot and its page tables */
 
-        if ( is_page_in_use(page) && is_xen_heap_page(page) ) {
+        if ( is_page_in_use(page) && is_xen_heap_page(page) )
+        {
             void *pg;
 
             if ( mfn_in_guarded_stack(mfn) )
@@ -344,14 +348,16 @@
 
     err = map_pages_to_xen(map_base << PAGE_SHIFT, map_base, map_size,
                            __PAGE_HYPERVISOR);
-    if ( err != 0 ) {
+    if ( err != 0 )
+    {
         printk("error (0x%x) mapping tboot pages (mfns) @ 0x%x, 0x%x\n", err,
                map_base, map_size);
         return;
     }
 
     /* if this is S3 then set regions to MAC */
-    if ( shutdown_type == TB_SHUTDOWN_S3 ) {
+    if ( shutdown_type == TB_SHUTDOWN_S3 )
+    {
         /*
          * Xen regions for tboot to MAC
          */
@@ -400,26 +406,25 @@
     /* TXT Heap */
     if ( txt_heap_base == 0 )
         return 0;
-    rc = e820_change_range_type(
-        &e820, txt_heap_base, txt_heap_base + txt_heap_size,
-        E820_RESERVED, E820_UNUSABLE);
+    rc = e820_change_range_type(&e820, txt_heap_base,
+                                txt_heap_base + txt_heap_size,
+                                E820_RESERVED, E820_UNUSABLE);
     if ( !rc )
         return 0;
 
     /* SINIT */
     if ( sinit_base == 0 )
         return 0;
-    rc = e820_change_range_type(
-        &e820, sinit_base, sinit_base + sinit_size,
-        E820_RESERVED, E820_UNUSABLE);
+    rc = e820_change_range_type(&e820, sinit_base,
+                                sinit_base + sinit_size,
+                                E820_RESERVED, E820_UNUSABLE);
     if ( !rc )
         return 0;
 
     /* TXT Private Space */
-    rc = e820_change_range_type(
-        &e820, TXT_PRIV_CONFIG_REGS_BASE,
-        TXT_PRIV_CONFIG_REGS_BASE + NR_TXT_CONFIG_PAGES * PAGE_SIZE,
-        E820_RESERVED, E820_UNUSABLE);
+    rc = e820_change_range_type(&e820, TXT_PRIV_CONFIG_REGS_BASE,
+                 TXT_PRIV_CONFIG_REGS_BASE + NR_TXT_CONFIG_PAGES * PAGE_SIZE,
+                 E820_RESERVED, E820_UNUSABLE);
     if ( !rc )
         return 0;
 
@@ -436,7 +441,6 @@
     sinit_mle_data_t sinit_mle_data;
     unsigned char *dmar_table_raw;
 
-
     if ( !tboot_in_measured_env() )
         return acpi_table_parse(ACPI_SIG_DMAR, dmar_handler);

Attachment: tboot-codestyle-fix.patch
Description: tboot-codestyle-fix.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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