* [PATCH -next] s390/ism: Remove PM support
@ 2020-03-26 19:05 Nathan Chancellor
2020-03-26 19:07 ` [PATCH -next v2] " Nathan Chancellor
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2020-03-26 19:05 UTC (permalink / raw)
To: Heiko Carstens, Vasily Gorbik, Christian Borntraeger
Cc: Julian Wiedmann, Ursula Braun, linux-s390, linux-kernel,
clang-built-linux, Nathan Chancellor
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.
Link: https://github.com/ClangBuiltLinux/linux/950
Fixes: 394216275c7d ("s390: remove broken hibernate / power management support")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
drivers/s390/net/ism_drv.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/drivers/s390/net/ism_drv.c b/drivers/s390/net/ism_drv.c
index 4fc2056bd227..c75112ee7b97 100644
--- a/drivers/s390/net/ism_drv.c
+++ b/drivers/s390/net/ism_drv.c
@@ -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)
--
2.26.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH -next v2] s390/ism: Remove PM support
2020-03-26 19:05 [PATCH -next] s390/ism: Remove PM support Nathan Chancellor
@ 2020-03-26 19:07 ` Nathan Chancellor
2020-03-27 12:58 ` Heiko Carstens
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2020-03-26 19:07 UTC (permalink / raw)
To: Heiko Carstens, Vasily Gorbik, Christian Borntraeger
Cc: Julian Wiedmann, Ursula Braun, linux-s390, linux-kernel,
clang-built-linux, Nathan Chancellor
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.
Link: https://github.com/ClangBuiltLinux/linux/issues/950
Fixes: 394216275c7d ("s390: remove broken hibernate / power management support")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
v1 -> v2:
* Fix issue link in commit message...
drivers/s390/net/ism_drv.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/drivers/s390/net/ism_drv.c b/drivers/s390/net/ism_drv.c
index 4fc2056bd227..c75112ee7b97 100644
--- a/drivers/s390/net/ism_drv.c
+++ b/drivers/s390/net/ism_drv.c
@@ -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)
--
2.26.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next v2] s390/ism: Remove PM support
2020-03-26 19:07 ` [PATCH -next v2] " Nathan Chancellor
@ 2020-03-27 12:58 ` Heiko Carstens
0 siblings, 0 replies; 3+ messages in thread
From: Heiko Carstens @ 2020-03-27 12:58 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Vasily Gorbik, Christian Borntraeger, Julian Wiedmann,
Ursula Braun, linux-s390, linux-kernel, clang-built-linux
On Thu, Mar 26, 2020 at 12:07:44PM -0700, Nathan Chancellor wrote:
> 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.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/950
> Fixes: 394216275c7d ("s390: remove broken hibernate / power management support")
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Thank you, however there was already an identical patch from Ursula
which was missing on our branch. It's now there:
https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?h=features&id=194f75706b86847d1b4237958f7d6bd7ea7baf42
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-27 12:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 19:05 [PATCH -next] s390/ism: Remove PM support Nathan Chancellor
2020-03-26 19:07 ` [PATCH -next v2] " Nathan Chancellor
2020-03-27 12:58 ` Heiko Carstens
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).