Skip to contentSkip to conversation

mmc: sdhci-omap: Remove forward declaration of sdhci_omap_context_save()

PATCH In review Geert Uytterhoeven 2 participants 2 messages Oct 20, 2021 – Oct 21, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: sdhci-omap: Remove forward declaration of sdhci_omap_context_save()

If CONFIG_PM_SLEEP=n:

    drivers/mmc/host/sdhci-omap.c:1213:13: error: ‘sdhci_omap_context_save’ declared ‘static’ but never defined [-Werror=unused-function]
     1213 | static void sdhci_omap_context_save(struct sdhci_omap_host *omap_host);
	  |             ^~~~~~~~~~~~~~~~~~~~~~~

The referenced commit added an unrelated forward declaration of sdhci_omap_context_save(), which is unneeded in general, and unused when CONFIG_PM_SLEEP=n.

Fixes f433e8aac6b94218 ("mmc: sdhci-omap: Implement PM runtime functions")
Reported-by [email protected]
---
 drivers/mmc/host/sdhci-omap.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mmc/host/sdhci-omap.c +0 -2
index 0dec2f849b81e242..a4a1734dcb84e9cf 100644
@@ -1210,8 +1210,6 @@ static const struct soc_device_attribute sdhci_omap_soc_devices[] = {
 	}
 };
 
-static void sdhci_omap_context_save(struct sdhci_omap_host *omap_host);
-
 static int sdhci_omap_probe(struct platform_device *pdev)
 {
 	int ret;
Signature · 1 line
2.25.1
#1 lore raw
Quoted 7 lines · Geert Uytterhoeven

If CONFIG_PM_SLEEP=n:

    drivers/mmc/host/sdhci-omap.c:1213:13: error: ‘sdhci_omap_context_save’ declared ‘static’ but never defined [-Werror=unused-function]
     1213 | static void sdhci_omap_context_save(struct sdhci_omap_host *omap_host);
          |             ^~~~~~~~~~~~~~~~~~~~~~~
Quoted 7 lines

The referenced commit added an unrelated forward declaration of sdhci_omap_context_save(), which is unneeded in general, and unused when CONFIG_PM_SLEEP=n.

Fixes f433e8aac6b94218 ("mmc: sdhci-omap: Implement PM runtime functions")
Reported-by [email protected]

Applied for next, thanks!

Kind regards
Uffe

Quoted 20 lines
---
 drivers/mmc/host/sdhci-omap.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mmc/host/sdhci-omap.c +0 -3
index 0dec2f849b81e242..a4a1734dcb84e9cf 100644
@@ -1210,8 +1210,6 @@ static const struct soc_device_attribute sdhci_omap_soc_devices[] = {
        }
 };
 
-static void sdhci_omap_context_save(struct sdhci_omap_host *omap_host);
-
 static int sdhci_omap_probe(struct platform_device *pdev)
 {
        int ret;
--

2.25.1