[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: fix places missed by spatch
commit 1b92b94c581270bd72588e06e304a88738cafd8e Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Fri Oct 2 15:56:41 2015 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Wed Oct 7 12:30:36 2015 +0100 libxl: fix places missed by spatch The spatch provided in previous patch didn't handle all sites that need transformation. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl.c | 17 ++++++++--------- tools/libxl/libxl_create.c | 4 ++-- tools/libxl/libxl_pci.c | 43 +++++++++++++++++++------------------------ tools/libxl/libxl_x86.c | 10 +++++----- 4 files changed, 34 insertions(+), 40 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index ca725a9..22bbc29 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1221,11 +1221,10 @@ static void domain_death_xswatch_callback(libxl__egc *egc, libxl__ev_xswatch *w, } gotend = &domaininfos[rc]; - LIBXL__LOG(CTX, LIBXL__LOG_DEBUG, "[evg=%p:%"PRIu32"]" - " nentries=%d rc=%d %ld..%ld", - evg, evg->domid, nentries, rc, - rc>0 ? (long)domaininfos[0].domain : 0, - rc>0 ? (long)domaininfos[rc-1].domain : 0); + LOG(DEBUG, "[evg=%p:%"PRIu32"] nentries=%d rc=%d %ld..%ld", + evg, evg->domid, nentries, rc, + rc>0 ? (long)domaininfos[0].domain : 0, + rc>0 ? (long)domaininfos[rc-1].domain : 0); for (;;) { if (!evg) { @@ -1233,10 +1232,10 @@ static void domain_death_xswatch_callback(libxl__egc *egc, libxl__ev_xswatch *w, goto all_reported; } - LIBXL__LOG(CTX, LIBXL__LOG_DEBUG, "[evg=%p:%"PRIu32"]" - " got=domaininfos[%d] got->domain=%ld", - evg, evg->domid, (int)(got - domaininfos), - got < gotend ? (long)got->domain : -1L); + LOG(DEBUG, "[evg=%p:%"PRIu32"]" + " got=domaininfos[%d] got->domain=%ld", + evg, evg->domid, (int)(got - domaininfos), + got < gotend ? (long)got->domain : -1L); if (!rc) { domain_death_occurred(egc, &evg, "empty list"); diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 30380ec..f0fee00 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -97,8 +97,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, if (rc < 0) { /* qemu-xen unavailable, use qemu-xen-traditional */ if (errno == ENOENT) { - LIBXL__LOG_ERRNO(CTX, XTL_VERBOSE, "qemu-xen is unavailable" - ", use qemu-xen-traditional instead"); + LOGE(VERBOSE, "qemu-xen is unavailable" + ", use qemu-xen-traditional instead"); b_info->device_model_version = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL; } else { diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 378f6b0..fad2eb6 100644 --- a/tools/libxl/libxl_pci.c +++ b/tools/libxl/libxl_pci.c @@ -768,7 +768,6 @@ static int libxl__device_pci_assignable_add(libxl__gc *gc, libxl_device_pci *pcidev, int rebind) { - libxl_ctx *ctx = libxl__gc_owner(gc); unsigned dom, bus, dev, func; char *spath, *driver_path = NULL; int rc; @@ -793,16 +792,14 @@ static int libxl__device_pci_assignable_add(libxl__gc *gc, return ERROR_FAIL; } if ( rc ) { - LIBXL__LOG(ctx, LIBXL__LOG_WARNING, PCI_BDF" already assigned to pciback", - dom, bus, dev, func); + LOG(WARN, PCI_BDF" already assigned to pciback", dom, bus, dev, func); return 0; } /* Check to see if there's already a driver that we need to unbind from */ if ( sysfs_dev_unbind(gc, pcidev, &driver_path ) ) { - LIBXL__LOG(ctx, LIBXL__LOG_ERROR, - "Couldn't unbind "PCI_BDF" from driver", - dom, bus, dev, func); + LOG(ERROR, "Couldn't unbind "PCI_BDF" from driver", + dom, bus, dev, func); return ERROR_FAIL; } @@ -812,13 +809,11 @@ static int libxl__device_pci_assignable_add(libxl__gc *gc, pci_assignable_driver_path_write(gc, pcidev, driver_path); } else if ( (driver_path = pci_assignable_driver_path_read(gc, pcidev)) != NULL ) { - LIBXL__LOG(ctx, LIBXL__LOG_INFO, - PCI_BDF" not bound to a driver, will be rebound to %s", - dom, bus, dev, func, driver_path); + LOG(INFO, PCI_BDF" not bound to a driver, will be rebound to %s", + dom, bus, dev, func, driver_path); } else { - LIBXL__LOG(ctx, LIBXL__LOG_WARNING, - PCI_BDF" not bound to a driver, will not be rebound.", - dom, bus, dev, func); + LOG(WARN, PCI_BDF" not bound to a driver, will not be rebound.", + dom, bus, dev, func); } } else { pci_assignable_driver_path_remove(gc, pcidev); @@ -906,7 +901,6 @@ int libxl_device_pci_assignable_remove(libxl_ctx *ctx, libxl_device_pci *pcidev, */ static int pci_multifunction_check(libxl__gc *gc, libxl_device_pci *pcidev, unsigned int *func_mask) { - libxl_ctx *ctx = libxl__gc_owner(gc); struct dirent *de; DIR *dir; @@ -935,8 +929,8 @@ static int pci_multifunction_check(libxl__gc *gc, libxl_device_pci *pcidev, unsi path = libxl__sprintf(gc, "%s/" PCI_BDF, SYSFS_PCIBACK_DRIVER, dom, bus, dev, func); if ( lstat(path, &st) ) { if ( errno == ENOENT ) - LIBXL__LOG(ctx, LIBXL__LOG_ERROR, PCI_BDF " is not assigned to pciback driver", - dom, bus, dev, func); + LOG(ERROR, PCI_BDF " is not assigned to pciback driver", + dom, bus, dev, func); else LOGE(ERROR, "Couldn't lstat %s", path); closedir(dir); @@ -1134,7 +1128,6 @@ out: static int libxl__device_pci_reset(libxl__gc *gc, unsigned int domain, unsigned int bus, unsigned int dev, unsigned int func) { - libxl_ctx *ctx = libxl__gc_owner(gc); char *reset; int fd, rc; @@ -1160,7 +1153,9 @@ static int libxl__device_pci_reset(libxl__gc *gc, unsigned int domain, unsigned return rc < 0 ? rc : 0; } if (errno == ENOENT) { - LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "The kernel doesn't support reset from sysfs for PCI device "PCI_BDF, domain, bus, dev, func); + LOG(ERROR, + "The kernel doesn't support reset from sysfs for PCI device "PCI_BDF, + domain, bus, dev, func); } else { LOGE(ERROR, "Failed to access reset path %s", reset); } @@ -1214,11 +1209,11 @@ int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcide if (libxl__domain_type(gc, domid) == LIBXL_DOMAIN_TYPE_HVM) { rc = xc_test_assign_device(ctx->xch, domid, pcidev_encode_bdf(pcidev)); if (rc) { - LIBXL__LOG(ctx, LIBXL__LOG_ERROR, - "PCI device %04x:%02x:%02x.%u %s?", - pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func, - errno == ENOSYS ? "cannot be assigned - no IOMMU" - : "already assigned to a different guest"); + LOG(ERROR, + "PCI device %04x:%02x:%02x.%u %s?", + pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func, + errno == ENOSYS ? "cannot be assigned - no IOMMU" + : "already assigned to a different guest"); goto out; } } @@ -1233,8 +1228,8 @@ int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcide } if (!libxl_pcidev_assignable(ctx, pcidev)) { - LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "PCI device %x:%x:%x.%x is not assignable", - pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); + LOG(ERROR, "PCI device %x:%x:%x.%x is not assignable", + pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func); rc = ERROR_FAIL; goto out; } diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c index a3e50df..bedd941 100644 --- a/tools/libxl/libxl_x86.c +++ b/tools/libxl/libxl_x86.c @@ -91,11 +91,11 @@ static int e820_sanitize(libxl__gc *gc, struct e820entry src[], ram_end = e820[idx].addr + e820[idx].size; idx ++; - LIBXL__LOG(CTX, LIBXL__LOG_DEBUG, "Memory: %"PRIu64"kB End of RAM: " \ - "0x%"PRIx64" (PFN) Delta: %"PRIu64"kB, PCI start: %"PRIu64"kB " \ - "(0x%"PRIx64" PFN), Balloon %"PRIu64"kB\n", (uint64_t)map_limitkb, - ram_end >> 12, delta_kb, start_kb ,start >> 12, - (uint64_t)balloon_kb); + LOG(DEBUG, "Memory: %"PRIu64"kB End of RAM: " \ + "0x%"PRIx64" (PFN) Delta: %"PRIu64"kB, PCI start: %"PRIu64"kB " \ + "(0x%"PRIx64" PFN), Balloon %"PRIu64"kB\n", (uint64_t)map_limitkb, + ram_end >> 12, delta_kb, start_kb ,start >> 12, + (uint64_t)balloon_kb); /* This whole code below is to guard against if the Intel IGD is passed into -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |