Skip to contentSkip to conversation

clk: samsung: mark PM functions as __maybe_unused

PATCH Superseded Arnd Bergmann 2 participants 3 messages Dec 3, 2020 – Dec 4, 2020

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

From: Arnd Bergmann <[email protected]>

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)
      |            ^~~~~~~~~~~~~~~~~~~~~
---
 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 Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

I understand this happens with !PM builds. It would be good to mention this in commit msg. With commit msg improved:

Best regards,
Krzysztof

Quoted 37 lines

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)
      |            ^~~~~~~~~~~~~~~~~~~~~
---
 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
#2 lore raw
Quoted 9 lines · Krzysztof Kozlowski
Quoted 2 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

I understand this happens with !PM builds. It would be good to mention this in commit msg. With commit msg improved:

Thanks for taking a look.

I had meant to add a changelog text and failed to notice that this only had the warning message and neither a Fixes tag nor a description when I sent it out.

v2 coming.

Arnd