linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM
@ 2013-09-06  2:28 Aaron Lu
  2013-09-06  7:20 ` Amit Shah
  2013-09-06  8:07 ` Amit Shah
  0 siblings, 2 replies; 6+ messages in thread
From: Aaron Lu @ 2013-09-06  2:28 UTC (permalink / raw)
  To: Amit Shah
  Cc: Rusty Russell, Rafael J. Wysocki, virtualization,
	Linux-pm mailing list


The virtio_pci_freeze/restore are defined under CONFIG_PM but is used
by SET_SYSTEM_SLEEP_PM_OPS macro, which is defined under
CONFIG_PM_SLEEP. So if CONFIG_PM_SLEEP is not cofigured but
CONFIG_PM_RUNTIME is, the following warning message appeared:

drivers/virtio/virtio_pci.c:770:12: warning: ‘virtio_pci_freeze’ defined but not used [-Wunused-function]
 static int virtio_pci_freeze(struct device *dev)
            ^
drivers/virtio/virtio_pci.c:790:12: warning: ‘virtio_pci_restore’ defined but not used [-Wunused-function]
 static int virtio_pci_restore(struct device *dev)
            ^
Fix it by changing CONFIG_PM to CONFIG_PM_SLEEP.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
---
 drivers/virtio/virtio_pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 1aba255..98917fc 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -766,7 +766,7 @@ static void virtio_pci_remove(struct pci_dev *pci_dev)
 	kfree(vp_dev);
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int virtio_pci_freeze(struct device *dev)
 {
 	struct pci_dev *pci_dev = to_pci_dev(dev);
@@ -824,7 +824,7 @@ static struct pci_driver virtio_pci_driver = {
 	.id_table	= virtio_pci_id_table,
 	.probe		= virtio_pci_probe,
 	.remove		= virtio_pci_remove,
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 	.driver.pm	= &virtio_pci_pm_ops,
 #endif
 };
-- 
1.8.3.2.10.g43d11f4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM
  2013-09-06  2:28 [PATCH] virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM Aaron Lu
@ 2013-09-06  7:20 ` Amit Shah
  2013-09-06  7:41   ` Aaron Lu
  2013-09-06  8:07 ` Amit Shah
  1 sibling, 1 reply; 6+ messages in thread
From: Amit Shah @ 2013-09-06  7:20 UTC (permalink / raw)
  To: Aaron Lu; +Cc: Rafael J. Wysocki, Linux-pm mailing list, virtualization

On (Fri) 06 Sep 2013 [10:28:36], Aaron Lu wrote:
> 
> The virtio_pci_freeze/restore are defined under CONFIG_PM but is used
> by SET_SYSTEM_SLEEP_PM_OPS macro, which is defined under
> CONFIG_PM_SLEEP. So if CONFIG_PM_SLEEP is not cofigured but
> CONFIG_PM_RUNTIME is, the following warning message appeared:
> 
> drivers/virtio/virtio_pci.c:770:12: warning: ‘virtio_pci_freeze’ defined but not used [-Wunused-function]
>  static int virtio_pci_freeze(struct device *dev)
>             ^
> drivers/virtio/virtio_pci.c:790:12: warning: ‘virtio_pci_restore’ defined but not used [-Wunused-function]
>  static int virtio_pci_restore(struct device *dev)
>             ^
> Fix it by changing CONFIG_PM to CONFIG_PM_SLEEP.
> 
> Signed-off-by: Aaron Lu <aaron.lu@intel.com>
> ---
>  drivers/virtio/virtio_pci.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

While you're at it, can you update the virtio drivers as well?

drivers/block/virtio_blk.c
drivers/char/hw_random/virtio_rng.c
drivers/char/virtio_console.c
drivers/net/virtio_net.c
drivers/scsi/virtio_scsi.c
drivers/virtio/virtio_balloon.c

Thanks,

		Amit
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM
  2013-09-06  7:20 ` Amit Shah
@ 2013-09-06  7:41   ` Aaron Lu
  2013-09-06  8:07     ` Amit Shah
  0 siblings, 1 reply; 6+ messages in thread
From: Aaron Lu @ 2013-09-06  7:41 UTC (permalink / raw)
  To: Amit Shah
  Cc: Rusty Russell, Rafael J. Wysocki, virtualization,
	Linux-pm mailing list

On 09/06/2013 03:20 PM, Amit Shah wrote:
> On (Fri) 06 Sep 2013 [10:28:36], Aaron Lu wrote:
>>
>> The virtio_pci_freeze/restore are defined under CONFIG_PM but is used
>> by SET_SYSTEM_SLEEP_PM_OPS macro, which is defined under
>> CONFIG_PM_SLEEP. So if CONFIG_PM_SLEEP is not cofigured but
>> CONFIG_PM_RUNTIME is, the following warning message appeared:
>>
>> drivers/virtio/virtio_pci.c:770:12: warning: ‘virtio_pci_freeze’ defined but not used [-Wunused-function]
>>  static int virtio_pci_freeze(struct device *dev)
>>             ^
>> drivers/virtio/virtio_pci.c:790:12: warning: ‘virtio_pci_restore’ defined but not used [-Wunused-function]
>>  static int virtio_pci_restore(struct device *dev)
>>             ^
>> Fix it by changing CONFIG_PM to CONFIG_PM_SLEEP.
>>
>> Signed-off-by: Aaron Lu <aaron.lu@intel.com>
>> ---
>>  drivers/virtio/virtio_pci.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> While you're at it, can you update the virtio drivers as well?

No problem, I think I'll send a separate patch for them on top of this
one, since they do not cause compile warnings.

Thanks,
Aaron

> 
> drivers/block/virtio_blk.c
> drivers/char/hw_random/virtio_rng.c
> drivers/char/virtio_console.c
> drivers/net/virtio_net.c
> drivers/scsi/virtio_scsi.c
> drivers/virtio/virtio_balloon.c
> 
> Thanks,
> 
> 		Amit
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM
  2013-09-06  7:41   ` Aaron Lu
@ 2013-09-06  8:07     ` Amit Shah
  0 siblings, 0 replies; 6+ messages in thread
From: Amit Shah @ 2013-09-06  8:07 UTC (permalink / raw)
  To: Aaron Lu; +Cc: Rafael J. Wysocki, Linux-pm mailing list, virtualization

On (Fri) 06 Sep 2013 [15:41:36], Aaron Lu wrote:
> On 09/06/2013 03:20 PM, Amit Shah wrote:
> > On (Fri) 06 Sep 2013 [10:28:36], Aaron Lu wrote:
> >>
> >> The virtio_pci_freeze/restore are defined under CONFIG_PM but is used
> >> by SET_SYSTEM_SLEEP_PM_OPS macro, which is defined under
> >> CONFIG_PM_SLEEP. So if CONFIG_PM_SLEEP is not cofigured but
> >> CONFIG_PM_RUNTIME is, the following warning message appeared:
> >>
> >> drivers/virtio/virtio_pci.c:770:12: warning: ‘virtio_pci_freeze’ defined but not used [-Wunused-function]
> >>  static int virtio_pci_freeze(struct device *dev)
> >>             ^
> >> drivers/virtio/virtio_pci.c:790:12: warning: ‘virtio_pci_restore’ defined but not used [-Wunused-function]
> >>  static int virtio_pci_restore(struct device *dev)
> >>             ^
> >> Fix it by changing CONFIG_PM to CONFIG_PM_SLEEP.
> >>
> >> Signed-off-by: Aaron Lu <aaron.lu@intel.com>
> >> ---
> >>  drivers/virtio/virtio_pci.c | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > While you're at it, can you update the virtio drivers as well?
> 
> No problem, I think I'll send a separate patch for them on top of this
> one, since they do not cause compile warnings.

Yes, thanks.

		Amit
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM
  2013-09-06  2:28 [PATCH] virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM Aaron Lu
  2013-09-06  7:20 ` Amit Shah
@ 2013-09-06  8:07 ` Amit Shah
  2013-09-09  0:33   ` Rusty Russell
  1 sibling, 1 reply; 6+ messages in thread
From: Amit Shah @ 2013-09-06  8:07 UTC (permalink / raw)
  To: Aaron Lu; +Cc: Rafael J. Wysocki, Linux-pm mailing list, virtualization

On (Fri) 06 Sep 2013 [10:28:36], Aaron Lu wrote:
> 
> The virtio_pci_freeze/restore are defined under CONFIG_PM but is used
> by SET_SYSTEM_SLEEP_PM_OPS macro, which is defined under
> CONFIG_PM_SLEEP. So if CONFIG_PM_SLEEP is not cofigured but
> CONFIG_PM_RUNTIME is, the following warning message appeared:
> 
> drivers/virtio/virtio_pci.c:770:12: warning: ‘virtio_pci_freeze’ defined but not used [-Wunused-function]
>  static int virtio_pci_freeze(struct device *dev)
>             ^
> drivers/virtio/virtio_pci.c:790:12: warning: ‘virtio_pci_restore’ defined but not used [-Wunused-function]
>  static int virtio_pci_restore(struct device *dev)
>             ^
> Fix it by changing CONFIG_PM to CONFIG_PM_SLEEP.
> 
> Signed-off-by: Aaron Lu <aaron.lu@intel.com>

Reviewed-by: Amit Shah <amit.shah@redhat.com>

		Amit
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM
  2013-09-06  8:07 ` Amit Shah
@ 2013-09-09  0:33   ` Rusty Russell
  0 siblings, 0 replies; 6+ messages in thread
From: Rusty Russell @ 2013-09-09  0:33 UTC (permalink / raw)
  To: Amit Shah, Aaron Lu
  Cc: Rafael J. Wysocki, Linux-pm mailing list, virtualization

Amit Shah <amit.shah@redhat.com> writes:

> On (Fri) 06 Sep 2013 [10:28:36], Aaron Lu wrote:
>> 
>> The virtio_pci_freeze/restore are defined under CONFIG_PM but is used
>> by SET_SYSTEM_SLEEP_PM_OPS macro, which is defined under
>> CONFIG_PM_SLEEP. So if CONFIG_PM_SLEEP is not cofigured but
>> CONFIG_PM_RUNTIME is, the following warning message appeared:
>> 
>> drivers/virtio/virtio_pci.c:770:12: warning: ‘virtio_pci_freeze’ defined but not used [-Wunused-function]
>>  static int virtio_pci_freeze(struct device *dev)
>>             ^
>> drivers/virtio/virtio_pci.c:790:12: warning: ‘virtio_pci_restore’ defined but not used [-Wunused-function]
>>  static int virtio_pci_restore(struct device *dev)
>>             ^
>> Fix it by changing CONFIG_PM to CONFIG_PM_SLEEP.
>> 
>> Signed-off-by: Aaron Lu <aaron.lu@intel.com>
>
> Reviewed-by: Amit Shah <amit.shah@redhat.com>
>
> 		Amit

Applied.

Thanks,
Rusty.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-09  0:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-06  2:28 [PATCH] virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM Aaron Lu
2013-09-06  7:20 ` Amit Shah
2013-09-06  7:41   ` Aaron Lu
2013-09-06  8:07     ` Amit Shah
2013-09-06  8:07 ` Amit Shah
2013-09-09  0:33   ` Rusty Russell

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).