diff mbox

[v2,2/3] iwlwifi: mvm: rs: Remove unused 'mcs' variable

Message ID 20161109055033.GA27470@google.com (mailing list archive)
State Accepted
Delegated to: Luca Coelho
Headers show

Commit Message

Kirtika Ruchandani Nov. 9, 2016, 5:50 a.m. UTC
Commit 5fc0f76c4 introduced Rx stats from debugfs, the function
iwl_mvm_reset_frame_stats from that commit defines and sets mcs but does not use
it. Compiling iwlwifi with W=1 gives this warning -

iwlwifi/mvm/rs.c: In function ‘iwl_mvm_update_frame_stats’:
iwlwifi/mvm/rs.c:3074:14: warning: variable ‘mcs’ set but not used [-Wunused-but-set-variable]

Fixes: 5fc0f76c43bd (iwlwifi: mvm: add Rx frames statistics via debugfs)

Signed-off-by: Kirtika Ruchandani <kirtika@google.com>
Cc: Eyal Shapira <eyal@wizery.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Luca Coelho Nov. 9, 2016, 7:28 a.m. UTC | #1
Another nitpick....
On Tue, 2016-11-08 at 21:50 -0800, Kirtika Ruchandani wrote:
> Commit 5fc0f76c4 introduced Rx stats from debugfs, the function
> iwl_mvm_reset_frame_stats from that commit defines and sets mcs but does not use
> it. Compiling iwlwifi with W=1 gives this warning -
> 
> iwlwifi/mvm/rs.c: In function ‘iwl_mvm_update_frame_stats’:
> iwlwifi/mvm/rs.c:3074:14: warning: variable ‘mcs’ set but not used [-Wunused-but-set-variable]
> 
> Fixes: 5fc0f76c43bd (iwlwifi: mvm: add Rx frames statistics via debugfs)

You forgot the quotes here, but no worries, I'll add them.

--
Luca.
diff mbox

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
index 0b79f4a..80f99c3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
@@ -3065,7 +3065,7 @@  static void iwl_mvm_reset_frame_stats(struct iwl_mvm *mvm)
 
 void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg)
 {
-	u8 nss = 0, mcs = 0;
+	u8 nss = 0;
 
 	spin_lock(&mvm->drv_stats_lock);
 
@@ -3093,11 +3093,9 @@  void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg)
 
 	if (rate & RATE_MCS_HT_MSK) {
 		mvm->drv_rx_stats.ht_frames++;
-		mcs = rate & RATE_HT_MCS_RATE_CODE_MSK;
 		nss = ((rate & RATE_HT_MCS_NSS_MSK) >> RATE_HT_MCS_NSS_POS) + 1;
 	} else if (rate & RATE_MCS_VHT_MSK) {
 		mvm->drv_rx_stats.vht_frames++;
-		mcs = rate & RATE_VHT_MCS_RATE_CODE_MSK;
 		nss = ((rate & RATE_VHT_MCS_NSS_MSK) >>
 		       RATE_VHT_MCS_NSS_POS) + 1;
 	} else {