Skip to content

Commit

Permalink
vfio: mdev: make a couple of functions and structure vfio_mdev_driver…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Xiongwei Song authored and Alex Williamson committed Jan 9, 2018
1 parent a32295c commit 46ed90f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/vfio/mdev/vfio_mdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 46ed90f

Please sign in to comment.