[staging:staging-testing 371/409] drivers/staging/rtl8188eu/core/rtw_efuse.c:239:8: warning: variable 'aaa' set but not used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   5b4f167ef3555ec4c334a8dc89c1b44bb2c6bff5
commit: 9a6780227ece18b6ad1ae6514a46a6850dfa9971 [371/409] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_efuse.c
config: mips-allyesconfig (attached as .config)
compiler: mips-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=9a6780227ece18b6ad1ae6514a46a6850dfa9971
        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 9a6780227ece18b6ad1ae6514a46a6850dfa9971
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   drivers/staging/rtl8188eu/core/rtw_efuse.c: In function 'efuse_read_phymap_from_txpktbuf':
>> drivers/staging/rtl8188eu/core/rtw_efuse.c:239:8: warning: variable 'aaa' set but not used [-Wunused-but-set-variable]
     239 |    u16 aaa;
         |        ^~~
>> drivers/staging/rtl8188eu/core/rtw_efuse.c:238:16: warning: variable 'aaabak' set but not used [-Wunused-but-set-variable]
     238 |    u16 lenbak, aaabak;
         |                ^~~~~~
>> drivers/staging/rtl8188eu/core/rtw_efuse.c:238:8: warning: variable 'lenbak' set but not used [-Wunused-but-set-variable]
     238 |    u16 lenbak, aaabak;
         |        ^~~~~~


vim +/aaa +239 drivers/staging/rtl8188eu/core/rtw_efuse.c

