mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
qemu: remove qemuDomainPCIAddressReserveNextAddr()
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).
This commit is contained in:
parent
27b0f971c4
commit
c5aea19d56
@ -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
|
static int
|
||||||
qemuDomainPCIAddressReserveNextSlot(virDomainPCIAddressSetPtr addrs,
|
qemuDomainPCIAddressReserveNextSlot(virDomainPCIAddressSetPtr addrs,
|
||||||
virDomainDeviceInfoPtr dev)
|
virDomainDeviceInfoPtr dev)
|
||||||
{
|
{
|
||||||
return qemuDomainPCIAddressReserveNextAddr(addrs, dev, -1);
|
return virDomainPCIAddressReserveNextAddr(addrs, dev,
|
||||||
|
dev->pciConnectFlags, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1688,8 +1678,9 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def,
|
|||||||
} else {
|
} else {
|
||||||
/* This is the first part of the controller, so need
|
/* This is the first part of the controller, so need
|
||||||
* to find a free slot & then reserve this function */
|
* to find a free slot & then reserve this function */
|
||||||
if (qemuDomainPCIAddressReserveNextAddr(addrs, &cont->info,
|
if (virDomainPCIAddressReserveNextAddr(addrs, &cont->info,
|
||||||
addr.function) < 0) {
|
cont->info.pciConnectFlags,
|
||||||
|
addr.function) < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user