* [PATCH] mmc: sdio: Fix PM_SLEEP related build warnings
@ 2012-08-09 9:32 Thierry Reding
2012-08-09 10:00 ` Rafael J. Wysocki
0 siblings, 1 reply; 7+ messages in thread
From: Thierry Reding @ 2012-08-09 9:32 UTC (permalink / raw)
To: Chris Ball; +Cc: Paul Gortmaker, Rafael J. Wysocki, linux-mmc, linux-kernel
Power management callbacks defined by SIMPLE_DEV_PM_OPS are only used if
the PM_SLEEP Kconfig symbol has been defined. If not, the compiler will
complain about them being unused. However, since the callback for this
driver doesn't do anything it can just as well be dropped.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
---
drivers/mmc/core/sdio_bus.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 236842e..6bf6879 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -193,14 +193,7 @@ static int sdio_bus_remove(struct device *dev)
}
#ifdef CONFIG_PM
-
-static int pm_no_operation(struct device *dev)
-{
- return 0;
-}
-
static const struct dev_pm_ops sdio_bus_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(pm_no_operation, pm_no_operation)
SET_RUNTIME_PM_OPS(
pm_generic_runtime_suspend,
pm_generic_runtime_resume,
--
1.7.11.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: sdio: Fix PM_SLEEP related build warnings
2012-08-09 9:32 [PATCH] mmc: sdio: Fix PM_SLEEP related build warnings Thierry Reding
@ 2012-08-09 10:00 ` Rafael J. Wysocki
2012-09-17 7:35 ` Chris Ball
0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2012-08-09 10:00 UTC (permalink / raw)
To: Thierry Reding; +Cc: Chris Ball, Paul Gortmaker, linux-mmc, linux-kernel
On Thursday, August 09, 2012, Thierry Reding wrote:
> Power management callbacks defined by SIMPLE_DEV_PM_OPS are only used if
> the PM_SLEEP Kconfig symbol has been defined. If not, the compiler will
> complain about them being unused. However, since the callback for this
> driver doesn't do anything it can just as well be dropped.
>
> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> drivers/mmc/core/sdio_bus.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
> index 236842e..6bf6879 100644
> --- a/drivers/mmc/core/sdio_bus.c
> +++ b/drivers/mmc/core/sdio_bus.c
> @@ -193,14 +193,7 @@ static int sdio_bus_remove(struct device *dev)
> }
>
> #ifdef CONFIG_PM
> -
> -static int pm_no_operation(struct device *dev)
> -{
> - return 0;
> -}
> -
> static const struct dev_pm_ops sdio_bus_pm_ops = {
> - SET_SYSTEM_SLEEP_PM_OPS(pm_no_operation, pm_no_operation)
> SET_RUNTIME_PM_OPS(
> pm_generic_runtime_suspend,
> pm_generic_runtime_resume,
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: sdio: Fix PM_SLEEP related build warnings
2012-08-09 10:00 ` Rafael J. Wysocki
@ 2012-09-17 7:35 ` Chris Ball
0 siblings, 0 replies; 7+ messages in thread
From: Chris Ball @ 2012-09-17 7:35 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Thierry Reding, Paul Gortmaker, linux-mmc, linux-kernel
Hi,
On Thu, Aug 09 2012, Rafael J. Wysocki wrote:
> On Thursday, August 09, 2012, Thierry Reding wrote:
>> Power management callbacks defined by SIMPLE_DEV_PM_OPS are only used if
>> the PM_SLEEP Kconfig symbol has been defined. If not, the compiler will
>> complain about them being unused. However, since the callback for this
>> driver doesn't do anything it can just as well be dropped.
>>
>> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
>
> Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Thanks, pushed to mmc-next for 3.7.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] mmc: sdio: Fix PM_SLEEP related build warnings
@ 2012-08-09 6:56 Thierry Reding
2012-08-09 9:27 ` Rafael J. Wysocki
0 siblings, 1 reply; 7+ messages in thread
From: Thierry Reding @ 2012-08-09 6:56 UTC (permalink / raw)
To: Chris Ball; +Cc: Paul Gortmaker, Rafael J. Wysocki, linux-mmc, linux-kernel
Power management callbacks defined by SIMPLE_DEV_PM_OPS are only used if
the PM_SLEEP Kconfig symbol has been defined. If not, the compiler will
complain about them being unused.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
---
drivers/mmc/core/sdio_bus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 236842e..f8f90b4 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -193,11 +193,12 @@ static int sdio_bus_remove(struct device *dev)
}
#ifdef CONFIG_PM
-
+#ifdef CONFIG_PM_SLEEP
static int pm_no_operation(struct device *dev)
{
return 0;
}
+#endif
static const struct dev_pm_ops sdio_bus_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(pm_no_operation, pm_no_operation)
--
1.7.11.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: sdio: Fix PM_SLEEP related build warnings
2012-08-09 6:56 Thierry Reding
@ 2012-08-09 9:27 ` Rafael J. Wysocki
2012-08-09 9:27 ` Thierry Reding
0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2012-08-09 9:27 UTC (permalink / raw)
To: Thierry Reding; +Cc: Chris Ball, Paul Gortmaker, linux-mmc, linux-kernel
On Thursday, August 09, 2012, Thierry Reding wrote:
> Power management callbacks defined by SIMPLE_DEV_PM_OPS are only used if
> the PM_SLEEP Kconfig symbol has been defined. If not, the compiler will
> complain about them being unused.
>
> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
The pm_no_operation() thing is not necessary at all, AFAICT. I'd just
remove it entirely. :-)
Thanks,
Rafael
> ---
> drivers/mmc/core/sdio_bus.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
> index 236842e..f8f90b4 100644
> --- a/drivers/mmc/core/sdio_bus.c
> +++ b/drivers/mmc/core/sdio_bus.c
> @@ -193,11 +193,12 @@ static int sdio_bus_remove(struct device *dev)
> }
>
> #ifdef CONFIG_PM
> -
> +#ifdef CONFIG_PM_SLEEP
> static int pm_no_operation(struct device *dev)
> {
> return 0;
> }
> +#endif
>
> static const struct dev_pm_ops sdio_bus_pm_ops = {
> SET_SYSTEM_SLEEP_PM_OPS(pm_no_operation, pm_no_operation)
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: sdio: Fix PM_SLEEP related build warnings
2012-08-09 9:27 ` Rafael J. Wysocki
@ 2012-08-09 9:27 ` Thierry Reding
2012-08-09 9:55 ` Rafael J. Wysocki
0 siblings, 1 reply; 7+ messages in thread
From: Thierry Reding @ 2012-08-09 9:27 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Chris Ball, Paul Gortmaker, linux-mmc, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 801 bytes --]
On Thu, Aug 09, 2012 at 11:27:02AM +0200, Rafael J. Wysocki wrote:
> On Thursday, August 09, 2012, Thierry Reding wrote:
> > Power management callbacks defined by SIMPLE_DEV_PM_OPS are only used if
> > the PM_SLEEP Kconfig symbol has been defined. If not, the compiler will
> > complain about them being unused.
> >
> > Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
>
> The pm_no_operation() thing is not necessary at all, AFAICT. I'd just
> remove it entirely. :-)
I don't actually have a setup where I can test suspend/resume with this
driver, but if you say so I can follow up with a patch that removes
pm_no_operation(). It should work because many drivers without proper
PM_SLEEP support do not specify .suspend() nor .resume() callbacks
either.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: sdio: Fix PM_SLEEP related build warnings
2012-08-09 9:27 ` Thierry Reding
@ 2012-08-09 9:55 ` Rafael J. Wysocki
0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2012-08-09 9:55 UTC (permalink / raw)
To: Thierry Reding; +Cc: Chris Ball, Paul Gortmaker, linux-mmc, linux-kernel
On Thursday, August 09, 2012, Thierry Reding wrote:
> On Thu, Aug 09, 2012 at 11:27:02AM +0200, Rafael J. Wysocki wrote:
> > On Thursday, August 09, 2012, Thierry Reding wrote:
> > > Power management callbacks defined by SIMPLE_DEV_PM_OPS are only used if
> > > the PM_SLEEP Kconfig symbol has been defined. If not, the compiler will
> > > complain about them being unused.
> > >
> > > Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
> >
> > The pm_no_operation() thing is not necessary at all, AFAICT. I'd just
> > remove it entirely. :-)
>
> I don't actually have a setup where I can test suspend/resume with this
> driver, but if you say so I can follow up with a patch that removes
> pm_no_operation(). It should work because many drivers without proper
> PM_SLEEP support do not specify .suspend() nor .resume() callbacks
> either.
Sure, it should work.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-09-17 7:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-09 9:32 [PATCH] mmc: sdio: Fix PM_SLEEP related build warnings Thierry Reding
2012-08-09 10:00 ` Rafael J. Wysocki
2012-09-17 7:35 ` Chris Ball
-- strict thread matches above, loose matches on Subject: below --
2012-08-09 6:56 Thierry Reding
2012-08-09 9:27 ` Rafael J. Wysocki
2012-08-09 9:27 ` Thierry Reding
2012-08-09 9:55 ` Rafael J. Wysocki
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).