linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] mfd: rk808: Mark rk8xx_resume and rk8xx_suspend as __maybe_unused
@ 2019-07-11  3:30 YueHaibing
  2019-07-25 12:19 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-07-11  3:30 UTC (permalink / raw)
  To: lee.jones, tony.xie, stefan; +Cc: linux-kernel, YueHaibing

Fix build warning:

drivers/mfd/rk808.c:752:12: warning: 'rk8xx_resume' defined but not used [-Wunused-function]
drivers/mfd/rk808.c:732:12: warning: 'rk8xx_suspend' defined but not used [-Wunused-function]

The function is declared unconditionally but only called
while CONFIG_PM_SLEEP is set.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 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 601cefb..9a9e631 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.7.4



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

* Re: [PATCH -next] mfd: rk808: Mark rk8xx_resume and rk8xx_suspend as __maybe_unused
  2019-07-11  3:30 [PATCH -next] mfd: rk808: Mark rk8xx_resume and rk8xx_suspend as __maybe_unused YueHaibing
@ 2019-07-25 12:19 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2019-07-25 12:19 UTC (permalink / raw)
  To: YueHaibing; +Cc: tony.xie, stefan, linux-kernel

On Thu, 11 Jul 2019, YueHaibing wrote:

> Fix build warning:
> 
> drivers/mfd/rk808.c:752:12: warning: 'rk8xx_resume' defined but not used [-Wunused-function]
> drivers/mfd/rk808.c:732:12: warning: 'rk8xx_suspend' defined but not used [-Wunused-function]
> 
> The function is declared unconditionally but only called
> while CONFIG_PM_SLEEP is set.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/mfd/rk808.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Arnd already fixed this.

> diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
> index 601cefb..9a9e631 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;

-- 
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:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11  3:30 [PATCH -next] mfd: rk808: Mark rk8xx_resume and rk8xx_suspend as __maybe_unused YueHaibing
2019-07-25 12:19 ` 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).