Skip to content

Commit bf9fdc9

Browse files
mgurtovoyAlex Williamson
authored andcommitted
vfio/pci: Rename ops functions to fit core namings
This is another preparation patch for separating the vfio_pci driver to a subsystem driver and a generic pci driver. This patch doesn't change any logic. Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Yishai Hadas <yishaih@nvidia.com> Link: https://lore.kernel.org/r/20210826103912.128972-5-yishaih@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
1 parent 5364751 commit bf9fdc9

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

drivers/vfio/pci/vfio_pci_core.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ static void vfio_pci_vf_token_user_add(struct vfio_pci_core_device *vdev, int va
533533
vfio_device_put(&pf_vdev->vdev);
534534
}
535535

536-
static void vfio_pci_close_device(struct vfio_device *core_vdev)
536+
static void vfio_pci_core_close_device(struct vfio_device *core_vdev)
537537
{
538538
struct vfio_pci_core_device *vdev =
539539
container_of(core_vdev, struct vfio_pci_core_device, vdev);
@@ -554,7 +554,7 @@ static void vfio_pci_close_device(struct vfio_device *core_vdev)
554554
mutex_unlock(&vdev->igate);
555555
}
556556

557-
static int vfio_pci_open_device(struct vfio_device *core_vdev)
557+
static int vfio_pci_core_open_device(struct vfio_device *core_vdev)
558558
{
559559
struct vfio_pci_core_device *vdev =
560560
container_of(core_vdev, struct vfio_pci_core_device, vdev);
@@ -727,7 +727,7 @@ int vfio_pci_register_dev_region(struct vfio_pci_core_device *vdev,
727727
return 0;
728728
}
729729

730-
static long vfio_pci_ioctl(struct vfio_device *core_vdev,
730+
static long vfio_pci_core_ioctl(struct vfio_device *core_vdev,
731731
unsigned int cmd, unsigned long arg)
732732
{
733733
struct vfio_pci_core_device *vdev =
@@ -1302,7 +1302,7 @@ static ssize_t vfio_pci_rw(struct vfio_pci_core_device *vdev, char __user *buf,
13021302
return -EINVAL;
13031303
}
13041304

1305-
static ssize_t vfio_pci_read(struct vfio_device *core_vdev, char __user *buf,
1305+
static ssize_t vfio_pci_core_read(struct vfio_device *core_vdev, char __user *buf,
13061306
size_t count, loff_t *ppos)
13071307
{
13081308
struct vfio_pci_core_device *vdev =
@@ -1314,7 +1314,7 @@ static ssize_t vfio_pci_read(struct vfio_device *core_vdev, char __user *buf,
13141314
return vfio_pci_rw(vdev, buf, count, ppos, false);
13151315
}
13161316

1317-
static ssize_t vfio_pci_write(struct vfio_device *core_vdev, const char __user *buf,
1317+
static ssize_t vfio_pci_core_write(struct vfio_device *core_vdev, const char __user *buf,
13181318
size_t count, loff_t *ppos)
13191319
{
13201320
struct vfio_pci_core_device *vdev =
@@ -1533,7 +1533,7 @@ static const struct vm_operations_struct vfio_pci_mmap_ops = {
15331533
.fault = vfio_pci_mmap_fault,
15341534
};
15351535

1536-
static int vfio_pci_mmap(struct vfio_device *core_vdev, struct vm_area_struct *vma)
1536+
static int vfio_pci_core_mmap(struct vfio_device *core_vdev, struct vm_area_struct *vma)
15371537
{
15381538
struct vfio_pci_core_device *vdev =
15391539
container_of(core_vdev, struct vfio_pci_core_device, vdev);
@@ -1604,7 +1604,7 @@ static int vfio_pci_mmap(struct vfio_device *core_vdev, struct vm_area_struct *v
16041604
return 0;
16051605
}
16061606

1607-
static void vfio_pci_request(struct vfio_device *core_vdev, unsigned int count)
1607+
static void vfio_pci_core_request(struct vfio_device *core_vdev, unsigned int count)
16081608
{
16091609
struct vfio_pci_core_device *vdev =
16101610
container_of(core_vdev, struct vfio_pci_core_device, vdev);
@@ -1720,7 +1720,7 @@ static int vfio_pci_validate_vf_token(struct vfio_pci_core_device *vdev,
17201720

17211721
#define VF_TOKEN_ARG "vf_token="
17221722

1723-
static int vfio_pci_match(struct vfio_device *core_vdev, char *buf)
1723+
static int vfio_pci_core_match(struct vfio_device *core_vdev, char *buf)
17241724
{
17251725
struct vfio_pci_core_device *vdev =
17261726
container_of(core_vdev, struct vfio_pci_core_device, vdev);
@@ -1772,14 +1772,14 @@ static int vfio_pci_match(struct vfio_device *core_vdev, char *buf)
17721772

17731773
static const struct vfio_device_ops vfio_pci_ops = {
17741774
.name = "vfio-pci",
1775-
.open_device = vfio_pci_open_device,
1776-
.close_device = vfio_pci_close_device,
1777-
.ioctl = vfio_pci_ioctl,
1778-
.read = vfio_pci_read,
1779-
.write = vfio_pci_write,
1780-
.mmap = vfio_pci_mmap,
1781-
.request = vfio_pci_request,
1782-
.match = vfio_pci_match,
1775+
.open_device = vfio_pci_core_open_device,
1776+
.close_device = vfio_pci_core_close_device,
1777+
.ioctl = vfio_pci_core_ioctl,
1778+
.read = vfio_pci_core_read,
1779+
.write = vfio_pci_core_write,
1780+
.mmap = vfio_pci_core_mmap,
1781+
.request = vfio_pci_core_request,
1782+
.match = vfio_pci_core_match,
17831783
};
17841784

17851785
static int vfio_pci_bus_notifier(struct notifier_block *nb,

0 commit comments

Comments
 (0)