Skip to contentSkip to conversation

clk: samsung: mark PM functions as __maybe_unused

PATCH Applied Arnd Bergmann 4 participants 4 messages Dec 4, 2020 – Dec 5, 2020

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

PATCH v2 1/1 clk: samsung: mark PM functions as __maybe_unused

From: Arnd Bergmann <[email protected]>

The use of SIMPLE_DEV_PM_OPS() means that the suspend/resume functions are now unused when CONFIG_PM is disabled:

drivers/clk/samsung/clk-exynos-clkout.c:219:12: error: 'exynos_clkout_resume' defined but not used [-Werror=unused-function]
219 | static int exynos_clkout_resume(struct device *dev)

      |            ^~~~~~~~~~~~~~~~~~~~
drivers/clk/samsung/clk-exynos-clkout.c:210:12: error: 'exynos_clkout_suspend' defined but not used [-Werror=unused-function]
  210 | static int exynos_clkout_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~

Mark them as __maybe_unused to shut up the otherwise harmless warning.

Fixes 9484f2cb8332 ("clk: samsung: exynos-clkout: convert to module driver")

---
v2: add proper changelog text

---
 drivers/clk/samsung/clk-exynos-clkout.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/samsung/clk-exynos-clkout.c +2 -2
index 9ec2f40cc400..e6d6cbf8c4e6 100644
@@ -207,7 +207,7 @@ static int exynos_clkout_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static int exynos_clkout_suspend(struct device *dev)
+static int __maybe_unused exynos_clkout_suspend(struct device *dev)
 {
 	struct exynos_clkout *clkout = dev_get_drvdata(dev);
 
@@ -216,7 +216,7 @@ static int exynos_clkout_suspend(struct device *dev)
 	return 0;
 }
 
-static int exynos_clkout_resume(struct device *dev)
+static int __maybe_unused exynos_clkout_resume(struct device *dev)
 {
 	struct exynos_clkout *clkout = dev_get_drvdata(dev);
 
Signature · 1 line
2.27.0
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 38 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The use of SIMPLE_DEV_PM_OPS() means that the suspend/resume functions are now unused when CONFIG_PM is disabled:

drivers/clk/samsung/clk-exynos-clkout.c:219:12: error: 'exynos_clkout_resume' defined but not used [-Werror=unused-function]
219 | static int exynos_clkout_resume(struct device *dev)

      |            ^~~~~~~~~~~~~~~~~~~~
drivers/clk/samsung/clk-exynos-clkout.c:210:12: error: 'exynos_clkout_suspend' defined but not used [-Werror=unused-function]
  210 | static int exynos_clkout_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~

Mark them as __maybe_unused to shut up the otherwise harmless warning.

Fixes 9484f2cb8332 ("clk: samsung: exynos-clkout: convert to module driver")

---
v2: add proper changelog text

---
 drivers/clk/samsung/clk-exynos-clkout.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/samsung/clk-exynos-clkout.c +1 -1
index 9ec2f40cc400..e6d6cbf8c4e6 100644
@@ -207,7 +207,7 @@ static int exynos_clkout_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static int exynos_clkout_suspend(struct device *dev)
+static int __maybe_unused exynos_clkout_suspend(struct device *dev)
 {
 	struct exynos_clkout *clkout = dev_get_drvdata(dev);
 

drivers/clk/samsung/clk-exynos-clkout.c static int exynos_clkout_suspend(struct device *dev) · line 222

Quoted 8 lines
drivers/clk/samsung/clk-exynos-clkout.c +1 -1
@@ -216,7 +216,7 @@ static int exynos_clkout_suspend(struct device *dev)
 	return 0;
 }
 
-static int exynos_clkout_resume(struct device *dev)
+static int __maybe_unused exynos_clkout_resume(struct device *dev)
 {
 	struct exynos_clkout *clkout = dev_get_drvdata(dev);
 

Best Regards,
Chanwoo Choi
Samsung Electronics

Acked-by on v2 1/1
#2 lore raw
In reply to Arnd Bergmann
Quoted 12 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The use of SIMPLE_DEV_PM_OPS() means that the suspend/resume functions are now unused when CONFIG_PM is disabled:

drivers/clk/samsung/clk-exynos-clkout.c:219:12: error: 'exynos_clkout_resume' defined but not used [-Werror=unused-function]
219 | static int exynos_clkout_resume(struct device *dev)

       |            ^~~~~~~~~~~~~~~~~~~~
drivers/clk/samsung/clk-exynos-clkout.c:210:12: error: 'exynos_clkout_suspend' defined but not used [-Werror=unused-function]
   210 | static int exynos_clkout_suspend(struct device *dev)
       |            ^~~~~~~~~~~~~~~~~~~~~
Quoted 7 lines

Mark them as __maybe_unused to shut up the otherwise harmless warning.

Fixes 9484f2cb8332 ("clk: samsung: exynos-clkout: convert to module driver")

---
v2: add proper changelog text

maintainer Applied
#3 lore raw
In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann

The use of SIMPLE_DEV_PM_OPS() means that the suspend/resume functions are now unused when CONFIG_PM is disabled:

drivers/clk/samsung/clk-exynos-clkout.c:219:12: error: 'exynos_clkout_resume' defined but not used [-Werror=unused-function]
219 | static int exynos_clkout_resume(struct device *dev)

      |            ^~~~~~~~~~~~~~~~~~~~
drivers/clk/samsung/clk-exynos-clkout.c:210:12: error: 'exynos_clkout_suspend' defined but not used [-Werror=unused-function]
  210 | static int exynos_clkout_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~

[...]

Applied, thanks!

[1/1] clk: samsung: mark PM functions as __maybe_unused

      commit: 4c44274ee457e3f7012dc532c8c9cc8964a82612

Best regards,

Signature · 6 lines
Krzysztof Kozlowski <[email protected]>

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel