s390/ism: Remove PM support
Subsystems (3)
PATCH 1/1 s390/ism: Remove PM support
Clang warns:
drivers/s390/net/ism_drv.c:570:12: warning: unused function 'ism_suspend' [-Wunused-function]
static int ism_suspend(struct device *dev)
^
drivers/s390/net/ism_drv.c:578:12: warning: unused function 'ism_resume'
[-Wunused-function]
static int ism_resume(struct device *dev)
^2 warnings generated.
When CONFIG_PM is unset, SIMPLE_DEV_PM_OPS does not use the suspend or resume functions. Power management was recently ripped out of s390 so CONFIG_PM will never be set and these functions will always be unused.
Remove them so that there is no more warning.
--- drivers/s390/net/ism_drv.c | 20 -------------------- 1 file changed, 20 deletions(-)
drivers/s390/net/ism_drv.c +0 -20
@@ -567,31 +567,11 @@ static void ism_remove(struct pci_dev *pdev)kfree (ism); } -static int ism_suspend (struct device *dev) -{ -struct ism_dev *ism =dev_get_drvdata (dev); - -ism_dev_exit (ism); -return 0 ; -} - -static int ism_resume (struct device *dev) -{ -struct ism_dev *ism =dev_get_drvdata (dev); - -return ism_dev_init (ism); -} - -static SIMPLE_DEV_PM_OPS(ism_pm_ops, ism_suspend, ism_resume); -static struct pci_driver ism_driver = { .name =DRV_NAME , .id_table = ism_device_table, .probe = ism_probe, .remove = ism_remove, - .driver = { - .pm = &ism_pm_ops, - }, };static int __init ism_init (void )
Signature · 1 line
2.26.0
PATCH v2 1/1 s390/ism: Remove PM support
Clang warns:
drivers/s390/net/ism_drv.c:570:12: warning: unused function 'ism_suspend' [-Wunused-function]
static int ism_suspend(struct device *dev)
^
drivers/s390/net/ism_drv.c:578:12: warning: unused function 'ism_resume'
[-Wunused-function]
static int ism_resume(struct device *dev)
^2 warnings generated.
When CONFIG_PM is unset, SIMPLE_DEV_PM_OPS does not use the suspend or resume functions. Power management was recently ripped out of s390 so CONFIG_PM will never be set and these functions will always be unused.
Remove them so that there is no more warning.
---
v1 -> v2:
* Fix issue link in commit message...
drivers/s390/net/ism_drv.c | 20 -------------------- 1 file changed, 20 deletions(-)
drivers/s390/net/ism_drv.c +0 -20
@@ -567,31 +567,11 @@ static void ism_remove(struct pci_dev *pdev)kfree (ism); } -static int ism_suspend (struct device *dev) -{ -struct ism_dev *ism =dev_get_drvdata (dev); - -ism_dev_exit (ism); -return 0 ; -} - -static int ism_resume (struct device *dev) -{ -struct ism_dev *ism =dev_get_drvdata (dev); - -return ism_dev_init (ism); -} - -static SIMPLE_DEV_PM_OPS(ism_pm_ops, ism_suspend, ism_resume); -static struct pci_driver ism_driver = { .name =DRV_NAME , .id_table = ism_device_table, .probe = ism_probe, .remove = ism_remove, - .driver = { - .pm = &ism_pm_ops, - }, };static int __init ism_init (void )
Signature · 1 line
2.26.0
Quoted 16 lines · Nathan Chancellor
Clang warns:
drivers/s390/net/ism_drv.c:570:12: warning: unused function 'ism_suspend' [-Wunused-function]
static intism_suspend(struct device *dev)^ drivers/s390/net/ism_drv.c:578:12: warning: unused function 'ism_resume' [-Wunused-function] static int ism_resume(struct device *dev) ^2 warnings generated.
When
CONFIG_PMis unset,SIMPLE_DEV_PM_OPSdoes not use the suspend or resume functions. Power management was recently ripped out of s390 soCONFIG_PMwill never be set and these functions will always be unused.
Quoted 5 lines
Remove them so that there is no more warning.
Fixes 394216275c7d ("s390: remove broken hibernate / power management support")Signed-off-by Nathan Chancellor <[email protected]>
Thank you, however there was already an identical patch from Ursula which was missing on our branch. It's now there: