svn commit: r345910 - stable/11/sys/compat/linuxkpi/common/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Apr 5 11:07:30 UTC 2019
Author: hselasky
Date: Fri Apr 5 11:07:29 2019
New Revision: 345910
URL: https://svnweb.freebsd.org/changeset/base/345910
Log:
MFC r345091:
Implement dev_err_once() function macro in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0 at gmail.com>
Sponsored by: Limelight Networks
Sponsored by: Mellanox Technologies
Modified:
stable/11/sys/compat/linuxkpi/common/include/linux/device.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/compat/linuxkpi/common/include/linux/device.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/device.h Fri Apr 5 11:07:15 2019 (r345909)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/device.h Fri Apr 5 11:07:29 2019 (r345910)
@@ -183,6 +183,14 @@ show_class_attr_string(struct class *class,
#define dev_printk(lvl, dev, fmt, ...) \
device_printf((dev)->bsddev, fmt, ##__VA_ARGS__)
+#define dev_err_once(dev, ...) do { \
+ static bool __dev_err_once; \
+ if (!__dev_err_once) { \
+ __dev_err_once = 1; \
+ dev_err(dev, __VA_ARGS__); \
+ } \
+} while (0)
+
#define dev_err_ratelimited(dev, ...) do { \
static linux_ratelimit_t __ratelimited; \
if (linux_ratelimited(&__ratelimited)) \
More information about the svn-src-stable-11
mailing list