* [PATCH] mt76: mt7921: get rid of unused variable in mt7921_tx_complete_skb
@ 2021-10-15 22:03 Lorenzo Bianconi
2021-10-16 4:45 ` kernel test robot
2021-10-25 12:10 ` kernel test robot
0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2021-10-15 22:03 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless, lorenzo.bianconi, sean.wang
Remove unused dev variable in mt7921_tx_complete_skb routine
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
index 0b51db9656e7..ae67e93524c2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
@@ -1356,15 +1356,11 @@ void mt7921_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
void mt7921_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue_entry *e)
{
- struct mt7921_dev *dev;
-
if (!e->txwi) {
dev_kfree_skb_any(e->skb);
return;
}
- dev = container_of(mdev, struct mt7921_dev, mt76);
-
/* error path */
if (e->skb == DMA_DUMMY_DATA) {
struct mt76_txwi_cache *t;
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mt76: mt7921: get rid of unused variable in mt7921_tx_complete_skb
2021-10-15 22:03 [PATCH] mt76: mt7921: get rid of unused variable in mt7921_tx_complete_skb Lorenzo Bianconi
@ 2021-10-16 4:45 ` kernel test robot
2021-10-25 12:10 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-10-16 4:45 UTC (permalink / raw)
To: Lorenzo Bianconi, nbd
Cc: llvm, kbuild-all, linux-wireless, lorenzo.bianconi, sean.wang
[-- Attachment #1: Type: text/plain, Size: 4835 bytes --]
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-rid-of-unused-variable-in-mt7921_tx_complete_skb/20211016-060448
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git 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/91d7fb264668cb286a961b82b9052e2e23a78f99
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@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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35193 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mt76: mt7921: get rid of unused variable in mt7921_tx_complete_skb
2021-10-15 22:03 [PATCH] mt76: mt7921: get rid of unused variable in mt7921_tx_complete_skb Lorenzo Bianconi
2021-10-16 4:45 ` kernel test robot
@ 2021-10-25 12:10 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-10-25 12:10 UTC (permalink / raw)
To: Lorenzo Bianconi, nbd
Cc: kbuild-all, linux-wireless, lorenzo.bianconi, sean.wang
[-- Attachment #1: Type: text/plain, Size: 6380 bytes --]
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-rc6]
[cannot apply to next-20211025]
[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-rid-of-unused-variable-in-mt7921_tx_complete_skb/20211016-060448
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
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/91d7fb264668cb286a961b82b9052e2e23a78f99
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=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/devcoredump.h:8,
from drivers/net/wireless/mediatek/mt76/mt7921/mac.c:4:
drivers/net/wireless/mediatek/mt76/mt7921/mac.c: In function 'mt7921_tx_complete_skb':
>> drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1115:40: error: 'dev' undeclared (first use in this function); did you mean 'mdev'?
1115 | wcid = rcu_dereference(dev->mt76.wcid[cb->wcid]);
| ^~~
include/linux/rcupdate.h:389:17: note: in definition of macro '__rcu_dereference_check'
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:596:28: note: in expansion of macro 'rcu_dereference_check'
596 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1115:24: note: in expansion of macro 'rcu_dereference'
1115 | wcid = rcu_dereference(dev->mt76.wcid[cb->wcid]);
| ^~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1115:40: note: each undeclared identifier is reported only once for each function it appears in
1115 | wcid = rcu_dereference(dev->mt76.wcid[cb->wcid]);
| ^~~
include/linux/rcupdate.h:389:17: note: in definition of macro '__rcu_dereference_check'
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:596:28: note: in expansion of macro 'rcu_dereference_check'
596 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1115:24: note: in expansion of macro 'rcu_dereference'
1115 | wcid = rcu_dereference(dev->mt76.wcid[cb->wcid]);
| ^~~~~~~~~~~~~~~
vim +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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 69219 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-25 12:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-15 22:03 [PATCH] mt76: mt7921: get rid of unused variable in mt7921_tx_complete_skb Lorenzo Bianconi
2021-10-16 4:45 ` kernel test robot
2021-10-25 12:10 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).