All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: clocking-wizard: Remove static function unused
@ 2019-10-25 12:32 Evan Chime
  2019-10-25 13:22 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Evan Chime @ 2019-10-25 12:32 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

Remove static function clk_wzrd_suspend, that is never used

Signed-off-by: Evan Chime <chime.evan.dri.devel@gmail.com>
---
 .../staging/clocking-wizard/clk-xlnx-clock-wizard.c    | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
index 566075f2972c..e0aaf4b276ea 100644
--- a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
+++ b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
@@ -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



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

* Re: [Outreachy kernel] [PATCH] staging: clocking-wizard: Remove static function unused
  2019-10-25 12:32 [PATCH] staging: clocking-wizard: Remove static function unused Evan Chime
@ 2019-10-25 13:22 ` Julia Lawall
  2019-10-25 14:53   ` evan chime
  0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2019-10-25 13:22 UTC (permalink / raw)
  To: Evan Chime; +Cc: gregkh, outreachy-kernel



On Fri, 25 Oct 2019, Evan Chime wrote:

> 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

>
> Signed-off-by: Evan Chime <chime.evan.dri.devel@gmail.com>
> ---
>  .../staging/clocking-wizard/clk-xlnx-clock-wizard.c    | 10 ----------
>  1 file changed, 10 deletions(-)
>
> diff --git a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> index 566075f2972c..e0aaf4b276ea 100644
> --- a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> +++ b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20191025123245.GA13135%40ik-ubuntu.
>


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

* Re: [Outreachy kernel] [PATCH] staging: clocking-wizard: Remove static function unused
  2019-10-25 13:22 ` [Outreachy kernel] " Julia Lawall
@ 2019-10-25 14:53   ` evan chime
  2019-10-25 15:03     ` Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: evan chime @ 2019-10-25 14:53 UTC (permalink / raw)
  To: Julia Lawall; +Cc: gregkh, outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 2112 bytes --]

On Fri, 25 Oct 2019 at 14:22, Julia Lawall <julia.lawall@lip6.fr> wrote:

>
>
> On Fri, 25 Oct 2019, Evan Chime wrote:
>
> > 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
>
> >
> > Signed-off-by: Evan Chime <chime.evan.dri.devel@gmail.com>
> > ---
> >  .../staging/clocking-wizard/clk-xlnx-clock-wizard.c    | 10 ----------
> >  1 file changed, 10 deletions(-)
> >
> > diff --git a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> > index 566075f2972c..e0aaf4b276ea 100644
> > --- a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> > +++ b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> > @@ -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
> >
> > --


I will remove that too. Also SIMPLE_DEV_PM_OPS is declared, but never
defined



> > 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 outreachy-kernel+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/20191025123245.GA13135%40ik-ubuntu
> .
> >
>

[-- Attachment #2: Type: text/html, Size: 3209 bytes --]

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

* Re: [Outreachy kernel] [PATCH] staging: clocking-wizard: Remove static function unused
  2019-10-25 14:53   ` evan chime
@ 2019-10-25 15:03     ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2019-10-25 15:03 UTC (permalink / raw)
  To: evan chime; +Cc: gregkh, outreachy-kernel

> I will remove that too. Also SIMPLE_DEV_PM_OPS is declared, but never
> defined

What do you mean by that exactly?

julia


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

end of thread, other threads:[~2019-10-25 15:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25 12:32 [PATCH] staging: clocking-wizard: Remove static function unused Evan Chime
2019-10-25 13:22 ` [Outreachy kernel] " Julia Lawall
2019-10-25 14:53   ` evan chime
2019-10-25 15:03     ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.