From 33b62676f8dee18bb85a64b33b86abef49d94a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 26 Nov 2019 16:53:53 +0000 Subject: [PATCH] conf: drop virCapsPtr param from device post parse callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit None of the impls of this callback require the virCapsPtr param. Reviewed-by: Michal Privoznik Signed-off-by: Daniel P. Berrangé --- src/bhyve/bhyve_domain.c | 1 - src/conf/domain_conf.c | 20 +++++++------------- src/conf/domain_conf.h | 1 - src/libxl/libxl_domain.c | 1 - src/lxc/lxc_domain.c | 1 - src/openvz/openvz_conf.c | 1 - src/phyp/phyp_driver.c | 1 - src/qemu/qemu_domain.c | 1 - src/vmware/vmware_driver.c | 1 - src/vmx/vmx.c | 1 - src/vz/vz_driver.c | 1 - 11 files changed, 7 insertions(+), 23 deletions(-) diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c index c8d33b4e00..82910ea261 100644 --- a/src/bhyve/bhyve_domain.c +++ b/src/bhyve/bhyve_domain.c @@ -132,7 +132,6 @@ bhyveDomainDiskDefAssignAddress(bhyveConnPtr driver, static int bhyveDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, const virDomainDef *def, - virCapsPtr caps G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED, void *opaque, void *parseOpaque G_GNUC_UNUSED) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index fd38f0b798..87be5afb5e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -5215,7 +5215,6 @@ virDomainVsockDefPostParse(virDomainVsockDefPtr vsock) static int virDomainDeviceDefPostParseCommon(virDomainDeviceDefPtr dev, const virDomainDef *def, - virCapsPtr caps G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED, virDomainXMLOptionPtr xmlopt) { @@ -5470,7 +5469,6 @@ virDomainDeviceDefPostParseCheckFeatures(virDomainDeviceDefPtr dev, static int virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, const virDomainDef *def, - virCapsPtr caps, unsigned int flags, virDomainXMLOptionPtr xmlopt, void *parseOpaque) @@ -5478,14 +5476,14 @@ virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, int ret; if (xmlopt->config.devicesPostParseCallback) { - ret = xmlopt->config.devicesPostParseCallback(dev, def, caps, flags, + ret = xmlopt->config.devicesPostParseCallback(dev, def, flags, xmlopt->config.priv, parseOpaque); if (ret < 0) return ret; } - if ((ret = virDomainDeviceDefPostParseCommon(dev, def, caps, flags, xmlopt)) < 0) + if ((ret = virDomainDeviceDefPostParseCommon(dev, def, flags, xmlopt)) < 0) return ret; if (virDomainDeviceDefPostParseCheckFeatures(dev, xmlopt) < 0) @@ -5497,7 +5495,6 @@ virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, static int virDomainDeviceDefPostParseOne(virDomainDeviceDefPtr dev, const virDomainDef *def, - virCapsPtr caps, unsigned int flags, virDomainXMLOptionPtr xmlopt, void *parseOpaque) @@ -5513,7 +5510,7 @@ virDomainDeviceDefPostParseOne(virDomainDeviceDefPtr dev, parseOpaque = data; } - ret = virDomainDeviceDefPostParse(dev, def, caps, flags, xmlopt, parseOpaque); + ret = virDomainDeviceDefPostParse(dev, def, flags, xmlopt, parseOpaque); if (data && xmlopt->config.domainPostParseDataFree) xmlopt->config.domainPostParseDataFree(data); @@ -5523,7 +5520,6 @@ virDomainDeviceDefPostParseOne(virDomainDeviceDefPtr dev, struct virDomainDefPostParseDeviceIteratorData { - virCapsPtr caps; virDomainXMLOptionPtr xmlopt; void *parseOpaque; unsigned int parseFlags; @@ -5537,7 +5533,7 @@ virDomainDefPostParseDeviceIterator(virDomainDefPtr def, void *opaque) { struct virDomainDefPostParseDeviceIteratorData *data = opaque; - return virDomainDeviceDefPostParse(dev, def, data->caps, + return virDomainDeviceDefPostParse(dev, def, data->parseFlags, data->xmlopt, data->parseOpaque); } @@ -5814,7 +5810,7 @@ virDomainDefPostParseCheckFailure(virDomainDefPtr def, int virDomainDefPostParse(virDomainDefPtr def, - virCapsPtr caps, + virCapsPtr caps G_GNUC_UNUSED, unsigned int parseFlags, virDomainXMLOptionPtr xmlopt, void *parseOpaque) @@ -5822,7 +5818,6 @@ virDomainDefPostParse(virDomainDefPtr def, int ret = -1; bool localParseOpaque = false; struct virDomainDefPostParseDeviceIteratorData data = { - .caps = caps, .xmlopt = xmlopt, .parseFlags = parseFlags, .parseOpaque = parseOpaque, @@ -7125,7 +7120,6 @@ virDomainDefValidate(virDomainDefPtr def, virDomainXMLOptionPtr xmlopt) { struct virDomainDefPostParseDeviceIteratorData data = { - .caps = caps, .xmlopt = xmlopt, .parseFlags = parseFlags, }; @@ -16427,7 +16421,7 @@ virDomainVsockDefParseXML(virDomainXMLOptionPtr xmlopt, virDomainDeviceDefPtr virDomainDeviceDefParse(const char *xmlStr, const virDomainDef *def, - virCapsPtr caps, + virCapsPtr caps G_GNUC_UNUSED, virDomainXMLOptionPtr xmlopt, void *parseOpaque, unsigned int flags) @@ -16585,7 +16579,7 @@ virDomainDeviceDefParse(const char *xmlStr, } /* callback to fill driver specific device aspects */ - if (virDomainDeviceDefPostParseOne(dev, def, caps, flags, + if (virDomainDeviceDefPostParseOne(dev, def, flags, xmlopt, parseOpaque) < 0) return NULL; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 2903ebe9ba..844340e67c 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2648,7 +2648,6 @@ typedef int (*virDomainDefPostParseCallback)(virDomainDefPtr def, * private data). */ typedef int (*virDomainDeviceDefPostParseCallback)(virDomainDeviceDefPtr dev, const virDomainDef *def, - virCapsPtr caps, unsigned int parseFlags, void *opaque, void *parseOpaque); diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 2524d17eb4..dfc8d8b611 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -278,7 +278,6 @@ virDomainXMLPrivateDataCallbacks libxlDomainXMLPrivateDataCallbacks = { static int libxlDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, const virDomainDef *def, - virCapsPtr caps G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED, void *parseOpaque G_GNUC_UNUSED) diff --git a/src/lxc/lxc_domain.c b/src/lxc/lxc_domain.c index 8b27bc95af..2439ec4f4b 100644 --- a/src/lxc/lxc_domain.c +++ b/src/lxc/lxc_domain.c @@ -376,7 +376,6 @@ virLXCDomainDefPostParse(virDomainDefPtr def, static int virLXCDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, const virDomainDef *def G_GNUC_UNUSED, - virCapsPtr caps G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED, void *parseOpaque G_GNUC_UNUSED) diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index 5057f9652e..a15d68d37f 100644 --- a/src/openvz/openvz_conf.c +++ b/src/openvz/openvz_conf.c @@ -1103,7 +1103,6 @@ openvzDomainDefPostParse(virDomainDefPtr def, static int openvzDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, const virDomainDef *def G_GNUC_UNUSED, - virCapsPtr caps G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED, void *parseOpaque G_GNUC_UNUSED) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 3c809378c3..b22063642e 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -1079,7 +1079,6 @@ phypDomainDefPostParse(virDomainDefPtr def, static int phypDomainDeviceDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED, const virDomainDef *def G_GNUC_UNUSED, - virCapsPtr caps G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED, void *parseOpaque G_GNUC_UNUSED) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 9c013a21ae..24aae6fb82 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8031,7 +8031,6 @@ qemuDomainHostdevDefPostParse(virDomainHostdevDefPtr hostdev, static int qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, const virDomainDef *def, - virCapsPtr caps G_GNUC_UNUSED, unsigned int parseFlags, void *opaque, void *parseOpaque) diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index 301f43d9e8..eb2fcd438b 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -133,7 +133,6 @@ vmwareDomainDefPostParse(virDomainDefPtr def, static int vmwareDomainDeviceDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED, const virDomainDef *def G_GNUC_UNUSED, - virCapsPtr caps G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED, void *parseOpaque G_GNUC_UNUSED) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 3f8324ce89..093092b701 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -546,7 +546,6 @@ virVMXDomainDefPostParse(virDomainDefPtr def, static int virVMXDomainDevicesDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED, const virDomainDef *def G_GNUC_UNUSED, - virCapsPtr caps G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED, void *parseOpaque G_GNUC_UNUSED) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index f54bdd49db..78aa85825a 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -271,7 +271,6 @@ vzDomainDefValidate(const virDomainDef *def, static int vzDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, const virDomainDef *def, - virCapsPtr caps G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED, void *parseOpaque G_GNUC_UNUSED) -- GitLab