From: Yishai Hadas <yishaih@nvidia.com>
To: <bhelgaas@google.com>, <corbet@lwn.net>,
<alex.williamson@redhat.com>, <diana.craciun@oss.nxp.com>,
<kwankhede@nvidia.com>, <eric.auger@redhat.com>,
<masahiroy@kernel.org>, <michal.lkml@markovi.net>
Cc: <linux-pci@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<kvm@vger.kernel.org>, <linux-s390@vger.kernel.org>,
<linux-kbuild@vger.kernel.org>, <mgurtovoy@nvidia.com>,
<jgg@nvidia.com>, <yishaih@nvidia.com>, <maorg@nvidia.com>,
<leonro@nvidia.com>
Subject: [PATCH V2 04/12] vfio/pci: Rename ops functions to fit core namings
Date: Wed, 18 Aug 2021 18:15:58 +0300 [thread overview]
Message-ID: <20210818151606.202815-5-yishaih@nvidia.com> (raw)
In-Reply-To: <20210818151606.202815-1-yishaih@nvidia.com>
From: Max Gurtovoy <mgurtovoy@nvidia.com>
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>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
---
drivers/vfio/pci/vfio_pci_core.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c
index 2729479390a0..ee5c8fe2a324 100644
--- a/drivers/vfio/pci/vfio_pci_core.c
+++ b/drivers/vfio/pci/vfio_pci_core.c
@@ -533,7 +533,7 @@ static void vfio_pci_vf_token_user_add(struct vfio_pci_core_device *vdev, int va
vfio_device_put(&pf_vdev->vdev);
}
-static void vfio_pci_close_device(struct vfio_device *core_vdev)
+static void vfio_pci_core_close_device(struct vfio_device *core_vdev)
{
struct vfio_pci_core_device *vdev =
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)
mutex_unlock(&vdev->igate);
}
-static int vfio_pci_open_device(struct vfio_device *core_vdev)
+static int vfio_pci_core_open_device(struct vfio_device *core_vdev)
{
struct vfio_pci_core_device *vdev =
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,
return 0;
}
-static long vfio_pci_ioctl(struct vfio_device *core_vdev,
+static long vfio_pci_core_ioctl(struct vfio_device *core_vdev,
unsigned int cmd, unsigned long arg)
{
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,
return -EINVAL;
}
-static ssize_t vfio_pci_read(struct vfio_device *core_vdev, char __user *buf,
+static ssize_t vfio_pci_core_read(struct vfio_device *core_vdev, char __user *buf,
size_t count, loff_t *ppos)
{
struct vfio_pci_core_device *vdev =
@@ -1314,7 +1314,7 @@ static ssize_t vfio_pci_read(struct vfio_device *core_vdev, char __user *buf,
return vfio_pci_rw(vdev, buf, count, ppos, false);
}
-static ssize_t vfio_pci_write(struct vfio_device *core_vdev, const char __user *buf,
+static ssize_t vfio_pci_core_write(struct vfio_device *core_vdev, const char __user *buf,
size_t count, loff_t *ppos)
{
struct vfio_pci_core_device *vdev =
@@ -1533,7 +1533,7 @@ static const struct vm_operations_struct vfio_pci_mmap_ops = {
.fault = vfio_pci_mmap_fault,
};
-static int vfio_pci_mmap(struct vfio_device *core_vdev, struct vm_area_struct *vma)
+static int vfio_pci_core_mmap(struct vfio_device *core_vdev, struct vm_area_struct *vma)
{
struct vfio_pci_core_device *vdev =
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
return 0;
}
-static void vfio_pci_request(struct vfio_device *core_vdev, unsigned int count)
+static void vfio_pci_core_request(struct vfio_device *core_vdev, unsigned int count)
{
struct vfio_pci_core_device *vdev =
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,
#define VF_TOKEN_ARG "vf_token="
-static int vfio_pci_match(struct vfio_device *core_vdev, char *buf)
+static int vfio_pci_core_match(struct vfio_device *core_vdev, char *buf)
{
struct vfio_pci_core_device *vdev =
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)
static const struct vfio_device_ops vfio_pci_ops = {
.name = "vfio-pci",
- .open_device = vfio_pci_open_device,
- .close_device = vfio_pci_close_device,
- .ioctl = vfio_pci_ioctl,
- .read = vfio_pci_read,
- .write = vfio_pci_write,
- .mmap = vfio_pci_mmap,
- .request = vfio_pci_request,
- .match = vfio_pci_match,
+ .open_device = vfio_pci_core_open_device,
+ .close_device = vfio_pci_core_close_device,
+ .ioctl = vfio_pci_core_ioctl,
+ .read = vfio_pci_core_read,
+ .write = vfio_pci_core_write,
+ .mmap = vfio_pci_core_mmap,
+ .request = vfio_pci_core_request,
+ .match = vfio_pci_core_match,
};
static int vfio_pci_bus_notifier(struct notifier_block *nb,
--
2.18.1
next prev parent reply other threads:[~2021-08-18 15:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 15:15 [PATCH V2 00/12] Introduce vfio_pci_core subsystem Yishai Hadas
2021-08-18 15:15 ` [PATCH V2 01/12] vfio/pci: Rename vfio_pci.c to vfio_pci_core.c Yishai Hadas
2021-08-18 15:15 ` [PATCH V2 02/12] vfio/pci: Rename vfio_pci_private.h to vfio_pci_core.h Yishai Hadas
2021-08-18 15:15 ` [PATCH V2 03/12] vfio/pci: Rename vfio_pci_device to vfio_pci_core_device Yishai Hadas
2021-08-18 15:15 ` Yishai Hadas [this message]
2021-08-18 15:15 ` [PATCH V2 05/12] vfio/pci: Include vfio header in vfio_pci_core.h Yishai Hadas
2021-08-18 15:16 ` [PATCH V2 06/12] vfio/pci: Split the pci_driver code out of vfio_pci_core.c Yishai Hadas
2021-08-19 21:12 ` Alex Williamson
2021-08-19 21:38 ` Alex Williamson
2021-08-19 22:36 ` Jason Gunthorpe
2021-08-18 15:16 ` [PATCH V2 07/12] vfio/pci: Move igd initialization to vfio_pci.c Yishai Hadas
2021-08-18 15:16 ` [PATCH V2 08/12] vfio/pci: Move module parameters " Yishai Hadas
2021-08-18 15:16 ` [PATCH V2 09/12] PCI: Add 'override_only' bitmap to struct pci_device_id Yishai Hadas
2021-08-19 15:15 ` Bjorn Helgaas
2021-08-19 16:16 ` Yishai Hadas
2021-08-19 16:39 ` Bjorn Helgaas
2021-08-19 19:57 ` Max Gurtovoy
2021-08-19 22:19 ` Alex Williamson
2021-08-18 15:16 ` [PATCH V2 10/12] vfio: Use select for eventfd Yishai Hadas
2021-08-18 15:16 ` [PATCH V2 11/12] vfio: Use kconfig if XX/endif blocks instead of repeating 'depends on' Yishai Hadas
2021-08-18 15:16 ` [PATCH V2 12/12] vfio/pci: Introduce vfio_pci_core.ko Yishai Hadas
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=20210818151606.202815-5-yishaih@nvidia.com \
--to=yishaih@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=corbet@lwn.net \
--cc=diana.craciun@oss.nxp.com \
--cc=eric.auger@redhat.com \
--cc=jgg@nvidia.com \
--cc=kvm@vger.kernel.org \
--cc=kwankhede@nvidia.com \
--cc=leonro@nvidia.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=maorg@nvidia.com \
--cc=masahiroy@kernel.org \
--cc=mgurtovoy@nvidia.com \
--cc=michal.lkml@markovi.net \
/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;
as well as URLs for NNTP newsgroup(s).