ee5f8a431ead8f3 navin patidar        2014-06-20  199  
ee5f8a431ead8f3 navin patidar        2014-06-20  200  static void efuse_read_phymap_from_txpktbuf(
ee5f8a431ead8f3 navin patidar        2014-06-20  201  	struct adapter  *adapter,
ee5f8a431ead8f3 navin patidar        2014-06-20  202  	int bcnhead,	/* beacon head, where FW store len(2-byte) and efuse physical map. */
ee5f8a431ead8f3 navin patidar        2014-06-20  203  	u8 *content,	/* buffer to store efuse physical map */
ee5f8a431ead8f3 navin patidar        2014-06-20  204  	u16 *size	/* for efuse content: the max byte to read. will update to byte read */
ee5f8a431ead8f3 navin patidar        2014-06-20  205  	)
ee5f8a431ead8f3 navin patidar        2014-06-20  206  {
ee5f8a431ead8f3 navin patidar        2014-06-20  207  	u16 dbg_addr = 0;
ed73749426deb28 Rémy Oudompheng      2015-11-02  208  	unsigned long start = 0;
ee5f8a431ead8f3 navin patidar        2014-06-20  209  	u8 reg_0x143 = 0;
ee5f8a431ead8f3 navin patidar        2014-06-20  210  	u32 lo32 = 0, hi32 = 0;
ee5f8a431ead8f3 navin patidar        2014-06-20  211  	u16 len = 0, count = 0;
ee5f8a431ead8f3 navin patidar        2014-06-20  212  	int i = 0;
ee5f8a431ead8f3 navin patidar        2014-06-20  213  	u16 limit = *size;
ee5f8a431ead8f3 navin patidar        2014-06-20  214  
ee5f8a431ead8f3 navin patidar        2014-06-20  215  	u8 *pos = content;
ee5f8a431ead8f3 navin patidar        2014-06-20  216  
ee5f8a431ead8f3 navin patidar        2014-06-20  217  	if (bcnhead < 0) /* if not valid */
ee5f8a431ead8f3 navin patidar        2014-06-20  218  		bcnhead = usb_read8(adapter, REG_TDECTRL + 1);
ee5f8a431ead8f3 navin patidar        2014-06-20  219  
ee5f8a431ead8f3 navin patidar        2014-06-20  220  	usb_write8(adapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
ee5f8a431ead8f3 navin patidar        2014-06-20  221  
ee5f8a431ead8f3 navin patidar        2014-06-20  222  	dbg_addr = bcnhead * 128 / 8; /* 8-bytes addressing */
ee5f8a431ead8f3 navin patidar        2014-06-20  223  
ee5f8a431ead8f3 navin patidar        2014-06-20  224  	while (1) {
ee5f8a431ead8f3 navin patidar        2014-06-20  225  		usb_write16(adapter, REG_PKTBUF_DBG_ADDR, dbg_addr + i);
ee5f8a431ead8f3 navin patidar        2014-06-20  226  
ee5f8a431ead8f3 navin patidar        2014-06-20  227  		usb_write8(adapter, REG_TXPKTBUF_DBG, 0);
ee5f8a431ead8f3 navin patidar        2014-06-20  228  		start = jiffies;
ee5f8a431ead8f3 navin patidar        2014-06-20  229  		while (!(reg_0x143 = usb_read8(adapter, REG_TXPKTBUF_DBG)) &&
9a6780227ece18b Phillip Potter       2021-06-15  230  		       jiffies_to_msecs(jiffies - start) < 1000)
c8cb5f2c780a600 Jiayi Ye             2014-10-20  231  			usleep_range(1000, 2000);
ee5f8a431ead8f3 navin patidar        2014-06-20  232  
ee5f8a431ead8f3 navin patidar        2014-06-20  233  		lo32 = usb_read32(adapter, REG_PKTBUF_DBG_DATA_L);
ee5f8a431ead8f3 navin patidar        2014-06-20  234  		hi32 = usb_read32(adapter, REG_PKTBUF_DBG_DATA_H);
ee5f8a431ead8f3 navin patidar        2014-06-20  235  
ee5f8a431ead8f3 navin patidar        2014-06-20  236  		if (i == 0) {
ee5f8a431ead8f3 navin patidar        2014-06-20  237  			u8 lenc[2];
ee5f8a431ead8f3 navin patidar        2014-06-20 @238  			u16 lenbak, aaabak;
ee5f8a431ead8f3 navin patidar        2014-06-20 @239  			u16 aaa;
7d2af82cc5f5713 Yamanappagouda Patil 2016-12-22  240  
ee5f8a431ead8f3 navin patidar        2014-06-20  241  			lenc[0] = usb_read8(adapter, REG_PKTBUF_DBG_DATA_L);
ee5f8a431ead8f3 navin patidar        2014-06-20  242  			lenc[1] = usb_read8(adapter, REG_PKTBUF_DBG_DATA_L + 1);
ee5f8a431ead8f3 navin patidar        2014-06-20  243  
ee5f8a431ead8f3 navin patidar        2014-06-20  244  			aaabak = le16_to_cpup((__le16 *)lenc);
ee5f8a431ead8f3 navin patidar        2014-06-20  245  			lenbak = le16_to_cpu(*((__le16 *)lenc));
ee5f8a431ead8f3 navin patidar        2014-06-20  246  			aaa = le16_to_cpup((__le16 *)&lo32);
ee5f8a431ead8f3 navin patidar        2014-06-20  247  			len = le16_to_cpu(*((__le16 *)&lo32));
ee5f8a431ead8f3 navin patidar        2014-06-20  248  
530c9b1b21fc41f Ivan Safonov         2015-10-27  249  			limit = min_t(u16, len - 2, limit);
ee5f8a431ead8f3 navin patidar        2014-06-20  250  
ee5f8a431ead8f3 navin patidar        2014-06-20  251  			memcpy(pos, ((u8 *)&lo32) + 2, (limit >= count + 2) ? 2 : limit - count);
ee5f8a431ead8f3 navin patidar        2014-06-20  252  			count += (limit >= count + 2) ? 2 : limit - count;
ee5f8a431ead8f3 navin patidar        2014-06-20  253  			pos = content + count;
ee5f8a431ead8f3 navin patidar        2014-06-20  254  
ee5f8a431ead8f3 navin patidar        2014-06-20  255  		} else {
ee5f8a431ead8f3 navin patidar        2014-06-20  256  			memcpy(pos, ((u8 *)&lo32), (limit >= count + 4) ? 4 : limit - count);
ee5f8a431ead8f3 navin patidar        2014-06-20  257  			count += (limit >= count + 4) ? 4 : limit - count;
ee5f8a431ead8f3 navin patidar        2014-06-20  258  			pos = content + count;
ee5f8a431ead8f3 navin patidar        2014-06-20  259  		}
ee5f8a431ead8f3 navin patidar        2014-06-20  260  
ee5f8a431ead8f3 navin patidar        2014-06-20  261  		if (limit > count && len - 2 > count) {
ee5f8a431ead8f3 navin patidar        2014-06-20  262  			memcpy(pos, (u8 *)&hi32, (limit >= count + 4) ? 4 : limit - count);
ee5f8a431ead8f3 navin patidar        2014-06-20  263  			count += (limit >= count + 4) ? 4 : limit - count;
ee5f8a431ead8f3 navin patidar        2014-06-20  264  			pos = content + count;
ee5f8a431ead8f3 navin patidar        2014-06-20  265  		}
ee5f8a431ead8f3 navin patidar        2014-06-20  266  
ee5f8a431ead8f3 navin patidar        2014-06-20  267  		if (limit <= count || len - 2 <= count)
ee5f8a431ead8f3 navin patidar        2014-06-20  268  			break;
ee5f8a431ead8f3 navin patidar        2014-06-20  269  		i++;
ee5f8a431ead8f3 navin patidar        2014-06-20  270  	}
ee5f8a431ead8f3 navin patidar        2014-06-20  271  	usb_write8(adapter, REG_PKT_BUFF_ACCESS_CTRL, DISABLE_TRXPKT_BUF_ACCESS);
ee5f8a431ead8f3 navin patidar        2014-06-20  272  	*size = count;
ee5f8a431ead8f3 navin patidar        2014-06-20  273  }
ee5f8a431ead8f3 navin patidar        2014-06-20  274  

:::::: The code at line 239 was first introduced by commit
:::::: ee5f8a431ead8f334f4c04f91ecafa34cb9d52ca staging: rtl8188eu: Move all efuse related code to rtw_efuse.c

:::::: TO: navin patidar <navin.patidar@xxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux