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

[PATCH v2 1/6] tools/oxenstored: Style fixes to Domain


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 30 Nov 2022 16:54:50 +0000
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Edwin Torok <edvin.torok@xxxxxxxxxx>, Rob Hoes <Rob.Hoes@xxxxxxxxxx>
  • Delivery-date: Wed, 30 Nov 2022 16:55:12 +0000
  • Ironport-data: A9a23:rw8Izay4JRXhP7MlDNZ6t+c6xirEfRIJ4+MujC+fZmUNrF6WrkUOz 2MfWGCDOfaINmbwLdEjaYvg9h8Fu8WBzIIxTgo/pCAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTbaeYUidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+U0HUMja4mtC5AVnPqgT5zcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KU9s9 80aIShcVTGotse4/6+/b9BNr/12eaEHPKtH0p1h5TTQDPJgSpHfWaTao9Rf2V/chOgXQ6yYP ZBAL2MyMlKQOHWjOX9OYH46tM6uimPybHtzr1WNqLBsy2PS0BZwwP7mN9+9ltmiFZgFzxfF+ TiuE2LRHQ4nKN2SmTW/ryi8g/3kjCHYCaE4LejtnhJtqALKnTFCYPEMbnO3qOe0olSzUNVeL woT4CVGhbg/8gmnQ8fwWzW8oWWYpVgMVtxICeo45QqRjK3O7G6k6nMsF2AbLoZ87YlvGGJsh gThc87V6SJHnp+XeHCU7uavjBiDHCYqMGsnXA4tdF5QizX8m70bghXKR9dlNae6iNzpBD39q wy3QDgCa6Y71pBSifjilbzTq3f1/8WSEFZpjunCdjj9hj6VcrJJcGBBBbLzyf9bZLiUQVCa1 JTvs5jPtbteZX1hecHkfQnsIF1Lz6zdWNE/qQQ1d3XEy9hK0yDLQGyoyGsiTHqFy+5dEdMTX GfduBlK+LhYN2awYKl8buqZUpp0nPe8S4q4CKyIMLKih6SdkifdpEmCgmbJjwjQfLUEy/lja f93j+7zZZrlNUiX5GXvHLpMuVPa7is/2XnSVfjGI+ePiNKjiIquYe5dajOmN7lphJ5oVS2Jq 76zwePWkUQAOAA/CwGLmbMuwacidCNqX8mp+5EPL4Zu4GNOQQkcNhMY+pt5E6QNokifvrqgE q2VMqOA9GfCuA==
  • Ironport-hdrordr: A9a23:oRJkH6y0SElKDWwFRqXxKrPwLL1zdoMgy1knxilNoRw8SKOlfq GV7ZImPHDP6Qr5NEtMpTnEAtjjfZq+z+8T3WByB9eftWDd0QPCRr2Kr7GSpgEIcxeOktK1vp 0PT0ERMrHN5CBB/KXH3DU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This file has some style problems so severe that they interfere with the
readability of the subsequent bugfix patches.

Fix these issues ahead of time, to make the subsequent changes more readable.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Christian Lindig <christian.lindig@xxxxxxxxxx>
CC: David Scott <dave@xxxxxxxxxx>
CC: Edwin Torok <edvin.torok@xxxxxxxxxx>
CC: Rob Hoes <Rob.Hoes@xxxxxxxxxx>

v2:
 * New
---
 tools/ocaml/xenstored/domain.ml | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/tools/ocaml/xenstored/domain.ml b/tools/ocaml/xenstored/domain.ml
index 81cb59b8f1a2..ab08dcf37f62 100644
--- a/tools/ocaml/xenstored/domain.ml
+++ b/tools/ocaml/xenstored/domain.ml
@@ -57,17 +57,16 @@ let is_paused_for_conflict dom = dom.conflict_credit <= 0.0
 let is_free_to_conflict = is_dom0
 
 let string_of_port = function
-| None -> "None"
-| Some x -> string_of_int (Xeneventchn.to_int x)
+       | None -> "None"
+       | Some x -> string_of_int (Xeneventchn.to_int x)
 
 let dump d chan =
        fprintf chan "dom,%d,%nd,%d\n" d.id d.mfn d.remote_port
 
-let notify dom = match dom.port with
-| None ->
-       warn "domain %d: attempt to notify on unknown port" dom.id
-| Some port ->
-       Event.notify dom.eventchn port
+let notify dom =
+       match dom.port with
+       | None -> warn "domain %d: attempt to notify on unknown port" dom.id
+       | Some port -> Event.notify dom.eventchn port
 
 let bind_interdomain dom =
        begin match dom.port with
@@ -84,8 +83,7 @@ let close dom =
        | None -> ()
        | Some port -> Event.unbind dom.eventchn port
        end;
-       Xenmmap.unmap dom.interface;
-       ()
+       Xenmmap.unmap dom.interface
 
 let make id mfn remote_port interface eventchn = {
        id = id;
-- 
2.11.0




 


Rackspace

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