Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1563760 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-01-20 17:30 +0100 |
| Last post | 2017-01-30 22:00 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] PCI: rockchip: mark PM functions as __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2017-01-20 17:30 +0100
Re: [PATCH] PCI: rockchip: mark PM functions as __maybe_unused Shawn Lin <shawn.lin@rock-chips.com> - 2017-01-22 08:40 +0100
Re: [PATCH] PCI: rockchip: mark PM functions as __maybe_unused Bjorn Helgaas <helgaas@kernel.org> - 2017-01-30 22:00 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-01-20 17:30 +0100 |
| Subject | [PATCH] PCI: rockchip: mark PM functions as __maybe_unused |
| Message-ID | <t1KeD-16c-43@gated-at.bofh.it> |
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.
Fixes: 013dd3d5e183 ("PCI: rockchip: Add system PM support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/pci/host/pcie-rockchip.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
index 0d6e8ee5b017..b975116d2b03 100644
--- a/drivers/pci/host/pcie-rockchip.c
+++ b/drivers/pci/host/pcie-rockchip.c
@@ -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;
--
2.9.0
[toc] | [next] | [standalone]
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2017-01-22 08:40 +0100 |
| Message-ID | <t2kUP-6jo-49@gated-at.bofh.it> |
| In reply to | #1563760 |
Hi Arnd,
On 2017/1/21 0:24, Arnd Bergmann wrote:
> 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.
Sorry for introducing this warning, and thanks for fixing it.
Acked-by: Shawn Lin <shawn.lin@rock-chips.com>
>
> Fixes: 013dd3d5e183 ("PCI: rockchip: Add system PM support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/pci/host/pcie-rockchip.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
> index 0d6e8ee5b017..b975116d2b03 100644
> --- a/drivers/pci/host/pcie-rockchip.c
> +++ b/drivers/pci/host/pcie-rockchip.c
> @@ -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;
>
--
Best Regards
Shawn Lin
[toc] | [prev] | [next] | [standalone]
| From | Bjorn Helgaas <helgaas@kernel.org> |
|---|---|
| Date | 2017-01-30 22:00 +0100 |
| Message-ID | <t5rdo-bx-1@gated-at.bofh.it> |
| In reply to | #1563760 |
On Fri, Jan 20, 2017 at 05:24:30PM +0100, Arnd Bergmann wrote:
> 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.
>
> Fixes: 013dd3d5e183 ("PCI: rockchip: Add system PM support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied with Shawn's ack to pci/host-rockchip for v4.11, thanks!
> ---
> drivers/pci/host/pcie-rockchip.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
> index 0d6e8ee5b017..b975116d2b03 100644
> --- a/drivers/pci/host/pcie-rockchip.c
> +++ b/drivers/pci/host/pcie-rockchip.c
> @@ -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;
> --
> 2.9.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web