]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Remove unused params from qemuDomainDeviceDefValidate
authorJohn Ferlan <jferlan@redhat.com>
Fri, 1 Sep 2017 17:16:17 +0000 (13:16 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 5 Sep 2017 14:56:58 +0000 (10:56 -0400)
Neither @cfg nor (now) @driver is used in the API, so remove them
and mark @opaque as UNUSED.

NB: Commit id 'fa3c558596' dropped the unused @qemuCaps which was the
last consumer of @driver other than @cfg, but even @cfg was never used
even in the original implementation from commit id 'd987f63a'.

src/qemu/qemu_domain.c

index c3f8b8f8f7e94f57ac9f9b324355f2bab080bbe4..9cff50100630ea83b6d702a1d8b9f3d0cda393c7 100644 (file)
@@ -3303,10 +3303,8 @@ qemuDomainRedirdevDefValidate(const virDomainRedirdevDef *def)
 static int
 qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
                             const virDomainDef *def ATTRIBUTE_UNUSED,
-                            void *opaque)
+                            void *opaque ATTRIBUTE_UNUSED)
 {
-    virQEMUDriverPtr driver = opaque;
-    virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
     int ret = -1;
 
     if (dev->type == VIR_DOMAIN_DEVICE_NET) {
@@ -3390,7 +3388,6 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
 
     ret = 0;
  cleanup:
-    virObjectUnref(cfg);
     return ret;
 }