diff options
author | Xiongwei Song <sxwjean@gmail.com> | 2017-12-21 18:12:26 -0500 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2018-01-09 14:13:08 -0500 |
commit | 46ed90f157f42d956ffed17c003f089a59b76e3e (patch) | |
tree | 80181a9ee7923d4f687f67239868a6c73222227c | |
parent | a32295c612c57990d17fb0f41e7134394b2f35f6 (diff) |
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>
-rw-r--r-- | drivers/vfio/mdev/vfio_mdev.c | 6 |
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 = { | |||
111 | .mmap = vfio_mdev_mmap, | 111 | .mmap = vfio_mdev_mmap, |
112 | }; | 112 | }; |
113 | 113 | ||
114 | int vfio_mdev_probe(struct device *dev) | 114 | static int vfio_mdev_probe(struct device *dev) |
115 | { | 115 | { |
116 | struct mdev_device *mdev = to_mdev_device(dev); | 116 | struct mdev_device *mdev = to_mdev_device(dev); |
117 | 117 | ||
118 | return vfio_add_group_dev(dev, &vfio_mdev_dev_ops, mdev); | 118 | return vfio_add_group_dev(dev, &vfio_mdev_dev_ops, mdev); |
119 | } | 119 | } |
120 | 120 | ||
121 | void vfio_mdev_remove(struct device *dev) | 121 | static void vfio_mdev_remove(struct device *dev) |
122 | { | 122 | { |
123 | vfio_del_group_dev(dev); | 123 | vfio_del_group_dev(dev); |
124 | } | 124 | } |
125 | 125 | ||
126 | struct mdev_driver vfio_mdev_driver = { | 126 | static struct mdev_driver vfio_mdev_driver = { |
127 | .name = "vfio_mdev", | 127 | .name = "vfio_mdev", |
128 | .probe = vfio_mdev_probe, | 128 | .probe = vfio_mdev_probe, |
129 | .remove = vfio_mdev_remove, | 129 | .remove = vfio_mdev_remove, |