[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202110160728.LNXILgCs-lkp@intel.com>
Date: Sat, 16 Oct 2021 07:40:38 +0800
From: kernel test robot <lkp@...el.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org, Felix Fietkau <nbd@....name>
Subject: [nbd168-wireless:mt76 74/113]
drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1108:23: warning: variable
'phy' set but not used
tree: https://github.com/nbd168/wireless mt76
head: 39e333d657f49619c65b9f5b59aa6405f13abf35
commit: 590e774e4ec95cd17d9c473284b45d2af5c4885a [74/113] mt76: mt7921: remove mcu rate reporting code
config: x86_64-randconfig-a004-20211015 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6069a6a5049497a32a50a49661c2f4169078bdba)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/nbd168/wireless/commit/590e774e4ec95cd17d9c473284b45d2af5c4885a
git remote add nbd168-wireless https://github.com/nbd168/wireless
git fetch --no-tags nbd168-wireless mt76
git checkout 590e774e4ec95cd17d9c473284b45d2af5c4885a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1108:23: warning: variable 'phy' set but not used [-Wunused-but-set-variable]
struct mt7921_phy *phy;
^
drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1345:21: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
struct mt7921_dev *dev;
^
2 warnings generated.
vim +/phy +1108 drivers/net/wireless/mediatek/mt76/mt7921/mac.c
bcf78d7bff1513 Lorenzo Bianconi 2021-09-04 1077
a7742ef4cd9166 Lorenzo Bianconi 2021-08-16 1078 static void
a7742ef4cd9166 Lorenzo Bianconi 2021-08-16 1079 mt7921_mac_tx_free(struct mt7921_dev *dev, struct sk_buff *skb)
163f4d22c118d4 Sean Wang 2021-01-28 1080 {
163f4d22c118d4 Sean Wang 2021-01-28 1081 struct mt7921_tx_free *free = (struct mt7921_tx_free *)skb->data;
163f4d22c118d4 Sean Wang 2021-01-28 1082 struct mt76_dev *mdev = &dev->mt76;
163f4d22c118d4 Sean Wang 2021-01-28 1083 struct mt76_txwi_cache *txwi;
163f4d22c118d4 Sean Wang 2021-01-28 1084 struct ieee80211_sta *sta = NULL;
163f4d22c118d4 Sean Wang 2021-01-28 1085 LIST_HEAD(free_list);
163f4d22c118d4 Sean Wang 2021-01-28 1086 struct sk_buff *tmp;
163f4d22c118d4 Sean Wang 2021-01-28 1087 bool wake = false;
163f4d22c118d4 Sean Wang 2021-01-28 1088 u8 i, count;
163f4d22c118d4 Sean Wang 2021-01-28 1089
163f4d22c118d4 Sean Wang 2021-01-28 1090 /* clean DMA queues and unmap buffers first */
163f4d22c118d4 Sean Wang 2021-01-28 1091 mt76_queue_tx_cleanup(dev, dev->mphy.q_tx[MT_TXQ_PSD], false);
163f4d22c118d4 Sean Wang 2021-01-28 1092 mt76_queue_tx_cleanup(dev, dev->mphy.q_tx[MT_TXQ_BE], false);
163f4d22c118d4 Sean Wang 2021-01-28 1093
163f4d22c118d4 Sean Wang 2021-01-28 1094 /* TODO: MT_TX_FREE_LATENCY is msdu time from the TXD is queued into PLE,
163f4d22c118d4 Sean Wang 2021-01-28 1095 * to the time ack is received or dropped by hw (air + hw queue time).
163f4d22c118d4 Sean Wang 2021-01-28 1096 * Should avoid accessing WTBL to get Tx airtime, and use it instead.
163f4d22c118d4 Sean Wang 2021-01-28 1097 */
163f4d22c118d4 Sean Wang 2021-01-28 1098 count = FIELD_GET(MT_TX_FREE_MSDU_CNT, le16_to_cpu(free->ctrl));
163f4d22c118d4 Sean Wang 2021-01-28 1099 for (i = 0; i < count; i++) {
163f4d22c118d4 Sean Wang 2021-01-28 1100 u32 msdu, info = le32_to_cpu(free->info[i]);
163f4d22c118d4 Sean Wang 2021-01-28 1101 u8 stat;
163f4d22c118d4 Sean Wang 2021-01-28 1102
163f4d22c118d4 Sean Wang 2021-01-28 1103 /* 1'b1: new wcid pair.
163f4d22c118d4 Sean Wang 2021-01-28 1104 * 1'b0: msdu_id with the same 'wcid pair' as above.
163f4d22c118d4 Sean Wang 2021-01-28 1105 */
163f4d22c118d4 Sean Wang 2021-01-28 1106 if (info & MT_TX_FREE_PAIR) {
163f4d22c118d4 Sean Wang 2021-01-28 1107 struct mt7921_sta *msta;
163f4d22c118d4 Sean Wang 2021-01-28 @1108 struct mt7921_phy *phy;
163f4d22c118d4 Sean Wang 2021-01-28 1109 struct mt76_wcid *wcid;
163f4d22c118d4 Sean Wang 2021-01-28 1110 u16 idx;
163f4d22c118d4 Sean Wang 2021-01-28 1111
163f4d22c118d4 Sean Wang 2021-01-28 1112 count++;
163f4d22c118d4 Sean Wang 2021-01-28 1113 idx = FIELD_GET(MT_TX_FREE_WLAN_ID, info);
163f4d22c118d4 Sean Wang 2021-01-28 1114 wcid = rcu_dereference(dev->mt76.wcid[idx]);
163f4d22c118d4 Sean Wang 2021-01-28 1115 sta = wcid_to_sta(wcid);
163f4d22c118d4 Sean Wang 2021-01-28 1116 if (!sta)
163f4d22c118d4 Sean Wang 2021-01-28 1117 continue;
163f4d22c118d4 Sean Wang 2021-01-28 1118
163f4d22c118d4 Sean Wang 2021-01-28 1119 msta = container_of(wcid, struct mt7921_sta, wcid);
163f4d22c118d4 Sean Wang 2021-01-28 1120 phy = msta->vif->phy;
163f4d22c118d4 Sean Wang 2021-01-28 1121 spin_lock_bh(&dev->sta_poll_lock);
163f4d22c118d4 Sean Wang 2021-01-28 1122 if (list_empty(&msta->poll_list))
163f4d22c118d4 Sean Wang 2021-01-28 1123 list_add_tail(&msta->poll_list, &dev->sta_poll_list);
163f4d22c118d4 Sean Wang 2021-01-28 1124 spin_unlock_bh(&dev->sta_poll_lock);
163f4d22c118d4 Sean Wang 2021-01-28 1125 continue;
163f4d22c118d4 Sean Wang 2021-01-28 1126 }
163f4d22c118d4 Sean Wang 2021-01-28 1127
163f4d22c118d4 Sean Wang 2021-01-28 1128 msdu = FIELD_GET(MT_TX_FREE_MSDU_ID, info);
163f4d22c118d4 Sean Wang 2021-01-28 1129 stat = FIELD_GET(MT_TX_FREE_STATUS, info);
163f4d22c118d4 Sean Wang 2021-01-28 1130
d089692bc7938a Lorenzo Bianconi 2021-04-20 1131 txwi = mt76_token_release(mdev, msdu, &wake);
163f4d22c118d4 Sean Wang 2021-01-28 1132 if (!txwi)
163f4d22c118d4 Sean Wang 2021-01-28 1133 continue;
163f4d22c118d4 Sean Wang 2021-01-28 1134
bcf78d7bff1513 Lorenzo Bianconi 2021-09-04 1135 mt7921_txwi_free(dev, txwi, sta, stat, &free_list);
163f4d22c118d4 Sean Wang 2021-01-28 1136 }
163f4d22c118d4 Sean Wang 2021-01-28 1137
d089692bc7938a Lorenzo Bianconi 2021-04-20 1138 if (wake)
d089692bc7938a Lorenzo Bianconi 2021-04-20 1139 mt76_set_tx_blocked(&dev->mt76, false);
163f4d22c118d4 Sean Wang 2021-01-28 1140
163f4d22c118d4 Sean Wang 2021-01-28 1141 napi_consume_skb(skb, 1);
163f4d22c118d4 Sean Wang 2021-01-28 1142
163f4d22c118d4 Sean Wang 2021-01-28 1143 list_for_each_entry_safe(skb, tmp, &free_list, list) {
163f4d22c118d4 Sean Wang 2021-01-28 1144 skb_list_del_init(skb);
163f4d22c118d4 Sean Wang 2021-01-28 1145 napi_consume_skb(skb, 1);
163f4d22c118d4 Sean Wang 2021-01-28 1146 }
1d8efc741df80b Sean Wang 2021-01-28 1147
1d8efc741df80b Sean Wang 2021-01-28 1148 mt7921_mac_sta_poll(dev);
1d8efc741df80b Sean Wang 2021-01-28 1149 mt76_worker_schedule(&dev->mt76.tx_worker);
163f4d22c118d4 Sean Wang 2021-01-28 1150 }
163f4d22c118d4 Sean Wang 2021-01-28 1151
:::::: The code at line 1108 was first introduced by commit
:::::: 163f4d22c118d4eb9e275bf9ee1577c0d14b3208 mt76: mt7921: add MAC support
:::::: TO: Sean Wang <sean.wang@...iatek.com>
:::::: CC: Felix Fietkau <nbd@....name>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (35190 bytes)
Powered by blists - more mailing lists