PCI/P2PDMA: Use for_each_pci_dev() helper
Use for_each_pci_dev() instead of open-coding it. No functional change. Link: https://lore.kernel.org/r/20220916140329.679633-1-yangyingliang@huawei.com Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
This commit is contained in:
parent
568035b01c
commit
e01bae16a7
@ -649,7 +649,7 @@ struct pci_dev *pci_p2pmem_find_many(struct device **clients, int num_clients)
|
||||
if (!closest_pdevs)
|
||||
return NULL;
|
||||
|
||||
while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
|
||||
for_each_pci_dev(pdev) {
|
||||
if (!pci_has_p2pmem(pdev))
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user