From patchwork Wed Mar 2 15:59:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102612 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2461759lbc; Wed, 2 Mar 2016 08:03:14 -0800 (PST) X-Received: by 10.66.120.202 with SMTP id le10mr39064437pab.155.1456934594793; Wed, 02 Mar 2016 08:03:14 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id s8si5398984pfi.10.2016.03.02.08.03.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Mar 2016 08:03:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9E2-0003JY-MX; Wed, 02 Mar 2016 16:02:10 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9CY-0001LL-GS for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2016 16:00:40 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0M95x7-1aknJL0eMv-00CRDY; Wed, 02 Mar 2016 17:00:14 +0100 From: Arnd Bergmann To: Tom Lendacky Subject: [PATCH 09/14] amd-xgbe: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:59:01 +0100 Message-Id: <1456934350-1389172-10-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456934350-1389172-1-git-send-email-arnd@arndb.de> References: <1456934350-1389172-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:P6KZ3jWJ+LNFemDBQyCYeSDTb2eF7bS/OJBLogWwupM5PVJgU9Y JZPimBNnxm2MAdCHMY6ygMlUTLKP2BEq+ZCArZyHN7iR8CfU+dYAoXqnrvAXJfXZLxr1VKP 7c2c7lsObPJ5XtQmMNDn5wHfQVIOq634mMFilzW85thSrX6Z65WGTkbECAyU4A07RNxf5Ka e3y/GQitWV0uGzwY/2vHA== X-UI-Out-Filterresults: notjunk:1; V01:K0:R1JB3BnUuGI=:f+o25f3JxnRP8wV9OmGAhI zoGFw3aKJVETzsZSiR40RGHsIxth0tMLTAVL3JMwXaktUpo5UMDH6stBYBccaYr1/HTS/Yqx/ XZEM2wbNnKFLL0xeu90QDm8jbjPyK4vx/Tj9dZYjcSLcTOhiN6WuU8hceercPjdKm4QoLao9J oW8hggIVFjRBljzgAPWMPHXBZGcQ5+uhCJsf4XTXDsXKWb8AgowWLIQ1oI8SAXYhhTxIDmiU3 27EUFY2pihWvBvsyJdpnznQ8LGAUKB972CJEz1oBVlYTz0qJuZB5Z9bYz+qQsEYRctvsixLyA Ydl87JBS8VEyYootgdCof7RYPMX8Y4wm8a89mKF7Q8XYe3pp56vYPreFCFaCUL1MpKoWPozLv 2R6qbKjEyke4+4Cf2piP67i3ll5Xnsx2ImR5BrXvIK6wGBpP8wa+wBmrovP6P6XjD61rp+BdK 5Q4W6xPkgM2RNmH1sKPkIq3jRXQFvzWbXcy51sTwJYGDuh97ieb8ds3tUbLM0KYfHw7wk9Ixo LgE6jvrTQxqsDxIyJTehIMUi6GIztS0H4zeCZSwjrAioI4ej0UpOhofjcOpSJk5gP+dguMw1B PfQaewIKQ7WhgDYU1qtzWJTrBqZZ68dwxrMYeLrlO5Rd3PG8vLJU58Xwl3YX2MMr1GMlFMG7J R/AH1nBgAjguMlurAojUrOaF4R3wYw44oz1bljzjI1gn4edQuZjqpvASw9BRPi1g3Hc0= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160302_080039_182283_B94C4158 X-CRM114-Status: GOOD ( 13.50 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.10 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.10 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The amd-xgbe ethernet driver hides its suspend/resume functions in #ifdef CONFIG_PM, but uses SIMPLE_DEV_PM_OPS() to make the reference conditional on CONFIG_PM_SLEEP, which results in a warning when PM_SLEEP is not set but PM is: drivers/net/ethernet/amd/xgbe/xgbe-main.c:833:12: warning: 'xgbe_suspend' defined but not used [-Wunused-function] drivers/net/ethernet/amd/xgbe/xgbe-main.c:853:12: warning: 'xgbe_resume' defined but not used [-Wunused-function] This removes the incorrect #ifdef and instead uses a __maybe_unused annotation to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/amd/xgbe/xgbe-main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.7.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c index 3eee3201b58f..a86f32106639 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c @@ -829,8 +829,7 @@ static int xgbe_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int xgbe_suspend(struct device *dev) +static int __maybe_unused xgbe_suspend(struct device *dev) { struct net_device *netdev = dev_get_drvdata(dev); struct xgbe_prv_data *pdata = netdev_priv(netdev); @@ -850,7 +849,7 @@ static int xgbe_suspend(struct device *dev) return ret; } -static int xgbe_resume(struct device *dev) +static int __maybe_unused xgbe_resume(struct device *dev) { struct net_device *netdev = dev_get_drvdata(dev); struct xgbe_prv_data *pdata = netdev_priv(netdev); @@ -868,7 +867,6 @@ static int xgbe_resume(struct device *dev) return ret; } -#endif /* CONFIG_PM */ #ifdef CONFIG_ACPI static const struct acpi_device_id xgbe_acpi_match[] = {