ath: make gcc check format arguments of ath_print(), fix all misuses
authorPavel Roskin <proski@gnu.org>
Fri, 29 Jan 2010 22:22:12 +0000 (17:22 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 1 Feb 2010 20:40:04 +0000 (15:40 -0500)
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: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/ath/ath9k/xmit.c
drivers/net/wireless/ath/debug.h

index e04835cb21b540f4faedf9ff495e4d5ca39fa6da..12069aac1d6c4fc7b7c4a2c2890c7b474dd3d649 100644 (file)
@@ -206,7 +206,7 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
        r = ath9k_hw_reset(ah, hchan, fastcc);
        if (r) {
                ath_print(common, ATH_DBG_FATAL,
-                         "Unable to reset channel (%u Mhz) "
+                         "Unable to reset channel (%u MHz), "
                          "reset status %d\n",
                          channel->center_freq, r);
                spin_unlock_bh(&sc->sc_resetlock);
@@ -869,7 +869,7 @@ void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw)
        r = ath9k_hw_reset(ah, ah->curchan, false);
        if (r) {
                ath_print(common, ATH_DBG_FATAL,
-                         "Unable to reset channel %u (%uMhz) ",
+                         "Unable to reset channel (%u MHz), "
                          "reset status %d\n",
                          channel->center_freq, r);
        }
@@ -924,7 +924,7 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw)
        r = ath9k_hw_reset(ah, ah->curchan, false);
        if (r) {
                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",
                          channel->center_freq, r);
        }
index 40b5d05edcce8ab274ad216d90aed3800b78e67f..1ca42e5148c81ba72935899a931125b1a60b2d1a 100644 (file)
@@ -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;
                ath_print(common, ATH_DBG_PS,
                          "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 |
                                        PS_WAIT_FOR_CAB |
                                        PS_WAIT_FOR_PSPOLL_DATA |
index a6893cf0c43ba2294641536a3addb6ae9b1df4f6..3c790a4f38f77988b2bfdbd09ddca89ea9f2740f 100644 (file)
@@ -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;
                ath_print(common, ATH_DBG_PS,
                          "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 |
                                        PS_WAIT_FOR_CAB |
                                        PS_WAIT_FOR_PSPOLL_DATA |
index d6b685a06c5edb9cc33853a163d186fc083f2528..8263633c003c050c1640a6994c8a33743cd1ba43 100644 (file)
@@ -65,11 +65,11 @@ enum ATH_DEBUG {
 #define ATH_DBG_DEFAULT (ATH_DBG_FATAL)
 
 #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
-static inline void ath_print(struct ath_common *common,
-                            int dbg_mask,
-                            const char *fmt, ...)
+static inline void __attribute__ ((format (printf, 3, 4)))
+ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...)
 {
 }
 #endif /* CONFIG_ATH_DEBUG */