Commit e4ff7d6b authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by David S. Miller

net: ipw2x00,iwlegacy,iwlwifi: Remove in_interrupt() from debug macros

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: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c597ede4
...@@ -201,8 +201,7 @@ static u32 ipw2100_debug_level = IPW_DL_NONE; ...@@ -201,8 +201,7 @@ static u32 ipw2100_debug_level = IPW_DL_NONE;
#define IPW_DEBUG(level, message...) \ #define IPW_DEBUG(level, message...) \
do { \ do { \
if (ipw2100_debug_level & (level)) { \ if (ipw2100_debug_level & (level)) { \
printk(KERN_DEBUG "ipw2100: %c %s ", \ printk(KERN_DEBUG "ipw2100: %s ", __func__); \
in_interrupt() ? 'I' : 'U', __func__); \
printk(message); \ printk(message); \
} \ } \
} while (0) } while (0)
......
...@@ -1382,14 +1382,12 @@ BIT_ARG16(x) ...@@ -1382,14 +1382,12 @@ BIT_ARG16(x)
#define IPW_DEBUG(level, fmt, args...) \ #define IPW_DEBUG(level, fmt, args...) \
do { if (ipw_debug_level & (level)) \ do { if (ipw_debug_level & (level)) \
printk(KERN_DEBUG DRV_NAME": %c %s " fmt, \ printk(KERN_DEBUG DRV_NAME": %s " fmt, __func__ , ## args); } while (0)
in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
#ifdef CONFIG_IPW2200_DEBUG #ifdef CONFIG_IPW2200_DEBUG
#define IPW_LL_DEBUG(level, fmt, args...) \ #define IPW_LL_DEBUG(level, fmt, args...) \
do { if (ipw_debug_level & (level)) \ do { if (ipw_debug_level & (level)) \
printk(KERN_DEBUG DRV_NAME": %c %s " fmt, \ printk(KERN_DEBUG DRV_NAME": %s " fmt, __func__ , ## args); } while (0)
in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
#else #else
#define IPW_LL_DEBUG(level, fmt, args...) do {} while (0) #define IPW_LL_DEBUG(level, fmt, args...) do {} while (0)
#endif /* CONFIG_IPW2200_DEBUG */ #endif /* CONFIG_IPW2200_DEBUG */
......
...@@ -60,8 +60,7 @@ ...@@ -60,8 +60,7 @@
extern u32 libipw_debug_level; extern u32 libipw_debug_level;
#define LIBIPW_DEBUG(level, fmt, args...) \ #define LIBIPW_DEBUG(level, fmt, args...) \
do { if (libipw_debug_level & (level)) \ do { if (libipw_debug_level & (level)) \
printk(KERN_DEBUG "libipw: %c %s " fmt, \ printk(KERN_DEBUG "libipw: %s " fmt, __func__ , ## args); } while (0)
in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
#else #else
#define LIBIPW_DEBUG(level, fmt, args...) do {} while (0) #define LIBIPW_DEBUG(level, fmt, args...) do {} while (0)
#endif /* CONFIG_LIBIPW_DEBUG */ #endif /* CONFIG_LIBIPW_DEBUG */
......
...@@ -2925,8 +2925,8 @@ do { \ ...@@ -2925,8 +2925,8 @@ do { \
#define IL_DBG(level, fmt, args...) \ #define IL_DBG(level, fmt, args...) \
do { \ do { \
if (il_get_debug_level(il) & level) \ if (il_get_debug_level(il) & level) \
dev_err(&il->hw->wiphy->dev, "%c %s " fmt, \ dev_err(&il->hw->wiphy->dev, "%s " fmt, __func__, \
in_interrupt() ? 'I' : 'U', __func__ , ##args); \ ##args); \
} while (0) } while (0)
#define il_print_hex_dump(il, level, p, len) \ #define il_print_hex_dump(il, level, p, len) \
......
...@@ -121,8 +121,7 @@ void __iwl_dbg(struct device *dev, ...@@ -121,8 +121,7 @@ void __iwl_dbg(struct device *dev,
#ifdef CONFIG_IWLWIFI_DEBUG #ifdef CONFIG_IWLWIFI_DEBUG
if (iwl_have_debug_level(level) && if (iwl_have_debug_level(level) &&
(!limit || net_ratelimit())) (!limit || net_ratelimit()))
dev_printk(KERN_DEBUG, dev, "%c %s %pV", dev_printk(KERN_DEBUG, dev, "%s %pV", function, &vaf);
in_interrupt() ? 'I' : 'U', function, &vaf);
#endif #endif
trace_iwlwifi_dbg(level, in_interrupt(), function, &vaf); trace_iwlwifi_dbg(level, in_interrupt(), function, &vaf);
va_end(args); va_end(args);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment