diff mbox series

[v2] clk: samsung: mark PM functions as __maybe_unused

Message ID 20201204091616.4128366-1-arnd@kernel.org (mailing list archive)
State Accepted
Commit 4c44274ee457e3f7012dc532c8c9cc8964a82612
Headers show
Series [v2] clk: samsung: mark PM functions as __maybe_unused | expand

Commit Message

Arnd Bergmann Dec. 4, 2020, 9:16 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

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")
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: add proper changelog text
---
 drivers/clk/samsung/clk-exynos-clkout.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Chanwoo Choi Dec. 4, 2020, 9:45 a.m. UTC | #1
On 12/4/20 6:16 PM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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")
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: add proper changelog text
> ---
>  drivers/clk/samsung/clk-exynos-clkout.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
> index 9ec2f40cc400..e6d6cbf8c4e6 100644
> --- a/drivers/clk/samsung/clk-exynos-clkout.c
> +++ b/drivers/clk/samsung/clk-exynos-clkout.c
> @@ -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);
>  
> 

Acked-by: Chanwoo Choi <cw00.choi@samsung.com>

Best Regards,
Chanwoo Choi
Samsung Electronics
Sylwester Nawrocki Dec. 4, 2020, 3:36 p.m. UTC | #2
On 12/4/20 10:16, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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")
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: add proper changelog text

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Krzysztof Kozlowski Dec. 5, 2020, 2:14 p.m. UTC | #3
On Fri, 4 Dec 2020 10:16:11 +0100, Arnd Bergmann wrote:
> 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,
diff mbox series

Patch

diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
index 9ec2f40cc400..e6d6cbf8c4e6 100644
--- a/drivers/clk/samsung/clk-exynos-clkout.c
+++ b/drivers/clk/samsung/clk-exynos-clkout.c
@@ -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);