Search Linux Wireless

Re: [PATCH] mt76: mt7921: get rid of unused variable in mt7921_tx_complete_skb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux