mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brett Creeley <bcreeley@amd.com>
To: oushixiong <oushixiong@kylinos.cn>, Jason Gunthorpe <jgg@ziepe.ca>
Cc: Yishai Hadas <yishaih@nvidia.com>,
	Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
	Kevin Tian <kevin.tian@intel.com>,
	Brett Creeley <brett.creeley@amd.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfio/pds: Use proper PF device access helper
Date: Thu, 14 Sep 2023 10:31:53 -0700	[thread overview]
Message-ID: <08009a16-f6b6-f644-406e-ea3dd0a858f1@amd.com> (raw)
In-Reply-To: <20230914021332.1929155-1-oushixiong@kylinos.cn>

On 9/13/2023 7:13 PM, oushixiong wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> From: Shixiong Ou <oushixiong@kylinos.cn>
> 
> The pci_physfn() helper exists to support cases where the physfn
> field may not be compiled into the pci_dev structure. We've
> declared this driver dependent on PCI_IOV to avoid this problem,
> but regardless we should follow the precedent not to access this
> field directly.
> 
> Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
> ---
> 
> This patch changes the subject line and commit log, and the previous
> patch's links is:
>          https://patchwork.kernel.org/project/kvm/patch/20230911080828.635184-1-oushixiong@kylinos.cn/
> 
>   drivers/vfio/pci/pds/vfio_dev.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/vfio/pci/pds/vfio_dev.c b/drivers/vfio/pci/pds/vfio_dev.c
> index b46174f5eb09..649b18ee394b 100644
> --- a/drivers/vfio/pci/pds/vfio_dev.c
> +++ b/drivers/vfio/pci/pds/vfio_dev.c
> @@ -162,7 +162,7 @@ static int pds_vfio_init_device(struct vfio_device *vdev)
>          pci_id = PCI_DEVID(pdev->bus->number, pdev->devfn);
>          dev_dbg(&pdev->dev,
>                  "%s: PF %#04x VF %#04x vf_id %d domain %d pds_vfio %p\n",
> -               __func__, pci_dev_id(pdev->physfn), pci_id, vf_id,
> +               __func__, pci_dev_id(pci_physfn(pdev)), pci_id, vf_id,
>                  pci_domain_nr(pdev->bus), pds_vfio);
> 
>          return 0;
> --
> 2.25.1
> 

LGTM! Thanks again.

Reviewed-by: Brett Creeley <brett.creeley@amd.com>

  reply	other threads:[~2023-09-14 17:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14  2:13 oushixiong
2023-09-14 17:31 ` Brett Creeley [this message]
2023-09-15 18:58 ` Alex Williamson
2023-09-16  9:53   ` Tian, Kevin
2023-09-18 12:40     ` Jason Gunthorpe
2023-09-18 20:51 ` Alex Williamson

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=08009a16-f6b6-f644-406e-ea3dd0a858f1@amd.com \
    --to=bcreeley@amd.com \
    --cc=alex.williamson@redhat.com \
    --cc=brett.creeley@amd.com \
    --cc=jgg@ziepe.ca \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oushixiong@kylinos.cn \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=yishaih@nvidia.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

all inboxes | Powered by JetHome®