Skip to content

Commit

Permalink
cfg80211: reg: reduce chan_reg_rule_print_dbg() ifdef
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg committed Oct 16, 2015
1 parent 9f50680 commit 81e9257
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,11 +1130,11 @@ const char *reg_initiator_name(enum nl80211_reg_initiator initiator)
}
EXPORT_SYMBOL(reg_initiator_name);

#ifdef CONFIG_CFG80211_REG_DEBUG
static void chan_reg_rule_print_dbg(const struct ieee80211_regdomain *regd,
struct ieee80211_channel *chan,
const struct ieee80211_reg_rule *reg_rule)
{
#ifdef CONFIG_CFG80211_REG_DEBUG
const struct ieee80211_power_rule *power_rule;
const struct ieee80211_freq_range *freq_range;
char max_antenna_gain[32], bw[32];
Expand Down Expand Up @@ -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,
bw, max_antenna_gain,
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
}

/*
* Note that right now we assume the desired channel bandwidth
Expand Down

0 comments on commit 81e9257

Please sign in to comment.