lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 15 Mar 2018 17:18:39 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Thierry Reding <thierry.reding@...il.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Jonathan Hunter <jonathanh@...dia.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Manikanta Maddireddy <mmaddireddy@...dia.com>,
        Stephen Warren <swarren@...dia.com>,
        Vidya Sagar <vidyas@...dia.com>, linux-tegra@...r.kernel.org,
        linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] PCI: tegra: mark PM functions as __maybe_unused

The new PM support causes a warning when CONFIG_PM is disabled:

drivers/pci/host/pci-tegra.c:2482:12: error: 'tegra_pcie_pm_resume' defined but not used [-Werror=unused-function]
 static int tegra_pcie_pm_resume(struct device *dev)
drivers/pci/host/pci-tegra.c:2463:12: error: 'tegra_pcie_pm_suspend' defined but not used [-Werror=unused-function]
 static int tegra_pcie_pm_suspend(struct device *dev)

Marking the functions as __maybe_unused lets the compiler drop them
silently instead.

Fixes: b90b44154023 ("PCI: tegra: Add power management support")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/pci/host/pci-tegra.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 39c4af9cf055..389e74be846c 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -2460,7 +2460,7 @@ static int tegra_pcie_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static int tegra_pcie_pm_suspend(struct device *dev)
+static int __maybe_unused tegra_pcie_pm_suspend(struct device *dev)
 {
 	struct tegra_pcie *pcie = dev_get_drvdata(dev);
 	struct tegra_pcie_port *port;
@@ -2479,7 +2479,7 @@ static int tegra_pcie_pm_suspend(struct device *dev)
 	return 0;
 }
 
-static int tegra_pcie_pm_resume(struct device *dev)
+static int __maybe_unused tegra_pcie_pm_resume(struct device *dev)
 {
 	struct tegra_pcie *pcie = dev_get_drvdata(dev);
 	int err;
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