Skip to content

Commit e01bae1

Browse files
Yang Yingliangbjorn-helgaas
authored andcommitted
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>
1 parent 568035b commit e01bae1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/p2pdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ struct pci_dev *pci_p2pmem_find_many(struct device **clients, int num_clients)
649649
if (!closest_pdevs)
650650
return NULL;
651651

652-
while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
652+
for_each_pci_dev(pdev) {
653653
if (!pci_has_p2pmem(pdev))
654654
continue;
655655

0 commit comments

Comments
 (0)