aboutsummaryrefslogtreecommitdiffstats
path: root/tools/virtio
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2018-01-26 01:36:40 +0200
committerDavid S. Miller <davem@davemloft.net>2018-01-29 12:02:54 -0500
commit6dd42157830d875bdd3c6fefd05cbcf0875b51e8 (patch)
tree3aaece5f59c6de5cf71d96c6753f154677d04e7e /tools/virtio
parenttools/virtio: switch to __ptr_ring_empty (diff)
downloadlinux-dev-6dd42157830d875bdd3c6fefd05cbcf0875b51e8.tar.xz
linux-dev-6dd42157830d875bdd3c6fefd05cbcf0875b51e8.zip
tools/virtio: more stubs to fix tools build
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/virtio')
-rw-r--r--tools/virtio/linux/kernel.h2
-rw-r--r--tools/virtio/linux/thread_info.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index 395521a7a8d8..fca8381bbe04 100644
--- a/tools/virtio/linux/kernel.h
+++ b/tools/virtio/linux/kernel.h
@@ -118,7 +118,7 @@ static inline void free_page(unsigned long addr)
#define dev_err(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__)
#define dev_warn(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__)
-#define WARN_ON_ONCE(cond) ((cond) && fprintf (stderr, "WARNING\n"))
+#define WARN_ON_ONCE(cond) ((cond) ? fprintf (stderr, "WARNING\n") : 0)
#define min(x, y) ({ \
typeof(x) _min1 = (x); \
diff --git a/tools/virtio/linux/thread_info.h b/tools/virtio/linux/thread_info.h
new file mode 100644
index 000000000000..e0f610d08006
--- /dev/null
+++ b/tools/virtio/linux/thread_info.h
@@ -0,0 +1 @@
+#define check_copy_size(A, B, C) (1)