drivers/net/wireless/marvell/mwifiex/sdio.c:799 mwifiex_check_fw_status() error: uninitialized symbol 'firmware_stat'.
kernel test robot
build botBCC: [email protected]
CC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: David Lin <[email protected]>
CC: Kalle Valo <[email protected]>
CC: Francesco Dolcini <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: aa4db8324c4d0e67aa4670356df4e9fae14b4d37 commit: 1c5d463c0770c6fa2037511a24fb17966fd07d97 [7668/9096] wifi: mwifiex: add extra delay for firmware ready
:::::: branch date: 10 hours ago
:::::: commit date: 4 days ago
config: x86_64-randconfig-161-20231219 (https://download.01.org/0day-ci/archive/20231219/[email protected]/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]> | Reported-by: Dan Carpenter <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/
New smatch warnings:drivers/net/wireless/marvell/mwifiex/sdio.c:799 mwifiex_check_fw_status() error: uninitialized symbol 'firmware_stat'.
Old smatch warnings:drivers/net/wireless/marvell/mwifiex/sdio.c:2112 mwifiex_process_int_status() warn: missing unwind goto?
vim +/firmware_stat +799 drivers/net/wireless/marvell/mwifiex/sdio.c
90ff71f9557591 Xinming Hu 2016-11-30 774
90ff71f9557591 Xinming Hu 2016-11-30 775 /* This function checks the firmware status in card.
90ff71f9557591 Xinming Hu 2016-11-30 776 */
90ff71f9557591 Xinming Hu 2016-11-30 777 static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter,
90ff71f9557591 Xinming Hu 2016-11-30 778 u32 poll_num)
90ff71f9557591 Xinming Hu 2016-11-30 779 {
1c5d463c0770c6 David Lin 2023-12-09 780 struct sdio_mmc_card *card = adapter->card;
90ff71f9557591 Xinming Hu 2016-11-30 781 int ret = 0;
90ff71f9557591 Xinming Hu 2016-11-30 782 u16 firmware_stat;
90ff71f9557591 Xinming Hu 2016-11-30 783 u32 tries;
90ff71f9557591 Xinming Hu 2016-11-30 784
90ff71f9557591 Xinming Hu 2016-11-30 785 for (tries = 0; tries < poll_num; tries++) {
90ff71f9557591 Xinming Hu 2016-11-30 786 ret = mwifiex_sdio_read_fw_status(adapter, &firmware_stat);
90ff71f9557591 Xinming Hu 2016-11-30 787 if (ret)
90ff71f9557591 Xinming Hu 2016-11-30 788 continue;
90ff71f9557591 Xinming Hu 2016-11-30 789 if (firmware_stat == FIRMWARE_READY_SDIO) {
90ff71f9557591 Xinming Hu 2016-11-30 790 ret = 0;
90ff71f9557591 Xinming Hu 2016-11-30 791 break;
90ff71f9557591 Xinming Hu 2016-11-30 792 }
90ff71f9557591 Xinming Hu 2016-11-30 793
90ff71f9557591 Xinming Hu 2016-11-30 794 msleep(100);
90ff71f9557591 Xinming Hu 2016-11-30 795 ret = -1;
90ff71f9557591 Xinming Hu 2016-11-30 796 }
90ff71f9557591 Xinming Hu 2016-11-30 797
1c5d463c0770c6 David Lin 2023-12-09 798 if (card->fw_ready_extra_delay &&
1c5d463c0770c6 David Lin 2023-12-09 @799 firmware_stat == FIRMWARE_READY_SDIO)
1c5d463c0770c6 David Lin 2023-12-09 800 /* firmware might pretend to be ready, when it's not.
1c5d463c0770c6 David Lin 2023-12-09 801 * Wait a little bit more as a workaround.
1c5d463c0770c6 David Lin 2023-12-09 802 */
1c5d463c0770c6 David Lin 2023-12-09 803 msleep(100);
1c5d463c0770c6 David Lin 2023-12-09 804
90ff71f9557591 Xinming Hu 2016-11-30 805 return ret;
90ff71f9557591 Xinming Hu 2016-11-30 806 }
90ff71f9557591 Xinming Hu 2016-11-30 807 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki