linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: rk808: mark pm functions __maybe_unused
@ 2019-07-08 12:53 Arnd Bergmann
  2019-07-25 12:02 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-07-08 12:53 UTC (permalink / raw)
  To: Lee Jones
  Cc: Arnd Bergmann, Tony Xie, Stephen Boyd, Stefan Mavrodiev,
	Greg Kroah-Hartman, Thomas Gleixner, linux-kernel

The newly added suspend/resume functions are only used if CONFIG_PM
is enabled:

drivers/mfd/rk808.c:752:12: error: 'rk8xx_resume' defined but not used [-Werror=unused-function]
drivers/mfd/rk808.c:732:12: error: 'rk8xx_suspend' defined but not used [-Werror=unused-function]

Mark them as __maybe_unused so the compiler can silently drop them
when they are not needed.

Fixes: 586c1b4125b3 ("mfd: rk808: Add RK817 and RK809 support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/mfd/rk808.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
index 601cefb5c9d8..9a9e6315ba46 100644
--- a/drivers/mfd/rk808.c
+++ b/drivers/mfd/rk808.c
@@ -729,7 +729,7 @@ static int rk808_remove(struct i2c_client *client)
 	return 0;
 }
 
-static int rk8xx_suspend(struct device *dev)
+static int __maybe_unused rk8xx_suspend(struct device *dev)
 {
 	struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
 	int ret = 0;
@@ -749,7 +749,7 @@ static int rk8xx_suspend(struct device *dev)
 	return ret;
 }
 
-static int rk8xx_resume(struct device *dev)
+static int __maybe_unused rk8xx_resume(struct device *dev)
 {
 	struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
 	int ret = 0;
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mfd: rk808: mark pm functions __maybe_unused
  2019-07-08 12:53 [PATCH] mfd: rk808: mark pm functions __maybe_unused Arnd Bergmann
@ 2019-07-25 12:02 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2019-07-25 12:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Tony Xie, Stephen Boyd, Stefan Mavrodiev, Greg Kroah-Hartman,
	Thomas Gleixner, linux-kernel

On Mon, 08 Jul 2019, Arnd Bergmann wrote:

> The newly added suspend/resume functions are only used if CONFIG_PM
> is enabled:
> 
> drivers/mfd/rk808.c:752:12: error: 'rk8xx_resume' defined but not used [-Werror=unused-function]
> drivers/mfd/rk808.c:732:12: error: 'rk8xx_suspend' defined but not used [-Werror=unused-function]
> 
> Mark them as __maybe_unused so the compiler can silently drop them
> when they are not needed.
> 
> Fixes: 586c1b4125b3 ("mfd: rk808: Add RK817 and RK809 support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/mfd/rk808.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-25 12:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 12:53 [PATCH] mfd: rk808: mark pm functions __maybe_unused Arnd Bergmann
2019-07-25 12:02 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).