aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2014-07-07 21:13:27 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2014-08-09 00:06:32 +0400
commit0f03fb6094743b50d403b9f6181aced9ded98883 (patch)
tree8e696788a8e2e919105db81f0577fe113e22b5e0
parenta3f1f040d2454b5328178393843656c8bbd0429c (diff)
virtio: Move extern declaration to header file
This fixes a warning from smatch (static code analyser). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r--hw/virtio/vhost-backend.c2
-rw-r--r--include/hw/virtio/vhost-backend.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c
index 35316c40d9..ff4f2001bb 100644
--- a/hw/virtio/vhost-backend.c
+++ b/hw/virtio/vhost-backend.c
@@ -14,8 +14,6 @@
#include <sys/ioctl.h>
-extern const VhostOps user_ops;
-
static int vhost_kernel_call(struct vhost_dev *dev, unsigned long int request,
void *arg)
{
diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h
index d31768a1d4..e472f29714 100644
--- a/include/hw/virtio/vhost-backend.h
+++ b/include/hw/virtio/vhost-backend.h
@@ -32,6 +32,8 @@ typedef struct VhostOps {
vhost_backend_cleanup vhost_backend_cleanup;
} VhostOps;
+extern const VhostOps user_ops;
+
int vhost_set_backend_type(struct vhost_dev *dev,
VhostBackendType backend_type);