This blocks the annoying ENIC driver initialization message unless
debug is enabled. Drivers should speak only when spoken to and not
be chatty.

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/enic/enic_compat.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/enic/enic_compat.h b/drivers/net/enic/enic_compat.h
index f3598ed..94656c8 100644
--- a/drivers/net/enic/enic_compat.h
+++ b/drivers/net/enic/enic_compat.h
@@ -82,7 +82,11 @@
 #define dev_err(x, args...) dev_printk(ERR, args)
 #define dev_info(x, args...) dev_printk(INFO,  args)
 #define dev_warning(x, args...) dev_printk(WARNING, args)
+#ifdef RTE_LIBRTE_ENIC_DEBUG
 #define dev_debug(x, args...) dev_printk(DEBUG, args)
+#else
+#define dev_debug(x, args...) do { } while(0)
+#endif

 #define __le16 u16
 #define __le32 u32
-- 
2.1.4

Reply via email to