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

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


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Edwin Torok <edvin.torok@xxxxxxxxxx>
  • Date: Wed, 30 Nov 2022 17:14:49 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cNo3kbzVMLSvEx/qQJP97hBtjOe56k8Itj3k/ZkIiN8=; b=j/xWCzfNANlHh+C4fZaG+xSd9XB3TGZ644QGWlHGkSS6oaZ2/qd2gLNf8QHYbSaVFKNSXaoYz6iLaO1/FLVgErQ++byTueP66hpnjFeUYw0oYniYN/NuFCMnEk7AjGU5Qa7V5kaLUGJkktYYpxl51Z/8y1BhUXVNEqm9/z/iCNzmlvXBKqItMhA4LVwoCIyMTPYVprttNvpRO0nHuJcx/0Jz5WLiM4aHuuqw5zImM3v5g949bE2yU5qhfu7O69UHw8BAfYKc+w9cFS1qcRO4oJW8VJ8ou5yxYTQzc0dBXxLpt33NtGBt66o0ifv+9mQ8bsXQG7woy4em4347LIXjqA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SBmLWmaa6f5lONW5/cJKLhmP66peH3Miz9tpHwuTZvOCAyPGS+0WzxXbsFV6KVT6+PE5F1Dl9cHCKlEIEhi1yEgOOEm135FmGGOs9DuMIP+2TkboUsSEYufOR10iY8I2/uUjNFWBEPW6gsaarTiurZKZoc48wq+i6w8CDmewGEhhDMqEqW2xNb0IMvLDxUrquQB3jAHnmq6P68fy9X0+iLrdXu/roCVej0ljtiSde9AWhABXwzgoCszFnXmDghQAKq3j+RDj6avUIYofPVO436Nb3i4OC9JJ/trsU61vxNWrB1AjNgCm2oXDhKeHwxurH4onJjF/5ndkHza+P+kUKQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Rob Hoes <Rob.Hoes@xxxxxxxxxx>
  • Delivery-date: Wed, 30 Nov 2022 17:15:16 +0000
  • Ironport-data: A9a23:lvY8caqlozAXVPCkgOIWmR6nq49eBmILZBIvgKrLsJaIsI4StFCzt garIBmBMvmMNGvyf4wgOti1p08OvZ7Rz9JlTQNlrXg9QShAoJuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpAFc+E0/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06W1wUmAWP6gR5gaHzCFNV/rzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXAA5Rbx2qvM2Z/J22V+dngPkBIerUF4xK7xmMzRmBZRonabbqZvySoPpnhnI3jM0IGuvCb c0EbzYpdA7HfxBEJlYQDtQ5gfusgX78NTZfrTp5p4JuuzSVkFM3jeWraYKLEjCJbZw9ckKwq 27Y/mK/HhYAM9+3wjuZ6HO8wOTImEsXXapCSubgp6433jV/wEQiWTE5dVCQvMW/1EjuW9BNb F4l+HIx+P1aGEuDC4OVsweDiG6JuFsQVsRdF8U+6RqR0ezE7gCBHG8GQzVdLts8u6ceSTU02 3eTktjuBDgpt6eaIU9x7Z+RpDK2fC0Kd2kLYHZcSRNfuoG95oYukhjIU9BvVravicH4Ei3xx DbMqzUig7IUjogA0KDTEU37vg9Ab6PhFmYdjjg7lEr/hu+lTOZJv7CV1GU=
  • Ironport-hdrordr: A9a23:xsAJxK26dpwIy/OqnQXlywqjBLskLtp133Aq2lEZdPU1SL36qy nKpp4mPHDP5Qr5NEtNpTniAsm9qBHnm6KdiLN5VdyftWHdyQ6VxepZjLcKrQeOJ8W0ntQtsZ uJGcJFeb/NMWQ=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZBNx/46jv4MYnYEmbfJm7DDYZZK5XtLyA
  • Thread-topic: [PATCH v2 1/6] tools/oxenstored: Style fixes to Domain


> On 30 Nov 2022, at 16:54, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> 
> 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>


Reviewed-by: Edwin Török <edvin.torok@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)

I would've expected ocp-indent to already do the right thing on this part.

> 
> 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

but yes for this we'd need ocamlformat, not ocp-indent.

> 
> 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®.