PCI: rockchip: mark PM functions as __maybe_unused
Subsystems (2)
PATCH 1/1 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.
--- drivers/pci/host/pcie-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/host/pcie-rockchip.c +2 -2
@@ -1237,7 +1237,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;
@@ -1264,7 +1264,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;
Signature · 1 line
2.9.0
Hi Arnd,
Quoted 7 lines · Arnd Bergmann
When
CONFIG_PM_SLEEPis 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_unusedavoids the warning without the need for #ifdef around them.
Sorry for introducing this warning, and thanks for fixing it.
Quoted 30 lines
Fixes 013dd3d5e183 ("PCI: rockchip: Add system PM support")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/pci/host/pcie-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pci/host/pcie-rockchip.c +2
-2@@ -1237,7 +1237,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;@@ -1264,7 +1264,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;
Signature · 2 lines
Best Regards Shawn Lin
Quoted 10 lines · Arnd Bergmann
When
CONFIG_PM_SLEEPis 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_unusedavoids the warning without the need for #ifdef around them.Fixes 013dd3d5e183 ("PCI: rockchip: Add system PM support")Signed-off-by Arnd Bergmann <[email protected]>
Applied with Shawn's ack to pci/host-rockchip for v4.11, thanks!
Quoted 34 lines
--- drivers/pci/host/pcie-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pci/host/pcie-rockchip.c +2
-2@@ -1237,7 +1237,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;@@ -1264,7 +1264,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;Signature · 7 lines
2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel