Skip to content

Commit

Permalink
PCI/P2PDMA: Use for_each_pci_dev() helper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yang Yingliang authored and Bjorn Helgaas committed Sep 19, 2022
1 parent 568035b commit e01bae1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/p2pdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e01bae1

Please sign in to comment.