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: <202108052157.IUqglcjX-lkp@intel.com>
Date:   Thu, 5 Aug 2021 21:07:04 +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 195/223]
 drivers/staging/r8188eu/core/rtw_mp_ioctl.c:671:15: warning: variable
 'width' set but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   a8f80c20b373bb46670643db81f043ba7da6a537
commit: c8ec10db41e5f95237d10d00d2a41037a370a265 [195/223] staging: r8188eu: remove RT_TRACE calls from core/rtw_mp_ioctl.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=c8ec10db41e5f95237d10d00d2a41037a370a265
        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 c8ec10db41e5f95237d10d00d2a41037a370a265
        # 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_mp_ioctl.c: In function 'rtl8188eu_oid_rt_pro_write_register_hdl':
>> drivers/staging/r8188eu/core/rtw_mp_ioctl.c:671:15: warning: variable 'width' set but not used [-Wunused-but-set-variable]
     671 |  u32  offset, width, value;
         |               ^~~~~
   drivers/staging/r8188eu/core/rtw_mp_ioctl.c: In function 'rtl8188eu_oid_rt_set_rx_packet_type_hdl':
>> drivers/staging/r8188eu/core/rtw_mp_ioctl.c:1096:6: warning: variable 'rx_pkt_type' set but not used [-Wunused-but-set-variable]
    1096 |  u8  rx_pkt_type;
         |      ^~~~~~~~~~~
   In file included from drivers/staging/r8188eu/core/rtw_mp_ioctl.c:9:
   At top level:
   drivers/staging/r8188eu/core/../include/rtw_mp_ioctl.h:209:34: warning: 'rtl8188eu_oid_rtl_seg_81_85' defined but not used [-Wunused-const-variable=]
     209 | static const struct oid_obj_priv rtl8188eu_oid_rtl_seg_81_85[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/r8188eu/core/../include/rtw_mp_ioctl.h:203:34: warning: 'rtl8188eu_oid_rtl_seg_81_80_80' defined but not used [-Wunused-const-variable=]
     203 | static const struct oid_obj_priv rtl8188eu_oid_rtl_seg_81_80_80[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/r8188eu/core/../include/rtw_mp_ioctl.h:194:34: warning: 'rtl8188eu_oid_rtl_seg_81_80_40' defined but not used [-Wunused-const-variable=]
     194 | static const struct oid_obj_priv rtl8188eu_oid_rtl_seg_81_80_40[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/r8188eu/core/../include/rtw_mp_ioctl.h:175:34: warning: 'rtl8188eu_oid_rtl_seg_81_80_20' defined but not used [-Wunused-const-variable=]
     175 | static const struct oid_obj_priv rtl8188eu_oid_rtl_seg_81_80_20[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/r8188eu/core/../include/rtw_mp_ioctl.h:140:34: warning: 'rtl8188eu_oid_rtl_seg_81_80_00' defined but not used [-Wunused-const-variable=]
     140 | static const struct oid_obj_priv rtl8188eu_oid_rtl_seg_81_80_00[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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 +/width +671 drivers/staging/r8188eu/core/rtw_mp_ioctl.c

15865124feed88 Phillip Potter 2021-07-28  607  
15865124feed88 Phillip Potter 2021-07-28  608  int rtl8188eu_oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv)
15865124feed88 Phillip Potter 2021-07-28  609  {
15865124feed88 Phillip Potter 2021-07-28  610  	struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
15865124feed88 Phillip Potter 2021-07-28  611  	int status = NDIS_STATUS_SUCCESS;
15865124feed88 Phillip Potter 2021-07-28  612  
15865124feed88 Phillip Potter 2021-07-28  613  	if (poid_par_priv->type_of_oid != SET_OID)
15865124feed88 Phillip Potter 2021-07-28  614  		return NDIS_STATUS_NOT_ACCEPTED;
15865124feed88 Phillip Potter 2021-07-28  615  
15865124feed88 Phillip Potter 2021-07-28  616  	_irqlevel_changed_(&oldirql, LOWER);
15865124feed88 Phillip Potter 2021-07-28  617  	rtw_hal_set_hwreg(Adapter, HW_VAR_TRIGGER_GPIO_0, NULL);
15865124feed88 Phillip Potter 2021-07-28  618  	_irqlevel_changed_(&oldirql, RAISE);
15865124feed88 Phillip Potter 2021-07-28  619  
15865124feed88 Phillip Potter 2021-07-28  620  	return status;
15865124feed88 Phillip Potter 2021-07-28  621  }
15865124feed88 Phillip Potter 2021-07-28  622  /*   rtl8188eu_oid_rtl_seg_81_80_00   section end **************** */
15865124feed88 Phillip Potter 2021-07-28  623  /*  */
15865124feed88 Phillip Potter 2021-07-28  624  int rtl8188eu_oid_rt_pro8711_join_bss_hdl(struct oid_par_priv *poid_par_priv)
15865124feed88 Phillip Potter 2021-07-28  625  {
15865124feed88 Phillip Potter 2021-07-28  626  	return 0;
15865124feed88 Phillip Potter 2021-07-28  627  }
15865124feed88 Phillip Potter 2021-07-28  628  /*  */
15865124feed88 Phillip Potter 2021-07-28  629  int rtl8188eu_oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv)
15865124feed88 Phillip Potter 2021-07-28  630  {
15865124feed88 Phillip Potter 2021-07-28  631  	struct mp_rw_reg *RegRWStruct;
15865124feed88 Phillip Potter 2021-07-28  632  	u32		offset, width;
15865124feed88 Phillip Potter 2021-07-28  633  	int status = NDIS_STATUS_SUCCESS;
15865124feed88 Phillip Potter 2021-07-28  634  	struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
15865124feed88 Phillip Potter 2021-07-28  635  
15865124feed88 Phillip Potter 2021-07-28  636  	if (poid_par_priv->type_of_oid != QUERY_OID)
15865124feed88 Phillip Potter 2021-07-28  637  		return NDIS_STATUS_NOT_ACCEPTED;
15865124feed88 Phillip Potter 2021-07-28  638  
15865124feed88 Phillip Potter 2021-07-28  639  	RegRWStruct = (struct mp_rw_reg *)poid_par_priv->information_buf;
15865124feed88 Phillip Potter 2021-07-28  640  	offset = RegRWStruct->offset;
15865124feed88 Phillip Potter 2021-07-28  641  	width = RegRWStruct->width;
15865124feed88 Phillip Potter 2021-07-28  642  
15865124feed88 Phillip Potter 2021-07-28  643  	if (offset > 0xFFF)
15865124feed88 Phillip Potter 2021-07-28  644  		return NDIS_STATUS_NOT_ACCEPTED;
15865124feed88 Phillip Potter 2021-07-28  645  
15865124feed88 Phillip Potter 2021-07-28  646  	_irqlevel_changed_(&oldirql, LOWER);
15865124feed88 Phillip Potter 2021-07-28  647  
15865124feed88 Phillip Potter 2021-07-28  648  	switch (width) {
15865124feed88 Phillip Potter 2021-07-28  649  	case 1:
15865124feed88 Phillip Potter 2021-07-28  650  		RegRWStruct->value = rtw_read8(Adapter, offset);
15865124feed88 Phillip Potter 2021-07-28  651  		break;
15865124feed88 Phillip Potter 2021-07-28  652  	case 2:
15865124feed88 Phillip Potter 2021-07-28  653  		RegRWStruct->value = rtw_read16(Adapter, offset);
15865124feed88 Phillip Potter 2021-07-28  654  		break;
15865124feed88 Phillip Potter 2021-07-28  655  	default:
15865124feed88 Phillip Potter 2021-07-28  656  		width = 4;
15865124feed88 Phillip Potter 2021-07-28  657  		RegRWStruct->value = rtw_read32(Adapter, offset);
15865124feed88 Phillip Potter 2021-07-28  658  		break;
15865124feed88 Phillip Potter 2021-07-28  659  	}
15865124feed88 Phillip Potter 2021-07-28  660  
15865124feed88 Phillip Potter 2021-07-28  661  	_irqlevel_changed_(&oldirql, RAISE);
15865124feed88 Phillip Potter 2021-07-28  662  
15865124feed88 Phillip Potter 2021-07-28  663  	*poid_par_priv->bytes_rw = width;
15865124feed88 Phillip Potter 2021-07-28  664  
15865124feed88 Phillip Potter 2021-07-28  665  	return status;
15865124feed88 Phillip Potter 2021-07-28  666  }
15865124feed88 Phillip Potter 2021-07-28  667  /*  */
15865124feed88 Phillip Potter 2021-07-28  668  int rtl8188eu_oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv)
15865124feed88 Phillip Potter 2021-07-28  669  {
15865124feed88 Phillip Potter 2021-07-28  670  	struct mp_rw_reg *RegRWStruct;
15865124feed88 Phillip Potter 2021-07-28 @671  	u32		offset, width, value;
15865124feed88 Phillip Potter 2021-07-28  672  	int status = NDIS_STATUS_SUCCESS;
15865124feed88 Phillip Potter 2021-07-28  673  	struct adapter *padapter = (struct adapter *)(poid_par_priv->adapter_context);
15865124feed88 Phillip Potter 2021-07-28  674  
15865124feed88 Phillip Potter 2021-07-28  675  	if (poid_par_priv->type_of_oid != SET_OID)
15865124feed88 Phillip Potter 2021-07-28  676  		return NDIS_STATUS_NOT_ACCEPTED;
15865124feed88 Phillip Potter 2021-07-28  677  
15865124feed88 Phillip Potter 2021-07-28  678  	RegRWStruct = (struct mp_rw_reg *)poid_par_priv->information_buf;
15865124feed88 Phillip Potter 2021-07-28  679  	offset = RegRWStruct->offset;
15865124feed88 Phillip Potter 2021-07-28  680  	width = RegRWStruct->width;
15865124feed88 Phillip Potter 2021-07-28  681  	value = RegRWStruct->value;
15865124feed88 Phillip Potter 2021-07-28  682  
15865124feed88 Phillip Potter 2021-07-28  683  	if (offset > 0xFFF)
15865124feed88 Phillip Potter 2021-07-28  684  		return NDIS_STATUS_NOT_ACCEPTED;
15865124feed88 Phillip Potter 2021-07-28  685  
15865124feed88 Phillip Potter 2021-07-28  686  	_irqlevel_changed_(&oldirql, LOWER);
15865124feed88 Phillip Potter 2021-07-28  687  
15865124feed88 Phillip Potter 2021-07-28  688  	switch (RegRWStruct->width) {
15865124feed88 Phillip Potter 2021-07-28  689  	case 1:
15865124feed88 Phillip Potter 2021-07-28  690  		if (value > 0xFF) {
15865124feed88 Phillip Potter 2021-07-28  691  			status = NDIS_STATUS_NOT_ACCEPTED;
15865124feed88 Phillip Potter 2021-07-28  692  			break;
15865124feed88 Phillip Potter 2021-07-28  693  		}
15865124feed88 Phillip Potter 2021-07-28  694  		rtw_write8(padapter, offset, (u8)value);
15865124feed88 Phillip Potter 2021-07-28  695  		break;
15865124feed88 Phillip Potter 2021-07-28  696  	case 2:
15865124feed88 Phillip Potter 2021-07-28  697  		if (value > 0xFFFF) {
15865124feed88 Phillip Potter 2021-07-28  698  			status = NDIS_STATUS_NOT_ACCEPTED;
15865124feed88 Phillip Potter 2021-07-28  699  			break;
15865124feed88 Phillip Potter 2021-07-28  700  		}
15865124feed88 Phillip Potter 2021-07-28  701  		rtw_write16(padapter, offset, (u16)value);
15865124feed88 Phillip Potter 2021-07-28  702  		break;
15865124feed88 Phillip Potter 2021-07-28  703  	case 4:
15865124feed88 Phillip Potter 2021-07-28  704  		rtw_write32(padapter, offset, value);
15865124feed88 Phillip Potter 2021-07-28  705  		break;
15865124feed88 Phillip Potter 2021-07-28  706  	default:
15865124feed88 Phillip Potter 2021-07-28  707  		status = NDIS_STATUS_NOT_ACCEPTED;
15865124feed88 Phillip Potter 2021-07-28  708  		break;
15865124feed88 Phillip Potter 2021-07-28  709  	}
15865124feed88 Phillip Potter 2021-07-28  710  
15865124feed88 Phillip Potter 2021-07-28  711  	_irqlevel_changed_(&oldirql, RAISE);
15865124feed88 Phillip Potter 2021-07-28  712  
15865124feed88 Phillip Potter 2021-07-28  713  	return status;
15865124feed88 Phillip Potter 2021-07-28  714  }
15865124feed88 Phillip Potter 2021-07-28  715  /*  */
15865124feed88 Phillip Potter 2021-07-28  716  int rtl8188eu_oid_rt_pro_burst_read_register_hdl(struct oid_par_priv *poid_par_priv)
15865124feed88 Phillip Potter 2021-07-28  717  {
15865124feed88 Phillip Potter 2021-07-28  718  	return 0;
15865124feed88 Phillip Potter 2021-07-28  719  }
15865124feed88 Phillip Potter 2021-07-28  720  /*  */
15865124feed88 Phillip Potter 2021-07-28  721  int rtl8188eu_oid_rt_pro_burst_write_register_hdl(struct oid_par_priv *poid_par_priv)
15865124feed88 Phillip Potter 2021-07-28  722  {
15865124feed88 Phillip Potter 2021-07-28  723  	return 0;
15865124feed88 Phillip Potter 2021-07-28  724  }
15865124feed88 Phillip Potter 2021-07-28  725  /*  */
15865124feed88 Phillip Potter 2021-07-28  726  int rtl8188eu_oid_rt_pro_write_txcmd_hdl(struct oid_par_priv *poid_par_priv)
15865124feed88 Phillip Potter 2021-07-28  727  {
15865124feed88 Phillip Potter 2021-07-28  728  	return 0;
15865124feed88 Phillip Potter 2021-07-28  729  }
15865124feed88 Phillip Potter 2021-07-28  730  

:::::: The code at line 671 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