From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-pci@vger.kernel.org>
Cc: <bhelgaas@google.com>, <logang@deltatee.com>, <hch@lst.de>,
<yangyingliang@huawei.com>
Subject: [PATCH -next] PCI/P2PDMA: Switch to use for_each_pci_dev() helper
Date: Fri, 16 Sep 2022 22:03:29 +0800 [thread overview]
Message-ID: <20220916140329.679633-1-yangyingliang@huawei.com> (raw)
Use for_each_pci_dev() instead of open-coding it.
No functional change.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/pci/p2pdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.25.1
next reply other threads:[~2022-09-16 13:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 14:03 Yang Yingliang [this message]
2022-09-16 15:12 ` [PATCH -next] PCI/P2PDMA: Switch to use for_each_pci_dev() helper Logan Gunthorpe
2022-09-19 18:45 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220916140329.679633-1-yangyingliang@huawei.com \
--to=yangyingliang@huawei.com \
--cc=bhelgaas@google.com \
--cc=hch@lst.de \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox