* [PATCH] spi: atmel: remove warning when !CONFIG_PM_SLEEP
@ 2015-09-10 8:19 Alexandre Belloni
[not found] ` <1441873192-18511-1-git-send-email-alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2015-09-18 14:34 ` [PATCH] spi: atmel: remove warning when !CONFIG_PM_SLEEP Nicolas Ferre
0 siblings, 2 replies; 3+ messages in thread
From: Alexandre Belloni @ 2015-09-10 8:19 UTC (permalink / raw)
To: Mark Brown
Cc: Nicolas Ferre, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Alexandre Belloni
When CONFIG_PM is defined but not CONFIG_PM_SLEEP (this happens when
CONFIG_SUSPEND is not defined), there is the following warning:
drivers/spi/spi-atmel.c:1723:12: warning: ‘atmel_spi_suspend’ defined but not used [-Wunused-function]
drivers/spi/spi-atmel.c:1741:12: warning: ‘atmel_spi_resume’ defined but not used [-Wunused-function]
Enclose both atmel_spi_suspend and atmel_spi_resume in #ifdef
CONFIG_PM_SLEEP/#endif to solve that.
Signed-off-by: Alexandre Belloni <alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
drivers/spi/spi-atmel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index bf9ed380bb1c..63318e2afba1 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1720,6 +1720,7 @@ static int atmel_spi_runtime_resume(struct device *dev)
return clk_prepare_enable(as->clk);
}
+#ifdef CONFIG_PM_SLEEP
static int atmel_spi_suspend(struct device *dev)
{
struct spi_master *master = dev_get_drvdata(dev);
@@ -1756,6 +1757,7 @@ static int atmel_spi_resume(struct device *dev)
return ret;
}
+#endif
static const struct dev_pm_ops atmel_spi_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(atmel_spi_suspend, atmel_spi_resume)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <1441873192-18511-1-git-send-email-alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>]
* Applied "spi: atmel: remove warning when !CONFIG_PM_SLEEP" to the spi tree
[not found] ` <1441873192-18511-1-git-send-email-alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
@ 2015-09-10 10:36 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-09-10 10:36 UTC (permalink / raw)
To: Alexandre Belloni, Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA
The patch
spi: atmel: remove warning when !CONFIG_PM_SLEEP
has been applied to the spi tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
From d630526d0aa6acc0868dae892b1febda72029a3e Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Date: Thu, 10 Sep 2015 10:19:52 +0200
Subject: [PATCH] spi: atmel: remove warning when !CONFIG_PM_SLEEP
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When CONFIG_PM is defined but not CONFIG_PM_SLEEP (this happens when
CONFIG_SUSPEND is not defined), there is the following warning:
drivers/spi/spi-atmel.c:1723:12: warning: âatmel_spi_suspendâ defined but not used [-Wunused-function]
drivers/spi/spi-atmel.c:1741:12: warning: âatmel_spi_resumeâ defined but not used [-Wunused-function]
Enclose both atmel_spi_suspend and atmel_spi_resume in #ifdef
CONFIG_PM_SLEEP/#endif to solve that.
Signed-off-by: Alexandre Belloni <alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/spi/spi-atmel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index c9eca34..709fb6f 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1721,6 +1721,7 @@ static int atmel_spi_runtime_resume(struct device *dev)
return clk_prepare_enable(as->clk);
}
+#ifdef CONFIG_PM_SLEEP
static int atmel_spi_suspend(struct device *dev)
{
struct spi_master *master = dev_get_drvdata(dev);
@@ -1757,6 +1758,7 @@ static int atmel_spi_resume(struct device *dev)
return ret;
}
+#endif
static const struct dev_pm_ops atmel_spi_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(atmel_spi_suspend, atmel_spi_resume)
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: atmel: remove warning when !CONFIG_PM_SLEEP
2015-09-10 8:19 [PATCH] spi: atmel: remove warning when !CONFIG_PM_SLEEP Alexandre Belloni
[not found] ` <1441873192-18511-1-git-send-email-alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
@ 2015-09-18 14:34 ` Nicolas Ferre
1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Ferre @ 2015-09-18 14:34 UTC (permalink / raw)
To: Alexandre Belloni, Mark Brown; +Cc: linux-arm-kernel, linux-spi, linux-kernel
Le 10/09/2015 10:19, Alexandre Belloni a écrit :
> When CONFIG_PM is defined but not CONFIG_PM_SLEEP (this happens when
> CONFIG_SUSPEND is not defined), there is the following warning:
>
> drivers/spi/spi-atmel.c:1723:12: warning: ‘atmel_spi_suspend’ defined but not used [-Wunused-function]
> drivers/spi/spi-atmel.c:1741:12: warning: ‘atmel_spi_resume’ defined but not used [-Wunused-function]
>
> Enclose both atmel_spi_suspend and atmel_spi_resume in #ifdef
> CONFIG_PM_SLEEP/#endif to solve that.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
No problem on my side:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> drivers/spi/spi-atmel.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
> index bf9ed380bb1c..63318e2afba1 100644
> --- a/drivers/spi/spi-atmel.c
> +++ b/drivers/spi/spi-atmel.c
> @@ -1720,6 +1720,7 @@ static int atmel_spi_runtime_resume(struct device *dev)
> return clk_prepare_enable(as->clk);
> }
>
> +#ifdef CONFIG_PM_SLEEP
> static int atmel_spi_suspend(struct device *dev)
> {
> struct spi_master *master = dev_get_drvdata(dev);
> @@ -1756,6 +1757,7 @@ static int atmel_spi_resume(struct device *dev)
>
> return ret;
> }
> +#endif
>
> static const struct dev_pm_ops atmel_spi_pm_ops = {
> SET_SYSTEM_SLEEP_PM_OPS(atmel_spi_suspend, atmel_spi_resume)
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-18 14:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-10 8:19 [PATCH] spi: atmel: remove warning when !CONFIG_PM_SLEEP Alexandre Belloni
[not found] ` <1441873192-18511-1-git-send-email-alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2015-09-10 10:36 ` Applied "spi: atmel: remove warning when !CONFIG_PM_SLEEP" to the spi tree Mark Brown
2015-09-18 14:34 ` [PATCH] spi: atmel: remove warning when !CONFIG_PM_SLEEP Nicolas Ferre
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).