浏览代码

ath6kl: add __printf verification to ath6kl_dbg

Fix fallout too.

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Steve deRosier <derosier@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Joe Perches 8 年之前
父节点
当前提交
169345d40d

+ 2 - 0
drivers/net/wireless/ath/ath6kl/debug.h

@@ -63,6 +63,7 @@ int ath6kl_read_tgt_stats(struct ath6kl *ar, struct ath6kl_vif *vif);
 
 
 #ifdef CONFIG_ATH6KL_DEBUG
 #ifdef CONFIG_ATH6KL_DEBUG
 
 
+__printf(2, 3)
 void ath6kl_dbg(enum ATH6K_DEBUG_MASK mask, const char *fmt, ...);
 void ath6kl_dbg(enum ATH6K_DEBUG_MASK mask, const char *fmt, ...);
 void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask,
 void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask,
 		     const char *msg, const char *prefix,
 		     const char *msg, const char *prefix,
@@ -83,6 +84,7 @@ int ath6kl_debug_init_fs(struct ath6kl *ar);
 void ath6kl_debug_cleanup(struct ath6kl *ar);
 void ath6kl_debug_cleanup(struct ath6kl *ar);
 
 
 #else
 #else
+__printf(2, 3)
 static inline void ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask,
 static inline void ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask,
 			      const char *fmt, ...)
 			      const char *fmt, ...)
 {
 {

+ 1 - 1
drivers/net/wireless/ath/ath6kl/htc_pipe.c

@@ -995,7 +995,7 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb,
 
 
 	if (netlen < (payload_len + HTC_HDR_LENGTH)) {
 	if (netlen < (payload_len + HTC_HDR_LENGTH)) {
 		ath6kl_dbg(ATH6KL_DBG_HTC,
 		ath6kl_dbg(ATH6KL_DBG_HTC,
-			   "HTC Rx: insufficient length, got:%d expected =%u\n",
+			   "HTC Rx: insufficient length, got:%d expected =%zu\n",
 			   netlen, payload_len + HTC_HDR_LENGTH);
 			   netlen, payload_len + HTC_HDR_LENGTH);
 		status = -EINVAL;
 		status = -EINVAL;
 		goto free_skb;
 		goto free_skb;

+ 1 - 1
drivers/net/wireless/ath/ath6kl/wmi.c

@@ -1596,7 +1596,7 @@ static int ath6kl_wmi_txe_notify_event_rx(struct wmi *wmi, u8 *datap, int len,
 	rate = le32_to_cpu(ev->rate);
 	rate = le32_to_cpu(ev->rate);
 	pkts = le32_to_cpu(ev->pkts);
 	pkts = le32_to_cpu(ev->pkts);
 
 
-	ath6kl_dbg(ATH6KL_DBG_WMI, "TXE notify event: peer %pM rate %d% pkts %d intvl %ds\n",
+	ath6kl_dbg(ATH6KL_DBG_WMI, "TXE notify event: peer %pM rate %d%% pkts %d intvl %ds\n",
 		   vif->bssid, rate, pkts, vif->txe_intvl);
 		   vif->bssid, rate, pkts, vif->txe_intvl);
 
 
 	cfg80211_cqm_txe_notify(vif->ndev, vif->bssid, pkts,
 	cfg80211_cqm_txe_notify(vif->ndev, vif->bssid, pkts,