]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mac80211: minstrel_ht: remove unused variable 'mg' in minstrel_ht_next_jump_rate()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 26 Mar 2021 02:48:43 +0000 (02:48 +0000)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 8 Apr 2021 09:20:45 +0000 (11:20 +0200)
GCC reports the following warning with W=1:

net/mac80211/rc80211_minstrel_ht.c:871:34: warning:
 variable 'mg' set but not used [-Wunused-but-set-variable]
  871 |  struct minstrel_mcs_group_data *mg;
      |                                  ^~

This variable is not used in function , this commit
remove it to fix the warning.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210326024843.987941-1-weiyongjun1@huawei.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rc80211_minstrel_ht.c

index ecad9b10984ffd4ea5c4d540647186aebbcb0c6a..f21c85eb906af78f61411a397c673e32c4084d82 100644 (file)
@@ -868,7 +868,6 @@ static u16
 minstrel_ht_next_jump_rate(struct minstrel_ht_sta *mi, u32 fast_rate_dur,
                           u32 slow_rate_dur, int *slow_rate_ofs)
 {
-       struct minstrel_mcs_group_data *mg;
        struct minstrel_rate_stats *mrs;
        u32 max_duration = slow_rate_dur;
        int i, index, offset;
@@ -886,7 +885,6 @@ minstrel_ht_next_jump_rate(struct minstrel_ht_sta *mi, u32 fast_rate_dur,
                u8 type;
 
                group = (group + 1) % ARRAY_SIZE(minstrel_mcs_groups);
-               mg = &mi->groups[group];
 
                supported = mi->supported[group];
                if (!supported)