linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: pcie-rcar: Mark rcar_pcie_resume() with __maybe_unused
@ 2020-04-26 12:31 marek.vasut
  2020-04-27  7:19 ` Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: marek.vasut @ 2020-04-26 12:31 UTC (permalink / raw)
  To: linux-pci
  Cc: Marek Vasut, Bjorn Helgaas, Lorenzo Pieralisi,
	Geert Uytterhoeven, Wolfram Sang, linux-renesas-soc

From: Marek Vasut <marek.vasut+renesas@gmail.com>

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")

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Reported-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc@vger.kernel.org
---
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(-)

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index b58dfe415cb3..1a0e74cad9bb 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -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 *);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-28  8:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-26 12:31 [PATCH] PCI: pcie-rcar: Mark rcar_pcie_resume() with __maybe_unused marek.vasut
2020-04-27  7:19 ` Geert Uytterhoeven
2020-04-27 16:44 ` Bjorn Helgaas
2020-04-27 17:14   ` Marek Vasut
2020-04-28  8:28 ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).