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(-)
--
1.8.3.4
It fixes following sparse check warning
>#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?
Reported-by: Fengguang Wu <[email protected]>
Signed-off-by: Nishant Sarmukadam <[email protected]>
Signed-off-by: Yogesh Ashok Powar <[email protected]>
---
drivers/net/wireless/mwl8k.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 706a445..3c0a0a8 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -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;
--
1.8.3.4
It fixes couple of sparse check
>#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
Reported-by: Fengguang Wu <[email protected]>
Signed-off-by: Nishant Sarmukadam <[email protected]>
Signed-off-by: Yogesh Ashok Powar <[email protected]>
---
drivers/net/wireless/mwl8k.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index b6d83f6..706a445 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -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;
--
1.8.3.4