[staging:staging-testing 37/59] drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2553:24: warning: variable 'pwdev_priv' 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/gregkh/staging.git staging-testing
head:   921190437a4827667cceef10202b2150571ebe5c
commit: bdee203cd80ce2d3b0a52015ecfde6ad45d01eb9 [37/59] staging: rtl8723bs: Remove switch(type) as type is constant
config: x86_64-buildonly-randconfig-004-20240625 (https://download.01.org/0day-ci/archive/20240625/202406250759.FnxzD3PK-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240625/202406250759.FnxzD3PK-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406250759.FnxzD3PK-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2553:24: warning: variable 'pwdev_priv' set but not used [-Wunused-but-set-variable]
    2553 |         struct rtw_wdev_priv *pwdev_priv;
         |                               ^
   1 warning generated.


vim +/pwdev_priv +2553 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c

554c0a3abf216c Hans de Goede     2017-03-29  2536  
1d85bb7fd66aa1 Franziska Naepelt 2023-07-01  2537  static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
554c0a3abf216c Hans de Goede     2017-03-29  2538  				struct cfg80211_mgmt_tx_params *params,
554c0a3abf216c Hans de Goede     2017-03-29  2539  				u64 *cookie)
554c0a3abf216c Hans de Goede     2017-03-29  2540  {
554c0a3abf216c Hans de Goede     2017-03-29  2541  	struct net_device *ndev = wdev_to_ndev(wdev);
554c0a3abf216c Hans de Goede     2017-03-29  2542  	struct ieee80211_channel *chan = params->chan;
554c0a3abf216c Hans de Goede     2017-03-29  2543  	const u8 *buf = params->buf;
554c0a3abf216c Hans de Goede     2017-03-29  2544  	size_t len = params->len;
554c0a3abf216c Hans de Goede     2017-03-29  2545  	int ret = 0;
554c0a3abf216c Hans de Goede     2017-03-29  2546  	int tx_ret;
554c0a3abf216c Hans de Goede     2017-03-29  2547  	u32 dump_limit = RTW_MAX_MGMT_TX_CNT;
554c0a3abf216c Hans de Goede     2017-03-29  2548  	u32 dump_cnt = 0;
554c0a3abf216c Hans de Goede     2017-03-29  2549  	bool ack = true;
554c0a3abf216c Hans de Goede     2017-03-29  2550  	u8 tx_ch = (u8)ieee80211_frequency_to_channel(chan->center_freq);
554c0a3abf216c Hans de Goede     2017-03-29  2551  	u8 category, action;
554c0a3abf216c Hans de Goede     2017-03-29  2552  	struct adapter *padapter;
554c0a3abf216c Hans de Goede     2017-03-29 @2553  	struct rtw_wdev_priv *pwdev_priv;
554c0a3abf216c Hans de Goede     2017-03-29  2554  
cd1f1450092216 Michael Straube   2021-08-29  2555  	if (!ndev) {
554c0a3abf216c Hans de Goede     2017-03-29  2556  		ret = -EINVAL;
554c0a3abf216c Hans de Goede     2017-03-29  2557  		goto exit;
554c0a3abf216c Hans de Goede     2017-03-29  2558  	}
554c0a3abf216c Hans de Goede     2017-03-29  2559  
42a18f09bcb900 Ivan Safonov      2020-10-11  2560  	padapter = rtw_netdev_priv(ndev);
554c0a3abf216c Hans de Goede     2017-03-29  2561  	pwdev_priv = adapter_wdev_data(padapter);
554c0a3abf216c Hans de Goede     2017-03-29  2562  
554c0a3abf216c Hans de Goede     2017-03-29  2563  	/* cookie generation */
554c0a3abf216c Hans de Goede     2017-03-29  2564  	*cookie = (unsigned long)buf;
554c0a3abf216c Hans de Goede     2017-03-29  2565  
554c0a3abf216c Hans de Goede     2017-03-29  2566  	/* indicate ack before issue frame to avoid racing with rsp frame */
554c0a3abf216c Hans de Goede     2017-03-29  2567  	rtw_cfg80211_mgmt_tx_status(padapter, *cookie, buf, len, ack, GFP_KERNEL);
554c0a3abf216c Hans de Goede     2017-03-29  2568  
04c35396c5c6c6 Fabio Aiuto       2021-04-10  2569  	if (rtw_action_frame_parse(buf, len, &category, &action) == false)
554c0a3abf216c Hans de Goede     2017-03-29  2570  		goto exit;
554c0a3abf216c Hans de Goede     2017-03-29  2571  
554c0a3abf216c Hans de Goede     2017-03-29  2572  	rtw_ps_deny(padapter, PS_DENY_MGNT_TX);
51c8299a031c19 Kang Minchul      2022-09-22  2573  	if (rtw_pwr_wakeup(padapter) == _FAIL) {
554c0a3abf216c Hans de Goede     2017-03-29  2574  		ret = -EFAULT;
554c0a3abf216c Hans de Goede     2017-03-29  2575  		goto cancel_ps_deny;
554c0a3abf216c Hans de Goede     2017-03-29  2576  	}
554c0a3abf216c Hans de Goede     2017-03-29  2577  
554c0a3abf216c Hans de Goede     2017-03-29  2578  	do {
554c0a3abf216c Hans de Goede     2017-03-29  2579  		dump_cnt++;
554c0a3abf216c Hans de Goede     2017-03-29  2580  		tx_ret = _cfg80211_rtw_mgmt_tx(padapter, tx_ch, buf, len);
554c0a3abf216c Hans de Goede     2017-03-29  2581  	} while (dump_cnt < dump_limit && tx_ret != _SUCCESS);
554c0a3abf216c Hans de Goede     2017-03-29  2582  
554c0a3abf216c Hans de Goede     2017-03-29  2583  cancel_ps_deny:
554c0a3abf216c Hans de Goede     2017-03-29  2584  	rtw_ps_deny_cancel(padapter, PS_DENY_MGNT_TX);
554c0a3abf216c Hans de Goede     2017-03-29  2585  exit:
554c0a3abf216c Hans de Goede     2017-03-29  2586  	return ret;
554c0a3abf216c Hans de Goede     2017-03-29  2587  }
554c0a3abf216c Hans de Goede     2017-03-29  2588  

:::::: The code at line 2553 was first introduced by commit
:::::: 554c0a3abf216c991c5ebddcdb2c08689ecd290b staging: Add rtl8723bs sdio wifi driver

:::::: TO: Hans de Goede <hdegoede@xxxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux