From patchwork Tue Jun 16 22:53:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Kirsher X-Patchwork-Id: 188108 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp4060992ilo; Tue, 16 Jun 2020 15:54:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyH+q+dLaINtHR3axLcfLhPxn7nRHeoTZFGJMIVHjtOg5VsnGVizVWLoRgy5xSwZ6bk9STN X-Received: by 2002:a50:cd1c:: with SMTP id z28mr4784243edi.257.1592348047001; Tue, 16 Jun 2020 15:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592348046; cv=none; d=google.com; s=arc-20160816; b=fOTw+rUMF2RKq+1FER5xL0jXn49vSIWDfQgmj0GDmBvUB8KF7oud1Ezbxv1bmI2jxl wdsyG9OiTpnCDPhhdrdM7nlZ7ib6gGK//TJXNdwzyj4ov8M5FicfBsCKPLwKXtQqFXKC KxRDPrIQw4H3QYPeFM6Y2h1ILlK1pQFghMGmYsf7+a76aTKVL3zSE11hY5A50inPo304 6cvenvv6vaQNDkLPjVn+r5+675tL5T9wWqX4d/wtTprOHubqVu6gqgngalTGFiH1ILZb hKHY+oM74c+2fqel5hFFOGjP07Omv3AJtj6PR6ITYCogRsVci5Zz7kZ/VSYFEXNpYz1u qA/g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=APgzkDY6Wz/mwVOEE+ExvosfIhYk0p0Tm+Y/3d3je7c=; b=cyk/a83Dbh1X8NBWLNdUMYJAEHi4au/Ikwi0MqWKVFSEUIbzcCiY57jUjhWYgDH1rX BC079yxljhIvye0jR+cu7BXJNK1wkhjsLqA8u/sLiY4hglcIFGWQ3NO7Lvd7BHXVT/67 4xsbnlkbw3oK3b1MvqrFnOXfEGIH3Sgpqzp1Q7cL57nLZhazdNVXI9t+fZ8Lrz5crQVg G4KfnU37zGy1yfaSaJFNxZjnMQhdDJ0fH+oXY9j9x7n1MUwIIL2kUfsZuV3AipRB6b9c GlJbq09sy44Lh8z1Mg3cmwrLnSqjZm8K8TNM7LP9nrfSs45a/tnGX0VeAvUaYUdOppao GbGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i9si13222145edn.437.2020.06.16.15.54.06; Tue, 16 Jun 2020 15:54:06 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-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 netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726468AbgFPWyE (ORCPT + 9 others); Tue, 16 Jun 2020 18:54:04 -0400 Received: from mga01.intel.com ([192.55.52.88]:27234 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725964AbgFPWyE (ORCPT ); Tue, 16 Jun 2020 18:54:04 -0400 IronPort-SDR: 1ltJcwNZz0NqfYTsz4Ws9msRLwQ8R86MZM3ZQ21wWwh7TWJpaMGCW7yDKbpVfprj02niMmYtjm hPel3iygxP+g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2020 15:54:02 -0700 IronPort-SDR: emVEg9a1qXm8HEInDW0EiO+eofzVRd1/MbiSbB80jIuxPWJqd3d/GjoNTO/qId76/xsetxNnL3 E24c3XNwKyWA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,520,1583222400"; d="scan'208";a="317362151" Received: from jtkirshe-desk1.jf.intel.com ([134.134.177.86]) by FMSMGA003.fm.intel.com with ESMTP; 16 Jun 2020 15:53:57 -0700 From: Jeff Kirsher To: davem@davemloft.net Cc: Arnd Bergmann , netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, Aaron Brown , Jeff Kirsher Subject: [net 3/3] e1000e: fix unused-function warning Date: Tue, 16 Jun 2020 15:53:54 -0700 Message-Id: <20200616225354.2744572-4-jeffrey.t.kirsher@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200616225354.2744572-1-jeffrey.t.kirsher@intel.com> References: <20200616225354.2744572-1-jeffrey.t.kirsher@intel.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann 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 Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/e1000e/netdev.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) -- 2.26.2 diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index e2ad3f38c75c..6f6479ca1267 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -6349,7 +6349,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) { @@ -6571,7 +6570,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) { @@ -6875,7 +6873,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); @@ -6941,8 +6938,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); @@ -6966,7 +6962,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); @@ -6985,9 +6981,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); @@ -7003,7 +6998,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); @@ -7020,7 +7015,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); @@ -7045,7 +7040,6 @@ static int e1000e_pm_runtime_suspend(struct device *dev) return 0; } -#endif /* CONFIG_PM */ static void e1000_shutdown(struct pci_dev *pdev) {