From: Arnd Bergmann Date: Sun, 5 Feb 2017 02:19:54 +0000 (+0800) Subject: UPSTREAM: PCI: rockchip: Mark PM functions as __maybe_unused X-Git-Tag: firefly_0821_release~694 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6c6074b2826d4cd37fb0816be4f54f72ae582f91;p=firefly-linux-kernel-4.4.55.git UPSTREAM: PCI: rockchip: Mark PM functions as __maybe_unused When CONFIG_PM_SLEEP is disabled, we get harmless build warnings: host/pcie-rockchip.c:1267:12: error: 'rockchip_pcie_resume_noirq' defined but not used [-Werror=unused-function] host/pcie-rockchip.c:1240:12: error: 'rockchip_pcie_suspend_noirq' defined but not used [-Werror=unused-function] Marking both functions as __maybe_unused avoids the warning without the need for #ifdef around them. Change-Id: Ic5f9f9d576049b77fd091488c785d09c46cb9b78 Fixes: 013dd3d5e183 ("PCI: rockchip: Add system PM support") Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Helgaas Acked-by: Shawn Lin Signed-off-by: Shawn Lin (cherry picked from git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git commit 0b351c986a5ffedb502632c1b27690c9730d79c4) --- diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c index 13a291be106a..f058cd544a23 100644 --- a/drivers/pci/host/pcie-rockchip.c +++ b/drivers/pci/host/pcie-rockchip.c @@ -1218,7 +1218,7 @@ static int rockchip_pcie_wait_l2(struct rockchip_pcie *rockchip) return 0; } -static int rockchip_pcie_suspend_noirq(struct device *dev) +static int __maybe_unused rockchip_pcie_suspend_noirq(struct device *dev) { struct rockchip_pcie *rockchip = dev_get_drvdata(dev); int ret; @@ -1245,7 +1245,7 @@ static int rockchip_pcie_suspend_noirq(struct device *dev) return ret; } -static int rockchip_pcie_resume_noirq(struct device *dev) +static int __maybe_unused rockchip_pcie_resume_noirq(struct device *dev) { struct rockchip_pcie *rockchip = dev_get_drvdata(dev); int err;