[bug report] net: txgbe: Add build support for txgbe

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

 



Hello Jiawen Wu,

The patch 3ce7547e5b71: "net: txgbe: Add build support for txgbe"
from Jun 28, 2022, leads to the following Smatch static checker
warning:

	drivers/net/ethernet/wangxun/txgbe/txgbe_main.c:50 txgbe_shutdown()
	error: uninitialized symbol 'wake'.

drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
    33  static void txgbe_dev_shutdown(struct pci_dev *pdev, bool *enable_wake)
                                                                   ^^^^^^^^^^^
Presumably this function is supposed to set "*enable_wake = true;" or
something?

    34  {
    35          struct txgbe_adapter *adapter = pci_get_drvdata(pdev);
    36          struct net_device *netdev = adapter->netdev;
    37  
    38          netif_device_detach(netdev);
    39  
    40          pci_disable_device(pdev);
    41  }
    42  
    43  static void txgbe_shutdown(struct pci_dev *pdev)
    44  {
    45          bool wake;
    46  
    47          txgbe_dev_shutdown(pdev, &wake);
    48  
    49          if (system_state == SYSTEM_POWER_OFF) {
    50                  pci_wake_from_d3(pdev, wake);
                                               ^^^^
Uninitialized.

    51                  pci_set_power_state(pdev, PCI_D3hot);
    52          }
    53  }

regards,
dan carpenter



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux