summaryrefslogtreecommitdiffstats
path: root/drivers/vfio
diff options
context:
space:
mode:
authorXiongwei Song <sxwjean@gmail.com>2017-12-22 07:12:26 +0800
committerAlex Williamson <alex.williamson@redhat.com>2018-01-09 12:13:08 -0700
commit46ed90f157f42d956ffed17c003f089a59b76e3e (patch)
tree80181a9ee7923d4f687f67239868a6c73222227c /drivers/vfio
parenta32295c612c57990d17fb0f41e7134394b2f35f6 (diff)
downloadlinux-stable-46ed90f157f42d956ffed17c003f089a59b76e3e.tar.gz
linux-stable-46ed90f157f42d956ffed17c003f089a59b76e3e.tar.bz2
linux-stable-46ed90f157f42d956ffed17c003f089a59b76e3e.zip
vfio: mdev: make a couple of functions and structure vfio_mdev_driver static
The functions vfio_mdev_probe, vfio_mdev_remove and the structure vfio_mdev_driver are only used in this file, so make them static. Clean up sparse warnings: drivers/vfio/mdev/vfio_mdev.c:114:5: warning: no previous prototype for 'vfio_mdev_probe' [-Wmissing-prototypes] drivers/vfio/mdev/vfio_mdev.c:121:6: warning: no previous prototype for 'vfio_mdev_remove' [-Wmissing-prototypes] Signed-off-by: Xiongwei Song <sxwjean@gmail.com> Reviewed-by: Quan Xu <quan.xu0@gmail.com> Reviewed-by: Liu, Yi L <yi.l.liu@intel.com> Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio')
-rw-r--r--drivers/vfio/mdev/vfio_mdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c
index fa848a701b8b..d230620fe02d 100644
--- a/drivers/vfio/mdev/vfio_mdev.c
+++ b/drivers/vfio/mdev/vfio_mdev.c
@@ -111,19 +111,19 @@ static const struct vfio_device_ops vfio_mdev_dev_ops = {
.mmap = vfio_mdev_mmap,
};
-int vfio_mdev_probe(struct device *dev)
+static int vfio_mdev_probe(struct device *dev)
{
struct mdev_device *mdev = to_mdev_device(dev);
return vfio_add_group_dev(dev, &vfio_mdev_dev_ops, mdev);
}
-void vfio_mdev_remove(struct device *dev)
+static void vfio_mdev_remove(struct device *dev)
{
vfio_del_group_dev(dev);
}
-struct mdev_driver vfio_mdev_driver = {
+static struct mdev_driver vfio_mdev_driver = {
.name = "vfio_mdev",
.probe = vfio_mdev_probe,
.remove = vfio_mdev_remove,