浏览代码

cfg80211: reg: reduce chan_reg_rule_print_dbg() ifdef

The function is void and static, so just ifdef its contents
instead of duplicating the declaration.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg 9 年之前
父节点
当前提交
81e925747e
共有 1 个文件被更改,包括 2 次插入9 次删除
  1. 2 9
      net/wireless/reg.c

+ 2 - 9
net/wireless/reg.c

@@ -1130,11 +1130,11 @@ const char *reg_initiator_name(enum nl80211_reg_initiator initiator)
 }
 }
 EXPORT_SYMBOL(reg_initiator_name);
 EXPORT_SYMBOL(reg_initiator_name);
 
 
-#ifdef CONFIG_CFG80211_REG_DEBUG
 static void chan_reg_rule_print_dbg(const struct ieee80211_regdomain *regd,
 static void chan_reg_rule_print_dbg(const struct ieee80211_regdomain *regd,
 				    struct ieee80211_channel *chan,
 				    struct ieee80211_channel *chan,
 				    const struct ieee80211_reg_rule *reg_rule)
 				    const struct ieee80211_reg_rule *reg_rule)
 {
 {
+#ifdef CONFIG_CFG80211_REG_DEBUG
 	const struct ieee80211_power_rule *power_rule;
 	const struct ieee80211_power_rule *power_rule;
 	const struct ieee80211_freq_range *freq_range;
 	const struct ieee80211_freq_range *freq_range;
 	char max_antenna_gain[32], bw[32];
 	char max_antenna_gain[32], bw[32];
@@ -1163,15 +1163,8 @@ static void chan_reg_rule_print_dbg(const struct ieee80211_regdomain *regd,
 		      freq_range->start_freq_khz, freq_range->end_freq_khz,
 		      freq_range->start_freq_khz, freq_range->end_freq_khz,
 		      bw, max_antenna_gain,
 		      bw, max_antenna_gain,
 		      power_rule->max_eirp);
 		      power_rule->max_eirp);
-}
-#else
-static void chan_reg_rule_print_dbg(const struct ieee80211_regdomain *regd,
-				    struct ieee80211_channel *chan,
-				    const struct ieee80211_reg_rule *reg_rule)
-{
-	return;
-}
 #endif
 #endif
+}
 
 
 /*
 /*
  * Note that right now we assume the desired channel bandwidth
  * Note that right now we assume the desired channel bandwidth