virtio_find_vqs is just a function pointer call, so move it into a header, so it can be inlined. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- drivers/virtio/virtio.c | 7 ------- include/linux/virtio_config.h | 6 +++++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index c4854e7d11aa..a0bd147c36c4 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -159,13 +159,6 @@ int virtio_finalize_features(struct virtio_device *dev) } EXPORT_SYMBOL_GPL(virtio_finalize_features); -int virtio_find_vqs(struct virtio_device *vdev, unsigned int nvqs, - struct virtqueue *vqs[]) -{ - return vdev->config->find_vqs(vdev, nvqs, vqs); -} -EXPORT_SYMBOL_GPL(virtio_find_vqs); - static int virtio_dev_probe(struct device *_d) { int err, i; diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 6bb1f768b636..6c53f4bc66a4 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -246,8 +246,12 @@ static inline int virtio_set_config(struct virtio_device *vdev, unsigned int off * @vqs: on success, includes new virtqueues * @return 0 if OK, -ve on error */ +static inline int virtio_find_vqs(struct virtio_device *vdev, unsigned int nvqs, - struct virtqueue *vqs[]); + struct virtqueue *vqs[]) +{ + return vdev->config->find_vqs(vdev, nvqs, vqs); +} /** * virtio_device_ready - enable vq use in probe function -- 2.39.5