mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
HV: define function bdf_is_equal() to compare bdf
Use a function to compare bdf instead and some related code cleanup Tracked-On: #2534 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -407,7 +407,7 @@ struct pci_pdev *find_pci_pdev(union pci_bdf pbdf)
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0U; i < num_pci_pdev; i++) {
|
||||
if (pci_pdev_array[i].bdf.value == pbdf.value) {
|
||||
if (bdf_is_equal(&pci_pdev_array[i].bdf, &pbdf)) {
|
||||
pdev = &pci_pdev_array[i];
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user