PCI: pcie-rcar: Mark rcar_pcie_resume() with __maybe_unused
Subsystems (4)
PATCH 1/1 PCI: pcie-rcar: Mark rcar_pcie_resume() with __maybe_unused
From: Marek Vasut <[email protected]>
If CONFIG_PM_SLEEP is not set, SET_SYSTEM_SLEEP_PM_OPS() is expanded to empty macro and there is no reference to rcar_pcie_resume(), hence the following warning is generated:
drivers/pci/controller/pcie-rcar.c:1253:12: warning: ‘rcar_pcie_resume’ defined but not used [-Wunused-function]
1253 | static int rcar_pcie_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~
Fix this by marking this function as __maybe_unused , just like in commit 226e6b866d74 ("gpio: pch: Convert to dev_pm_ops")
---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c
--- drivers/pci/controller/pcie-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/pcie-rcar.c +1 -1
@@ -1250,7 +1250,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)return err; } -static int rcar_pcie_resume (struct device *dev) +static int __maybe_unused rcar_pcie_resume (struct device *dev) {struct rcar_pcie *pcie =dev_get_drvdata (dev);int (*hw_init_fn)(struct rcar_pcie *);
Signature · 1 line
2.25.1
Quoted 8 lines · On Sun, Apr 26, 2020 at 2:31 PM <[email protected]> wrote:
From: Marek Vasut <[email protected]>
If
CONFIG_PM_SLEEPis not set,SET_SYSTEM_SLEEP_PM_OPS()is expanded to empty macro and there is no reference torcar_pcie_resume(), hence the following warning is generated:
drivers/pci/controller/pcie-rcar.c:1253:12: warning: ‘rcar_pcie_resume’ defined but not used [-Wunused-function]
1253 | static intrcar_pcie_resume(struct device *dev)
Quoted 7 lines
| ^~~~~~~~~~~~~~~~Fix this by marking this function as
__maybe_unused, just like in commit226e6b866d74("gpio: pch: Convert todev_pm_ops")Signed-off-by Marek Vasut <[email protected]>Reported-by Bjorn Helgaas <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 20 lines · On Sun, Apr 26, 2020 at 02:31:15PM +0200, [email protected] wrote:
From: Marek Vasut <[email protected]>
If
CONFIG_PM_SLEEPis not set,SET_SYSTEM_SLEEP_PM_OPS()is expanded to empty macro and there is no reference torcar_pcie_resume(), hence the following warning is generated:
drivers/pci/controller/pcie-rcar.c:1253:12: warning: ‘rcar_pcie_resume’ defined but not used [-Wunused-function]
1253 | static intrcar_pcie_resume(struct device *dev)| ^~~~~~~~~~~~~~~~Fix this by marking this function as
__maybe_unused, just like in commit226e6b866d74("gpio: pch: Convert todev_pm_ops")Signed-off-by Marek Vasut <[email protected]>Reported-by Bjorn Helgaas <[email protected]>Cc Bjorn Helgaas <[email protected]>Cc Lorenzo Pieralisi <[email protected]>Cc Geert Uytterhoeven <[email protected]>Cc Wolfram Sang <[email protected]>
Quoted 4 lines
---
NOTE: Based ongit://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it frompci-rcar-gen2.c
I hope Lorenzo will squash this into the original commit. I don't think it adds anything useful to keep it as a separate commit.
Quoted 20 lines
--- drivers/pci/controller/pcie-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/controller/pcie-rcar.c +1
-1@@ -1250,7 +1250,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)return err; } -static int rcar_pcie_resume (struct device *dev) +static int __maybe_unused rcar_pcie_resume (struct device *dev) {struct rcar_pcie *pcie =dev_get_drvdata (dev);int (*hw_init_fn)(struct rcar_pcie *);Signature · 1 line
2.25.1
Quoted 26 lines · Bjorn Helgaas
Quoted 20 lines · On Sun, Apr 26, 2020 at 02:31:15PM +0200, [email protected] wrote:
From: Marek Vasut <[email protected]>
If
CONFIG_PM_SLEEPis not set,SET_SYSTEM_SLEEP_PM_OPS()is expanded to empty macro and there is no reference torcar_pcie_resume(), hence the following warning is generated:
drivers/pci/controller/pcie-rcar.c:1253:12: warning: ‘rcar_pcie_resume’ defined but not used [-Wunused-function]
1253 | static intrcar_pcie_resume(struct device *dev)| ^~~~~~~~~~~~~~~~Fix this by marking this function as
__maybe_unused, just like in commit226e6b866d74("gpio: pch: Convert todev_pm_ops")Signed-off-by Marek Vasut <[email protected]>Reported-by Bjorn Helgaas <[email protected]>Cc Bjorn Helgaas <[email protected]>Cc Lorenzo Pieralisi <[email protected]>Cc Geert Uytterhoeven <[email protected]>Cc Wolfram Sang <[email protected]>Quoted 4 lines
---
NOTE: Based ongit://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it frompci-rcar-gen2.c
Quoted 2 lines
I hope Lorenzo will squash this into the original commit. I don't think it adds anything useful to keep it as a separate commit.
Fine by me, that's also why I added these notes, so it's obvious it's based off the same branch where the previous patch is already.
Quoted 20 lines · On Sun, Apr 26, 2020 at 02:31:15PM +0200, [email protected] wrote:
From: Marek Vasut <[email protected]>
If
CONFIG_PM_SLEEPis not set,SET_SYSTEM_SLEEP_PM_OPS()is expanded to empty macro and there is no reference torcar_pcie_resume(), hence the following warning is generated:
drivers/pci/controller/pcie-rcar.c:1253:12: warning: ‘rcar_pcie_resume’ defined but not used [-Wunused-function]
1253 | static intrcar_pcie_resume(struct device *dev)| ^~~~~~~~~~~~~~~~Fix this by marking this function as
__maybe_unused, just like in commit226e6b866d74("gpio: pch: Convert todev_pm_ops")Signed-off-by Marek Vasut <[email protected]>Reported-by Bjorn Helgaas <[email protected]>Cc Bjorn Helgaas <[email protected]>Cc Lorenzo Pieralisi <[email protected]>Cc Geert Uytterhoeven <[email protected]>Cc Wolfram Sang <[email protected]>
Quoted 7 lines
---
NOTE: Based ongit://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it frompci-rcar-gen2.c--- drivers/pci/controller/pcie-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Squashed in https://patchwork.kernel.org/patch/11438665/
Quoted 16 lines
drivers/pci/controller/pcie-rcar.c +1
-1@@ -1250,7 +1250,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)return err; } -static int rcar_pcie_resume (struct device *dev) +static int __maybe_unused rcar_pcie_resume (struct device *dev) {struct rcar_pcie *pcie =dev_get_drvdata (dev);int (*hw_init_fn)(struct rcar_pcie *);Signature · 1 line
2.25.1