From patchwork Tue Oct 31 18:40:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Kirsher X-Patchwork-Id: 117659 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp4285981edm; Tue, 31 Oct 2017 11:43:46 -0700 (PDT) X-Google-Smtp-Source: ABhQp+S9ErTRLD8O2PAIi5zxI1a+pSf/x9UzbDYdYs9VZoII0m5sn6GAsVodbhIL/wv4jjbxx+Uv X-Received: by 10.101.77.144 with SMTP id p16mr2685414pgq.226.1509475426289; Tue, 31 Oct 2017 11:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509475426; cv=none; d=google.com; s=arc-20160816; b=la/+mWHk5a1TDPKCYeVzneqZN95q7cajyPOLAXIEqggZhqkKDrV204QbXbye6AlLV6 vU4ctC26YD6VuBxeyDyaQPrtHi/BcwRiEhE6qlQCk1lR739HFdlG9TKDFGDAq2q2tO3l 1tKGn7sFl8aDwOoDHy5KosgoVpiNrmUNOcsrHt8QszVDqbLA/ejlxAT/bGTeYMjLUhEQ OOP0LnQJynfUt5UKguTkN8TrHSlftcs8/6SNQ/+0Cuota48nu68kXjp5ts591iaBHRDD G9UdOkGeztlAE0K+TobFJ1juOf56w0dJ6AlvqZqU6i3SOFw/o8d5nB234jZrLgdGqwF4 wJTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=XFthaHI2XUjuXhypZiSinHiff1kT5kgP6EVyBYBY1PI=; b=Apwe1sOYqkbfLFBKZVtFggT/4TClmmeM/mAV9vi5+wOI+gmZNNGNB+/F6SkYjYd6Hb HIijpf2Vd7gEPsURopoj9aHCrpKeWVyHYrNIdXd0aqzHxvuzzvE27gdNZEO9RJmXVfIG PrvX0lg3m0MFOIk3HUz+M041SQeiAfyJuaIa9wW+x7Bmi/7sYALkXWdnMTulC4Pr3tWa tNbWwuS4sKhSKiQgMbclO0B9PaS/O08Fs6uZ17uJPdNmRPeNnw0Vl+zg/hYXPRNGMpBr DEWnZQ9gU4A8Khic2wKI60+807UQgFpkrufwpml6R5QL3RqGi2nj+bvvoL88nRghViZx iyAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s68si2159099pgb.168.2017.10.31.11.43.46; Tue, 31 Oct 2017 11:43:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932847AbdJaSno (ORCPT + 8 others); Tue, 31 Oct 2017 14:43:44 -0400 Received: from mga11.intel.com ([192.55.52.93]:21198 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932584AbdJaSkg (ORCPT ); Tue, 31 Oct 2017 14:40:36 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Oct 2017 11:40:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,325,1505804400"; d="scan'208";a="2918702" Received: from jtkirshe-desk.jf.intel.com (HELO jtkirshe-DESK.amr.corp.intel.com.com) ([134.134.177.54]) by orsmga002.jf.intel.com with ESMTP; 31 Oct 2017 11:40:34 -0700 From: Jeff Kirsher To: davem@davemloft.net Cc: Arnd Bergmann , netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, jogreene@redhat.com, Jeff Kirsher Subject: [net-next 1/9] i40e: mark PM functions as __maybe_unused Date: Tue, 31 Oct 2017 11:40:04 -0700 Message-Id: <20171031184012.29690-2-jeffrey.t.kirsher@intel.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171031184012.29690-1-jeffrey.t.kirsher@intel.com> References: <20171031184012.29690-1-jeffrey.t.kirsher@intel.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann A cleanup of the PM code left an incorrect #ifdef in place, leading to a harmless build warning: drivers/net/ethernet/intel/i40e/i40e_main.c:12223:12: error: 'i40e_resume' defined but not used [-Werror=unused-function] drivers/net/ethernet/intel/i40e/i40e_main.c:12185:12: error: 'i40e_suspend' defined but not used [-Werror=unused-function] It's easier to use __maybe_unused attributes here, since you can't pick the wrong one. Fixes: 0e5d3da40055 ("i40e: use newer generic PM support instead of legacy PM callbacks") Signed-off-by: Arnd Bergmann Tested-by: Andrew Bowers Acked-by: Jacob Keller Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) -- 2.14.2 diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 54ff34faca37..2a087319c09b 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -9557,7 +9557,6 @@ static int i40e_init_interrupt_scheme(struct i40e_pf *pf) return 0; } -#ifdef CONFIG_PM /** * i40e_restore_interrupt_scheme - Restore the interrupt scheme * @pf: private board data structure @@ -9606,7 +9605,6 @@ static int i40e_restore_interrupt_scheme(struct i40e_pf *pf) return err; } -#endif /* CONFIG_PM */ /** * i40e_setup_misc_vector - Setup the misc vector to handle non queue events @@ -13285,12 +13283,11 @@ static void i40e_shutdown(struct pci_dev *pdev) } } -#ifdef CONFIG_PM /** * i40e_suspend - PM callback for moving to D3 * @dev: generic device information structure **/ -static int i40e_suspend(struct device *dev) +static int __maybe_unused i40e_suspend(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct i40e_pf *pf = pci_get_drvdata(pdev); @@ -13328,7 +13325,7 @@ static int i40e_suspend(struct device *dev) * i40e_resume - PM callback for waking up from D3 * @dev: generic device information structure **/ -static int i40e_resume(struct device *dev) +static int __maybe_unused i40e_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct i40e_pf *pf = pci_get_drvdata(pdev); @@ -13360,8 +13357,6 @@ static int i40e_resume(struct device *dev) return 0; } -#endif /* CONFIG_PM */ - static const struct pci_error_handlers i40e_err_handler = { .error_detected = i40e_pci_error_detected, .slot_reset = i40e_pci_error_slot_reset, @@ -13377,11 +13372,9 @@ static struct pci_driver i40e_driver = { .id_table = i40e_pci_tbl, .probe = i40e_probe, .remove = i40e_remove, -#ifdef CONFIG_PM .driver = { .pm = &i40e_pm_ops, }, -#endif /* CONFIG_PM */ .shutdown = i40e_shutdown, .err_handler = &i40e_err_handler, .sriov_configure = i40e_pci_sriov_configure,