* [PATCH] gpio: omap: Pass __maybe_unused to the suspend()/resume() hooks
@ 2020-08-24 13:03 Fabio Estevam
2020-08-26 11:23 ` Grygorii Strashko
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2020-08-24 13:03 UTC (permalink / raw)
To: linus.walleij; +Cc: grygorii.strashko, khilman, tony, linux-gpio, Fabio Estevam
When building a defconfig that does not have CONFIG_PM_SLEEP
selected, the following build warnings are seen:
drivers/gpio/gpio-omap.c:1531:12: warning: 'omap_gpio_resume' defined but not used [-Wunused-function]
drivers/gpio/gpio-omap.c:1519:12: warning: 'omap_gpio_suspend' defined but not used [-Wunused-function]
Pass __maybe_unused to avoid these warnings.
Fixes: f02a03985d06 ("gpio: omap: Add missing PM ops for suspend")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/gpio/gpio-omap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 7fbe0c9e1fc1..0ea640fb636c 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1516,7 +1516,7 @@ static int __maybe_unused omap_gpio_runtime_resume(struct device *dev)
return 0;
}
-static int omap_gpio_suspend(struct device *dev)
+static int __maybe_unused omap_gpio_suspend(struct device *dev)
{
struct gpio_bank *bank = dev_get_drvdata(dev);
@@ -1528,7 +1528,7 @@ static int omap_gpio_suspend(struct device *dev)
return omap_gpio_runtime_suspend(dev);
}
-static int omap_gpio_resume(struct device *dev)
+static int __maybe_unused omap_gpio_resume(struct device *dev)
{
struct gpio_bank *bank = dev_get_drvdata(dev);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: omap: Pass __maybe_unused to the suspend()/resume() hooks
2020-08-24 13:03 [PATCH] gpio: omap: Pass __maybe_unused to the suspend()/resume() hooks Fabio Estevam
@ 2020-08-26 11:23 ` Grygorii Strashko
2020-09-09 1:00 ` Fabio Estevam
0 siblings, 1 reply; 3+ messages in thread
From: Grygorii Strashko @ 2020-08-26 11:23 UTC (permalink / raw)
To: Fabio Estevam, linus.walleij; +Cc: khilman, tony, linux-gpio
On 24/08/2020 16:03, Fabio Estevam wrote:
> When building a defconfig that does not have CONFIG_PM_SLEEP
> selected, the following build warnings are seen:
>
> drivers/gpio/gpio-omap.c:1531:12: warning: 'omap_gpio_resume' defined but not used [-Wunused-function]
> drivers/gpio/gpio-omap.c:1519:12: warning: 'omap_gpio_suspend' defined but not used [-Wunused-function]
>
> Pass __maybe_unused to avoid these warnings.
>
> Fixes: f02a03985d06 ("gpio: omap: Add missing PM ops for suspend")
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> drivers/gpio/gpio-omap.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> index 7fbe0c9e1fc1..0ea640fb636c 100644
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -1516,7 +1516,7 @@ static int __maybe_unused omap_gpio_runtime_resume(struct device *dev)
> return 0;
> }
>
> -static int omap_gpio_suspend(struct device *dev)
> +static int __maybe_unused omap_gpio_suspend(struct device *dev)
> {
> struct gpio_bank *bank = dev_get_drvdata(dev);
>
> @@ -1528,7 +1528,7 @@ static int omap_gpio_suspend(struct device *dev)
> return omap_gpio_runtime_suspend(dev);
> }
>
> -static int omap_gpio_resume(struct device *dev)
> +static int __maybe_unused omap_gpio_resume(struct device *dev)
> {
> struct gpio_bank *bank = dev_get_drvdata(dev);
>
>
Duplicates
https://www.spinics.net/lists/arm-kernel/msg830596.html
--
Best regards,
grygorii
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: omap: Pass __maybe_unused to the suspend()/resume() hooks
2020-08-26 11:23 ` Grygorii Strashko
@ 2020-09-09 1:00 ` Fabio Estevam
0 siblings, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2020-09-09 1:00 UTC (permalink / raw)
To: Grygorii Strashko
Cc: Linus Walleij, Kevin Hilman, Tony Lindgren, open list:GPIO SUBSYSTEM
On Wed, Aug 26, 2020 at 8:23 AM Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
> Duplicates
> https://www.spinics.net/lists/arm-kernel/msg830596.html
It would be good if someone could apply it. The warning is still in
today's linux-next.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-09 1:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 13:03 [PATCH] gpio: omap: Pass __maybe_unused to the suspend()/resume() hooks Fabio Estevam
2020-08-26 11:23 ` Grygorii Strashko
2020-09-09 1:00 ` Fabio Estevam
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).