net: ipw2x00,iwlegacy,iwlwifi: Remove in_interrupt() from debug macros
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 29 Sep 2020 20:25:37 +0000 (22:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Sep 2020 21:02:55 +0000 (14:02 -0700)
The usage of in_interrupt() in non-core code is phased out.

The debugging macros in these drivers use in_interrupt() to print 'I' or
'U' depending on the return value of in_interrupt(). While 'U' is confusing
at best and 'I' is not really describing the actual context (hard interupt,
soft interrupt, bottom half disabled section) these debug macros originate
from the pre ftrace kernel era and their value today is questionable. They
probably should be removed completely.

The macros weere added initially for ipw2100 and then spreaded when the
driver was forked.

Remove the in_interrupt() usage at least..

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wireless/intel/ipw2x00/ipw2100.c
drivers/net/wireless/intel/ipw2x00/ipw2200.h
drivers/net/wireless/intel/ipw2x00/libipw.h
drivers/net/wireless/intel/iwlegacy/common.h
drivers/net/wireless/intel/iwlwifi/iwl-debug.c

index b7fbfc77b612f38ea31fb15fd80cef5ff73e4017..23fbddd0c1f8e070548efa44184908e5a3bfa8b4 100644 (file)
@@ -201,8 +201,7 @@ static u32 ipw2100_debug_level = IPW_DL_NONE;
 #define IPW_DEBUG(level, message...) \
 do { \
        if (ipw2100_debug_level & (level)) { \
-               printk(KERN_DEBUG "ipw2100: %c %s ", \
-                       in_interrupt() ? 'I' : 'U',  __func__); \
+               printk(KERN_DEBUG "ipw2100: %s ", __func__); \
                printk(message); \
        } \
 } while (0)
index e1ec1c96dcd8810e1b9f5704b7fee0597bf6c99f..98fe62737888c5f6f20743f80fbae377440e590e 100644 (file)
@@ -1382,14 +1382,12 @@ BIT_ARG16(x)
 
 #define IPW_DEBUG(level, fmt, args...) \
 do { if (ipw_debug_level & (level)) \
-  printk(KERN_DEBUG DRV_NAME": %c %s " fmt, \
-         in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
+  printk(KERN_DEBUG DRV_NAME": %s " fmt, __func__ , ## args); } while (0)
 
 #ifdef CONFIG_IPW2200_DEBUG
 #define IPW_LL_DEBUG(level, fmt, args...) \
 do { if (ipw_debug_level & (level)) \
-  printk(KERN_DEBUG DRV_NAME": %c %s " fmt, \
-         in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
+  printk(KERN_DEBUG DRV_NAME": %s " fmt, __func__ , ## args); } while (0)
 #else
 #define IPW_LL_DEBUG(level, fmt, args...) do {} while (0)
 #endif                         /* CONFIG_IPW2200_DEBUG */
index e87538a8b88b276758dbd556234514c917f79f4d..7964ef7d15f02010f0e18289d4a2b20d254fecaf 100644 (file)
@@ -60,8 +60,7 @@
 extern u32 libipw_debug_level;
 #define LIBIPW_DEBUG(level, fmt, args...) \
 do { if (libipw_debug_level & (level)) \
-  printk(KERN_DEBUG "libipw: %c %s " fmt, \
-         in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
+  printk(KERN_DEBUG "libipw: %s " fmt, __func__ , ## args); } while (0)
 #else
 #define LIBIPW_DEBUG(level, fmt, args...) do {} while (0)
 #endif                         /* CONFIG_LIBIPW_DEBUG */
index bc9cd7e5ccb8889c1525d676535242199ae6f525..ea1b1bb7ddcb8ee92f74e66ea8554f9fa323407a 100644 (file)
@@ -2925,8 +2925,8 @@ do {                                                                      \
 #define IL_DBG(level, fmt, args...)                                    \
 do {                                                                   \
        if (il_get_debug_level(il) & level)                             \
-               dev_err(&il->hw->wiphy->dev, "%c %s " fmt,              \
-                       in_interrupt() ? 'I' : 'U', __func__ , ##args); \
+               dev_err(&il->hw->wiphy->dev, "%s " fmt, __func__,       \
+                        ##args);                                       \
 } while (0)
 
 #define il_print_hex_dump(il, level, p, len)                           \
index e1a41fd503a82922eb59b0fb62a4196ec06ab6b0..64dc718c5b2b553714b9562a504262c95757dc34 100644 (file)
@@ -121,8 +121,7 @@ void __iwl_dbg(struct device *dev,
 #ifdef CONFIG_IWLWIFI_DEBUG
        if (iwl_have_debug_level(level) &&
            (!limit || net_ratelimit()))
-               dev_printk(KERN_DEBUG, dev, "%c %s %pV",
-                          in_interrupt() ? 'I' : 'U', function, &vaf);
+               dev_printk(KERN_DEBUG, dev, "%s %pV", function, &vaf);
 #endif
        trace_iwlwifi_dbg(level, in_interrupt(), function, &vaf);
        va_end(args);