Skip to contentSkip to conversation

mwl8k: Fixing sparse warnings

PATCH New Yogesh Ashok Powar 1 participant 3 messages Mar 6, 2014 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

cover mwl8k: Fixing sparse warnings

Fixing Sparse warnings.

Yogesh Ashok Powar (2):
mwl8k: le32_to_cpu is redandant on ioread32
mwl8k: mwl8k_update_survey can be static

 drivers/net/wireless/mwl8k.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
1.8.3.4
#1 lore raw

PATCH 1/2 mwl8k: le32_to_cpu cast to restricted

It fixes couple of sparse check

Quoted 3 lines

#make C=1 CF=-D__CHECK_ENDIAN__ drivers/net/wireless/mwl8k.o drivers/net/wireless/mwl8k.c:3104:19: warning: cast to restricted __le32 drivers/net/wireless/mwl8k.c:3108:18: warning: cast to restricted __le32

---
 drivers/net/wireless/mwl8k.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/mwl8k.c +2 -2
index b6d83f6..706a445 100644
@@ -3103,11 +3103,11 @@ void mwl8k_update_survey(struct mwl8k_priv *priv,
 
 	survey = &priv->survey[idx];
 
-	cca_cnt = le32_to_cpu(ioread32(priv->regs + NOK_CCA_CNT_REG));
+	cca_cnt = ioread32(priv->regs + NOK_CCA_CNT_REG);
 	cca_cnt /= 1000; /* uSecs to mSecs */
 	survey->channel_time_busy = (u64) cca_cnt;
 
-	rx_rdy = le32_to_cpu(ioread32(priv->regs + BBU_RXRDY_CNT_REG));
+	rx_rdy = ioread32(priv->regs + BBU_RXRDY_CNT_REG);
 	rx_rdy /= 1000; /* uSecs to mSecs */
 	survey->channel_time_rx = (u64) rx_rdy;
 
Signature · 1 line
1.8.3.4
#2 lore raw

PATCH 2/2 mwl8k: mwl8k_update_survey can be static

In reply to Yogesh Ashok Powar

It fixes following sparse check warning

Quoted 2 lines

#make C=1 CF=-D__CHECK_ENDIAN__ drivers/net/wireless/mwl8k.o drivers/net/wireless/mwl8k.c:3089:6: warning: symbol 'mwl8k_update_survey' was not declared. Should it be static?

---
 drivers/net/wireless/mwl8k.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/mwl8k.c +2 -2
index 706a445..3c0a0a8 100644
@@ -3088,8 +3088,8 @@ exit:
 	return idx;
 }
 
-void mwl8k_update_survey(struct mwl8k_priv *priv,
-			 struct ieee80211_channel *channel)
+static void mwl8k_update_survey(struct mwl8k_priv *priv,
+				struct ieee80211_channel *channel)
 {
 	u32 cca_cnt, rx_rdy;
 	s8 nf = 0, idx;
Signature · 1 line
1.8.3.4