linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e1000: fix e1000e_disable_aspm_locked() warning
@ 2015-08-31 21:26 Dave Hansen
  2015-09-28 15:57 ` Dave Hansen
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Hansen @ 2015-08-31 21:26 UTC (permalink / raw)
  To: dave
  Cc: dave.hansen, jeffrey.t.kirsher, jesse.brandeburg, shannon.nelson,
	carolyn.wyborny, donald.c.skidmore, matthew.vick, john.ronciak,
	mitch.a.williams, intel-wired-lan, netdev, linux-kernel


From: Dave Hansen <dave.hansen@linux.intel.com>

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.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> (supporter:INTEL ETHERNET DRIVERS)
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> (reviewer)
Cc: Shannon Nelson <shannon.nelson@intel.com> (reviewer)
Cc: Carolyn Wyborny <carolyn.wyborny@intel.com> (reviewer)
Cc: Don Skidmore <donald.c.skidmore@intel.com> (reviewer)
Cc: Matthew Vick <matthew.vick@intel.com> (reviewer)
Cc: John Ronciak <john.ronciak@intel.com> (reviewer)
Cc: Mitch Williams <mitch.a.williams@intel.com> (reviewer)
Cc: intel-wired-lan@lists.osuosl.org (open list:INTEL ETHERNET DRIVERS)
Cc: netdev@vger.kernel.org (open list:NETWORKING DRIVERS)
Cc: linux-kernel@vger.kernel.org (open list)
---

 b/drivers/net/ethernet/intel/e1000e/netdev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/net/ethernet/intel/e1000e/netdev.c~fix-e1000-warning drivers/net/ethernet/intel/e1000e/netdev.c
--- a/drivers/net/ethernet/intel/e1000e/netdev.c~fix-e1000-warning	2015-08-31 14:19:11.520115321 -0700
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c	2015-08-31 14:19:11.525115549 -0700
@@ -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);
_

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

* Re: [PATCH] e1000: fix e1000e_disable_aspm_locked() warning
  2015-08-31 21:26 [PATCH] e1000: fix e1000e_disable_aspm_locked() warning Dave Hansen
@ 2015-09-28 15:57 ` Dave Hansen
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Hansen @ 2015-09-28 15:57 UTC (permalink / raw)
  To: raanan.avargil
  Cc: dave.hansen, jeffrey.t.kirsher, jesse.brandeburg, shannon.nelson,
	carolyn.wyborny, donald.c.skidmore, matthew.vick, john.ronciak,
	mitch.a.williams, intel-wired-lan, netdev, linux-kernel

On 08/31/2015 02:26 PM, Dave Hansen wrote:
> From: Dave Hansen <dave.hansen@linux.intel.com>
> 
> 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.

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

end of thread, other threads:[~2015-09-28 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-31 21:26 [PATCH] e1000: fix e1000e_disable_aspm_locked() warning Dave Hansen
2015-09-28 15:57 ` Dave Hansen

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).