[staging:staging-testing 1/495] drivers/staging/rtl8723bs/os_dep/recv_linux.c:101:6: warning: variable 'ret' set but not used

kernel test robot lkp at intel.com
Mon Apr 5 21:56:43 UTC 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   001c6bb6b62656e29e3b353242b5c955a1d94212
commit: de69e2b3f10594d37433033ad6e2cf6954d89409 [1/495] staging: rtl8723bs: remove DBG_COUNTER calls from os_dep/recv_linux.c
config: m68k-randconfig-r024-20210406 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.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=de69e2b3f10594d37433033ad6e2cf6954d89409
        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 de69e2b3f10594d37433033ad6e2cf6954d89409
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   drivers/staging/rtl8723bs/os_dep/recv_linux.c: In function 'rtw_os_recv_indicate_pkt':
>> drivers/staging/rtl8723bs/os_dep/recv_linux.c:101:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     101 |  int ret;
         |      ^~~
   In file included from drivers/staging/rtl8723bs/include/drv_types.h:42,
                    from drivers/staging/rtl8723bs/os_dep/recv_linux.c:9:
   At top level:
   drivers/staging/rtl8723bs/include/rtw_security.h:368:28: warning: 'K' defined but not used [-Wunused-const-variable=]
     368 | static const unsigned long K[64] = {
         |                            ^


vim +/ret +101 drivers/staging/rtl8723bs/os_dep/recv_linux.c

554c0a3abf216c Hans de Goede   2017-03-29   97  
554c0a3abf216c Hans de Goede   2017-03-29   98  void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt_attrib *pattrib)
554c0a3abf216c Hans de Goede   2017-03-29   99  {
554c0a3abf216c Hans de Goede   2017-03-29  100  	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
554c0a3abf216c Hans de Goede   2017-03-29 @101  	int ret;
554c0a3abf216c Hans de Goede   2017-03-29  102  
3fce0276f98a5e R Veera Kumar   2020-03-19  103  	/* Indicate the packets to upper layer */
554c0a3abf216c Hans de Goede   2017-03-29  104  	if (pkt) {
6a9b5dd1e24c06 Shobhit Kukreti 2019-06-18  105  		if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
554c0a3abf216c Hans de Goede   2017-03-29  106  			_pkt *pskb2 = NULL;
554c0a3abf216c Hans de Goede   2017-03-29  107  			struct sta_info *psta = NULL;
554c0a3abf216c Hans de Goede   2017-03-29  108  			struct sta_priv *pstapriv = &padapter->stapriv;
554c0a3abf216c Hans de Goede   2017-03-29  109  			int bmcast = IS_MCAST(pattrib->dst);
554c0a3abf216c Hans de Goede   2017-03-29  110  
6a9b5dd1e24c06 Shobhit Kukreti 2019-06-18  111  			if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)) {
6a9b5dd1e24c06 Shobhit Kukreti 2019-06-18  112  				if (bmcast) {
554c0a3abf216c Hans de Goede   2017-03-29  113  					psta = rtw_get_bcmc_stainfo(padapter);
21b1f2b3fb2e24 Ivan Safonov    2020-05-31  114  					pskb2 = skb_clone(pkt, GFP_ATOMIC);
554c0a3abf216c Hans de Goede   2017-03-29  115  				} else {
554c0a3abf216c Hans de Goede   2017-03-29  116  					psta = rtw_get_stainfo(pstapriv, pattrib->dst);
554c0a3abf216c Hans de Goede   2017-03-29  117  				}
554c0a3abf216c Hans de Goede   2017-03-29  118  
6a9b5dd1e24c06 Shobhit Kukreti 2019-06-18  119  				if (psta) {
554c0a3abf216c Hans de Goede   2017-03-29  120  					struct net_device *pnetdev = (struct net_device *)padapter->pnetdev;
554c0a3abf216c Hans de Goede   2017-03-29  121  					/* skb->ip_summed = CHECKSUM_NONE; */
554c0a3abf216c Hans de Goede   2017-03-29  122  					pkt->dev = pnetdev;
554c0a3abf216c Hans de Goede   2017-03-29  123  					skb_set_queue_mapping(pkt, rtw_recv_select_queue(pkt));
554c0a3abf216c Hans de Goede   2017-03-29  124  
554c0a3abf216c Hans de Goede   2017-03-29  125  					_rtw_xmit_entry(pkt, pnetdev);
554c0a3abf216c Hans de Goede   2017-03-29  126  
de69e2b3f10594 Phillip Potter  2021-02-15  127  					if (bmcast && pskb2)
554c0a3abf216c Hans de Goede   2017-03-29  128  						pkt = pskb2;
de69e2b3f10594 Phillip Potter  2021-02-15  129  					else
554c0a3abf216c Hans de Goede   2017-03-29  130  						return;
554c0a3abf216c Hans de Goede   2017-03-29  131  				}
fabf298696d030 Shobhit Kukreti 2019-06-18  132  			} else {
6a9b5dd1e24c06 Shobhit Kukreti 2019-06-18  133  				/*  to APself */
554c0a3abf216c Hans de Goede   2017-03-29  134  				/* DBG_871X("to APSelf\n"); */
554c0a3abf216c Hans de Goede   2017-03-29  135  			}
554c0a3abf216c Hans de Goede   2017-03-29  136  		}
554c0a3abf216c Hans de Goede   2017-03-29  137  
554c0a3abf216c Hans de Goede   2017-03-29  138  		pkt->protocol = eth_type_trans(pkt, padapter->pnetdev);
554c0a3abf216c Hans de Goede   2017-03-29  139  		pkt->dev = padapter->pnetdev;
554c0a3abf216c Hans de Goede   2017-03-29  140  

:::::: The code at line 101 was first introduced by commit
:::::: 554c0a3abf216c991c5ebddcdb2c08689ecd290b staging: Add rtl8723bs sdio wifi driver

:::::: TO: Hans de Goede <hdegoede at redhat.com>
:::::: CC: Greg Kroah-Hartman <gregkh at linuxfoundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 30309 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20210406/9eb17770/attachment-0001.bin>


More information about the devel mailing list