lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108151020.9OYD9f2T-lkp@intel.com>
Date:   Sun, 15 Aug 2021 10:53:29 +0800
From:   kernel test robot <lkp@...el.com>
To:     Phillip Potter <phil@...lpotter.co.uk>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [staging:staging-next 319/341]
 drivers/staging/r8188eu/hal/rtl8188e_cmd.c:158:12: warning: variable
 'init_rate' set but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next
head:   0bd35146642bdc56f1b87d75f047b1c92bd2bd39
commit: 987219ad34a67b6160e6f5247578596a1a887031 [319/341] staging: r8188eu: remove lines from Makefile that silence build warnings
config: x86_64-randconfig-r005-20210815 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 7776b19eed44906e9973bfb240b6279d6feaab41)
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=987219ad34a67b6160e6f5247578596a1a887031
        git remote add staging https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
        git fetch --no-tags staging staging-next
        git checkout 987219ad34a67b6160e6f5247578596a1a887031
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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 >>):

   In file included from drivers/staging/r8188eu/hal/rtl8188e_cmd.c:7:
   In file included from drivers/staging/r8188eu/hal/../include/drv_types.h:22:
   drivers/staging/r8188eu/hal/../include/rtw_recv.h:395:9: warning: variable 'buf_desc' is uninitialized when used here [-Wuninitialized]
           return buf_desc;
                  ^~~~~~~~
   drivers/staging/r8188eu/hal/../include/rtw_recv.h:391:25: note: initialize the variable 'buf_desc' to silence this warning
           unsigned char *buf_desc;
                                  ^
                                   = NULL
   drivers/staging/r8188eu/hal/../include/rtw_recv.h:412:52: warning: variable 'buf_star' is uninitialized when used here [-Wuninitialized]
           precv_frame = rxmem_to_recvframe((unsigned char *)buf_star);
                                                             ^~~~~~~~
   drivers/staging/r8188eu/hal/../include/rtw_recv.h:410:14: note: initialize the variable 'buf_star' to silence this warning
           u8 *buf_star;
                       ^
                        = NULL
>> drivers/staging/r8188eu/hal/rtl8188e_cmd.c:158:12: warning: variable 'init_rate' set but not used [-Wunused-but-set-variable]
           u8 macid, init_rate, raid, shortGIrate = false;
                     ^
   3 warnings generated.


vim +/init_rate +158 drivers/staging/r8188eu/hal/rtl8188e_cmd.c

8cd574e6af5463 Phillip Potter  2021-07-28  149  
8cd574e6af5463 Phillip Potter  2021-07-28  150  /* bitmap[0:27] = tx_rate_bitmap */
8cd574e6af5463 Phillip Potter  2021-07-28  151  /* bitmap[28:31]= Rate Adaptive id */
8cd574e6af5463 Phillip Potter  2021-07-28  152  /* arg[0:4] = macid */
8cd574e6af5463 Phillip Potter  2021-07-28  153  /* arg[5] = Short GI */
8cd574e6af5463 Phillip Potter  2021-07-28  154  void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_level)
8cd574e6af5463 Phillip Potter  2021-07-28  155  {
8cd574e6af5463 Phillip Potter  2021-07-28  156  	struct hal_data_8188e *haldata = GET_HAL_DATA(pAdapter);
8cd574e6af5463 Phillip Potter  2021-07-28  157  
8cd574e6af5463 Phillip Potter  2021-07-28 @158  	u8 macid, init_rate, raid, shortGIrate = false;
8cd574e6af5463 Phillip Potter  2021-07-28  159  
8cd574e6af5463 Phillip Potter  2021-07-28  160  	macid = arg&0x1f;
8cd574e6af5463 Phillip Potter  2021-07-28  161  
8cd574e6af5463 Phillip Potter  2021-07-28  162  	raid = (bitmap>>28) & 0x0f;
8cd574e6af5463 Phillip Potter  2021-07-28  163  	bitmap &= 0x0fffffff;
8cd574e6af5463 Phillip Potter  2021-07-28  164  
8cd574e6af5463 Phillip Potter  2021-07-28  165  	if (rssi_level != DM_RATR_STA_INIT)
8cd574e6af5463 Phillip Potter  2021-07-28  166  		bitmap = ODM_Get_Rate_Bitmap(&haldata->odmpriv, macid, bitmap, rssi_level);
8cd574e6af5463 Phillip Potter  2021-07-28  167  
8cd574e6af5463 Phillip Potter  2021-07-28  168  	bitmap |= ((raid<<28)&0xf0000000);
8cd574e6af5463 Phillip Potter  2021-07-28  169  
8cd574e6af5463 Phillip Potter  2021-07-28  170  	init_rate = get_highest_rate_idx(bitmap&0x0fffffff)&0x3f;
8cd574e6af5463 Phillip Potter  2021-07-28  171  
8cd574e6af5463 Phillip Potter  2021-07-28  172  	shortGIrate = (arg&BIT(5)) ? true : false;
8cd574e6af5463 Phillip Potter  2021-07-28  173  
8cd574e6af5463 Phillip Potter  2021-07-28  174  	if (shortGIrate)
8cd574e6af5463 Phillip Potter  2021-07-28  175  		init_rate |= BIT(6);
8cd574e6af5463 Phillip Potter  2021-07-28  176  
8cd574e6af5463 Phillip Potter  2021-07-28  177  	raid = (bitmap>>28) & 0x0f;
8cd574e6af5463 Phillip Potter  2021-07-28  178  
8cd574e6af5463 Phillip Potter  2021-07-28  179  	bitmap &= 0x0fffffff;
8cd574e6af5463 Phillip Potter  2021-07-28  180  
8cd574e6af5463 Phillip Potter  2021-07-28  181  	DBG_88E("%s=> mac_id:%d, raid:%d, ra_bitmap=0x%x, shortGIrate=0x%02x\n",
8cd574e6af5463 Phillip Potter  2021-07-28  182  		__func__, macid, raid, bitmap, shortGIrate);
8cd574e6af5463 Phillip Potter  2021-07-28  183  
6839ff57baa4a6 Michael Straube 2021-08-09  184  	ODM_RA_UpdateRateInfo_8188E(&haldata->odmpriv, macid, raid, bitmap, shortGIrate);
8cd574e6af5463 Phillip Potter  2021-07-28  185  }
8cd574e6af5463 Phillip Potter  2021-07-28  186  

:::::: The code at line 158 was first introduced by commit
:::::: 8cd574e6af5463af7d693d111c61212e52c44810 staging: r8188eu: introduce new hal 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" (33770 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