All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PM / OPP: fix incorrect OPP count handling in of_init_opp_table
@ 2014-05-16 10:51 Chander Kashyap
  2014-05-16 11:13 ` Viresh Kumar
  2014-05-19 13:04 ` Nishanth Menon
  0 siblings, 2 replies; 6+ messages in thread
From: Chander Kashyap @ 2014-05-16 10:51 UTC (permalink / raw)
  To: linux-pm, linux-kernel
  Cc: nm, rjw, pavel, len.brown, gregkh, viresh.kumar, Chander Kashyap,
	Chander Kashyap, Inderpal Singh

In of_init_opp_table function, if a failure to add an OPP is
detected, the count of OPPs, yet to be added is not updated.
Fix this by decrementing this count on failure as well.

Signed-off-by: Chander Kashyap <k.chander@samsung.com>
Signed-off-by: Inderpal Singh <inderpal.s@samsung.com>
---
 drivers/base/power/opp.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index d9e376a..faae9cf 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -643,11 +643,9 @@ int of_init_opp_table(struct device *dev)
 		unsigned long freq = be32_to_cpup(val++) * 1000;
 		unsigned long volt = be32_to_cpup(val++);
 
-		if (dev_pm_opp_add(dev, freq, volt)) {
+		if (dev_pm_opp_add(dev, freq, volt))
 			dev_warn(dev, "%s: Failed to add OPP %ld\n",
 				 __func__, freq);
-			continue;
-		}
 		nr -= 2;
 	}
 
-- 
1.7.9.5


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

* Re: [PATCH] PM / OPP: fix incorrect OPP count handling in of_init_opp_table
  2014-05-16 10:51 [PATCH] PM / OPP: fix incorrect OPP count handling in of_init_opp_table Chander Kashyap
@ 2014-05-16 11:13 ` Viresh Kumar
  2014-05-16 23:03   ` Rafael J. Wysocki
  2014-05-19 13:04 ` Nishanth Menon
  1 sibling, 1 reply; 6+ messages in thread
From: Viresh Kumar @ 2014-05-16 11:13 UTC (permalink / raw)
  To: Chander Kashyap
  Cc: linux-pm, Linux Kernel Mailing List, Nishanth Menon,
	Rafael J. Wysocki, Pavel Machek, Brown, Len, Greg Kroah-Hartman,
	Chander Kashyap, Inderpal Singh

On 16 May 2014 16:21, Chander Kashyap <chander.kashyap@linaro.org> wrote:
> In of_init_opp_table function, if a failure to add an OPP is
> detected, the count of OPPs, yet to be added is not updated.
> Fix this by decrementing this count on failure as well.
>
> Signed-off-by: Chander Kashyap <k.chander@samsung.com>
> Signed-off-by: Inderpal Singh <inderpal.s@samsung.com>
> ---
>  drivers/base/power/opp.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

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

* Re: [PATCH] PM / OPP: fix incorrect OPP count handling in of_init_opp_table
  2014-05-16 11:13 ` Viresh Kumar
@ 2014-05-16 23:03   ` Rafael J. Wysocki
  2014-05-17  4:54     ` Viresh Kumar
  0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2014-05-16 23:03 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Chander Kashyap, linux-pm, Linux Kernel Mailing List,
	Nishanth Menon, Pavel Machek, Brown, Len, Greg Kroah-Hartman,
	Chander Kashyap, Inderpal Singh

On Friday, May 16, 2014 04:43:31 PM Viresh Kumar wrote:
> On 16 May 2014 16:21, Chander Kashyap <chander.kashyap@linaro.org> wrote:
> > In of_init_opp_table function, if a failure to add an OPP is
> > detected, the count of OPPs, yet to be added is not updated.
> > Fix this by decrementing this count on failure as well.
> >
> > Signed-off-by: Chander Kashyap <k.chander@samsung.com>
> > Signed-off-by: Inderpal Singh <inderpal.s@samsung.com>
> > ---
> >  drivers/base/power/opp.c |    4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

Is this -stable material?  If so, which -stable?

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH] PM / OPP: fix incorrect OPP count handling in of_init_opp_table
  2014-05-16 23:03   ` Rafael J. Wysocki
@ 2014-05-17  4:54     ` Viresh Kumar
  0 siblings, 0 replies; 6+ messages in thread
From: Viresh Kumar @ 2014-05-17  4:54 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Chander Kashyap, linux-pm, Linux Kernel Mailing List,
	Nishanth Menon, Pavel Machek, Brown, Len, Greg Kroah-Hartman,
	Chander Kashyap, Inderpal Singh

