summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-debug.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-06-12 09:56:51 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-06-13 12:05:50 +0200
commit51cd53ad120f33410c48fd0d696e6f6255c8e780 (patch)
tree9271622e696002e527d77f1460ec3da402596ed4 /drivers/net/wireless/iwlwifi/iwl-debug.h
parent12dcf2c3325a8aa25e8634b7e8337aad6f9be9b7 (diff)
downloadblackbird-op-linux-51cd53ad120f33410c48fd0d696e6f6255c8e780.tar.gz
blackbird-op-linux-51cd53ad120f33410c48fd0d696e6f6255c8e780.zip
iwlwifi: reduce debug ifdefs using the optimiser
Instead of using #ifdef CONFIG_IWLWIFI_DEBUG, remove the iwlwifi_mod_params.debug_level variable completely and make iwl_have_debug_level() always return false in the non-debug case. This way, the optimiser will elide all code for it automatically without having to add #ifdefs. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debug.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debug.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
index 8cf5db7fb5c9..7edb8519c8a4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
@@ -34,7 +34,11 @@
static inline bool iwl_have_debug_level(u32 level)
{
+#ifdef CONFIG_IWLWIFI_DEBUG
return iwlwifi_mod_params.debug_level & level;
+#else
+ return false;
+#endif
}
void __iwl_err(struct device *dev, bool rfkill_prefix, bool only_trace,
OpenPOWER on IntegriCloud