Message ID | 20201124080159.11912-7-paul@xen.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | xl / libxl: named PCI pass-through devices | expand |
Hi, Paul! On 11/24/20 10:01 AM, Paul Durrant wrote: > From: Paul Durrant <pdurrant@amazon.com> > > Both 'domid' and 'pci' are available in 'pci_remove_state' so there is no > need to also pass them as separate arguments. > > Signed-off-by: Paul Durrant <pdurrant@amazon.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Thank you, Oleksandr > --- > Cc: Ian Jackson <iwj@xenproject.org> > Cc: Wei Liu <wl@xen.org> > --- > tools/libs/light/libxl_pci.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/tools/libs/light/libxl_pci.c b/tools/libs/light/libxl_pci.c > index de617e95eb..41e4b2b571 100644 > --- a/tools/libs/light/libxl_pci.c > +++ b/tools/libs/light/libxl_pci.c > @@ -1871,14 +1871,14 @@ static void pci_remove_stubdom_done(libxl__egc *egc, > static void pci_remove_done(libxl__egc *egc, > pci_remove_state *prs, int rc); > > -static void do_pci_remove(libxl__egc *egc, uint32_t domid, > - libxl_device_pci *pci, int force, > - pci_remove_state *prs) > +static void do_pci_remove(libxl__egc *egc, pci_remove_state *prs) > { > STATE_AO_GC(prs->aodev->ao); > libxl_ctx *ctx = libxl__gc_owner(gc); > libxl_device_pci *assigned; > + uint32_t domid = prs->domid; > libxl_domain_type type = libxl__domain_type(gc, domid); > + libxl_device_pci *pci = prs->pci; > int rc, num; > uint32_t domainid = domid; > > @@ -2275,7 +2275,6 @@ static void device_pci_remove_common_next(libxl__egc *egc, > EGC_GC; > > /* Convenience aliases */ > - libxl_domid domid = prs->domid; > libxl_device_pci *const pci = prs->pci; > libxl__ao_device *const aodev = prs->aodev; > const unsigned int pfunc_mask = prs->pfunc_mask; > @@ -2293,7 +2292,7 @@ static void device_pci_remove_common_next(libxl__egc *egc, > } else { > pci->vdevfn = orig_vdev; > } > - do_pci_remove(egc, domid, pci, prs->force, prs); > + do_pci_remove(egc, prs); > return; > } > }
diff --git a/tools/libs/light/libxl_pci.c b/tools/libs/light/libxl_pci.c index de617e95eb..41e4b2b571 100644 --- a/tools/libs/light/libxl_pci.c +++ b/tools/libs/light/libxl_pci.c @@ -1871,14 +1871,14 @@ static void pci_remove_stubdom_done(libxl__egc *egc, static void pci_remove_done(libxl__egc *egc, pci_remove_state *prs, int rc); -static void do_pci_remove(libxl__egc *egc, uint32_t domid, - libxl_device_pci *pci, int force, - pci_remove_state *prs) +static void do_pci_remove(libxl__egc *egc, pci_remove_state *prs) { STATE_AO_GC(prs->aodev->ao); libxl_ctx *ctx = libxl__gc_owner(gc); libxl_device_pci *assigned; + uint32_t domid = prs->domid; libxl_domain_type type = libxl__domain_type(gc, domid); + libxl_device_pci *pci = prs->pci; int rc, num; uint32_t domainid = domid; @@ -2275,7 +2275,6 @@ static void device_pci_remove_common_next(libxl__egc *egc, EGC_GC; /* Convenience aliases */ - libxl_domid domid = prs->domid; libxl_device_pci *const pci = prs->pci; libxl__ao_device *const aodev = prs->aodev; const unsigned int pfunc_mask = prs->pfunc_mask; @@ -2293,7 +2292,7 @@ static void device_pci_remove_common_next(libxl__egc *egc, } else { pci->vdevfn = orig_vdev; } - do_pci_remove(egc, domid, pci, prs->force, prs); + do_pci_remove(egc, prs); return; } }