summaryrefslogtreecommitdiffstats
path: root/tools/virtio
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-06-03 10:04:05 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-06-03 10:04:05 -0700
commitf340208fe27319b1420bf19e96f9cf8eec85cccc (patch)
treeaae1f64b9b21b6812a309abed7df3d20ccf6f5ac /tools/virtio
parentf2c7c76c5d0a443053e94adb9f0918fa2fb85c3a (diff)
parentc1ea02f15ab5efb3e93fc3144d895410bf79fcf2 (diff)
downloadlinux-f340208fe27319b1420bf19e96f9cf8eec85cccc.tar.bz2
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio fixes from Michael Tsirkin: "Several fixes, some of them for CVEs" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost: scsi: add weight support vhost: vsock: add weight support vhost_net: fix possible infinite loop vhost: introduce vhost_exceeds_weight() virtio: Fix indentation of VIRTIO_MMIO virtio: add unlikely() to WARN_ON_ONCE()
Diffstat (limited to 'tools/virtio')
-rw-r--r--tools/virtio/linux/kernel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index 7ef45a4a3cba..6683b4a70b05 100644
--- a/tools/virtio/linux/kernel.h
+++ b/tools/virtio/linux/kernel.h
@@ -127,7 +127,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") : 0)
+#define WARN_ON_ONCE(cond) (unlikely(cond) ? fprintf (stderr, "WARNING\n") : 0)
#define min(x, y) ({ \
typeof(x) _min1 = (x); \