Skip to content

Commit

Permalink
tools/virtio: move list macro stubs
Browse files Browse the repository at this point in the history
Makes them more generally available.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
Michael S. Tsirkin committed Dec 7, 2015
1 parent c13f99b commit 40c172e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions tools/virtio/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,10 @@ 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 */
6 changes: 0 additions & 6 deletions tools/virtio/linux/virtio.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
#include <linux/scatterlist.h>
#include <linux/kernel.h>

/* 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 */

struct virtio_device {
void *dev;
u64 features;
Expand Down

0 comments on commit 40c172e

Please sign in to comment.