vfio/pci: Have all VFIO PCI drivers store the vfio_pci_core_device in drvdata
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 11 May 2022 19:19:07 +0000 (13:19 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 11 May 2022 19:32:56 +0000 (13:32 -0600)
commit91be0bd6c6cf21328017e990d3ceeb00f03821fd
tree646fde177d80ac18c2905f10af4ce69a6ce26694
parenteadd86f835c63769febbd056dfcb70dafef0d4b3
vfio/pci: Have all VFIO PCI drivers store the vfio_pci_core_device in drvdata

Having a consistent pointer in the drvdata will allow the next patch to
make use of the drvdata from some of the core code helpers.

Use a WARN_ON inside vfio_pci_core_register_device() to detect drivers
that miss this.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/1-v4-c841817a0349+8f-vfio_get_from_dev_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
drivers/vfio/pci/mlx5/main.c
drivers/vfio/pci/vfio_pci.c
drivers/vfio/pci/vfio_pci_core.c