Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160457772
D39049.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
938 B
Referenced Files
None
Subscribers
None
D39049.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h
--- a/sys/compat/linuxkpi/common/include/linux/device.h
+++ b/sys/compat/linuxkpi/common/include/linux/device.h
@@ -199,6 +199,20 @@
#define dev_printk(lvl, dev, fmt, ...) \
device_printf((dev)->bsddev, fmt, ##__VA_ARGS__)
+#define dev_WARN(dev, fmt, ...) \
+ device_printf((dev)->bsddev, "%s:%d: " fmt, __func__, __LINE__, ##__VA_ARGS__)
+
+#define dev_WARN_ONCE(dev, condition, fmt, ...) do { \
+ static bool __dev_WARN_ONCE; \
+ bool __ret_warn_on = (condition); \
+ if (unlikely(__ret_warn_on)) { \
+ if (!__dev_WARN_ONCE) { \
+ __dev_WARN_ONCE = true; \
+ device_printf((dev)->bsddev, "%s:%d: " fmt, __func__, __LINE__, ##__VA_ARGS__); \
+ } \
+ } \
+} while (0)
+
#define dev_info_once(dev, ...) do { \
static bool __dev_info_once; \
if (!__dev_info_once) { \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jun 25, 4:43 PM (3 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34325313
Default Alt Text
D39049.diff (938 B)
Attached To
Mode
D39049: linuxkpi: Define `dev_WARN()` and `dev_WARN_ONCE()`
Attached
Detach File
Event Timeline
Log In to Comment