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.14-rc6 next-20210820] [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/20210820-124025 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master config: i386-randconfig-a015-20210822 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf) 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/6c4e6c23950c253389ad130ffe0367bbca3af99e 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/20210820-124025 git checkout 6c4e6c23950c253389ad130ffe0367bbca3af99e # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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:1522:6: warning: variable 'active_entry' set but not used [-Wunused-but-set-variable] u64 active_entry = 0; ^ 1 warning generated. vim +/active_entry +1522 drivers/net/wireless/realtek/rtw89/phy.c 32d97af0af9324 Ping-Ke Shih 2021-08-20 1507 32d97af0af9324 Ping-Ke Shih 2021-08-20 1508 static s32 rtw89_phy_multi_sta_cfo_calc(struct rtw89_dev *rtwdev) 32d97af0af9324 Ping-Ke Shih 2021-08-20 1509 { 32d97af0af9324 Ping-Ke Shih 2021-08-20 1510 struct rtw89_cfo_tracking_info *cfo = &rtwdev->cfo_tracking; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1511 struct rtw89_traffic_stats *stats = &rtwdev->stats; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1512 s32 target_cfo = 0; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1513 s32 cfo_khz_all = 0; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1514 s32 cfo_khz_all_tp_wgt = 0; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1515 s32 cfo_avg = 0; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1516 s32 max_cfo_lb = BIT(31); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1517 s32 min_cfo_ub = GENMASK(30, 0); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1518 u16 cfo_cnt_all = 0; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1519 u8 active_entry_cnt = 0; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1520 u8 sta_cnt = 0; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1521 u32 tp_all = 0; 32d97af0af9324 Ping-Ke Shih 2021-08-20 @1522 u64 active_entry = 0; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1523 u8 i; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1524 u8 cfo_tol = 0; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1525 32d97af0af9324 Ping-Ke Shih 2021-08-20 1526 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Multi entry cfo_trk\n"); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1527 if (cfo->rtw89_multi_cfo_mode == RTW89_PKT_BASED_AVG_MODE) { 32d97af0af9324 Ping-Ke Shih 2021-08-20 1528 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Pkt based avg mode\n"); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1529 for (i = 0; i < CFO_TRACK_MAX_USER; i++) { 32d97af0af9324 Ping-Ke Shih 2021-08-20 1530 if (cfo->cfo_cnt[i] == 0) 32d97af0af9324 Ping-Ke Shih 2021-08-20 1531 continue; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1532 cfo_khz_all += cfo->cfo_tail[i]; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1533 cfo_cnt_all += cfo->cfo_cnt[i]; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1534 cfo_avg = phy_div(cfo_khz_all, (s32)cfo_cnt_all); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1535 rtw89_debug(rtwdev, RTW89_DBG_CFO, 32d97af0af9324 Ping-Ke Shih 2021-08-20 1536 "Msta cfo=%d, pkt_cnt=%d, avg_cfo=%d\n", 32d97af0af9324 Ping-Ke Shih 2021-08-20 1537 cfo_khz_all, cfo_cnt_all, cfo_avg); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1538 target_cfo = cfo_avg; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1539 } 32d97af0af9324 Ping-Ke Shih 2021-08-20 1540 } else if (cfo->rtw89_multi_cfo_mode == RTW89_ENTRY_BASED_AVG_MODE) { 32d97af0af9324 Ping-Ke Shih 2021-08-20 1541 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Entry based avg mode\n"); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1542 for (i = 0; i < CFO_TRACK_MAX_USER; i++) { 32d97af0af9324 Ping-Ke Shih 2021-08-20 1543 if (cfo->cfo_cnt[i] == 0) 32d97af0af9324 Ping-Ke Shih 2021-08-20 1544 continue; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1545 active_entry |= BIT_ULL(i); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1546 cfo->cfo_avg[i] = phy_div(cfo->cfo_tail[i], 32d97af0af9324 Ping-Ke Shih 2021-08-20 1547 (s32)cfo->cfo_cnt[i]); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1548 cfo_khz_all += cfo->cfo_avg[i]; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1549 rtw89_debug(rtwdev, RTW89_DBG_CFO, 32d97af0af9324 Ping-Ke Shih 2021-08-20 1550 "Macid=%d, cfo_avg=%d\n", i, 32d97af0af9324 Ping-Ke Shih 2021-08-20 1551 cfo->cfo_avg[i]); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1552 } 32d97af0af9324 Ping-Ke Shih 2021-08-20 1553 sta_cnt = rtwdev->total_sta_assoc; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1554 cfo_avg = phy_div(cfo_khz_all, (s32)sta_cnt); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1555 rtw89_debug(rtwdev, RTW89_DBG_CFO, 32d97af0af9324 Ping-Ke Shih 2021-08-20 1556 "Msta cfo_acc=%d, ent_cnt=%d, avg_cfo=%d\n", 32d97af0af9324 Ping-Ke Shih 2021-08-20 1557 cfo_khz_all, sta_cnt, cfo_avg); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1558 target_cfo = cfo_avg; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1559 } else if (cfo->rtw89_multi_cfo_mode == RTW89_TP_BASED_AVG_MODE) { 32d97af0af9324 Ping-Ke Shih 2021-08-20 1560 rtw89_debug(rtwdev, RTW89_DBG_CFO, "TP based avg mode\n"); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1561 cfo_tol = cfo->sta_cfo_tolerance; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1562 for (i = 0; i < CFO_TRACK_MAX_USER; i++) { 32d97af0af9324 Ping-Ke Shih 2021-08-20 1563 sta_cnt++; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1564 if (cfo->cfo_cnt[i] != 0) { 32d97af0af9324 Ping-Ke Shih 2021-08-20 1565 cfo->cfo_avg[i] = phy_div(cfo->cfo_tail[i], 32d97af0af9324 Ping-Ke Shih 2021-08-20 1566 (s32)cfo->cfo_cnt[i]); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1567 active_entry_cnt++; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1568 } else { 32d97af0af9324 Ping-Ke Shih 2021-08-20 1569 cfo->cfo_avg[i] = cfo->pre_cfo_avg[i]; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1570 } 32d97af0af9324 Ping-Ke Shih 2021-08-20 1571 max_cfo_lb = max(cfo->cfo_avg[i] - cfo_tol, max_cfo_lb); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1572 min_cfo_ub = min(cfo->cfo_avg[i] + cfo_tol, min_cfo_ub); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1573 cfo_khz_all += cfo->cfo_avg[i]; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1574 /* need tp for each entry */ 32d97af0af9324 Ping-Ke Shih 2021-08-20 1575 rtw89_debug(rtwdev, RTW89_DBG_CFO, 32d97af0af9324 Ping-Ke Shih 2021-08-20 1576 "[%d] cfo_avg=%d, tp=tbd\n", 32d97af0af9324 Ping-Ke Shih 2021-08-20 1577 i, cfo->cfo_avg[i]); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1578 if (sta_cnt >= rtwdev->total_sta_assoc) 32d97af0af9324 Ping-Ke Shih 2021-08-20 1579 break; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1580 } 32d97af0af9324 Ping-Ke Shih 2021-08-20 1581 tp_all = stats->rx_throughput; /* need tp for each entry */ 32d97af0af9324 Ping-Ke Shih 2021-08-20 1582 cfo_avg = phy_div(cfo_khz_all_tp_wgt, (s32)tp_all); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1583 32d97af0af9324 Ping-Ke Shih 2021-08-20 1584 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Assoc sta cnt=%d\n", 32d97af0af9324 Ping-Ke Shih 2021-08-20 1585 sta_cnt); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1586 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Active sta cnt=%d\n", 32d97af0af9324 Ping-Ke Shih 2021-08-20 1587 active_entry_cnt); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1588 rtw89_debug(rtwdev, RTW89_DBG_CFO, 32d97af0af9324 Ping-Ke Shih 2021-08-20 1589 "Msta cfo with tp_wgt=%d, avg_cfo=%d\n", 32d97af0af9324 Ping-Ke Shih 2021-08-20 1590 cfo_khz_all_tp_wgt, cfo_avg); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1591 rtw89_debug(rtwdev, RTW89_DBG_CFO, "cfo_lb=%d,cfo_ub=%d\n", 32d97af0af9324 Ping-Ke Shih 2021-08-20 1592 max_cfo_lb, min_cfo_ub); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1593 if (max_cfo_lb <= min_cfo_ub) { 32d97af0af9324 Ping-Ke Shih 2021-08-20 1594 rtw89_debug(rtwdev, RTW89_DBG_CFO, 32d97af0af9324 Ping-Ke Shih 2021-08-20 1595 "cfo win_size=%d\n", 32d97af0af9324 Ping-Ke Shih 2021-08-20 1596 min_cfo_ub - max_cfo_lb); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1597 target_cfo = clamp(cfo_avg, max_cfo_lb, min_cfo_ub); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1598 } else { 32d97af0af9324 Ping-Ke Shih 2021-08-20 1599 rtw89_debug(rtwdev, RTW89_DBG_CFO, 32d97af0af9324 Ping-Ke Shih 2021-08-20 1600 "No intersection of cfo torlence windows\n"); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1601 target_cfo = phy_div(cfo_khz_all, (s32)sta_cnt); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1602 } 32d97af0af9324 Ping-Ke Shih 2021-08-20 1603 for (i = 0; i < CFO_TRACK_MAX_USER; i++) 32d97af0af9324 Ping-Ke Shih 2021-08-20 1604 cfo->pre_cfo_avg[i] = cfo->cfo_avg[i]; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1605 } 32d97af0af9324 Ping-Ke Shih 2021-08-20 1606 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Target cfo=%d\n", target_cfo); 32d97af0af9324 Ping-Ke Shih 2021-08-20 1607 return target_cfo; 32d97af0af9324 Ping-Ke Shih 2021-08-20 1608 } 32d97af0af9324 Ping-Ke Shih 2021-08-20 1609 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip