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

[Xen-devel] [PATCH v2 6/7] gnttab: clean up main switch in do_grant_table_op()



Add blank lines as necessary and drop unnecessary braces.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: New.

--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -3153,6 +3153,7 @@ do_grant_table_op(
     {
         XEN_GUEST_HANDLE_PARAM(gnttab_map_grant_ref_t) map =
             guest_handle_cast(uop, gnttab_map_grant_ref_t);
+
         if ( unlikely(!guest_handle_okay(map, count)) )
             goto out;
         rc = gnttab_map_grant_ref(map, count);
@@ -3163,10 +3164,12 @@ do_grant_table_op(
         }
         break;
     }
+
     case GNTTABOP_unmap_grant_ref:
     {
         XEN_GUEST_HANDLE_PARAM(gnttab_unmap_grant_ref_t) unmap =
             guest_handle_cast(uop, gnttab_unmap_grant_ref_t);
+
         if ( unlikely(!guest_handle_okay(unmap, count)) )
             goto out;
         rc = gnttab_unmap_grant_ref(unmap, count);
@@ -3177,10 +3180,12 @@ do_grant_table_op(
         }
         break;
     }
+
     case GNTTABOP_unmap_and_replace:
     {
         XEN_GUEST_HANDLE_PARAM(gnttab_unmap_and_replace_t) unmap =
             guest_handle_cast(uop, gnttab_unmap_and_replace_t);
+
         if ( unlikely(!guest_handle_okay(unmap, count)) )
             goto out;
         rc = -ENOSYS;
@@ -3194,17 +3199,18 @@ do_grant_table_op(
         }
         break;
     }
+
     case GNTTABOP_setup_table:
-    {
         rc = gnttab_setup_table(
             guest_handle_cast(uop, gnttab_setup_table_t), count);
         ASSERT(rc <= 0);
         break;
-    }
+
     case GNTTABOP_transfer:
     {
         XEN_GUEST_HANDLE_PARAM(gnttab_transfer_t) transfer =
             guest_handle_cast(uop, gnttab_transfer_t);
+
         if ( unlikely(!guest_handle_okay(transfer, count)) )
             goto out;
         rc = gnttab_transfer(transfer, count);
@@ -3215,10 +3221,12 @@ do_grant_table_op(
         }
         break;
     }
+
     case GNTTABOP_copy:
     {
         XEN_GUEST_HANDLE_PARAM(gnttab_copy_t) copy =
             guest_handle_cast(uop, gnttab_copy_t);
+
         if ( unlikely(!guest_handle_okay(copy, count)) )
             goto out;
         rc = gnttab_copy(copy, count);
@@ -3230,33 +3238,31 @@ do_grant_table_op(
         }
         break;
     }
+
     case GNTTABOP_query_size:
-    {
         rc = gnttab_query_size(
             guest_handle_cast(uop, gnttab_query_size_t), count);
         ASSERT(rc <= 0);
         break;
-    }
+
     case GNTTABOP_set_version:
-    {
         rc = gnttab_set_version(guest_handle_cast(uop, gnttab_set_version_t));
         break;
-    }
+
     case GNTTABOP_get_status_frames:
-    {
         rc = gnttab_get_status_frames(
             guest_handle_cast(uop, gnttab_get_status_frames_t), count);
         break;
-    }
+
     case GNTTABOP_get_version:
-    {
         rc = gnttab_get_version(guest_handle_cast(uop, gnttab_get_version_t));
         break;
-    }
+
     case GNTTABOP_swap_grant_ref:
     {
         XEN_GUEST_HANDLE_PARAM(gnttab_swap_grant_ref_t) swap =
             guest_handle_cast(uop, gnttab_swap_grant_ref_t);
+
         if ( unlikely(!guest_handle_okay(swap, count)) )
             goto out;
         rc = gnttab_swap_grant_ref(swap, count);
@@ -3267,6 +3273,7 @@ do_grant_table_op(
         }
         break;
     }
+
     case GNTTABOP_cache_flush:
     {
         XEN_GUEST_HANDLE_PARAM(gnttab_cache_flush_t) cflush =
@@ -3283,6 +3290,7 @@ do_grant_table_op(
         opaque_out = opaque_in;
         break;
     }
+
     default:
         rc = -ENOSYS;
         break;




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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