* [Qemu-devel] [PATCH] virtio: Move extern declaration to header file
@ 2014-07-07 19:13 Stefan Weil
2014-08-02 13:27 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-08-02 13:31 ` [Qemu-devel] " Michael Tokarev
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Weil @ 2014-07-07 19:13 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil
This fixes a warning from smatch (static code analyser).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
hw/virtio/vhost-backend.c | 2 --
include/hw/virtio/vhost-backend.h | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c
index 35316c4..ff4f200 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 d31768a..e472f29 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);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] virtio: Move extern declaration to header file
2014-07-07 19:13 [Qemu-devel] [PATCH] virtio: Move extern declaration to header file Stefan Weil
@ 2014-08-02 13:27 ` Michael Tokarev
2014-08-02 13:31 ` [Qemu-devel] " Michael Tokarev
1 sibling, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2014-08-02 13:27 UTC (permalink / raw)
To: Stefan Weil, qemu-devel; +Cc: qemu-trivial
Applied to -trivial, thanks!
/mjt
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] virtio: Move extern declaration to header file
2014-07-07 19:13 [Qemu-devel] [PATCH] virtio: Move extern declaration to header file Stefan Weil
2014-08-02 13:27 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
@ 2014-08-02 13:31 ` Michael Tokarev
1 sibling, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2014-08-02 13:31 UTC (permalink / raw)
To: Stefan Weil, qemu-devel; +Cc: Nikolay Nikolaev
07.07.2014 23:13, Stefan Weil wrote:
[]
> index 35316c4..ff4f200 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;
> -
BTW, it looks like we still have just one VhostOps - this user_ops one -
despite commit 24d1eb33eb2ccd995a which was aimed to add another ops
(kernel) back in May. Maybe we should not add extra indirection without
a reason, before it is actually used?
Also, "user_ops" is way too generic name. Maybe user_vhost_ops or something.
Just.. saying.
Thanks,
/mjt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-02 13:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-07 19:13 [Qemu-devel] [PATCH] virtio: Move extern declaration to header file Stefan Weil
2014-08-02 13:27 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2014-08-02 13:31 ` [Qemu-devel] " Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.