[libvirt] [PATCH] qemu: Remove unused params from qemuDomainDeviceDefValidate

John Ferlan posted 1 patch 6 years, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20170901172309.9934-1-jferlan@redhat.com
src/qemu/qemu_domain.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
[libvirt] [PATCH] qemu: Remove unused params from qemuDomainDeviceDefValidate
Posted by John Ferlan 6 years, 6 months ago
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'.

Signed-off-by: John Ferlan <jferlan@redhat.com>
---
 Another rogue piece of unused data seen whilst working through the
 VxHS patches.

 src/qemu/qemu_domain.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index b98ffff..cd53c6f 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3302,10 +3302,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) {
@@ -3389,7 +3387,6 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
 
     ret = 0;
  cleanup:
-    virObjectUnref(cfg);
     return ret;
 }
 
-- 
2.9.5

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: Remove unused params from qemuDomainDeviceDefValidate
Posted by Martin Kletzander 6 years, 6 months ago
On Fri, Sep 01, 2017 at 01:23:09PM -0400, John Ferlan wrote:
>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'.
>
>Signed-off-by: John Ferlan <jferlan@redhat.com>
>---
> Another rogue piece of unused data seen whilst working through the
> VxHS patches.
>
> src/qemu/qemu_domain.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>

ACK
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list