diff options
author | Eugenio Pérez <eperezma@redhat.com> | 2020-04-18 13:22:17 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-06-22 19:34:22 +0300 |
commit | cb91909e48a4809261ef4e967464e2009b214f06 (patch) | |
tree | 876b6f1d4541820c3fc866fae5e198189cc94f4a /tools/virtio/linux | |
parent | 1d8bf5c3a3a1b90c39ccbafb3aa63ffc5196b142 (diff) | |
download | linux-cb91909e48a4809261ef4e967464e2009b214f06.tar.xz |
tools/virtio: Use tools/include/list.h instead of stubs
It should not make any significant difference but reduce stub code.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Link: https://lore.kernel.org/r/20200418102217.32327-9-eperezma@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools/virtio/linux')
-rw-r--r-- | tools/virtio/linux/kernel.h | 7 | ||||
-rw-r--r-- | tools/virtio/linux/virtio.h | 5 |
2 files changed, 3 insertions, 9 deletions
diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h index 6683b4a70b05..caab980211a6 100644 --- a/tools/virtio/linux/kernel.h +++ b/tools/virtio/linux/kernel.h @@ -11,6 +11,7 @@ #include <linux/compiler.h> #include <linux/types.h> +#include <linux/list.h> #include <linux/printk.h> #include <linux/bug.h> #include <errno.h> @@ -135,10 +136,4 @@ static inline void free_page(unsigned long addr) (void) (&_min1 == &_min2); \ _min1 < _min2 ? _min1 : _min2; }) -/* TODO: empty stubs for now. Broken but enough for virtio_ring.c */ -#define list_add_tail(a, b) do {} while (0) -#define list_del(a) do {} while (0) -#define list_for_each_entry(a, b, c) while (0) -/* end of stubs */ - #endif /* KERNEL_H */ diff --git a/tools/virtio/linux/virtio.h b/tools/virtio/linux/virtio.h index b751350d4ce8..5d90254ddae4 100644 --- a/tools/virtio/linux/virtio.h +++ b/tools/virtio/linux/virtio.h @@ -11,12 +11,11 @@ struct device { struct virtio_device { struct device dev; u64 features; + struct list_head vqs; }; struct virtqueue { - /* TODO: commented as list macros are empty stubs for now. - * Broken but enough for virtio_ring.c - * struct list_head list; */ + struct list_head list; void (*callback)(struct virtqueue *vq); const char *name; struct virtio_device *vdev; |