Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp825640ybm; Wed, 27 May 2020 08:54:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKPW2AjHV0fYC47IZUt7pu8EF6h3FNd63YT6XZpnYX+Dnva0yMfrTp9v7SQgkZHvZdaToM X-Received: by 2002:a50:f086:: with SMTP id v6mr25615717edl.140.1590594882430; Wed, 27 May 2020 08:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590594882; cv=none; d=google.com; s=arc-20160816; b=ZbOFYxemDZ7eRvsYF50O3R2bR3SVBAheDlPrOauJgvktqa5PQ2rXY3VYMS2moZuMQQ DoLY5M4zFYNfIyQ5DGKSzJA58WLOCo+h5QnwHK4VMAO1myOIYfjw1DBukTY0gyxY5zEo afICDaT9MD4P4OGxGmOPxt6aqBv0JQaaNspkLaDGFDxfi95O06H1d8VZxrEqsuAsDOfD E3mFxuwKudeiilIFKkSi8UNy4B3iM+hds0sTz9/M1u718uWByl9cjoOaibcgd4mKBQF2 YSY7uOSlFppHC0jS6J6VdyW7SIG2YqeyKQcTL6j8sdf90CtK6iO/q5fcULsuMEQCVQ2X kH1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=YxP3V8lRy8TYiGdWt0M/T5norrMW96eiEqY7kTqQHEM=; b=NUUWB+gkss1ZLN0FnzDMdZIUYqoh9Mo+L5hov3xXoecHT0lumf3S8ZN8P1Kvxwkk2A o7bciuqbPnbk76DoTZlYBQKqUMfdSOqop63aN6VyFeyhaxLkdvTc+fPl5sIZkQZ3VNvS DjC6FCnWnxONyICh6nW/L0BZdex7MGEQar8ZI3bB04mOqX+pJgvV5g59DY/y7gs8z+ft oKuT3c4DUNWRVgyHIhaZzFtyJOw4WyuD5U9jdSeXNJgMSF9JBY+dMZZ6rn/BnJ+zhG4d 3OSK82VWr2W5mbQIMk2XPgZRHqT7QecE/PuCSSsH1wggaQGXNnK3/fOTvmofm+n+Iqt4 mOGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h3si1784061edn.52.2020.05.27.08.54.18; Wed, 27 May 2020 08:54:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388718AbgE0Nrh (ORCPT + 99 others); Wed, 27 May 2020 09:47:37 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:36665 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388082AbgE0Nrf (ORCPT ); Wed, 27 May 2020 09:47:35 -0400 Received: from threadripper.lan ([149.172.98.151]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1N0nzR-1iqnfB1yGD-00wljD; Wed, 27 May 2020 15:47:20 +0200 From: Arnd Bergmann To: Jeff Kirsher , "David S. Miller" , Jakub Kicinski , Vitaly Lifshits Cc: Arnd Bergmann , Sasha Neftin , Alexander Duyck , "Rafael J. Wysocki" , Konstantin Khlebnikov , Detlev Casanova , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [net-next] e1000e: fix unused-function warning Date: Wed, 27 May 2020 15:47:00 +0200 Message-Id: <20200527134716.948148-1-arnd@arndb.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 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ND9StWQVB1fRSje3AcQ/+IejDuvREnOVJBbZAwEm ZUJIw+8x5FMAZQV+3MLJqTbcK0D1h04UY+JPHp3K4ZP9p0htwU= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The CONFIG_PM_SLEEP #ifdef checks in this file are inconsistent, leading to a warning about sometimes unused function: drivers/net/ethernet/intel/e1000e/netdev.c:137:13: error: unused function 'e1000e_check_me' [-Werror,-Wunused-function] Rather than adding more #ifdefs, just remove them completely and mark the PM functions as __maybe_unused to let the compiler work it out on it own. Fixes: e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/intel/e1000e/netdev.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 9cc8ec5421d5..66ca083b95f9 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -6351,7 +6351,6 @@ static void e1000e_flush_lpic(struct pci_dev *pdev) pm_runtime_put_sync(netdev->dev.parent); } -#ifdef CONFIG_PM_SLEEP /* S0ix implementation */ static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter) { @@ -6573,7 +6572,6 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter) mac_data &= ~E1000_CTRL_EXT_FORCE_SMBUS; ew32(CTRL_EXT, mac_data); } -#endif /* CONFIG_PM_SLEEP */ static int e1000e_pm_freeze(struct device *dev) { @@ -6871,7 +6869,6 @@ static int e1000e_pm_thaw(struct device *dev) return rc; } -#ifdef CONFIG_PM static int __e1000_resume(struct pci_dev *pdev) { struct net_device *netdev = pci_get_drvdata(pdev); @@ -6937,8 +6934,7 @@ static int __e1000_resume(struct pci_dev *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int e1000e_pm_suspend(struct device *dev) +static __maybe_unused int e1000e_pm_suspend(struct device *dev) { struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev)); struct e1000_adapter *adapter = netdev_priv(netdev); @@ -6962,7 +6958,7 @@ static int e1000e_pm_suspend(struct device *dev) return rc; } -static int e1000e_pm_resume(struct device *dev) +static __maybe_unused int e1000e_pm_resume(struct device *dev) { struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev)); struct e1000_adapter *adapter = netdev_priv(netdev); @@ -6981,9 +6977,8 @@ static int e1000e_pm_resume(struct device *dev) return e1000e_pm_thaw(dev); } -#endif /* CONFIG_PM_SLEEP */ -static int e1000e_pm_runtime_idle(struct device *dev) +static __maybe_unused int e1000e_pm_runtime_idle(struct device *dev) { struct net_device *netdev = dev_get_drvdata(dev); struct e1000_adapter *adapter = netdev_priv(netdev); @@ -6999,7 +6994,7 @@ static int e1000e_pm_runtime_idle(struct device *dev) return -EBUSY; } -static int e1000e_pm_runtime_resume(struct device *dev) +static __maybe_unused int e1000e_pm_runtime_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct net_device *netdev = pci_get_drvdata(pdev); @@ -7016,7 +7011,7 @@ static int e1000e_pm_runtime_resume(struct device *dev) return rc; } -static int e1000e_pm_runtime_suspend(struct device *dev) +static __maybe_unused int e1000e_pm_runtime_suspend(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct net_device *netdev = pci_get_drvdata(pdev); @@ -7041,7 +7036,6 @@ static int e1000e_pm_runtime_suspend(struct device *dev) return 0; } -#endif /* CONFIG_PM */ static void e1000_shutdown(struct pci_dev *pdev) { -- 2.26.2