linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: fix unused variable warning
       [not found] <1318506157-10329-1-git-send-email-mkl@pengutronix.de>
@ 2012-03-25  6:43 ` Oliver Hartkopp
  2012-03-26  1:49   ` Guy, Wey-Yi
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Hartkopp @ 2012-03-25  6:43 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Wey-Yi Guy, Intel Linux Wireless

In the case of disabled CONFIG_IWLWIFI_DEBUGFS option the compiler complains
about the unused variable 'img'. Fix this by moving the 'img' definition.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>

---

diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
index b6805f8..0f5db8b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c
+++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
@@ -437,7 +437,6 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw)
 	unsigned long flags;
 	u32 base, status = 0xffffffff;
 	int ret = -EIO;
-	const struct fw_img *img;
 
 	IWL_DEBUG_MAC80211(priv, "enter\n");
 	mutex_lock(&priv->mutex);
@@ -458,6 +457,8 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw)
 
 #ifdef CONFIG_IWLWIFI_DEBUGFS
 		if (ret == 0) {
+			const struct fw_img *img;
+
 			img = &(priv->fw->img[IWL_UCODE_WOWLAN]);
 			if (!priv->wowlan_sram) {
 				priv->wowlan_sram =


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iwlwifi: fix unused variable warning
  2012-03-25  6:43 ` [PATCH] iwlwifi: fix unused variable warning Oliver Hartkopp
@ 2012-03-26  1:49   ` Guy, Wey-Yi
  0 siblings, 0 replies; 2+ messages in thread
From: Guy, Wey-Yi @ 2012-03-26  1:49 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: John W. Linville, linux-wireless, Intel Linux Wireless

On Sun, 2012-03-25 at 08:43 +0200, Oliver Hartkopp wrote:
> In the case of disabled CONFIG_IWLWIFI_DEBUGFS option the compiler complains
> about the unused variable 'img'. Fix this by moving the 'img' definition.
> 
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
> 
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-26  1:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1318506157-10329-1-git-send-email-mkl@pengutronix.de>
2012-03-25  6:43 ` [PATCH] iwlwifi: fix unused variable warning Oliver Hartkopp
2012-03-26  1:49   ` Guy, Wey-Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).