From: Reinette Chatre <reinette.chatre@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net, "Winkler,
Tomas" <tomas.winkler@intel.com>,
Helmut Schaa <helmut.schaa@googlemail.com>,
Reinette Chatre <reinette.chatre@intel.com>
Subject: [PATCH 2/7] iwlwifi: suppress unused variable warning when compiling w/o IWLWIFI_DEBUG
Date: Tue, 27 Jan 2009 14:27:53 -0800 [thread overview]
Message-ID: <1233095278-5850-3-git-send-email-reinette.chatre@intel.com> (raw)
In-Reply-To: <1233095278-5850-2-git-send-email-reinette.chatre@intel.com>
From: Winkler, Tomas <tomas.winkler@intel.com>
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>
---
drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 10 +++++-----
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 b93f5ba..45ce3ff 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)
int unflushed = 0;
int i;
unsigned long flags;
- struct iwl_priv *priv = rs_sta->priv;
+ struct iwl_priv *priv __maybe_unused = rs_sta->priv;
/*
* 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)
static void iwl3945_bg_rate_scale_flush(unsigned long data)
{
struct iwl3945_rs_sta *rs_sta = (void *)data;
- struct iwl_priv *priv = rs_sta->priv;
+ struct iwl_priv *priv __maybe_unused = rs_sta->priv;
int unflushed = 0;
unsigned long flags;
u32 packet_count, duration, pps;
@@ -290,7 +290,7 @@ static void iwl3945_collect_tx_data(struct iwl3945_rs_sta *rs_sta,
{
unsigned long flags;
s32 fail_count;
- struct iwl_priv *priv = rs_sta->priv;
+ struct iwl_priv *priv __maybe_unused = rs_sta->priv;
if (!retries) {
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,
{
struct iwl3945_sta_priv *psta = (void *) sta->drv_priv;
struct iwl3945_rs_sta *rs_sta = priv_sta;
- struct iwl_priv *priv = rs_sta->priv;
+ struct iwl_priv *priv __maybe_unused = rs_sta->priv;
psta->rs_sta = NULL;
@@ -556,7 +556,7 @@ static u16 iwl3945_get_adjacent_rate(struct iwl3945_rs_sta *rs_sta,
{
u8 high = IWL_RATE_INVALID;
u8 low = IWL_RATE_INVALID;
- struct iwl_priv *priv = rs_sta->priv;
+ struct iwl_priv *priv __maybe_unused = rs_sta->priv;
/* 802.11A walks to the next literal adjacent rate in
* the rate table */
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 6a2c8a3..72ff20e 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,
struct device_attribute *attr,
const char *buf, size_t count)
{
+ struct iwl_priv *priv __maybe_unused = dev_get_drvdata(d);
int ant;
- struct iwl_priv *priv = dev_get_drvdata(d);
if (count == 0)
return 0;
--
1.5.4.3
next prev parent reply other threads:[~2009-01-27 22:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-27 22:27 [PATCH 0/7] iwlwifi driver updates 01/27/2009 Reinette Chatre
2009-01-27 22:27 ` [PATCH 1/7] iwl3945: Getting rid of the *39_rxon iwl_priv fields Reinette Chatre
2009-01-27 22:27 ` Reinette Chatre [this message]
2009-01-27 22:27 ` [PATCH 3/7] iwlwifi: iwl3945_send_tx_power must be static Reinette Chatre
2009-01-27 22:27 ` [PATCH 4/7] iwlwifi: check return value of pci_enable_device Reinette Chatre
2009-01-27 22:27 ` [PATCH 5/7] iwlwifi: don't use implicit priv in IWL_DEBUG Reinette Chatre
2009-01-27 22:27 ` [PATCH 6/7] iwlwifi: clean key table in iwl_clear_stations_table Reinette Chatre
2009-01-27 22:27 ` [PATCH 7/7] iwlwifi: unify iwlagn and 3945 power save management Reinette Chatre
2009-01-28 10:16 ` Johannes Berg
2009-01-28 11:54 ` Tomas Winkler
2009-01-28 13:02 ` Johannes Berg
2009-01-28 18:25 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1233095278-5850-3-git-send-email-reinette.chatre@intel.com \
--to=reinette.chatre@intel.com \
--cc=helmut.schaa@googlemail.com \
--cc=ipw3945-devel@lists.sourceforge.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=tomas.winkler@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox