Skip to contentSkip to conversation

clk: samsung: exynos5433: mark PM functions as __maybe_unused

PATCH Applied Arnd Bergmann 5 participants 5 messages Oct 10, 2017 – Oct 11, 2017

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

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

The suspend/resume functions are referenced conditionally, causing a harmless warning when CONFIG_PM is disabled:

drivers/clk/samsung/clk-exynos5433.c:5476:12: error: 'exynos5433_cmu_resume' defined but not used [-Werror=unused-function] drivers/clk/samsung/clk-exynos5433.c:5453:12: error: 'exynos5433_cmu_suspend' defined but not used [-Werror=unused-function]

This marks both as __maybe_unused to shut up the warning.

Fixes 523d3de41f02 ("clk: samsung: exynos5433: Add support for runtime PM")
---
 drivers/clk/samsung/clk-exynos5433.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/samsung/clk-exynos5433.c +2 -2
index cd9337613dd8..db270908037a 100644
@@ -5450,7 +5450,7 @@ struct exynos5433_cmu_data {
 	struct samsung_clk_provider ctx;
 };
 
-static int exynos5433_cmu_suspend(struct device *dev)
+static int __maybe_unused exynos5433_cmu_suspend(struct device *dev)
 {
 	struct exynos5433_cmu_data *data = dev_get_drvdata(dev);
 	int i;
@@ -5473,7 +5473,7 @@ static int exynos5433_cmu_suspend(struct device *dev)
 	return 0;
 }
 
-static int exynos5433_cmu_resume(struct device *dev)
+static int __maybe_unused exynos5433_cmu_resume(struct device *dev)
 {
 	struct exynos5433_cmu_data *data = dev_get_drvdata(dev);
 	int i;
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw

Hi Arnd,

Quoted 10 lines · Arnd Bergmann

The suspend/resume functions are referenced conditionally, causing a harmless warning when CONFIG_PM is disabled:

drivers/clk/samsung/clk-exynos5433.c:5476:12: error: 'exynos5433_cmu_resume' defined but not used [-Werror=unused-function] drivers/clk/samsung/clk-exynos5433.c:5453:12: error: 'exynos5433_cmu_suspend' defined but not used [-Werror=unused-function]

This marks both as __maybe_unused to shut up the warning.

Fixes 523d3de41f02 ("clk: samsung: exynos5433: Add support for runtime PM")
Quoted 18 lines
---
  drivers/clk/samsung/clk-exynos5433.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/samsung/clk-exynos5433.c +1 -1
index cd9337613dd8..db270908037a 100644
@@ -5450,7 +5450,7 @@ struct exynos5433_cmu_data {
  	struct samsung_clk_provider ctx;
  };
 
-static int exynos5433_cmu_suspend(struct device *dev)
+static int __maybe_unused exynos5433_cmu_suspend(struct device *dev)
  {
  	struct exynos5433_cmu_data *data = dev_get_drvdata(dev);
  	int i;

drivers/clk/samsung/clk-exynos5433.c static int exynos5433_cmu_suspend(struct device *dev) · line 5479

Quoted 8 lines
drivers/clk/samsung/clk-exynos5433.c +1 -1
@@ -5473,7 +5473,7 @@ static int exynos5433_cmu_suspend(struct device *dev)
  	return 0;
  }
 
-static int exynos5433_cmu_resume(struct device *dev)
+static int __maybe_unused exynos5433_cmu_resume(struct device *dev)
  {
  	struct exynos5433_cmu_data *data = dev_get_drvdata(dev);
  	int i;

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Arnd Bergmann

Hi Arnd,

Quoted 29 lines · Arnd Bergmann

The suspend/resume functions are referenced conditionally, causing a harmless warning when CONFIG_PM is disabled:

drivers/clk/samsung/clk-exynos5433.c:5476:12: error: 'exynos5433_cmu_resume' defined but not used [-Werror=unused-function] drivers/clk/samsung/clk-exynos5433.c:5453:12: error: 'exynos5433_cmu_suspend' defined but not used [-Werror=unused-function]

This marks both as __maybe_unused to shut up the warning.

Fixes 523d3de41f02 ("clk: samsung: exynos5433: Add support for runtime PM")
---
 drivers/clk/samsung/clk-exynos5433.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/samsung/clk-exynos5433.c +1 -1
index cd9337613dd8..db270908037a 100644
@@ -5450,7 +5450,7 @@ struct exynos5433_cmu_data {
 	struct samsung_clk_provider ctx;
 };
 
-static int exynos5433_cmu_suspend(struct device *dev)
+static int __maybe_unused exynos5433_cmu_suspend(struct device *dev)
 {
 	struct exynos5433_cmu_data *data = dev_get_drvdata(dev);
 	int i;

drivers/clk/samsung/clk-exynos5433.c static int exynos5433_cmu_suspend(struct device *dev) · line 5479

Quoted 8 lines
drivers/clk/samsung/clk-exynos5433.c +1 -1
@@ -5473,7 +5473,7 @@ static int exynos5433_cmu_suspend(struct device *dev)
 	return 0;
 }
 
-static int exynos5433_cmu_resume(struct device *dev)
+static int __maybe_unused exynos5433_cmu_resume(struct device *dev)
 {
 	struct exynos5433_cmu_data *data = dev_get_drvdata(dev);
 	int i;
Signature · 3 lines
Best Regards,
Chanwoo Choi
Samsung Electronics
Acked-by on v1 1/1
#3 lore raw
In reply to Arnd Bergmann
Quoted 10 lines · Arnd Bergmann

The suspend/resume functions are referenced conditionally, causing a harmless warning when CONFIG_PM is disabled:

drivers/clk/samsung/clk-exynos5433.c:5476:12: error: 'exynos5433_cmu_resume' defined but not used [-Werror=unused-function] drivers/clk/samsung/clk-exynos5433.c:5453:12: error: 'exynos5433_cmu_suspend' defined but not used [-Werror=unused-function]

This marks both as __maybe_unused to shut up the warning.

Fixes 523d3de41f02 ("clk: samsung: exynos5433: Add support for runtime PM")

FWIW:

[...]

maintainer Applied
#4 lore raw
In reply to Arnd Bergmann
Quoted 10 lines · Arnd Bergmann

The suspend/resume functions are referenced conditionally, causing a harmless warning when CONFIG_PM is disabled:

drivers/clk/samsung/clk-exynos5433.c:5476:12: error: 'exynos5433_cmu_resume' defined but not used [-Werror=unused-function] drivers/clk/samsung/clk-exynos5433.c:5453:12: error: 'exynos5433_cmu_suspend' defined but not used [-Werror=unused-function]

This marks both as __maybe_unused to shut up the warning.

Fixes 523d3de41f02 ("clk: samsung: exynos5433: Add support for runtime PM")

Applied, thanks.