Skip to contentSkip to conversation

s390/virtio: remove unused pm callbacks

PATCH Applied Cornelia Huck 3 participants 5 messages May 26, 2020 – Jun 5, 2020

Subsystems (4)
lore
Share & tools
lore

Cornelia Huck

author maintainer
#0 lore raw

PATCH 1/1 s390/virtio: remove unused pm callbacks

Support for hibernation on s390 has been recently been removed with commit 394216275c7d ("s390: remove broken hibernate / power management support"), no need to keep unused code around.

---
 drivers/s390/virtio/virtio_ccw.c | 26 --------------------------
 1 file changed, 26 deletions(-)
drivers/s390/virtio/virtio_ccw.c +0 -26
index 957889a42d2e..5730572b52cd 100644
@@ -1372,27 +1372,6 @@ static struct ccw_device_id virtio_ids[] = {
 	{},
 };
 
-#ifdef CONFIG_PM_SLEEP
-static int virtio_ccw_freeze(struct ccw_device *cdev)
-{
-	struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev);
-
-	return virtio_device_freeze(&vcdev->vdev);
-}
-
-static int virtio_ccw_restore(struct ccw_device *cdev)
-{
-	struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev);
-	int ret;
-
-	ret = virtio_ccw_set_transport_rev(vcdev);
-	if (ret)
-		return ret;
-
-	return virtio_device_restore(&vcdev->vdev);
-}
-#endif
-
 static struct ccw_driver virtio_ccw_driver = {
 	.driver = {
 		.owner = THIS_MODULE,
@@ -1405,11 +1384,6 @@ static struct ccw_driver virtio_ccw_driver = {
 	.set_online = virtio_ccw_online,
 	.notify = virtio_ccw_cio_notify,
 	.int_class = IRQIO_VIR,
-#ifdef CONFIG_PM_SLEEP
-	.freeze = virtio_ccw_freeze,
-	.thaw = virtio_ccw_restore,
-	.restore = virtio_ccw_restore,
-#endif
 };
 
 static int __init pure_hex(char **cp, unsigned int *val, int min_digit,
Signature · 1 line
2.25.4
author maintainer
#1 lore raw

Friendly ping.

Quoted 1 line · On Tue, 26 May 2020 11:36:29 +0200 Cornelia Huck <[email protected]> wrote:

Support for hibernation on s390 has been recently been removed with

(one 'been' too much here, I just noticed :)

Quoted 52 lines

commit 394216275c7d ("s390: remove broken hibernate / power management support"), no need to keep unused code around.

---
 drivers/s390/virtio/virtio_ccw.c | 26 --------------------------
 1 file changed, 26 deletions(-)
drivers/s390/virtio/virtio_ccw.c +0 -26
index 957889a42d2e..5730572b52cd 100644
@@ -1372,27 +1372,6 @@ static struct ccw_device_id virtio_ids[] = {
 	{},
 };
 
-#ifdef CONFIG_PM_SLEEP
-static int virtio_ccw_freeze(struct ccw_device *cdev)
-{
-	struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev);
-
-	return virtio_device_freeze(&vcdev->vdev);
-}
-
-static int virtio_ccw_restore(struct ccw_device *cdev)
-{
-	struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev);
-	int ret;
-
-	ret = virtio_ccw_set_transport_rev(vcdev);
-	if (ret)
-		return ret;
-
-	return virtio_device_restore(&vcdev->vdev);
-}
-#endif
-
 static struct ccw_driver virtio_ccw_driver = {
 	.driver = {
 		.owner = THIS_MODULE,
@@ -1405,11 +1384,6 @@ static struct ccw_driver virtio_ccw_driver = {
 	.set_online = virtio_ccw_online,
 	.notify = virtio_ccw_cio_notify,
 	.int_class = IRQIO_VIR,
-#ifdef CONFIG_PM_SLEEP
-	.freeze = virtio_ccw_freeze,
-	.thaw = virtio_ccw_restore,
-	.restore = virtio_ccw_restore,
-#endif
 };
 
 static int __init pure_hex(char **cp, unsigned int *val, int min_digit,
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Cornelia Huck
Quoted 5 lines · On Tue, 26 May 2020 11:36:29 +0200 Cornelia Huck <[email protected]> wrote:

Support for hibernation on s390 has been recently been removed with commit 394216275c7d ("s390: remove broken hibernate / power management support"), no need to keep unused code around.

Quoted 48 lines
---
 drivers/s390/virtio/virtio_ccw.c | 26 --------------------------
 1 file changed, 26 deletions(-)
drivers/s390/virtio/virtio_ccw.c +0 -26
index 957889a42d2e..5730572b52cd 100644
@@ -1372,27 +1372,6 @@ static struct ccw_device_id virtio_ids[] = {
 	{},
 };
 
-#ifdef CONFIG_PM_SLEEP
-static int virtio_ccw_freeze(struct ccw_device *cdev)
-{
-	struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev);
-
-	return virtio_device_freeze(&vcdev->vdev);
-}
-
-static int virtio_ccw_restore(struct ccw_device *cdev)
-{
-	struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev);
-	int ret;
-
-	ret = virtio_ccw_set_transport_rev(vcdev);
-	if (ret)
-		return ret;
-
-	return virtio_device_restore(&vcdev->vdev);
-}
-#endif
-
 static struct ccw_driver virtio_ccw_driver = {
 	.driver = {
 		.owner = THIS_MODULE,
@@ -1405,11 +1384,6 @@ static struct ccw_driver virtio_ccw_driver = {
 	.set_online = virtio_ccw_online,
 	.notify = virtio_ccw_cio_notify,
 	.int_class = IRQIO_VIR,
-#ifdef CONFIG_PM_SLEEP
-	.freeze = virtio_ccw_freeze,
-	.thaw = virtio_ccw_restore,
-	.restore = virtio_ccw_restore,
-#endif
 };
 
 static int __init pure_hex(char **cp, unsigned int *val, int min_digit,
author maintainer
#3 lore raw
Quoted 4 lines · On Thu, 4 Jun 2020 23:44:21 +0200 Halil Pasic <[email protected]> wrote:
Quoted 1 line · On Tue, 26 May 2020 11:36:29 +0200 Cornelia Huck <[email protected]> wrote:

Support for hibernation on s390 has been recently been removed with

s/been recently been removed/recently been removed/

Quoted 6 lines
Quoted 4 lines

commit 394216275c7d ("s390: remove broken hibernate / power management support"), no need to keep unused code around.

Thanks!

As this is only a single patch, I think a pull request is a bit overkill, so it would probably be best for someone to pick this directly.

s390 arch maintainers? Michael?

Quoted 50 lines
Quoted 49 lines
---
 drivers/s390/virtio/virtio_ccw.c | 26 --------------------------
 1 file changed, 26 deletions(-)
drivers/s390/virtio/virtio_ccw.c +0 -26
index 957889a42d2e..5730572b52cd 100644
@@ -1372,27 +1372,6 @@ static struct ccw_device_id virtio_ids[] = {
 	{},
 };
 
-#ifdef CONFIG_PM_SLEEP
-static int virtio_ccw_freeze(struct ccw_device *cdev)
-{
-	struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev);
-
-	return virtio_device_freeze(&vcdev->vdev);
-}
-
-static int virtio_ccw_restore(struct ccw_device *cdev)
-{
-	struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev);
-	int ret;
-
-	ret = virtio_ccw_set_transport_rev(vcdev);
-	if (ret)
-		return ret;
-
-	return virtio_device_restore(&vcdev->vdev);
-}
-#endif
-
 static struct ccw_driver virtio_ccw_driver = {
 	.driver = {
 		.owner = THIS_MODULE,
@@ -1405,11 +1384,6 @@ static struct ccw_driver virtio_ccw_driver = {
 	.set_online = virtio_ccw_online,
 	.notify = virtio_ccw_cio_notify,
 	.int_class = IRQIO_VIR,
-#ifdef CONFIG_PM_SLEEP
-	.freeze = virtio_ccw_freeze,
-	.thaw = virtio_ccw_restore,
-	.restore = virtio_ccw_restore,
-#endif
 };
 
 static int __init pure_hex(char **cp, unsigned int *val, int min_digit,  
#4 lore raw
Quoted 17 lines · Cornelia Huck
Quoted 4 lines · On Thu, 4 Jun 2020 23:44:21 +0200 Halil Pasic <[email protected]> wrote:
Quoted 1 line · On Tue, 26 May 2020 11:36:29 +0200 Cornelia Huck <[email protected]> wrote:

Support for hibernation on s390 has been recently been removed with

s/been recently been removed/recently been removed/

Quoted 6 lines
Quoted 4 lines

commit 394216275c7d ("s390: remove broken hibernate / power management support"), no need to keep unused code around.

Quoted 7 lines

Thanks!

As this is only a single patch, I think a pull request is a bit overkill, so it would probably be best for someone to pick this directly.

s390 arch maintainers? Michael?

Applied, thanks!