Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1604560 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-03-20 14:30 +0100 |
| Last post | 2017-03-21 05:00 +0100 |
| Articles | 5 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH] power: bq24190_charger: mark PM functions as __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2017-03-20 14:30 +0100
Re: [PATCH] power: bq24190_charger: mark PM functions as __maybe_unused Tony Lindgren <tony@atomide.com> - 2017-03-20 15:50 +0100
Re: [PATCH] power: bq24190_charger: mark PM functions as __maybe_unused Liam Breck <liam@networkimprov.net> - 2017-03-20 19:40 +0100
Re: [PATCH] power: bq24190_charger: mark PM functions as __maybe_unused Sebastian Reichel <sre@kernel.org> - 2017-03-20 22:40 +0100
Re: [PATCH] power: bq24190_charger: mark PM functions as __maybe_unused Mark Greer <mgreer@animalcreek.com> - 2017-03-21 05:00 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-03-20 14:30 +0100 |
| Subject | [PATCH] power: bq24190_charger: mark PM functions as __maybe_unused |
| Message-ID | <tn5xM-5ik-21@gated-at.bofh.it> |
Without CONFIG_PM, we get a harmless warning:
drivers/power/supply/bq24190_charger.c:1514:12: error: 'bq24190_runtime_resume' defined but not used [-Werror=unused-function]
drivers/power/supply/bq24190_charger.c:1501:12: error: 'bq24190_runtime_suspend' defined but not used [-Werror=unused-function]
To avoid the warning, we can mark all four PM functions as __maybe_unused,
which also lets us remove the incorrect #ifdef.
Fixes: 3d8090cba638 ("power: bq24190_charger: Check the interrupt status on resume")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/power/supply/bq24190_charger.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
index 6d80670586eb..451f2bc05ea5 100644
--- a/drivers/power/supply/bq24190_charger.c
+++ b/drivers/power/supply/bq24190_charger.c
@@ -1498,7 +1498,7 @@ static int bq24190_remove(struct i2c_client *client)
return 0;
}
-static int bq24190_runtime_suspend(struct device *dev)
+static __maybe_unused int bq24190_runtime_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
@@ -1511,7 +1511,7 @@ static int bq24190_runtime_suspend(struct device *dev)
return 0;
}
-static int bq24190_runtime_resume(struct device *dev)
+static __maybe_unused int bq24190_runtime_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
@@ -1527,8 +1527,7 @@ static int bq24190_runtime_resume(struct device *dev)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
-static int bq24190_pm_suspend(struct device *dev)
+static __maybe_unused int bq24190_pm_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
@@ -1550,7 +1549,7 @@ static int bq24190_pm_suspend(struct device *dev)
return 0;
}
-static int bq24190_pm_resume(struct device *dev)
+static __maybe_unused int bq24190_pm_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
@@ -1580,7 +1579,6 @@ static int bq24190_pm_resume(struct device *dev)
return 0;
}
-#endif
static const struct dev_pm_ops bq24190_pm_ops = {
SET_RUNTIME_PM_OPS(bq24190_runtime_suspend, bq24190_runtime_resume,
--
2.9.0
[toc] | [next] | [standalone]
| From | Tony Lindgren <tony@atomide.com> |
|---|---|
| Date | 2017-03-20 15:50 +0100 |
| Subject | Re: [PATCH] power: bq24190_charger: mark PM functions as __maybe_unused |
| Message-ID | <tn6Nc-67a-15@gated-at.bofh.it> |
| In reply to | #1604560 |
* Arnd Bergmann <arnd@arndb.de> [170320 06:17]:
> Without CONFIG_PM, we get a harmless warning:
>
> drivers/power/supply/bq24190_charger.c:1514:12: error: 'bq24190_runtime_resume' defined but not used [-Werror=unused-function]
> drivers/power/supply/bq24190_charger.c:1501:12: error: 'bq24190_runtime_suspend' defined but not used [-Werror=unused-function]
>
> To avoid the warning, we can mark all four PM functions as __maybe_unused,
> which also lets us remove the incorrect #ifdef.
>
> Fixes: 3d8090cba638 ("power: bq24190_charger: Check the interrupt status on resume")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks for fixing that:
Acked-by: Tony Lindgren <tony@atomide.com>
[toc] | [prev] | [next] | [standalone]
| From | Liam Breck <liam@networkimprov.net> |
|---|---|
| Date | 2017-03-20 19:40 +0100 |
| Message-ID | <tnanO-iT-57@gated-at.bofh.it> |
| In reply to | #1604560 |
On Mon, Mar 20, 2017 at 6:14 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> Without CONFIG_PM, we get a harmless warning:
>
> drivers/power/supply/bq24190_charger.c:1514:12: error: 'bq24190_runtime_resume' defined but not used [-Werror=unused-function]
> drivers/power/supply/bq24190_charger.c:1501:12: error: 'bq24190_runtime_suspend' defined but not used [-Werror=unused-function]
>
> To avoid the warning, we can mark all four PM functions as __maybe_unused,
> which also lets us remove the incorrect #ifdef.
>
> Fixes: 3d8090cba638 ("power: bq24190_charger: Check the interrupt status on resume")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cool, thx!
Acked-by: Liam Breck <kernel@networkimprov.net>
> ---
> drivers/power/supply/bq24190_charger.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
> index 6d80670586eb..451f2bc05ea5 100644
> --- a/drivers/power/supply/bq24190_charger.c
> +++ b/drivers/power/supply/bq24190_charger.c
> @@ -1498,7 +1498,7 @@ static int bq24190_remove(struct i2c_client *client)
> return 0;
> }
>
> -static int bq24190_runtime_suspend(struct device *dev)
> +static __maybe_unused int bq24190_runtime_suspend(struct device *dev)
> {
> struct i2c_client *client = to_i2c_client(dev);
> struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
> @@ -1511,7 +1511,7 @@ static int bq24190_runtime_suspend(struct device *dev)
> return 0;
> }
>
> -static int bq24190_runtime_resume(struct device *dev)
> +static __maybe_unused int bq24190_runtime_resume(struct device *dev)
> {
> struct i2c_client *client = to_i2c_client(dev);
> struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
> @@ -1527,8 +1527,7 @@ static int bq24190_runtime_resume(struct device *dev)
> return 0;
> }
>
> -#ifdef CONFIG_PM_SLEEP
> -static int bq24190_pm_suspend(struct device *dev)
> +static __maybe_unused int bq24190_pm_suspend(struct device *dev)
> {
> struct i2c_client *client = to_i2c_client(dev);
> struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
> @@ -1550,7 +1549,7 @@ static int bq24190_pm_suspend(struct device *dev)
> return 0;
> }
>
> -static int bq24190_pm_resume(struct device *dev)
> +static __maybe_unused int bq24190_pm_resume(struct device *dev)
> {
> struct i2c_client *client = to_i2c_client(dev);
> struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
> @@ -1580,7 +1579,6 @@ static int bq24190_pm_resume(struct device *dev)
>
> return 0;
> }
> -#endif
>
> static const struct dev_pm_ops bq24190_pm_ops = {
> SET_RUNTIME_PM_OPS(bq24190_runtime_suspend, bq24190_runtime_resume,
> --
> 2.9.0
>
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sre@kernel.org> |
|---|---|
| Date | 2017-03-20 22:40 +0100 |
| Subject | Re: [PATCH] power: bq24190_charger: mark PM functions as __maybe_unused |
| Message-ID | <tndbZ-2bk-39@gated-at.bofh.it> |
| In reply to | #1604560 |
[Multipart message — attachments visible in raw view] — view raw
Hi,
On Mon, Mar 20, 2017 at 02:14:15PM +0100, Arnd Bergmann wrote:
> Without CONFIG_PM, we get a harmless warning:
>
> drivers/power/supply/bq24190_charger.c:1514:12: error: 'bq24190_runtime_resume' defined but not used [-Werror=unused-function]
> drivers/power/supply/bq24190_charger.c:1501:12: error: 'bq24190_runtime_suspend' defined but not used [-Werror=unused-function]
>
> To avoid the warning, we can mark all four PM functions as __maybe_unused,
> which also lets us remove the incorrect #ifdef.
>
> Fixes: 3d8090cba638 ("power: bq24190_charger: Check the interrupt status on resume")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, queued.
-- Sebastian
[toc] | [prev] | [next] | [standalone]
| From | Mark Greer <mgreer@animalcreek.com> |
|---|---|
| Date | 2017-03-21 05:00 +0100 |
| Subject | Re: [PATCH] power: bq24190_charger: mark PM functions as __maybe_unused |
| Message-ID | <tnj7H-68t-5@gated-at.bofh.it> |
| In reply to | #1604560 |
On Mon, Mar 20, 2017 at 02:14:15PM +0100, Arnd Bergmann wrote:
> Without CONFIG_PM, we get a harmless warning:
>
> drivers/power/supply/bq24190_charger.c:1514:12: error: 'bq24190_runtime_resume' defined but not used [-Werror=unused-function]
> drivers/power/supply/bq24190_charger.c:1501:12: error: 'bq24190_runtime_suspend' defined but not used [-Werror=unused-function]
>
> To avoid the warning, we can mark all four PM functions as __maybe_unused,
> which also lets us remove the incorrect #ifdef.
>
> Fixes: 3d8090cba638 ("power: bq24190_charger: Check the interrupt status on resume")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
Probably too late but if it isn't...
Acked-by: Mark Greer <mgreer@animalcreek.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web