virpci: Drop duplicate function

We have two functions: virPCIDeviceAddressIsEqual() defined only
on Linux and virPCIDeviceAddressEqual() defined everywhere. And
both of them do the same. Drop the former in favour of the
latter.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Michal Privoznik 2019-07-18 20:28:15 +02:00
parent b4a44ec272
commit 5fc601e7a6

View File

@ -2590,19 +2590,6 @@ virZPCIDeviceAddressIsEmpty(const virZPCIDeviceAddress *addr)
#ifdef __linux__
/*
* returns true if equal
*/
static bool
virPCIDeviceAddressIsEqual(virPCIDeviceAddressPtr bdf1,
virPCIDeviceAddressPtr bdf2)
{
return ((bdf1->domain == bdf2->domain) &&
(bdf1->bus == bdf2->bus) &&
(bdf1->slot == bdf2->slot) &&
(bdf1->function == bdf2->function));
}
virPCIDeviceAddressPtr
virPCIGetDeviceAddressFromSysfsLink(const char *device_link)
{
@ -2787,7 +2774,7 @@ virPCIGetVirtualFunctionIndex(const char *pf_sysfs_device_link,
}
for (i = 0; i < num_virt_fns; i++) {
if (virPCIDeviceAddressIsEqual(vf_bdf, virt_fns[i])) {
if (virPCIDeviceAddressEqual(vf_bdf, virt_fns[i])) {
*vf_index = i;
ret = 0;
break;