Skip to contentSkip to conversation

tools/virtio: move list macro stubs

PATCH In review Michael S. Tsirkin 2 participants 2 messages Nov 30, 2015 virtio core

lore
Share & tools
lore

Michael S. Tsirkin

author maintainer
#0 lore raw

PATCH 1/1 tools/virtio: move list macro stubs

Makes them more generally available.

---
 tools/virtio/linux/kernel.h | 6 ++++++
 tools/virtio/linux/virtio.h | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)
tools/virtio/linux/kernel.h +6 -0
index 0a3da64..4db7d56 100644
@@ -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 */
tools/virtio/linux/virtio.h +0 -6
index a3e0701..ee125e7 100644
@@ -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;
Signature · 1 line
MST
#1 lore raw
Quoted 7 lines · On Mon, 30 Nov 2015 10:41:35 +0200 "Michael S. Tsirkin" <[email protected]> wrote:

Makes them more generally available.

---
 tools/virtio/linux/kernel.h | 6 ++++++
 tools/virtio/linux/virtio.h | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)

Create a dummy list.h? Or would that be overkill?