netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e1000e: Move e1000e_disable_aspm_locked() inside CONFIG_PM
@ 2015-07-14  3:54 Michael Ellerman
  2015-07-15 10:30 ` Jeff Kirsher
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2015-07-14  3:54 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, intel-wired-lan, jeffrey.t.kirsher, aaron.f.brown,
	yanirx.lubetkin, jesse.brandeburg, shannon.nelson,
	carolyn.wyborny, donald.c.skidmore, matthew.vick, john.ronciak,
	mitch.a.williams

e1000e_disable_aspm_locked() is only used in __e1000_resume() which is
inside CONFIG_PM. So when CONFIG_PM=n we get a "defined but not used"
warning for e1000e_disable_aspm_locked().

Move it inside the existing CONFIG_PM block to avoid the warning.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 89d788d8f263..f1d7fe2ea183 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6439,6 +6439,7 @@ static void e1000e_disable_aspm(struct pci_dev *pdev, u16 state)
 	__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(struct pci_dev *pdev, u16 state)
 	__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);
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-25  9:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14  3:54 [PATCH] e1000e: Move e1000e_disable_aspm_locked() inside CONFIG_PM Michael Ellerman
2015-07-15 10:30 ` Jeff Kirsher
2015-07-22  1:41   ` Michael Ellerman
2015-07-23 14:07     ` Jeff Kirsher
2015-07-25  9:12       ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).