OSDN Git Service

hw/virtio: move vhost_set_backend_type() to vhost.c
authorTiberiu Georgescu <tiberiu.georgescu@nutanix.com>
Mon, 9 Aug 2021 13:40:15 +0000 (13:40 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 4 Sep 2021 13:07:46 +0000 (09:07 -0400)
commit9b1d929adb24bc4e613447c0fcc70479154e488f
tree989f9c59d41761f569f7a72485fdd959943aa720
parentfe8adae3455c3e43473bc23b00d257f6d41d24c3
hw/virtio: move vhost_set_backend_type() to vhost.c

Just a small refactor patch.

vhost_set_backend_type() gets called only in vhost.c, so we can move the
function there and make it static. We can then extern the visibility of
kernel_ops, to match the other VhostOps in vhost-backend.h.
The VhostOps constants now make more sense in vhost.h

Suggested-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Signed-off-by: Tiberiu Georgescu <tiberiu.georgescu@nutanix.com>
Message-Id: <20210809134015.67941-1-tiberiu.georgescu@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost-backend.c
hw/virtio/vhost.c
include/hw/virtio/vhost-backend.h
include/hw/virtio/vhost.h