[staging:staging-testing 192/222] drivers/staging/r8188eu/core/rtw_ieee80211.c:629:15: warning: variable 'sec_idx' 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:   d229f0fb10250173989d2086073ff702980ef48b
commit: 0399a1e24bbd1b78bf3e73ee46f25c2647ae8927 [192/222] staging: r8188eu: remove RT_TRACE calls from core/rtw_ieee80211.c
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 10.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/gregkh/staging.git/commit/?id=0399a1e24bbd1b78bf3e73ee46f25c2647ae8927
        git remote add staging https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
        git fetch --no-tags staging staging-testing
        git checkout 0399a1e24bbd1b78bf3e73ee46f25c2647ae8927
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=sh 

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

All warnings (new ones prefixed by >>):

   drivers/staging/r8188eu/core/rtw_ieee80211.c: In function 'rtw_get_sec_ie':
>> drivers/staging/r8188eu/core/rtw_ieee80211.c:629:15: warning: variable 'sec_idx' set but not used [-Wunused-but-set-variable]
     629 |  u8 authmode, sec_idx, i;
         |               ^~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
   Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
   Selected by
   - SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
   - SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC


vim +/sec_idx +629 drivers/staging/r8188eu/core/rtw_ieee80211.c

15865124feed88 Phillip Potter 2021-07-28  626  
15865124feed88 Phillip Potter 2021-07-28  627  int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie, u16 *wpa_len)
15865124feed88 Phillip Potter 2021-07-28  628  {
15865124feed88 Phillip Potter 2021-07-28 @629  	u8 authmode, sec_idx, i;
15865124feed88 Phillip Potter 2021-07-28  630  	u8 wpa_oui[4] = {0x0, 0x50, 0xf2, 0x01};
15865124feed88 Phillip Potter 2021-07-28  631  	uint	cnt;
15865124feed88 Phillip Potter 2021-07-28  632  
15865124feed88 Phillip Potter 2021-07-28  633  	/* Search required WPA or WPA2 IE and copy to sec_ie[] */
15865124feed88 Phillip Potter 2021-07-28  634  
15865124feed88 Phillip Potter 2021-07-28  635  	cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_);
15865124feed88 Phillip Potter 2021-07-28  636  
15865124feed88 Phillip Potter 2021-07-28  637  	sec_idx = 0;
15865124feed88 Phillip Potter 2021-07-28  638  
15865124feed88 Phillip Potter 2021-07-28  639  	while (cnt < in_len) {
15865124feed88 Phillip Potter 2021-07-28  640  		authmode = in_ie[cnt];
15865124feed88 Phillip Potter 2021-07-28  641  
15865124feed88 Phillip Potter 2021-07-28  642  		if ((authmode == _WPA_IE_ID_) && (!memcmp(&in_ie[cnt+2], &wpa_oui[0], 4))) {
0399a1e24bbd1b Phillip Potter 2021-08-01  643  				if (wpa_ie)
15865124feed88 Phillip Potter 2021-07-28  644  					memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt+1]+2);
15865124feed88 Phillip Potter 2021-07-28  645  
15865124feed88 Phillip Potter 2021-07-28  646  				*wpa_len = in_ie[cnt+1]+2;
15865124feed88 Phillip Potter 2021-07-28  647  				cnt += in_ie[cnt+1]+2;  /* get next */
15865124feed88 Phillip Potter 2021-07-28  648  		} else {
15865124feed88 Phillip Potter 2021-07-28  649  			if (authmode == _WPA2_IE_ID_) {
0399a1e24bbd1b Phillip Potter 2021-08-01  650  				if (rsn_ie)
15865124feed88 Phillip Potter 2021-07-28  651  					memcpy(rsn_ie, &in_ie[cnt], in_ie[cnt+1]+2);
15865124feed88 Phillip Potter 2021-07-28  652  
15865124feed88 Phillip Potter 2021-07-28  653  				*rsn_len = in_ie[cnt+1]+2;
15865124feed88 Phillip Potter 2021-07-28  654  				cnt += in_ie[cnt+1]+2;  /* get next */
15865124feed88 Phillip Potter 2021-07-28  655  			} else {
15865124feed88 Phillip Potter 2021-07-28  656  				cnt += in_ie[cnt+1]+2;   /* get next */
15865124feed88 Phillip Potter 2021-07-28  657  			}
15865124feed88 Phillip Potter 2021-07-28  658  		}
15865124feed88 Phillip Potter 2021-07-28  659  	}
15865124feed88 Phillip Potter 2021-07-28  660  
15865124feed88 Phillip Potter 2021-07-28  661  	return *rsn_len + *wpa_len;
15865124feed88 Phillip Potter 2021-07-28  662  }
15865124feed88 Phillip Potter 2021-07-28  663  

:::::: The code at line 629 was first introduced by commit
:::::: 15865124feed880978b79839c756ef6cbb4ec6b3 staging: r8188eu: introduce new core dir for RTL8188eu driver

:::::: TO: Phillip Potter <phil@xxxxxxxxxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
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