xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wl@xen.org>
Subject: [Xen-devel] [PATCH 05/15] libxl_pci: `starting' is a bool
Date: Fri, 14 Jun 2019 12:24:34 +0100	[thread overview]
Message-ID: <20190614112444.29980-6-anthony.perard@citrix.com> (raw)
In-Reply-To: <20190614112444.29980-1-anthony.perard@citrix.com>

The argument `starting' is used as a boolean, change its type to
reflex that throughout libxl_pci.c.

No functional changes.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 tools/libxl/libxl_internal.h |  3 ++-
 tools/libxl/libxl_pci.c      | 14 ++++++++------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 01411382fd..846227c3cd 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -1540,7 +1540,8 @@ _hidden int libxl__pci_topology_init(libxl__gc *gc,
 
 /* from libxl_pci */
 
-_hidden int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, int starting);
+_hidden int libxl__device_pci_add(libxl__gc *gc, uint32_t domid,
+                                  libxl_device_pci *pcidev, bool starting);
 _hidden int libxl__device_pci_destroy_all(libxl__gc *gc, uint32_t domid);
 _hidden bool libxl__is_igd_vga_passthru(libxl__gc *gc,
                                         const libxl_domain_config *d_config);
diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
index d2d37be75d..f204ac9fb7 100644
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -116,7 +116,7 @@ static int libxl__create_pci_backend(libxl__gc *gc, uint32_t domid,
 static int libxl__device_pci_add_xenstore(libxl__gc *gc,
                                           uint32_t domid,
                                           const libxl_device_pci *pcidev,
-                                          int starting)
+                                          bool starting)
 {
     flexarray_t *back;
     char *num_devs, *be_path;
@@ -983,7 +983,8 @@ static int qemu_pci_add_xenstore(libxl__gc *gc, uint32_t domid,
     return rc;
 }
 
-static int do_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, int starting)
+static int do_pci_add(libxl__gc *gc, uint32_t domid,
+                      libxl_device_pci *pcidev, bool starting)
 {
     libxl_ctx *ctx = libxl__gc_owner(gc);
     libxl_domain_type type = libxl__domain_type(gc, domid);
@@ -1164,7 +1165,7 @@ int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid,
 {
     AO_CREATE(ctx, domid, ao_how);
     int rc;
-    rc = libxl__device_pci_add(gc, domid, pcidev, 0);
+    rc = libxl__device_pci_add(gc, domid, pcidev, false);
     libxl__ao_complete(egc, ao, rc);
     return AO_INPROGRESS;
 }
@@ -1186,7 +1187,8 @@ static int libxl_pcidev_assignable(libxl_ctx *ctx, libxl_device_pci *pcidev)
     return i != num;
 }
 
-int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, int starting)
+int libxl__device_pci_add(libxl__gc *gc, uint32_t domid,
+                          libxl_device_pci *pcidev, bool starting)
 {
     libxl_ctx *ctx = libxl__gc_owner(gc);
     unsigned int orig_vdev, pfunc_mask;
@@ -1241,7 +1243,7 @@ int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcide
     if (stubdomid != 0) {
         libxl_device_pci pcidev_s = *pcidev;
         /* stubdomain is always running by now, even at create time */
-        rc = do_pci_add(gc, stubdomid, &pcidev_s, 0);
+        rc = do_pci_add(gc, stubdomid, &pcidev_s, false);
         if ( rc )
             goto out;
     }
@@ -1294,7 +1296,7 @@ static void libxl__add_pcidevs(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
     int i, rc = 0;
 
     for (i = 0; i < d_config->num_pcidevs; i++) {
-        rc = libxl__device_pci_add(gc, domid, &d_config->pcidevs[i], 1);
+        rc = libxl__device_pci_add(gc, domid, &d_config->pcidevs[i], true);
         if (rc < 0) {
             LOGD(ERROR, domid, "libxl_device_pci_add failed: %d", rc);
             goto out;
-- 
Anthony PERARD


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-06-14 11:25 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 11:24 [Xen-devel] [PATCH 00/15] Some cleanup of libxl Anthony PERARD
2019-06-14 11:24 ` [Xen-devel] [PATCH 01/15] libxl: Rename struct libxl_device_type to libxl__device_type Anthony PERARD
2019-09-17 16:28   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 02/15] libxl: Remove unused variable in libxl__device_pci_add_xenstore Anthony PERARD
2019-09-17 16:31   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 03/15] libxl_pci: Make libxl__create_pci_backend static Anthony PERARD
2019-09-17 16:40   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 04/15] libxl_pci: Constify arg `pcidev' of libxl__device_pci_add_xenstore Anthony PERARD
2019-09-17 16:41   ` Ian Jackson
2019-06-14 11:24 ` Anthony PERARD [this message]
2019-09-17 16:41   ` [Xen-devel] [PATCH 05/15] libxl_pci: `starting' is a bool Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 06/15] libxl_dom_save: Reorder functions for switch_qemu_logdirty Anthony PERARD
2019-09-17 16:41   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 07/15] libxl_dm: Fix initialisation of libxl__stub_dm_spawn_state Anthony PERARD
2019-09-17 16:42   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 08/15] libxl: Comment libxl__dm_spawn_state aboud init and dispose Anthony PERARD
2019-09-17 16:42   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 09/15] libxl_domain: Cleanup libxl__destroy_domid Anthony PERARD
2019-09-17 16:42   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 10/15] libxl_usb: Use proper domid value, from libxl__device Anthony PERARD
2019-09-17 16:43   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 11/15] libxl_usb: Fix wrong usage of asserts Anthony PERARD
2019-09-17 16:44   ` Ian Jackson
2019-09-18 10:17     ` Anthony PERARD
2019-09-18 10:39       ` Ian Jackson
2019-09-19 10:03         ` [Xen-devel] [PATCH v2 " Anthony PERARD
2019-09-19 11:21           ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 12/15] libxl_usb: Fix libxl_device_usbctrl_getinfo Anthony PERARD
2019-09-17 16:44   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 13/15] libxl: Constify libxl_device_* param of *_getinfo Anthony PERARD
2019-09-17 16:45   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 14/15] libxl_usb: usbctrl, make use of generic device handling functions Anthony PERARD
2019-09-17 16:46   ` Ian Jackson
2019-06-14 11:24 ` [Xen-devel] [PATCH 15/15] libxl_usb: Use usbctrl instead of usbctrlinfo Anthony PERARD
2019-09-17 16:46   ` Ian Jackson
2019-09-19 17:07 ` [Xen-devel] [PATCH 00/15] Some cleanup of libxl Anthony PERARD

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=20190614112444.29980-6-anthony.perard@citrix.com \
    --to=anthony.perard@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wl@xen.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).