[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108052037.8y37VEd5-lkp@intel.com>
Date: Thu, 5 Aug 2021 20:34:47 +0800
From: kernel test robot <lkp@...el.com>
To: Phillip Potter <phil@...lpotter.co.uk>
Cc: kbuild-all@...ts.01.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [staging:staging-testing 192/222]
drivers/staging/r8188eu/core/rtw_ieee80211.c:629:15: warning: variable
'sec_idx' set but not used
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@...el.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@...lpotter.co.uk>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (55015 bytes)
Powered by blists - more mailing lists