Search Linux Wireless

Re: [PATCH 18/18] rtw89: add Kconfig and Makefile

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

 



Hi Ping-Ke,

I love your patch! Perhaps something to improve:

[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on wireless-drivers/master v5.11-rc1 next-20201223]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20201230-124948
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/b4945b490f8d3df1d3e1aa0c9e16654172195a08
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20201230-124948
        git checkout b4945b490f8d3df1d3e1aa0c9e16654172195a08
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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/net/wireless/realtek/rtw89/phy.c: In function 'rtw89_phy_average_cfo_calc':
>> drivers/net/wireless/realtek/rtw89/phy.c:1367:24: warning: variable 'cfo_min_macid' set but not used [-Wunused-but-set-variable]
    1367 |  u8 cfo_max_macid = 0, cfo_min_macid = 0, i;
         |                        ^~~~~~~~~~~~~
>> drivers/net/wireless/realtek/rtw89/phy.c:1367:5: warning: variable 'cfo_max_macid' set but not used [-Wunused-but-set-variable]
    1367 |  u8 cfo_max_macid = 0, cfo_min_macid = 0, i;
         |     ^~~~~~~~~~~~~
>> drivers/net/wireless/realtek/rtw89/phy.c:1366:24: warning: variable 'cnt_min_macid' set but not used [-Wunused-but-set-variable]
    1366 |  u8 cnt_max_macid = 0, cnt_min_macid = 0;
         |                        ^~~~~~~~~~~~~
--
   drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c: In function '_lok_finetune_check':
>> drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c:1191:6: warning: variable 'fine_q' set but not used [-Wunused-but-set-variable]
    1191 |  u32 fine_q = 0x0;
         |      ^~~~~~
>> drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c:1190:6: warning: variable 'fine_i' set but not used [-Wunused-but-set-variable]
    1190 |  u32 fine_i = 0x0;
         |      ^~~~~~
   drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c: In function '_iqk_get_ch_info':
>> drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c:1384:6: warning: variable 'reg_rf18' set but not used [-Wunused-but-set-variable]
    1384 |  u32 reg_rf18 = 0x0;
         |      ^~~~~~~~
--
   drivers/net/wireless/realtek/rtw89/pci.c: In function 'rtw89_pci_release_rpp':
>> drivers/net/wireless/realtek/rtw89/pci.c:407:7: warning: variable 'polluted' set but not used [-Wunused-but-set-variable]
     407 |  bool polluted;
         |       ^~~~~~~~
>> drivers/net/wireless/realtek/rtw89/pci.c:406:5: warning: variable 'mac_id' set but not used [-Wunused-but-set-variable]
     406 |  u8 mac_id, qsel, tx_status, txch;
         |     ^~~~~~
   drivers/net/wireless/realtek/rtw89/pci.c: In function 'rtw89_pci_reset_trx_rings':
>> drivers/net/wireless/realtek/rtw89/pci.c:1009:6: warning: variable 'addr_desa_h' set but not used [-Wunused-but-set-variable]
    1009 |  u32 addr_desa_h;
         |      ^~~~~~~~~~~
   drivers/net/wireless/realtek/rtw89/pci.c: In function 'rtw89_pci_remove':
>> drivers/net/wireless/realtek/rtw89/pci.c:2549:20: warning: variable 'rtwpci' set but not used [-Wunused-but-set-variable]
    2549 |  struct rtw89_pci *rtwpci;
         |                    ^~~~~~


vim +/cfo_min_macid +1367 drivers/net/wireless/realtek/rtw89/phy.c

