tools/virtio: move list macro stubs
Michael S. Tsirkin
maintainerPATCH 1/1 tools/virtio: move list macro stubs
Makes them more generally available.
Signed-off-by Michael S. Tsirkin <[email protected]>
--- 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
@@ -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
@@ -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
Quoted 7 lines · On Mon, 30 Nov 2015 10:41:35 +0200 "Michael S. Tsirkin" <[email protected]> wrote:
Makes them more generally available.
Signed-off-by Michael S. Tsirkin <[email protected]>--- 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?