linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [staging:staging-testing 192/222] drivers/staging/r8188eu/core/rtw_ieee80211.c:629:15: warning: variable 'sec_idx' set but not used
@ 2021-08-05 12:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-05 12:34 UTC (permalink / raw)
  To: Phillip Potter; +Cc: kbuild-all, devel, linux-kernel, Greg Kroah-Hartman

[-- Attachment #1: Type: text/plain, Size: 4909 bytes --]

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@intel.com>

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@philpotter.co.uk>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
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: 55015 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-05 12:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 12:34 [staging:staging-testing 192/222] drivers/staging/r8188eu/core/rtw_ieee80211.c:629:15: warning: variable 'sec_idx' set but not used 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).