Hi Lorenzo,
I love your patch! Yet something to improve:
[auto build test ERROR on kvalo-wireless-drivers-next/master]
[also build test ERROR on kvalo-wireless-drivers/master v5.15-rc5 next-20211015]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Lorenzo-Bianconi/mt76-mt7921-get...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-ne...
master
config: x86_64-randconfig-a004-20211015 (attached as .config)
compiler: clang version 14.0.0 (
https://github.com/llvm/llvm-project
a49f5386ce6b091da66ea7c3a1d9a588d53becf7)
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/0day-ci/linux/commit/91d7fb264668cb286a961b82b9052e2e2...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Lorenzo-Bianconi/mt76-mt7921-get-rid-of-unused-variable-in-mt7921_tx_complete_skb/20211016-060448
git checkout 91d7fb264668cb286a961b82b9052e2e23a78f99
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir
ARCH=x86_64 SHELL=/bin/bash drivers/net/wireless/mediatek/mt76/mt7921/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1115:26: error:
use of undeclared identifier 'dev'
wcid =
rcu_dereference(dev->mt76.wcid[cb->wcid]);
^
> drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1115:26: error:
use of undeclared identifier 'dev'
>
drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1115:26: error: use of undeclared
identifier 'dev'
>>
drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1115:8: error: assigning to 'struct
mt76_wcid *' from incompatible type 'void'
wcid = rcu_dereference(dev->mt76.wcid[cb->wcid]);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.
vim +/dev +1115 drivers/net/wireless/mediatek/mt76/mt7921/mac.c
163f4d22c118d4 Sean Wang 2021-01-28 1091
163f4d22c118d4 Sean Wang 2021-01-28 1092 void mt7921_tx_complete_skb(struct
mt76_dev *mdev, struct mt76_queue_entry *e)
163f4d22c118d4 Sean Wang 2021-01-28 1093 {
163f4d22c118d4 Sean Wang 2021-01-28 1094 if (!e->txwi) {
163f4d22c118d4 Sean Wang 2021-01-28 1095 dev_kfree_skb_any(e->skb);
163f4d22c118d4 Sean Wang 2021-01-28 1096 return;
163f4d22c118d4 Sean Wang 2021-01-28 1097 }
163f4d22c118d4 Sean Wang 2021-01-28 1098
163f4d22c118d4 Sean Wang 2021-01-28 1099 /* error path */
163f4d22c118d4 Sean Wang 2021-01-28 1100 if (e->skb == DMA_DUMMY_DATA) {
163f4d22c118d4 Sean Wang 2021-01-28 1101 struct mt76_txwi_cache *t;
163f4d22c118d4 Sean Wang 2021-01-28 1102 struct mt7921_txp_common *txp;
163f4d22c118d4 Sean Wang 2021-01-28 1103 u16 token;
163f4d22c118d4 Sean Wang 2021-01-28 1104
163f4d22c118d4 Sean Wang 2021-01-28 1105 txp = mt7921_txwi_to_txp(mdev,
e->txwi);
163f4d22c118d4 Sean Wang 2021-01-28 1106 token =
le16_to_cpu(txp->hw.msdu_id[0]) & ~MT_MSDU_ID_VALID;
d089692bc7938a Lorenzo Bianconi 2021-04-20 1107 t = mt76_token_put(mdev, token);
163f4d22c118d4 Sean Wang 2021-01-28 1108 e->skb = t ? t->skb : NULL;
163f4d22c118d4 Sean Wang 2021-01-28 1109 }
163f4d22c118d4 Sean Wang 2021-01-28 1110
163f4d22c118d4 Sean Wang 2021-01-28 1111 if (e->skb) {
163f4d22c118d4 Sean Wang 2021-01-28 1112 struct mt76_tx_cb *cb =
mt76_tx_skb_cb(e->skb);
163f4d22c118d4 Sean Wang 2021-01-28 1113 struct mt76_wcid *wcid;
163f4d22c118d4 Sean Wang 2021-01-28 1114
163f4d22c118d4 Sean Wang 2021-01-28 @1115 wcid =
rcu_dereference(dev->mt76.wcid[cb->wcid]);
163f4d22c118d4 Sean Wang 2021-01-28 1116
163f4d22c118d4 Sean Wang 2021-01-28 1117 mt7921_tx_complete_status(mdev,
e->skb, wcid_to_sta(wcid), 0,
163f4d22c118d4 Sean Wang 2021-01-28 1118 NULL);
163f4d22c118d4 Sean Wang 2021-01-28 1119 }
163f4d22c118d4 Sean Wang 2021-01-28 1120 }
163f4d22c118d4 Sean Wang 2021-01-28 1121
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org