Commit f643e51d authored by Pavel Roskin's avatar Pavel Roskin Committed by John W. Linville

ath: make gcc check format arguments of ath_print(), fix all misuses

Numeric channel is hard to get, so it won't be printed.  Replace Mhz
with MHz on the affected lines and add commas as needed.
Signed-off-by: default avatarPavel Roskin <proski@gnu.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c6c97bda
...@@ -206,7 +206,7 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, ...@@ -206,7 +206,7 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
r = ath9k_hw_reset(ah, hchan, fastcc); r = ath9k_hw_reset(ah, hchan, fastcc);
if (r) { if (r) {
ath_print(common, ATH_DBG_FATAL, ath_print(common, ATH_DBG_FATAL,
"Unable to reset channel (%u Mhz) " "Unable to reset channel (%u MHz), "
"reset status %d\n", "reset status %d\n",
channel->center_freq, r); channel->center_freq, r);
spin_unlock_bh(&sc->sc_resetlock); spin_unlock_bh(&sc->sc_resetlock);
...@@ -869,7 +869,7 @@ void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw) ...@@ -869,7 +869,7 @@ void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw)
r = ath9k_hw_reset(ah, ah->curchan, false); r = ath9k_hw_reset(ah, ah->curchan, false);
if (r) { if (r) {
ath_print(common, ATH_DBG_FATAL, ath_print(common, ATH_DBG_FATAL,
"Unable to reset channel %u (%uMhz) ", "Unable to reset channel (%u MHz), "
"reset status %d\n", "reset status %d\n",
channel->center_freq, r); channel->center_freq, r);
} }
...@@ -924,7 +924,7 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw) ...@@ -924,7 +924,7 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw)
r = ath9k_hw_reset(ah, ah->curchan, false); r = ath9k_hw_reset(ah, ah->curchan, false);
if (r) { if (r) {
ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL, ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL,
"Unable to reset channel %u (%uMhz) " "Unable to reset channel (%u MHz), "
"reset status %d\n", "reset status %d\n",
channel->center_freq, r); channel->center_freq, r);
} }
......
...@@ -429,7 +429,7 @@ static void ath_rx_ps(struct ath_softc *sc, struct sk_buff *skb) ...@@ -429,7 +429,7 @@ static void ath_rx_ps(struct ath_softc *sc, struct sk_buff *skb)
sc->ps_flags &= ~PS_WAIT_FOR_PSPOLL_DATA; sc->ps_flags &= ~PS_WAIT_FOR_PSPOLL_DATA;
ath_print(common, ATH_DBG_PS, ath_print(common, ATH_DBG_PS,
"Going back to sleep after having received " "Going back to sleep after having received "
"PS-Poll data (0x%x)\n", "PS-Poll data (0x%lx)\n",
sc->ps_flags & (PS_WAIT_FOR_BEACON | sc->ps_flags & (PS_WAIT_FOR_BEACON |
PS_WAIT_FOR_CAB | PS_WAIT_FOR_CAB |
PS_WAIT_FOR_PSPOLL_DATA | PS_WAIT_FOR_PSPOLL_DATA |
......
...@@ -1857,7 +1857,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb, ...@@ -1857,7 +1857,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK; sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK;
ath_print(common, ATH_DBG_PS, ath_print(common, ATH_DBG_PS,
"Going back to sleep after having " "Going back to sleep after having "
"received TX status (0x%x)\n", "received TX status (0x%lx)\n",
sc->ps_flags & (PS_WAIT_FOR_BEACON | sc->ps_flags & (PS_WAIT_FOR_BEACON |
PS_WAIT_FOR_CAB | PS_WAIT_FOR_CAB |
PS_WAIT_FOR_PSPOLL_DATA | PS_WAIT_FOR_PSPOLL_DATA |
......
...@@ -65,11 +65,11 @@ enum ATH_DEBUG { ...@@ -65,11 +65,11 @@ enum ATH_DEBUG {
#define ATH_DBG_DEFAULT (ATH_DBG_FATAL) #define ATH_DBG_DEFAULT (ATH_DBG_FATAL)
#ifdef CONFIG_ATH_DEBUG #ifdef CONFIG_ATH_DEBUG
void ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...); void ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...)
__attribute__ ((format (printf, 3, 4)));
#else #else
static inline void ath_print(struct ath_common *common, static inline void __attribute__ ((format (printf, 3, 4)))
int dbg_mask, ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...)
const char *fmt, ...)
{ {
} }
#endif /* CONFIG_ATH_DEBUG */ #endif /* CONFIG_ATH_DEBUG */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment