[B/D/E/OEM-OSP1-B,2/3] HID: core: Add printk_once variants to hid_warn() etc
diff mbox series

Message ID 20191030071652.8130-3-kai.heng.feng@canonical.com
State New
Headers show
Series
  • Suppress "hid_field_extract() called with n (192) > 32!" message floods
Related show

Commit Message

Kai-Heng Feng Oct. 30, 2019, 7:16 a.m. UTC
From: Joshua Clayton <stillcompiling@gmail.com>

BugLink: https://bugs.launchpad.net/bugs/1850600

hid_warn_once() is needed. Add the others as part of the block.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
(cherry picked from commit aaeabb121a6271775cef35ec3197e9ef124fdb2a)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 include/linux/hid.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

Patch
diff mbox series

diff --git a/include/linux/hid.h b/include/linux/hid.h
index 3881ce5cf1e8..c003564778a3 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -1182,4 +1182,15 @@  do {									\
 #define hid_dbg(hid, fmt, ...)				\
 	dev_dbg(&(hid)->dev, fmt, ##__VA_ARGS__)
 
+#define hid_err_once(hid, fmt, ...)			\
+	dev_err_once(&(hid)->dev, fmt, ##__VA_ARGS__)
+#define hid_notice_once(hid, fmt, ...)			\
+	dev_notice_once(&(hid)->dev, fmt, ##__VA_ARGS__)
+#define hid_warn_once(hid, fmt, ...)			\
+	dev_warn_once(&(hid)->dev, fmt, ##__VA_ARGS__)
+#define hid_info_once(hid, fmt, ...)			\
+	dev_info_once(&(hid)->dev, fmt, ##__VA_ARGS__)
+#define hid_dbg_once(hid, fmt, ...)			\
+	dev_dbg_once(&(hid)->dev, fmt, ##__VA_ARGS__)
+
 #endif