]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: remove qemuDomainPCIAddressReserveNextAddr()
authorLaine Stump <laine@laine.org>
Sun, 23 Oct 2016 22:11:06 +0000 (18:11 -0400)
committerLaine Stump <laine@laine.org>
Wed, 11 Jan 2017 09:59:42 +0000 (04:59 -0500)
This function is only called in two places, and the function itself is
just adding a single argument and calling
virDomainPCIAddressReserveNextAddr(), so we can remove it and instead
call virDomainPCIAddressReserveNextAddr() directly. (The main
motivation for doing this is to free up the name so that
qemuDomainPCIAddressReserveNextSlot() can be renamed in the next
patch, as its current name is now inaccurate and misleading).

src/qemu/qemu_domain_address.c

index 276a75a6608e7b8bba1c7bbf45853cfa121d172e..9575257fe9e64b36824b5a5660edf581327b6f4e 100644 (file)
@@ -934,22 +934,12 @@ qemuDomainFillDevicePCIConnectFlags(virDomainDefPtr def,
 }
 
 
-static int
-qemuDomainPCIAddressReserveNextAddr(virDomainPCIAddressSetPtr addrs,
-                                    virDomainDeviceInfoPtr dev,
-                                    unsigned int function)
-{
-    return virDomainPCIAddressReserveNextAddr(addrs, dev,
-                                              dev->pciConnectFlags,
-                                              function);
-}
-
-
 static int
 qemuDomainPCIAddressReserveNextSlot(virDomainPCIAddressSetPtr addrs,
                                     virDomainDeviceInfoPtr dev)
 {
-    return qemuDomainPCIAddressReserveNextAddr(addrs, dev, -1);
+    return virDomainPCIAddressReserveNextAddr(addrs, dev,
+                                              dev->pciConnectFlags, -1);
 }
 
 
@@ -1688,8 +1678,9 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def,
             } else {
                 /* This is the first part of the controller, so need
                  * to find a free slot & then reserve this function */
-                if (qemuDomainPCIAddressReserveNextAddr(addrs, &cont->info,
-                                                        addr.function) < 0) {
+                if (virDomainPCIAddressReserveNextAddr(addrs, &cont->info,
+                                                       cont->info.pciConnectFlags,
+                                                       addr.function) < 0) {
                     goto error;
                 }