mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-23 08:55:56 -04:00
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>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
1d8bf5c3a3
commit
cb91909e48
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user