Search Linux Wireless

[wireless-next:mld 23/23] net/mac80211/tx.c:5367:38: warning: variable 'ifmgd' set but not used

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git mld
head:   d7de9813d17ee0522e30489f3228f2e3a456ff0a
commit: d7de9813d17ee0522e30489f3228f2e3a456ff0a [23/23] mac80211: reorg some iface data structs for MLD
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220517/202205170246.inGN6Zt9-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 11.3.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://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git/commit/?id=d7de9813d17ee0522e30489f3228f2e3a456ff0a
        git remote add wireless-next https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git
        git fetch --no-tags wireless-next mld
        git checkout d7de9813d17ee0522e30489f3228f2e3a456ff0a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash net/mac80211/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   net/mac80211/tx.c: In function 'ieee80211_pspoll_get':
>> net/mac80211/tx.c:5367:38: warning: variable 'ifmgd' set but not used [-Wunused-but-set-variable]
    5367 |         struct ieee80211_if_managed *ifmgd;
         |                                      ^~~~~
   net/mac80211/tx.c: In function 'ieee80211_nullfunc_get':
   net/mac80211/tx.c:5406:38: warning: variable 'ifmgd' set but not used [-Wunused-but-set-variable]
    5406 |         struct ieee80211_if_managed *ifmgd;
         |                                      ^~~~~


vim +/ifmgd +5367 net/mac80211/tx.c

632189a0180fda Aloka Dixit   2020-09-11  5362  
7044cc565b45a8 Kalle Valo    2010-01-05  5363  struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
7044cc565b45a8 Kalle Valo    2010-01-05  5364  				     struct ieee80211_vif *vif)
7044cc565b45a8 Kalle Valo    2010-01-05  5365  {
7044cc565b45a8 Kalle Valo    2010-01-05  5366  	struct ieee80211_sub_if_data *sdata;
7044cc565b45a8 Kalle Valo    2010-01-05 @5367  	struct ieee80211_if_managed *ifmgd;
7044cc565b45a8 Kalle Valo    2010-01-05  5368  	struct ieee80211_pspoll *pspoll;
7044cc565b45a8 Kalle Valo    2010-01-05  5369  	struct ieee80211_local *local;
7044cc565b45a8 Kalle Valo    2010-01-05  5370  	struct sk_buff *skb;
7044cc565b45a8 Kalle Valo    2010-01-05  5371  
7044cc565b45a8 Kalle Valo    2010-01-05  5372  	if (WARN_ON(vif->type != NL80211_IFTYPE_STATION))
7044cc565b45a8 Kalle Valo    2010-01-05  5373  		return NULL;
7044cc565b45a8 Kalle Valo    2010-01-05  5374  
7044cc565b45a8 Kalle Valo    2010-01-05  5375  	sdata = vif_to_sdata(vif);
7044cc565b45a8 Kalle Valo    2010-01-05  5376  	ifmgd = &sdata->u.mgd;
7044cc565b45a8 Kalle Valo    2010-01-05  5377  	local = sdata->local;
7044cc565b45a8 Kalle Valo    2010-01-05  5378  
7044cc565b45a8 Kalle Valo    2010-01-05  5379  	skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*pspoll));
d15b84590a1d2e Joe Perches   2011-08-29  5380  	if (!skb)
7044cc565b45a8 Kalle Valo    2010-01-05  5381  		return NULL;
d15b84590a1d2e Joe Perches   2011-08-29  5382  
7044cc565b45a8 Kalle Valo    2010-01-05  5383  	skb_reserve(skb, local->hw.extra_tx_headroom);
7044cc565b45a8 Kalle Valo    2010-01-05  5384  
b080db585384b9 Johannes Berg 2017-06-16  5385  	pspoll = skb_put_zero(skb, sizeof(*pspoll));
7044cc565b45a8 Kalle Valo    2010-01-05  5386  	pspoll->frame_control = cpu_to_le16(IEEE80211_FTYPE_CTL |
7044cc565b45a8 Kalle Valo    2010-01-05  5387  					    IEEE80211_STYPE_PSPOLL);
cb8723de122ee2 Johannes Berg 2022-05-10  5388  	pspoll->aid = cpu_to_le16(sdata->vif.cfg.aid);
7044cc565b45a8 Kalle Valo    2010-01-05  5389  
7044cc565b45a8 Kalle Valo    2010-01-05  5390  	/* aid in PS-Poll has its two MSBs each set to 1 */
7044cc565b45a8 Kalle Valo    2010-01-05  5391  	pspoll->aid |= cpu_to_le16(1 << 15 | 1 << 14);
7044cc565b45a8 Kalle Valo    2010-01-05  5392  
d7de9813d17ee0 Johannes Berg 2022-05-16  5393  	memcpy(pspoll->bssid, sdata->deflink.u.mgd.bssid, ETH_ALEN);
7044cc565b45a8 Kalle Valo    2010-01-05  5394  	memcpy(pspoll->ta, vif->addr, ETH_ALEN);
7044cc565b45a8 Kalle Valo    2010-01-05  5395  
7044cc565b45a8 Kalle Valo    2010-01-05  5396  	return skb;
7044cc565b45a8 Kalle Valo    2010-01-05  5397  }
7044cc565b45a8 Kalle Valo    2010-01-05  5398  EXPORT_SYMBOL(ieee80211_pspoll_get);
7044cc565b45a8 Kalle Valo    2010-01-05  5399  

:::::: The code at line 5367 was first introduced by commit
:::::: 7044cc565b45a898c140fb185174a66f2d68a163 mac80211: add functions to create PS Poll and Nullfunc templates

:::::: TO: Kalle Valo <kalle.valo@xxxxxxxxx>
:::::: CC: John W. Linville <linville@xxxxxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[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