summaryrefslogtreecommitdiff
path: root/drivers/pci/p2pdma.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-09-16 22:03:29 +0800
committerBjorn Helgaas <bhelgaas@google.com>2022-09-19 13:44:38 -0500
commite01bae16a7d68931f0450cb079479c4a8f56d3e3 (patch)
treea782e1a64632af544e9bd22923a0ed36e415f690 /drivers/pci/p2pdma.c
parent568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff)
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>
Diffstat (limited to 'drivers/pci/p2pdma.c')
-rw-r--r--drivers/pci/p2pdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index 4496a7c5c478..88dc66ee1c46 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -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;