提交 5fc601e7 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 b4a44ec2
...@@ -2590,19 +2590,6 @@ virZPCIDeviceAddressIsEmpty(const virZPCIDeviceAddress *addr) ...@@ -2590,19 +2590,6 @@ virZPCIDeviceAddressIsEmpty(const virZPCIDeviceAddress *addr)
#ifdef __linux__ #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 virPCIDeviceAddressPtr
virPCIGetDeviceAddressFromSysfsLink(const char *device_link) virPCIGetDeviceAddressFromSysfsLink(const char *device_link)
{ {
...@@ -2787,7 +2774,7 @@ virPCIGetVirtualFunctionIndex(const char *pf_sysfs_device_link, ...@@ -2787,7 +2774,7 @@ virPCIGetVirtualFunctionIndex(const char *pf_sysfs_device_link,
} }
for (i = 0; i < num_virt_fns; i++) { 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; *vf_index = i;
ret = 0; ret = 0;
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册