Skip to contentSkip to conversation

e1000: fix e1000e_disable_aspm_locked() warning

PATCH In review Dave Hansen 1 participant 2 messages Aug 31, 2015 – Sep 28, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 e1000: fix e1000e_disable_aspm_locked() warning

From: Dave Hansen <[email protected]>

I have a .config with CONFIG_PM disabled. I get the following whenever compiling the e1000 driver:

...net/ethernet/intel/e1000e/netdev.c:6450:13: warning: 'e1000e_disable_aspm_locked' defined but not used [-Wunused-function]
static void e1000e_disable_aspm_locked(struct pci_dev *pdev, u16 state)

Looks like we just need to move e1000e_disable_aspm_locked() to be underneath the CONFIG_PM #ifdef.

Cc Jeff Kirsher <[email protected]> (supporter:INTEL ETHERNET DRIVERS)
Cc Jesse Brandeburg <[email protected]> (reviewer)
Cc Shannon Nelson <[email protected]> (reviewer)
Cc Carolyn Wyborny <[email protected]> (reviewer)
Cc Don Skidmore <[email protected]> (reviewer)
Cc Matthew Vick <[email protected]> (reviewer)
Cc John Ronciak <[email protected]> (reviewer)
Cc Mitch Williams <[email protected]> (reviewer)
Cc intel-wired-lan at lists.osuosl.org (open list:INTEL ETHERNET DRIVERS)
Cc netdev at vger.kernel.org (open list:NETWORKING DRIVERS)
Cc linux-kernel at vger.kernel.org (open list)

---

 b/drivers/net/ethernet/intel/e1000e/netdev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/e1000e/netdev.c renamed from drivers/net/ethernet/intel/e1000e/netdev.c~fix-e1000-warning +1 -1
diff -puN drivers/net/ethernet/intel/e1000e/netdev.c~fix-e1000-warning drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6439,6 +6439,7 @@ static void e1000e_disable_aspm(struct p
 	__e1000e_disable_aspm(pdev, state, 0);
 }
 
+#ifdef CONFIG_PM
 /**
  * e1000e_disable_aspm_locked   Disable ASPM states.
  * @pdev: pointer to PCI device struct
@@ -6452,7 +6453,6 @@ static void e1000e_disable_aspm_locked(s
 	__e1000e_disable_aspm(pdev, state, 1);
 }
 
-#ifdef CONFIG_PM
 static int __e1000_resume(struct pci_dev *pdev)
 {
 	struct net_device *netdev = pci_get_drvdata(pdev);

_

#1 lore raw
Quoted 10 lines · Dave Hansen

From: Dave Hansen <[email protected]>

I have a .config with CONFIG_PM disabled. I get the following whenever compiling the e1000 driver:

...net/ethernet/intel/e1000e/netdev.c:6450:13: warning: 'e1000e_disable_aspm_locked' defined but not used [-Wunused-function]
static void e1000e_disable_aspm_locked(struct pci_dev *pdev, u16 state)

Looks like we just need to move e1000e_disable_aspm_locked() to be underneath the CONFIG_PM #ifdef.

This patch:

	[2758f9edb]: e1000e: Fix incorrect ASPM locking

established a new caller for e1000e_disable_aspm_locked() which makes my patch useless and wrong (it breaks the compile).

I believe we should just revert my patch.