drivers/net/wireless/mediatek/mt76/mt7915/mac.c:1130 mt7915_mac_sta_stats_work() warn: test_bit() takes a bit number
From: kernel test robot
Date: Wed Aug 12 2020 - 01:52:03 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fb893de323e2d39f7a1f6df425703a2edbdf56ea
commit: e57b7901469fc0b021930b83a8094baaf3d81b09 mt76: add mac80211 driver for MT7915 PCIe-based chipsets
date: 3 months ago
config: parisc-randconfig-m031-20200811 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7915/mac.c:1130 mt7915_mac_sta_stats_work() warn: test_bit() takes a bit number
vim +1130 drivers/net/wireless/mediatek/mt76/mt7915/mac.c
1107
1108 void mt7915_mac_sta_stats_work(struct work_struct *work)
1109 {
1110 struct ieee80211_sta *sta;
1111 struct ieee80211_vif *vif;
1112 struct mt7915_sta_stats *stats;
1113 struct mt7915_sta *msta;
1114 struct mt7915_dev *dev;
1115
1116 msta = container_of(work, struct mt7915_sta, stats_work);
1117 sta = container_of((void *)msta, struct ieee80211_sta, drv_priv);
1118 vif = container_of((void *)msta->vif, struct ieee80211_vif, drv_priv);
1119 dev = msta->vif->dev;
1120 stats = &msta->stats;
1121
1122 /* use MT_TX_FREE_RATE to report Tx rate for further devices */
1123 if (time_after(jiffies, stats->jiffies + HZ)) {
1124 mt7915_mcu_get_rate_info(dev, RATE_CTRL_RU_INFO,
1125 msta->wcid.idx);
1126
1127 stats->jiffies = jiffies;
1128 }
1129
> 1130 if (test_and_clear_bit(IEEE80211_RC_SUPP_RATES_CHANGED |
1131 IEEE80211_RC_NSS_CHANGED |
1132 IEEE80211_RC_BW_CHANGED, &stats->changed))
1133 mt7915_mcu_add_rate_ctrl(dev, vif, sta);
1134
1135 if (test_and_clear_bit(IEEE80211_RC_SMPS_CHANGED, &stats->changed))
1136 mt7915_mcu_add_smps(dev, vif, sta);
1137
1138 spin_lock_bh(&dev->sta_poll_lock);
1139 if (list_empty(&msta->poll_list))
1140 list_add_tail(&msta->poll_list, &dev->sta_poll_list);
1141 spin_unlock_bh(&dev->sta_poll_lock);
1142 }
1143
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip