Re: [PATCH v2 05/15] staging: r8188eu: remove DBG_88E calls from hal subdir

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

 



Hi Phillip,

I love your patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Phillip-Potter/staging-r8188eu-Cleanup-and-removal-of-DBG_88E-macro/20220216-090900
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git e9685834b1db754cbd07e31ad1a091f5d366dacf
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220217/202202170549.Ns7hoYfn-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0e628a783b935c70c80815db6c061ec84f884af5)
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://github.com/0day-ci/linux/commit/b481114992de793aca50ace1616b6b3947fde0a0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Phillip-Potter/staging-r8188eu-Cleanup-and-removal-of-DBG_88E-macro/20220216-090900
        git checkout b481114992de793aca50ace1616b6b3947fde0a0
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/leds/ drivers/net/ethernet/mellanox/mlxsw/ drivers/platform/chrome/ drivers/staging/r8188eu/ mm/damon/

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/r8188eu/hal/usb_halinit.c:1546:6: warning: variable 'arg' set but not used [-Wunused-but-set-variable]
                   u8 arg;
                      ^
   1 warning generated.


vim +/arg +1546 drivers/staging/r8188eu/hal/usb_halinit.c

8cd574e6af5463a Phillip Potter  2021-07-28  1490  
b561d2f0dc01ab0 Michael Straube 2021-09-06  1491  void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_level)
8cd574e6af5463a Phillip Potter  2021-07-28  1492  {
8cd574e6af5463a Phillip Potter  2021-07-28  1493  	u8 init_rate = 0;
8cd574e6af5463a Phillip Potter  2021-07-28  1494  	u8 networkType, raid;
8cd574e6af5463a Phillip Potter  2021-07-28  1495  	u32 mask, rate_bitmap;
8cd574e6af5463a Phillip Potter  2021-07-28  1496  	u8 shortGIrate = false;
8cd574e6af5463a Phillip Potter  2021-07-28  1497  	int	supportRateNum = 0;
8cd574e6af5463a Phillip Potter  2021-07-28  1498  	struct sta_info	*psta;
d904512db6f3727 Michael Straube 2021-12-07  1499  	struct hal_data_8188e *haldata = &adapt->haldata;
8cd574e6af5463a Phillip Potter  2021-07-28  1500  	struct mlme_ext_priv	*pmlmeext = &adapt->mlmeextpriv;
6839ff57baa4a60 Michael Straube 2021-08-09  1501  	struct mlme_ext_info	*pmlmeinfo = &pmlmeext->mlmext_info;
6839ff57baa4a60 Michael Straube 2021-08-09  1502  	struct wlan_bssid_ex	*cur_network = &pmlmeinfo->network;
8cd574e6af5463a Phillip Potter  2021-07-28  1503  
8cd574e6af5463a Phillip Potter  2021-07-28  1504  	if (mac_id >= NUM_STA) /* CAM_SIZE */
8cd574e6af5463a Phillip Potter  2021-07-28  1505  		return;
8cd574e6af5463a Phillip Potter  2021-07-28  1506  	psta = pmlmeinfo->FW_sta_info[mac_id].psta;
725a3f1c4d56b73 Michael Straube 2021-08-01  1507  	if (!psta)
8cd574e6af5463a Phillip Potter  2021-07-28  1508  		return;
8cd574e6af5463a Phillip Potter  2021-07-28  1509  	switch (mac_id) {
8cd574e6af5463a Phillip Potter  2021-07-28  1510  	case 0:/*  for infra mode */
8cd574e6af5463a Phillip Potter  2021-07-28  1511  		supportRateNum = rtw_get_rateset_len(cur_network->SupportedRates);
8cd574e6af5463a Phillip Potter  2021-07-28  1512  		networkType = judge_network_type(adapt, cur_network->SupportedRates, supportRateNum) & 0xf;
8cd574e6af5463a Phillip Potter  2021-07-28  1513  		raid = networktype_to_raid(networkType);
8cd574e6af5463a Phillip Potter  2021-07-28  1514  		mask = update_supported_rate(cur_network->SupportedRates, supportRateNum);
6839ff57baa4a60 Michael Straube 2021-08-09  1515  		mask |= (pmlmeinfo->HT_enable) ? update_MSC_rate(&pmlmeinfo->HT_caps) : 0;
6839ff57baa4a60 Michael Straube 2021-08-09  1516  		if (support_short_GI(adapt, &pmlmeinfo->HT_caps))
8cd574e6af5463a Phillip Potter  2021-07-28  1517  			shortGIrate = true;
8cd574e6af5463a Phillip Potter  2021-07-28  1518  		break;
8cd574e6af5463a Phillip Potter  2021-07-28  1519  	case 1:/* for broadcast/multicast */
8cd574e6af5463a Phillip Potter  2021-07-28  1520  		supportRateNum = rtw_get_rateset_len(pmlmeinfo->FW_sta_info[mac_id].SupportedRates);
8cd574e6af5463a Phillip Potter  2021-07-28  1521  		if (pmlmeext->cur_wireless_mode & WIRELESS_11B)
8cd574e6af5463a Phillip Potter  2021-07-28  1522  			networkType = WIRELESS_11B;
8cd574e6af5463a Phillip Potter  2021-07-28  1523  		else
8cd574e6af5463a Phillip Potter  2021-07-28  1524  			networkType = WIRELESS_11G;
8cd574e6af5463a Phillip Potter  2021-07-28  1525  		raid = networktype_to_raid(networkType);
8cd574e6af5463a Phillip Potter  2021-07-28  1526  		mask = update_basic_rate(cur_network->SupportedRates, supportRateNum);
8cd574e6af5463a Phillip Potter  2021-07-28  1527  		break;
8cd574e6af5463a Phillip Potter  2021-07-28  1528  	default: /* for each sta in IBSS */
8cd574e6af5463a Phillip Potter  2021-07-28  1529  		supportRateNum = rtw_get_rateset_len(pmlmeinfo->FW_sta_info[mac_id].SupportedRates);
8cd574e6af5463a Phillip Potter  2021-07-28  1530  		networkType = judge_network_type(adapt, pmlmeinfo->FW_sta_info[mac_id].SupportedRates, supportRateNum) & 0xf;
8cd574e6af5463a Phillip Potter  2021-07-28  1531  		raid = networktype_to_raid(networkType);
8cd574e6af5463a Phillip Potter  2021-07-28  1532  		mask = update_supported_rate(cur_network->SupportedRates, supportRateNum);
8cd574e6af5463a Phillip Potter  2021-07-28  1533  
8cd574e6af5463a Phillip Potter  2021-07-28  1534  		/* todo: support HT in IBSS */
8cd574e6af5463a Phillip Potter  2021-07-28  1535  		break;
8cd574e6af5463a Phillip Potter  2021-07-28  1536  	}
8cd574e6af5463a Phillip Potter  2021-07-28  1537  
8cd574e6af5463a Phillip Potter  2021-07-28  1538  	rate_bitmap = 0x0fffffff;
8cd574e6af5463a Phillip Potter  2021-07-28  1539  	rate_bitmap = ODM_Get_Rate_Bitmap(&haldata->odmpriv, mac_id, mask, rssi_level);
8cd574e6af5463a Phillip Potter  2021-07-28  1540  
8cd574e6af5463a Phillip Potter  2021-07-28  1541  	mask &= rate_bitmap;
8cd574e6af5463a Phillip Potter  2021-07-28  1542  
8cd574e6af5463a Phillip Potter  2021-07-28  1543  	init_rate = get_highest_rate_idx(mask) & 0x3f;
8cd574e6af5463a Phillip Potter  2021-07-28  1544  
8cd574e6af5463a Phillip Potter  2021-07-28  1545  	if (haldata->fw_ractrl) {
8cd574e6af5463a Phillip Potter  2021-07-28 @1546  		u8 arg;
8cd574e6af5463a Phillip Potter  2021-07-28  1547  
8cd574e6af5463a Phillip Potter  2021-07-28  1548  		arg = mac_id & 0x1f;/* MACID */
8cd574e6af5463a Phillip Potter  2021-07-28  1549  		arg |= BIT(7);
8cd574e6af5463a Phillip Potter  2021-07-28  1550  		if (shortGIrate)
8cd574e6af5463a Phillip Potter  2021-07-28  1551  			arg |= BIT(5);
8cd574e6af5463a Phillip Potter  2021-07-28  1552  		mask |= ((raid << 28) & 0xf0000000);
8cd574e6af5463a Phillip Potter  2021-07-28  1553  		psta->ra_mask = mask;
8cd574e6af5463a Phillip Potter  2021-07-28  1554  		mask |= ((raid << 28) & 0xf0000000);
8cd574e6af5463a Phillip Potter  2021-07-28  1555  
8cd574e6af5463a Phillip Potter  2021-07-28  1556  		/* to do ,for 8188E-SMIC */
8cd574e6af5463a Phillip Potter  2021-07-28  1557  		rtl8188e_set_raid_cmd(adapt, mask);
8cd574e6af5463a Phillip Potter  2021-07-28  1558  	} else {
6839ff57baa4a60 Michael Straube 2021-08-09  1559  		ODM_RA_UpdateRateInfo_8188E(&haldata->odmpriv,
8cd574e6af5463a Phillip Potter  2021-07-28  1560  				mac_id,
8cd574e6af5463a Phillip Potter  2021-07-28  1561  				raid,
8cd574e6af5463a Phillip Potter  2021-07-28  1562  				mask,
8cd574e6af5463a Phillip Potter  2021-07-28  1563  				shortGIrate
8cd574e6af5463a Phillip Potter  2021-07-28  1564  				);
8cd574e6af5463a Phillip Potter  2021-07-28  1565  	}
8cd574e6af5463a Phillip Potter  2021-07-28  1566  	/* set ra_id */
8cd574e6af5463a Phillip Potter  2021-07-28  1567  	psta->raid = raid;
8cd574e6af5463a Phillip Potter  2021-07-28  1568  	psta->init_rate = init_rate;
8cd574e6af5463a Phillip Potter  2021-07-28  1569  }
8cd574e6af5463a Phillip Potter  2021-07-28  1570  

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




[Index of Archives]     [Linux Driver Development]     [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