[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <749e7a03b7cd56baf50a27efc3b05e50cf8f36b6.1764873799.git.mst@redhat.com>
Date: Thu, 4 Dec 2025 13:46:13 -0500
From: "Michael S. Tsirkin" <mst@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Jason Wang <jasowang@...hat.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio Pérez <eperezma@...hat.com>,
virtualization@...ts.linux.dev
Subject: [PATCH 06/14] tools/virtio: add dev_WARN_ONCE and is_vmalloc_addr
stubs
Add dev_WARN_ONCE and is_vmalloc_addr stubs needed by virtio_ring.c.
is_vmalloc_addr stub always returns false - that's fine since it's
merely a sanity check.
Created using Cursor CLI.
Signed-off-by: Michael S. Tsirkin <mst@...hat.com>
---
tools/virtio/linux/kernel.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index 6702008f7f5c..d7fc70b68a2b 100644
--- a/tools/virtio/linux/kernel.h
+++ b/tools/virtio/linux/kernel.h
@@ -14,6 +14,7 @@
#include <linux/log2.h>
#include <linux/types.h>
#include <linux/overflow.h>
+#include <linux/limits.h>
#include <linux/list.h>
#include <linux/printk.h>
#include <linux/bug.h>
@@ -135,6 +136,14 @@ static inline void *krealloc_array(void *p, size_t new_n, size_t new_size, gfp_t
#define dev_warn(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__)
#define dev_warn_once(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__)
+#define dev_WARN_ONCE(dev, condition, format...) \
+ WARN_ONCE(condition, format)
+
+static inline bool is_vmalloc_addr(const void *x)
+{
+ return false;
+}
+
#define min(x, y) ({ \
typeof(x) _min1 = (x); \
typeof(y) _min2 = (y); \
--
MST
Powered by blists - more mailing lists