From patchwork Tue Jul 14 03:54:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 495203 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 7734C140320 for ; Wed, 15 Jul 2015 04:32:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6B1C0920E0; Tue, 14 Jul 2015 18:32:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id laHvnX8G+CXW; Tue, 14 Jul 2015 18:32:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 0F86391DCD; Tue, 14 Jul 2015 18:32:44 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 51CD71CE62C for ; Tue, 14 Jul 2015 04:00:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4A50191DD1 for ; Tue, 14 Jul 2015 04:00:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SiErprMSPyKJ for ; Tue, 14 Jul 2015 04:00:34 +0000 (UTC) X-Greylist: delayed 00:05:49 by SQLgrey-1.7.6 Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6414E91BB9 for ; Tue, 14 Jul 2015 04:00:34 +0000 (UTC) Received: by ozlabs.org (Postfix, from userid 1034) id 2C8B814076B; Tue, 14 Jul 2015 13:54:43 +1000 (AEST) From: Michael Ellerman To: Date: Tue, 14 Jul 2015 13:54:35 +1000 Message-Id: <1436846075-29366-1-git-send-email-mpe@ellerman.id.au> X-Mailer: git-send-email 2.1.0 X-Mailman-Approved-At: Tue, 14 Jul 2015 18:32:42 +0000 Cc: linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org Subject: [Intel-wired-lan] [PATCH] e1000e: Move e1000e_disable_aspm_locked() inside CONFIG_PM X-BeenThere: intel-wired-lan@lists.osuosl.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@lists.osuosl.org Sender: "Intel-wired-lan" 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 --- 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);