mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
vfio/pds: Use proper PF device access helper
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> Reviewed-by: Brett Creeley <brett.creeley@amd.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20230914021332.1929155-1-oushixiong@kylinos.cn Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
5a59f2ff30
commit
27004f89b0
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue