Skip to contentSkip to conversation

gpio: omap: Fix warnings if PM is disabled

PATCH In review Tony Lindgren 3 participants 3 messages Aug 19, 2020

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

PATCH 1/1 gpio: omap: Fix warnings if PM is disabled

Fix warnings for omap_gpio_resume and omap_gpio_suspend defined but not used when PM is disabled as noticed when doing make randconfig builds.

Fixes f02a03985d06 ("gpio: omap: Add missing PM ops for suspend")
Cc Arnd Bergmann <[email protected]>
---
 drivers/gpio/gpio-omap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpio-omap.c +2 -2
@@ -1516,7 +1516,7 @@ static int __maybe_unused omap_gpio_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int omap_gpio_suspend(struct device *dev)
+static int __maybe_unused omap_gpio_suspend(struct device *dev)
 {
 	struct gpio_bank *bank = dev_get_drvdata(dev);
 
@@ -1528,7 +1528,7 @@ static int omap_gpio_suspend(struct device *dev)
 	return omap_gpio_runtime_suspend(dev);
 }
 
-static int omap_gpio_resume(struct device *dev)
+static int __maybe_unused omap_gpio_resume(struct device *dev)
 {
 	struct gpio_bank *bank = dev_get_drvdata(dev);
 
Signature · 1 line
2.28.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 25 lines · Tony Lindgren

Fix warnings for omap_gpio_resume and omap_gpio_suspend defined but not used when PM is disabled as noticed when doing make randconfig builds.

Fixes f02a03985d06 ("gpio: omap: Add missing PM ops for suspend")
Cc Arnd Bergmann <[email protected]>
---
  drivers/gpio/gpio-omap.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpio-omap.c +1 -1
@@ -1516,7 +1516,7 @@ static int __maybe_unused omap_gpio_runtime_resume(struct device *dev)
  	return 0;
  }
 
-static int omap_gpio_suspend(struct device *dev)
+static int __maybe_unused omap_gpio_suspend(struct device *dev)
  {
  	struct gpio_bank *bank = dev_get_drvdata(dev);
 

drivers/gpio/gpio-omap.c static int omap_gpio_suspend(struct device *dev) · line 1534

Quoted 8 lines
drivers/gpio/gpio-omap.c +1 -1
@@ -1528,7 +1528,7 @@ static int omap_gpio_suspend(struct device *dev)
  	return omap_gpio_runtime_suspend(dev);
  }
 
-static int omap_gpio_resume(struct device *dev)
+static int __maybe_unused omap_gpio_resume(struct device *dev)
  {
  	struct gpio_bank *bank = dev_get_drvdata(dev);
 

Thank you.

Signature · 2 lines
Best regards,
grygorii
#2 lore raw
In reply to Tony Lindgren
Quoted 34 lines · Tony Lindgren

Fix warnings for omap_gpio_resume and omap_gpio_suspend defined but not used when PM is disabled as noticed when doing make randconfig builds.

Fixes f02a03985d06 ("gpio: omap: Add missing PM ops for suspend")
Cc Arnd Bergmann <[email protected]>
---
 drivers/gpio/gpio-omap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpio-omap.c +2 -3
@@ -1516,7 +1516,7 @@ static int __maybe_unused omap_gpio_runtime_resume(struct device *dev)
        return 0;
 }
 
-static int omap_gpio_suspend(struct device *dev)
+static int __maybe_unused omap_gpio_suspend(struct device *dev)
 {
        struct gpio_bank *bank = dev_get_drvdata(dev);
 
@@ -1528,7 +1528,7 @@ static int omap_gpio_suspend(struct device *dev)
        return omap_gpio_runtime_suspend(dev);
 }
 
-static int omap_gpio_resume(struct device *dev)
+static int __maybe_unused omap_gpio_resume(struct device *dev)
 {
        struct gpio_bank *bank = dev_get_drvdata(dev);
 
--
Quoted 1 line

2.28.0

Applied for fixes, thanks!

Bartosz