diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-09-16 16:03:29 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2022-09-19 20:44:38 +0200 |
commit | e01bae16a7d68931f0450cb079479c4a8f56d3e3 (patch) | |
tree | a782e1a64632af544e9bd22923a0ed36e415f690 /drivers/pci/p2pdma.c | |
parent | Linux 6.0-rc1 (diff) | |
download | linux-e01bae16a7d68931f0450cb079479c4a8f56d3e3.tar.xz linux-e01bae16a7d68931f0450cb079479c4a8f56d3e3.zip |
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.c | 2 |
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; |