Skip to contentSkip to conversation

fm10k: add missing newline to debug log

PATCH Superseded Stephen Hemminger 2 participants 2 messages Jul 16, 2015 Network drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fm10k: add missing newline to debug log

If FM10K_DEBUG_DRIVER is enabled, then the log messages about function entry are missing newline causing extremely long lines.

---
 drivers/net/fm10k/base/fm10k_osdep.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/fm10k/base/fm10k_osdep.h +1 -1
index 04f8fe9..33d9120 100644
@@ -46,7 +46,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #define STATIC                  static
 #define DEBUGFUNC(F)            DEBUGOUT(F);
-#define DEBUGOUT(S, args...)    PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, args...)    PMD_DRV_LOG_RAW(DEBUG, S "\n", ##args)
 #define DEBUGOUT1(S, args...)   DEBUGOUT(S, ##args)
 #define DEBUGOUT2(S, args...)   DEBUGOUT(S, ##args)
 #define DEBUGOUT3(S, args...)   DEBUGOUT(S, ##args)
Signature · 1 line
2.1.4
#1 lore raw
Quoted 13 lines · Stephen Hemminger

If FM10K_DEBUG_DRIVER is enabled, then the log messages about function entry are missing newline causing extremely long lines.

---
  drivers/net/fm10k/base/fm10k_osdep.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/fm10k/base/fm10k_osdep.h +0 -0
index 04f8fe9..33d9120 100644

drivers/net/fm10k/base/fm10k_osdep.h POSSIBILITY OF SUCH DAMAGE. · line 52

Quoted 8 lines
drivers/net/fm10k/base/fm10k_osdep.h +1 -1
@@ -46,7 +46,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
  #define STATIC                  static
  #define DEBUGFUNC(F)            DEBUGOUT(F);
-#define DEBUGOUT(S, args...)    PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, args...)    PMD_DRV_LOG_RAW(DEBUG, S "\n", ##args)
  #define DEBUGOUT1(S, args...)   DEBUGOUT(S, ##args)
  #define DEBUGOUT2(S, args...)   DEBUGOUT(S, ##args)
  #define DEBUGOUT3(S, args...)   DEBUGOUT(S, ##args)

I think this ends up adding a redundant "\n" to several other DEBUGOUT statements then. Maybe you should update it so that DEBUGFUNC adds the "\n" instead of DEBUGOUT.

- Alex