Browse Source

tools/virtio: move list macro stubs

Makes them more generally available.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Michael S. Tsirkin 9 years ago
parent
commit
40c172e5d9
2 changed files with 6 additions and 6 deletions
  1. 6 0
      tools/virtio/linux/kernel.h
  2. 0 6
      tools/virtio/linux/virtio.h

+ 6 - 0
tools/virtio/linux/kernel.h

@@ -110,4 +110,10 @@ static inline void free_page(unsigned long addr)
 	(void) (&_min1 == &_min2);		\
 	(void) (&_min1 == &_min2);		\
 	_min1 < _min2 ? _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 */
 #endif /* KERNEL_H */

+ 0 - 6
tools/virtio/linux/virtio.h

@@ -3,12 +3,6 @@
 #include <linux/scatterlist.h>
 #include <linux/scatterlist.h>
 #include <linux/kernel.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 {
 struct virtio_device {
 	void *dev;
 	void *dev;
 	u64 features;
 	u64 features;