staging: clocking-wizard: Remove static function unused
PATCH 1/1 staging: clocking-wizard: Remove static function unused
Remove static function clk_wzrd_suspend, that is never used
--- .../staging/clocking-wizard/clk-xlnx-clock-wizard.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c +0 -10
@@ -99,16 +99,6 @@ static int clk_wzrd_clk_notifier(struct notifier_block *nb, unsigned long event, } } -static int __maybe_unused clk_wzrd_suspend (struct device *dev) -{ -struct clk_wzrd *clk_wzrd =dev_get_drvdata (dev); - -clk_disable_unprepare (clk_wzrd->axi_clk); - clk_wzrd->suspended = true; - -return 0 ; -} -static int __maybe_unused clk_wzrd_resume (struct device *dev) {int ret;
Signature · 1 line
2.17.1
Quoted 1 line · Evan Chime
Remove static function
clk_wzrd_suspend, that is never used
Are you sure? I see:
static SIMPLE_DEV_PM_OPS(clk_wzrd_dev_pm_ops, clk_wzrd_suspend,
clk_wzrd_resume);
If the code compiled, then maybe it is because there is a configuraion option such that there is no power management.
If the function really is useless, it would make sense to remove the resume function at the same time, since without suspend, resume doesn't seem useful.
julia
Quoted 35 lines
Signed-off-by Evan Chime <[email protected]>--- .../staging/clocking-wizard/clk-xlnx-clock-wizard.c | 10 ---------- 1 file changed, 10 deletions(-)drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c +0
-11@@ -99,16 +99,6 @@ static int clk_wzrd_clk_notifier(struct notifier_block *nb, unsigned long event, } } -static int __maybe_unused clk_wzrd_suspend (struct device *dev) -{ -struct clk_wzrd *clk_wzrd =dev_get_drvdata (dev); - -clk_disable_unprepare (clk_wzrd->axi_clk); - clk_wzrd->suspended = true; - -return 0 ; -} -static int __maybe_unused clk_wzrd_resume (struct device *dev) {int ret; --2.17.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20191025123245.GA13135%40ik-ubuntu.
Quoted 52 lines · Julia Lawall
Quoted 1 line · Evan Chime
Remove static function
clk_wzrd_suspend, that is never usedAre you sure? I see:
static SIMPLE_DEV_PM_OPS(clk_wzrd_dev_pm_ops,
clk_wzrd_suspend,clk_wzrd_resume);If the code compiled, then maybe it is because there is a configuraion option such that there is no power management.
If the function really is useless, it would make sense to remove the resume function at the same time, since without suspend, resume doesn't seem useful.
julia
Review
Quoted 7 lines
Signed-off-by Evan Chime <[email protected]>--- .../staging/clocking-wizard/clk-xlnx-clock-wizard.c | 10 ---------- 1 file changed, 10 deletions(-)(quoted diff) +0
-0
b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.cdrivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c static int clk_wzrd_clk_notifier(struct
Quoted 4 lines
index
566075f2972c..e0aaf4b276ea100644drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c +0
-0@@ -99,16 +99,6 @@ static int clk_wzrd_clk_notifier(struct
notifier_block*nb, unsigned long event,Quoted 19 lines
drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c +0
-11} } -static int __maybe_unused clk_wzrd_suspend (struct device *dev) -{ -struct clk_wzrd *clk_wzrd =dev_get_drvdata (dev); - -clk_disable_unprepare (clk_wzrd->axi_clk); - clk_wzrd->suspended = true; - -return 0 ; -} -static int __maybe_unused clk_wzrd_resume (struct device *dev) {int ret; --2.17.1
Quoted 1 line
Quoted 1 line
--
I will remove that too. Also SIMPLE_DEV_PM_OPS is declared, but never defined
Quoted 9 lines
Quoted 1 line
You received this message because you are subscribed to the Google
Groups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
Quoted 1 line
To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/20191025123245.GA13135%40ik-ubuntu
.Quoted 1 line
Quoted 2 lines
I will remove that too. Also
SIMPLE_DEV_PM_OPSis declared, but never defined
What do you mean by that exactly?
julia