mfd: rk808: Mark rk8xx_resume and rk8xx_suspend as __maybe_unused
PATCH 1/1 mfd: rk808: Mark rk8xx_resume and rk8xx_suspend as __maybe_unused
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 <[email protected]>
Signed-off-by YueHaibing <[email protected]>
--- drivers/mfd/rk808.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/rk808.c +2 -2
@@ -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 ;
Signature · 1 line
2.7.4
Quoted 5 lines · 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]
Quoted 8 lines
The function is declared unconditionally but only called while
CONFIG_PM_SLEEPis set.Reported-by Hulk Robot <[email protected]>Signed-off-by YueHaibing <[email protected]>--- drivers/mfd/rk808.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Arnd already fixed this.
Quoted 22 lines
drivers/mfd/rk808.c +2
-2@@ -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 ;
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog