:::::: :::::: Manual check reason: "low confidence bisect report" :::::: Manual check reason: "low confidence static check warning: drivers/net/wireless/realtek/rtw88/phy.c:1599:12: warning: use of uninitialized value '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]" ::::::
BCC: [email protected] CC: [email protected] CC: [email protected] TO: "Zong-Zhe Yang" <[email protected]> CC: Kalle Valo <[email protected]> CC: "Ping-Ke Shih" <[email protected]> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 10d4879f9ef01cc6190fafe4257d06f375bab92c commit: f8509c38ececde7fb0f0bc9959f79d2a34be577d rtw88: upgrade rtw_regulatory mechanism and mapping date: 11 months ago :::::: branch date: 11 hours ago :::::: commit date: 11 months ago config: arm-randconfig-c002-20220827 (https://download.01.org/0day-ci/archive/20220828/[email protected]/config) compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/torvalds/linux.git/commit/?id=f8509c38ececde7fb0f0bc9959f79d2a34be577d git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout f8509c38ececde7fb0f0bc9959f79d2a34be577d # save the config file COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross ARCH=arm KBUILD_USERCFLAGS='-fanalyzer -Wno-error' If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <[email protected]> gcc-analyzer warnings: (new ones prefixed by >>) drivers/net/wireless/realtek/rtw88/phy.c: In function 'rtw_parse_tbl_txpwr_lmt': >> drivers/net/wireless/realtek/rtw88/phy.c:1599:12: warning: use of >> uninitialized value '<unknown>' [CWE-457] >> [-Wanalyzer-use-of-uninitialized-value] 1599 | u8 regd_alt; | ^~~~~~~~ 'rtw_parse_tbl_txpwr_lmt': event 1 | | 1599 | u8 regd_alt; | | ^~~~~~~~ | | | | | (1) use of uninitialized value '<unknown>' here | vim +1599 drivers/net/wireless/realtek/rtw88/phy.c f8509c38ececde Zong-Zhe Yang 2021-08-30 1592 fa6dfe6bff246d Yan-Hsuan Chuang 2019-05-29 1593 void rtw_parse_tbl_txpwr_lmt(struct rtw_dev *rtwdev, fa6dfe6bff246d Yan-Hsuan Chuang 2019-05-29 1594 const struct rtw_table *tbl) fa6dfe6bff246d Yan-Hsuan Chuang 2019-05-29 1595 { 3457f86da60de7 Brian Norris 2019-07-12 1596 const struct rtw_txpwr_lmt_cfg_pair *p = tbl->data; 3457f86da60de7 Brian Norris 2019-07-12 1597 const struct rtw_txpwr_lmt_cfg_pair *end = p + tbl->size; f8509c38ececde Zong-Zhe Yang 2021-08-30 1598 u32 regd_cfg_flag = 0; f8509c38ececde Zong-Zhe Yang 2021-08-30 @1599 u8 regd_alt; f8509c38ececde Zong-Zhe Yang 2021-08-30 1600 u8 i; fa6dfe6bff246d Yan-Hsuan Chuang 2019-05-29 1601 fa6dfe6bff246d Yan-Hsuan Chuang 2019-05-29 1602 for (; p < end; p++) { f8509c38ececde Zong-Zhe Yang 2021-08-30 1603 regd_cfg_flag |= BIT(p->regd); 43712199e05b51 Yan-Hsuan Chuang 2019-05-29 1604 rtw_phy_set_tx_power_limit(rtwdev, p->regd, p->band, 43712199e05b51 Yan-Hsuan Chuang 2019-05-29 1605 p->bw, p->rs, p->ch, p->txpwr_lmt); fa6dfe6bff246d Yan-Hsuan Chuang 2019-05-29 1606 } 93f68a865f1193 Zong-Zhe Yang 2019-05-29 1607 f8509c38ececde Zong-Zhe Yang 2021-08-30 1608 for (i = 0; i < RTW_REGD_MAX; i++) { f8509c38ececde Zong-Zhe Yang 2021-08-30 1609 if (i == RTW_REGD_WW) f8509c38ececde Zong-Zhe Yang 2021-08-30 1610 continue; f8509c38ececde Zong-Zhe Yang 2021-08-30 1611 f8509c38ececde Zong-Zhe Yang 2021-08-30 1612 if (regd_cfg_flag & BIT(i)) f8509c38ececde Zong-Zhe Yang 2021-08-30 1613 continue; f8509c38ececde Zong-Zhe Yang 2021-08-30 1614 f8509c38ececde Zong-Zhe Yang 2021-08-30 1615 rtw_dbg(rtwdev, RTW_DBG_REGD, f8509c38ececde Zong-Zhe Yang 2021-08-30 1616 "txpwr regd %d does not be configured\n", i); f8509c38ececde Zong-Zhe Yang 2021-08-30 1617 f8509c38ececde Zong-Zhe Yang 2021-08-30 1618 if (rtw_regd_has_alt(i, ®d_alt) && f8509c38ececde Zong-Zhe Yang 2021-08-30 1619 regd_cfg_flag & BIT(regd_alt)) { f8509c38ececde Zong-Zhe Yang 2021-08-30 1620 rtw_dbg(rtwdev, RTW_DBG_REGD, f8509c38ececde Zong-Zhe Yang 2021-08-30 1621 "cfg txpwr regd %d by regd %d as alternative\n", f8509c38ececde Zong-Zhe Yang 2021-08-30 1622 i, regd_alt); f8509c38ececde Zong-Zhe Yang 2021-08-30 1623 f8509c38ececde Zong-Zhe Yang 2021-08-30 1624 rtw_cfg_txpwr_lmt_by_alt(rtwdev, i, regd_alt); f8509c38ececde Zong-Zhe Yang 2021-08-30 1625 continue; f8509c38ececde Zong-Zhe Yang 2021-08-30 1626 } f8509c38ececde Zong-Zhe Yang 2021-08-30 1627 f8509c38ececde Zong-Zhe Yang 2021-08-30 1628 rtw_dbg(rtwdev, RTW_DBG_REGD, "cfg txpwr regd %d by WW\n", i); f8509c38ececde Zong-Zhe Yang 2021-08-30 1629 rtw_cfg_txpwr_lmt_by_alt(rtwdev, i, RTW_REGD_WW); f8509c38ececde Zong-Zhe Yang 2021-08-30 1630 } f8509c38ececde Zong-Zhe Yang 2021-08-30 1631 93f68a865f1193 Zong-Zhe Yang 2019-05-29 1632 rtw_xref_txpwr_lmt(rtwdev); fa6dfe6bff246d Yan-Hsuan Chuang 2019-05-29 1633 } 449be86670f502 Zong-Zhe Yang 2020-05-15 1634 EXPORT_SYMBOL(rtw_parse_tbl_txpwr_lmt); fa6dfe6bff246d Yan-Hsuan Chuang 2019-05-29 1635 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
