[kbuild] drivers/net/ethernet/wangxun/ngbe/ngbe_main.c:54 ngbe_shutdown() error: uninitialized symbol 'wake'.
From: Dan Carpenter
Date: Wed Oct 05 2022 - 06:06:15 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2bca25eaeba6190efbfcb38ed169bd7ee43b5aaf
commit: e79e40c83b9fd4e8b9b9d4fc9093d25b7a67c745 net: ngbe: Add build support for ngbe
config: powerpc-randconfig-m041-20221002
compiler: powerpc-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
smatch warnings:
drivers/net/ethernet/wangxun/ngbe/ngbe_main.c:54 ngbe_shutdown() error: uninitialized symbol 'wake'.
vim +/wake +54 drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
e79e40c83b9fd4 Mengyuan Lou 2022-08-26 47 static void ngbe_shutdown(struct pci_dev *pdev)
e79e40c83b9fd4 Mengyuan Lou 2022-08-26 48 {
e79e40c83b9fd4 Mengyuan Lou 2022-08-26 49 bool wake;
e79e40c83b9fd4 Mengyuan Lou 2022-08-26 50
e79e40c83b9fd4 Mengyuan Lou 2022-08-26 51 ngbe_dev_shutdown(pdev, &wake);
ngbe_dev_shutdown() does not do anything to wake.
e79e40c83b9fd4 Mengyuan Lou 2022-08-26 52
e79e40c83b9fd4 Mengyuan Lou 2022-08-26 53 if (system_state == SYSTEM_POWER_OFF) {
e79e40c83b9fd4 Mengyuan Lou 2022-08-26 @54 pci_wake_from_d3(pdev, wake);
^^^^
Uninitialized.
e79e40c83b9fd4 Mengyuan Lou 2022-08-26 55 pci_set_power_state(pdev, PCI_D3hot);
e79e40c83b9fd4 Mengyuan Lou 2022-08-26 56 }
e79e40c83b9fd4 Mengyuan Lou 2022-08-26 57 }
--
0-DAY CI Kernel Test Service
https://01.org/lkp