eb46958227be930 Ping-Ke Shih 2020-12-30  1358  
eb46958227be930 Ping-Ke Shih 2020-12-30  1359  static void rtw89_phy_average_cfo_calc(struct rtw89_dev *rtwdev)
eb46958227be930 Ping-Ke Shih 2020-12-30  1360  {
eb46958227be930 Ping-Ke Shih 2020-12-30  1361  	struct rtw89_cfo_tracking_info *cfo = &rtwdev->cfo_tracking;
eb46958227be930 Ping-Ke Shih 2020-12-30  1362  	s32 cfo_khz_avg[CFO_TRACK_MAX_USER] = {0};
eb46958227be930 Ping-Ke Shih 2020-12-30  1363  	s32 cfo_max = 0, cfo_min = U16_MAX, cfo_khz_all = 0;
eb46958227be930 Ping-Ke Shih 2020-12-30  1364  	s32 cnt_max = 0, cnt_min = U16_MAX, cfo_cnt_all = 0;
eb46958227be930 Ping-Ke Shih 2020-12-30  1365  	s16 val;
eb46958227be930 Ping-Ke Shih 2020-12-30 @1366  	u8 cnt_max_macid = 0, cnt_min_macid = 0;
eb46958227be930 Ping-Ke Shih 2020-12-30 @1367  	u8 cfo_max_macid = 0, cfo_min_macid = 0, i;
eb46958227be930 Ping-Ke Shih 2020-12-30  1368  
eb46958227be930 Ping-Ke Shih 2020-12-30  1369  	rtw89_debug(rtwdev, RTW89_DBG_CFO, "one_entry_only=%d\n",
eb46958227be930 Ping-Ke Shih 2020-12-30  1370  		    rtwdev->total_sta_assoc == 1);
eb46958227be930 Ping-Ke Shih 2020-12-30  1371  
eb46958227be930 Ping-Ke Shih 2020-12-30  1372  	if (rtwdev->total_sta_assoc == 1) {
eb46958227be930 Ping-Ke Shih 2020-12-30  1373  		for (i = 0; i < CFO_TRACK_MAX_USER; i++) {
eb46958227be930 Ping-Ke Shih 2020-12-30  1374  			if (cfo->cfo_cnt[i] == 0)
eb46958227be930 Ping-Ke Shih 2020-12-30  1375  				continue;
eb46958227be930 Ping-Ke Shih 2020-12-30  1376  			cfo_khz_all += cfo->cfo_tail[i];
eb46958227be930 Ping-Ke Shih 2020-12-30  1377  			cfo_cnt_all += cfo->cfo_cnt[i];
eb46958227be930 Ping-Ke Shih 2020-12-30  1378  			if (cfo_cnt_all == 0)
eb46958227be930 Ping-Ke Shih 2020-12-30  1379  				cfo->cfo_avg_pre = 0;
eb46958227be930 Ping-Ke Shih 2020-12-30  1380  			else
eb46958227be930 Ping-Ke Shih 2020-12-30  1381  				cfo->cfo_avg_pre = cfo_khz_all / cfo_cnt_all;
eb46958227be930 Ping-Ke Shih 2020-12-30  1382  		}
eb46958227be930 Ping-Ke Shih 2020-12-30  1383  		rtw89_debug(rtwdev, RTW89_DBG_CFO,
eb46958227be930 Ping-Ke Shih 2020-12-30  1384  			    "CFO track for one entry only\n");
eb46958227be930 Ping-Ke Shih 2020-12-30  1385  		rtw89_debug(rtwdev, RTW89_DBG_CFO,
eb46958227be930 Ping-Ke Shih 2020-12-30  1386  			    "Total cfo=(%dK), pkt_cnt=(%d), avg_cfo=(%dK)\n",
eb46958227be930 Ping-Ke Shih 2020-12-30  1387  			    cfo_khz_all >> 2, cfo_cnt_all,
eb46958227be930 Ping-Ke Shih 2020-12-30  1388  			    cfo->cfo_avg_pre >> 2);
eb46958227be930 Ping-Ke Shih 2020-12-30  1389  		return;
eb46958227be930 Ping-Ke Shih 2020-12-30  1390  	}
eb46958227be930 Ping-Ke Shih 2020-12-30  1391  
eb46958227be930 Ping-Ke Shih 2020-12-30  1392  	for (i = 0; i < CFO_TRACK_MAX_USER; i++) {
eb46958227be930 Ping-Ke Shih 2020-12-30  1393  		if (cfo->cfo_cnt[i] == 0)
eb46958227be930 Ping-Ke Shih 2020-12-30  1394  			continue;
eb46958227be930 Ping-Ke Shih 2020-12-30  1395  
eb46958227be930 Ping-Ke Shih 2020-12-30  1396  		cfo_khz_all += cfo->cfo_tail[i];
eb46958227be930 Ping-Ke Shih 2020-12-30  1397  		cfo_cnt_all += cfo->cfo_cnt[i];
eb46958227be930 Ping-Ke Shih 2020-12-30  1398  		if (cfo->cfo_cnt[i] == 0)
eb46958227be930 Ping-Ke Shih 2020-12-30  1399  			cfo_khz_avg[i] = 0;
eb46958227be930 Ping-Ke Shih 2020-12-30  1400  		else
eb46958227be930 Ping-Ke Shih 2020-12-30  1401  			cfo_khz_avg[i] = cfo->cfo_tail[i] / cfo->cfo_cnt[i];
eb46958227be930 Ping-Ke Shih 2020-12-30  1402  
eb46958227be930 Ping-Ke Shih 2020-12-30  1403  		if (cfo->cfo_cnt[i] > cnt_max) {
eb46958227be930 Ping-Ke Shih 2020-12-30  1404  			cnt_max = cfo->cfo_cnt[i];
eb46958227be930 Ping-Ke Shih 2020-12-30  1405  			cnt_max_macid = i;
eb46958227be930 Ping-Ke Shih 2020-12-30  1406  		}
eb46958227be930 Ping-Ke Shih 2020-12-30  1407  		if (cfo->cfo_cnt[i] < cnt_min) {
eb46958227be930 Ping-Ke Shih 2020-12-30  1408  			cnt_min = cfo->cfo_cnt[i];
eb46958227be930 Ping-Ke Shih 2020-12-30  1409  			cnt_min_macid = i;
eb46958227be930 Ping-Ke Shih 2020-12-30  1410  		}
eb46958227be930 Ping-Ke Shih 2020-12-30  1411  		if (cfo_khz_avg[i] > cfo_max) {
eb46958227be930 Ping-Ke Shih 2020-12-30  1412  			cfo_max = cfo_khz_avg[i];
eb46958227be930 Ping-Ke Shih 2020-12-30  1413  			cfo_max_macid = i;
eb46958227be930 Ping-Ke Shih 2020-12-30  1414  		}
eb46958227be930 Ping-Ke Shih 2020-12-30  1415  		if (cfo_khz_avg[i] < cfo_min) {
eb46958227be930 Ping-Ke Shih 2020-12-30  1416  			cfo_min = cfo_khz_avg[i];
eb46958227be930 Ping-Ke Shih 2020-12-30  1417  			cfo_min_macid = i;
eb46958227be930 Ping-Ke Shih 2020-12-30  1418  		}
eb46958227be930 Ping-Ke Shih 2020-12-30  1419  	}
eb46958227be930 Ping-Ke Shih 2020-12-30  1420  
eb46958227be930 Ping-Ke Shih 2020-12-30  1421  	/* Multi-sta CFO tracking strategy */
eb46958227be930 Ping-Ke Shih 2020-12-30  1422  	val = (s16)abs(cfo_max - cfo_min);
eb46958227be930 Ping-Ke Shih 2020-12-30  1423  	if (val < MAX_CFO_TOLERANCE || val > (MAX_CFO_TOLERANCE << 1)) {
eb46958227be930 Ping-Ke Shih 2020-12-30  1424  		rtw89_debug(rtwdev, RTW89_DBG_CFO,
eb46958227be930 Ping-Ke Shih 2020-12-30  1425  			    "CFO track for only pri-user\n");
eb46958227be930 Ping-Ke Shih 2020-12-30  1426  		rtw89_debug(rtwdev, RTW89_DBG_CFO,
eb46958227be930 Ping-Ke Shih 2020-12-30  1427  			    "Total cfo=(%dK), pkt_cnt=(%d), avg_cfo=(%dK)\n",
eb46958227be930 Ping-Ke Shih 2020-12-30  1428  			    cfo->cfo_tail[cnt_max_macid] >> 2,
eb46958227be930 Ping-Ke Shih 2020-12-30  1429  			    cfo->cfo_cnt[cnt_max_macid],
eb46958227be930 Ping-Ke Shih 2020-12-30  1430  			    cfo_khz_avg[cnt_max_macid] >> 2);
eb46958227be930 Ping-Ke Shih 2020-12-30  1431  		cfo->cfo_avg_pre = cfo_khz_avg[cnt_max_macid];
eb46958227be930 Ping-Ke Shih 2020-12-30  1432  	} else {
eb46958227be930 Ping-Ke Shih 2020-12-30  1433  		rtw89_debug(rtwdev, RTW89_DBG_CFO,
eb46958227be930 Ping-Ke Shih 2020-12-30  1434  			    "CFO track for average of all user\n");
eb46958227be930 Ping-Ke Shih 2020-12-30  1435  		rtw89_debug(rtwdev, RTW89_DBG_CFO,
eb46958227be930 Ping-Ke Shih 2020-12-30  1436  			    "Total cfo=(%dK), pkt_cnt=(%d), avg_cfo=(%dK)\n",
eb46958227be930 Ping-Ke Shih 2020-12-30  1437  			    cfo_khz_all >> 2, cfo_cnt_all,
eb46958227be930 Ping-Ke Shih 2020-12-30  1438  			    cfo->cfo_avg_pre >> 2);
eb46958227be930 Ping-Ke Shih 2020-12-30  1439  		if (cfo_cnt_all == 0)
eb46958227be930 Ping-Ke Shih 2020-12-30  1440  			cfo->cfo_avg_pre = 0;
eb46958227be930 Ping-Ke Shih 2020-12-30  1441  		else
eb46958227be930 Ping-Ke Shih 2020-12-30  1442  			cfo->cfo_avg_pre = cfo_khz_all / cfo_cnt_all;
eb46958227be930 Ping-Ke Shih 2020-12-30  1443  	}
eb46958227be930 Ping-Ke Shih 2020-12-30  1444  }
eb46958227be930 Ping-Ke Shih 2020-12-30  1445  

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux