diff options
author | Winkler, Tomas <tomas.winkler@intel.com> | 2009-01-27 17:27:53 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-09 15:03:33 -0500 |
commit | 7530f85f086a5d58a5e43b1a98993801fe509c51 (patch) | |
tree | 25681cf041683dc30f36e6276e2eaf381159adc4 /drivers/net | |
parent | 8ccde88a87a3dc906234b281a036fee9c7371949 (diff) |
iwlwifi: suppress unused variable warning when compiling w/o IWLWIFI_DEBUG
This patch adds __maybe_unused attribute to priv variables used in
functions that used it solely for debug printouts
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index b93f5ba77192..45ce3ff653ab 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c | |||
@@ -183,7 +183,7 @@ static int iwl3945_rate_scale_flush_windows(struct iwl3945_rs_sta *rs_sta) | |||
183 | int unflushed = 0; | 183 | int unflushed = 0; |
184 | int i; | 184 | int i; |
185 | unsigned long flags; | 185 | unsigned long flags; |
186 | struct iwl_priv *priv = rs_sta->priv; | 186 | struct iwl_priv *priv __maybe_unused = rs_sta->priv; |
187 | 187 | ||
188 | /* | 188 | /* |
189 | * For each rate, if we have collected data on that rate | 189 | * For each rate, if we have collected data on that rate |
@@ -216,7 +216,7 @@ static int iwl3945_rate_scale_flush_windows(struct iwl3945_rs_sta *rs_sta) | |||
216 | static void iwl3945_bg_rate_scale_flush(unsigned long data) | 216 | static void iwl3945_bg_rate_scale_flush(unsigned long data) |
217 | { | 217 | { |
218 | struct iwl3945_rs_sta *rs_sta = (void *)data; | 218 | struct iwl3945_rs_sta *rs_sta = (void *)data; |
219 | struct iwl_priv *priv = rs_sta->priv; | 219 | struct iwl_priv *priv __maybe_unused = rs_sta->priv; |
220 | int unflushed = 0; | 220 | int unflushed = 0; |
221 | unsigned long flags; | 221 | unsigned long flags; |
222 | u32 packet_count, duration, pps; | 222 | u32 packet_count, duration, pps; |
@@ -290,7 +290,7 @@ static void iwl3945_collect_tx_data(struct iwl3945_rs_sta *rs_sta, | |||
290 | { | 290 | { |
291 | unsigned long flags; | 291 | unsigned long flags; |
292 | s32 fail_count; | 292 | s32 fail_count; |
293 | struct iwl_priv *priv = rs_sta->priv; | 293 | struct iwl_priv *priv __maybe_unused = rs_sta->priv; |
294 | 294 | ||
295 | if (!retries) { | 295 | if (!retries) { |
296 | IWL_DEBUG_RATE("leave: retries == 0 -- should be at least 1\n"); | 296 | IWL_DEBUG_RATE("leave: retries == 0 -- should be at least 1\n"); |
@@ -438,7 +438,7 @@ static void rs_free_sta(void *iwl_priv, struct ieee80211_sta *sta, | |||
438 | { | 438 | { |
439 | struct iwl3945_sta_priv *psta = (void *) sta->drv_priv; | 439 | struct iwl3945_sta_priv *psta = (void *) sta->drv_priv; |
440 | struct iwl3945_rs_sta *rs_sta = priv_sta; | 440 | struct iwl3945_rs_sta *rs_sta = priv_sta; |
441 | struct iwl_priv *priv = rs_sta->priv; | 441 | struct iwl_priv *priv __maybe_unused = rs_sta->priv; |
442 | 442 | ||
443 | psta->rs_sta = NULL; | 443 | psta->rs_sta = NULL; |
444 | 444 | ||
@@ -556,7 +556,7 @@ static u16 iwl3945_get_adjacent_rate(struct iwl3945_rs_sta *rs_sta, | |||
556 | { | 556 | { |
557 | u8 high = IWL_RATE_INVALID; | 557 | u8 high = IWL_RATE_INVALID; |
558 | u8 low = IWL_RATE_INVALID; | 558 | u8 low = IWL_RATE_INVALID; |
559 | struct iwl_priv *priv = rs_sta->priv; | 559 | struct iwl_priv *priv __maybe_unused = rs_sta->priv; |
560 | 560 | ||
561 | /* 802.11A walks to the next literal adjacent rate in | 561 | /* 802.11A walks to the next literal adjacent rate in |
562 | * the rate table */ | 562 | * the rate table */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 6a2c8a3a3d5e..72ff20e10aa6 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -5270,8 +5270,8 @@ static ssize_t store_antenna(struct device *d, | |||
5270 | struct device_attribute *attr, | 5270 | struct device_attribute *attr, |
5271 | const char *buf, size_t count) | 5271 | const char *buf, size_t count) |
5272 | { | 5272 | { |
5273 | struct iwl_priv *priv __maybe_unused = dev_get_drvdata(d); | ||
5273 | int ant; | 5274 | int ant; |
5274 | struct iwl_priv *priv = dev_get_drvdata(d); | ||
5275 | 5275 | ||
5276 | if (count == 0) | 5276 | if (count == 0) |
5277 | return 0; | 5277 | return 0; |