Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-pci@vger.kernel.org, bhelgaas@google.com,
	logang@deltatee.com, hch@lst.de
Subject: Re: [PATCH -next] PCI/P2PDMA: Switch to use for_each_pci_dev() helper
Date: Mon, 19 Sep 2022 13:45:43 -0500	[thread overview]
Message-ID: <20220919184543.GA1022568@bhelgaas> (raw)
In-Reply-To: <20220916140329.679633-1-yangyingliang@huawei.com>

On Fri, Sep 16, 2022 at 10:03:29PM +0800, Yang Yingliang wrote:
> Use for_each_pci_dev() instead of open-coding it.
> No functional change.
> 
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Applied with Logan's Reviewed-by to pci/misc for v6.1, thanks!

> ---
>  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
> 

      parent reply	other threads:[~2022-09-19 18:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 14:03 [PATCH -next] PCI/P2PDMA: Switch to use for_each_pci_dev() helper Yang Yingliang
2022-09-16 15:12 ` Logan Gunthorpe
2022-09-19 18:45 ` Bjorn Helgaas [this message]

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=20220919184543.GA1022568@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=hch@lst.de \
    --cc=linux-pci@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=yangyingliang@huawei.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