ath9k: Fix compile warnings when DEBUGFS is disabled.
authorBen Greear <greearb@candelatech.com>
Tue, 17 Apr 2012 22:19:03 +0000 (15:19 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 23 Apr 2012 19:28:34 +0000 (15:28 -0400)
This fixes two compile warnings, and removes a useless
cast when assigning the 'sc' variable.

Reported-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/ath9k/recv.c

index dd4b8f4097c837663dea38538bb20b97bdb9aad8..8c827a183fc0277ee2e2fa3e69bbdbc8195f30cf 100644 (file)
@@ -959,7 +959,8 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
 #ifdef CONFIG_ATH9K_DEBUGFS
 void ath9k_debug_sync_cause(struct ath_common *common, u32 sync_cause);
 #else
-static void ath9k_debug_sync_cause(struct ath_common *common, u32 sync_cause) {}
+static inline void ath9k_debug_sync_cause(struct ath_common *common,
+                                         u32 sync_cause) {}
 #endif
 
 /* Generic hw timer primitives */
index 301ef3e57145b4227862a7d7a9e09bec5dd69a3c..12b09798864ab798321f1dd51030caf46fd0b3b7 100644 (file)
@@ -907,7 +907,7 @@ static int ath9k_process_rate(struct ath_common *common,
        struct ieee80211_supported_band *sband;
        enum ieee80211_band band;
        unsigned int i = 0;
-       struct ath_softc *sc = (struct ath_softc *) common->priv;
+       struct ath_softc __maybe_unused *sc = common->priv;
 
        band = hw->conf.channel->band;
        sband = hw->wiphy->bands[band];