On 17 May 2014 04:33, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> Is this -stable material?  If so, which -stable?

3.7+

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

* Re: [PATCH] PM / OPP: fix incorrect OPP count handling in of_init_opp_table
  2014-05-16 10:51 [PATCH] PM / OPP: fix incorrect OPP count handling in of_init_opp_table Chander Kashyap
  2014-05-16 11:13 ` Viresh Kumar
@ 2014-05-19 13:04 ` Nishanth Menon
  2014-05-19 23:26   ` Rafael J. Wysocki
  1 sibling, 1 reply; 6+ messages in thread
From: Nishanth Menon @ 2014-05-19 13:04 UTC (permalink / raw)
  To: Chander Kashyap
  Cc: linux-pm, lkml, rjw, pavel, Len Brown, gregkh, Viresh Kumar,
	Chander Kashyap, Inderpal Singh

On Fri, May 16, 2014 at 5:51 AM, Chander Kashyap
<chander.kashyap@linaro.org> wrote:
> In of_init_opp_table function, if a failure to add an OPP is
> detected, the count of OPPs, yet to be added is not updated.
> Fix this by decrementing this count on failure as well.
>
> Signed-off-by: Chander Kashyap <k.chander@samsung.com>
> Signed-off-by: Inderpal Singh <inderpal.s@samsung.com>
> ---
>  drivers/base/power/opp.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
> index d9e376a..faae9cf 100644
> --- a/drivers/base/power/opp.c
> +++ b/drivers/base/power/opp.c
> @@ -643,11 +643,9 @@ int of_init_opp_table(struct device *dev)
>                 unsigned long freq = be32_to_cpup(val++) * 1000;
>                 unsigned long volt = be32_to_cpup(val++);
>
> -               if (dev_pm_opp_add(dev, freq, volt)) {
> +               if (dev_pm_opp_add(dev, freq, volt))
>                         dev_warn(dev, "%s: Failed to add OPP %ld\n",
>                                  __func__, freq);
> -                       continue;
> -               }
>                 nr -= 2;
>         }
Good Catch. Thanks.

Acked-by: Nishanth Menon <nm@ti.com>

--
Regards,
Nishanth Menon

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

* Re: [PATCH] PM / OPP: fix incorrect OPP count handling in of_init_opp_table
  2014-05-19 13:04 ` Nishanth Menon
@ 2014-05-19 23:26   ` Rafael J. Wysocki
  0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2014-05-19 23:26 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Chander Kashyap, linux-pm, lkml, pavel, Len Brown, gregkh,
	Viresh Kumar, Chander Kashyap, Inderpal Singh

On Monday, May 19, 2014 08:04:30 AM Nishanth Menon wrote:
> On Fri, May 16, 2014 at 5:51 AM, Chander Kashyap
> <chander.kashyap@linaro.org> wrote:
> > In of_init_opp_table function, if a failure to add an OPP is
> > detected, the count of OPPs, yet to be added is not updated.
> > Fix this by decrementing this count on failure as well.
> >
> > Signed-off-by: Chander Kashyap <k.chander@samsung.com>
> > Signed-off-by: Inderpal Singh <inderpal.s@samsung.com>
> > ---
> >  drivers/base/power/opp.c |    4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
> > index d9e376a..faae9cf 100644
> > --- a/drivers/base/power/opp.c
> > +++ b/drivers/base/power/opp.c
> > @@ -643,11 +643,9 @@ int of_init_opp_table(struct device *dev)
> >                 unsigned long freq = be32_to_cpup(val++) * 1000;
> >                 unsigned long volt = be32_to_cpup(val++);
> >
> > -               if (dev_pm_opp_add(dev, freq, volt)) {
> > +               if (dev_pm_opp_add(dev, freq, volt))
> >                         dev_warn(dev, "%s: Failed to add OPP %ld\n",
> >                                  __func__, freq);
> > -                       continue;
> > -               }
> >                 nr -= 2;
> >         }
> Good Catch. Thanks.
> 
> Acked-by: Nishanth Menon <nm@ti.com>

Since my pull request for 3.15-rc6 has been sent already, I'm going to push
this for -rc7.  Thanks!


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

end of thread, other threads:[~2014-05-19 23:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-16 10:51 [PATCH] PM / OPP: fix incorrect OPP count handling in of_init_opp_table Chander Kashyap
2014-05-16 11:13 ` Viresh Kumar
2014-05-16 23:03   ` Rafael J. Wysocki
2014-05-17  4:54     ` Viresh Kumar
2014-05-19 13:04 ` Nishanth Menon
2014-05-19 23:26   ` Rafael J. Wysocki

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.