linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] opp: Don't always remove static OPPs in _of_add_opp_table_v1()
@ 2020-10-14  4:26 Viresh Kumar
  2020-10-15  2:35 ` Aisheng Dong
  2020-10-28  9:53 ` Geert Uytterhoeven
  0 siblings, 2 replies; 5+ messages in thread
From: Viresh Kumar @ 2020-10-14  4:26 UTC (permalink / raw)
  To: Rafael Wysocki, Viresh Kumar, Nishanth Menon, Stephen Boyd
  Cc: Viresh Kumar, linux-pm, Vincent Guittot, Aisheng Dong, linux-kernel

The patch missed returning 0 early in case of success and hence the
static OPPs got removed by mistake. Fix it.

Fixes: 90d46d71cce2 ("opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1()")
Reported-by: Aisheng Dong <aisheng.dong@nxp.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/opp/of.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index 874b58756220..9faeb83e4b32 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -944,6 +944,8 @@ static int _of_add_opp_table_v1(struct device *dev, struct opp_table *opp_table)
 		nr -= 2;
 	}
 
+	return 0;
+
 remove_static_opp:
 	_opp_remove_all_static(opp_table);
 
-- 
2.25.0.rc1.19.g042ed3e048af


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

* RE: [PATCH] opp: Don't always remove static OPPs in _of_add_opp_table_v1()
  2020-10-14  4:26 [PATCH] opp: Don't always remove static OPPs in _of_add_opp_table_v1() Viresh Kumar
@ 2020-10-15  2:35 ` Aisheng Dong
  2020-10-15  4:31   ` Viresh Kumar
  2020-10-28  9:53 ` Geert Uytterhoeven
  1 sibling, 1 reply; 5+ messages in thread
From: Aisheng Dong @ 2020-10-15  2:35 UTC (permalink / raw)
  To: Viresh Kumar, Rafael Wysocki, Viresh Kumar, Nishanth Menon, Stephen Boyd
  Cc: linux-pm, Vincent Guittot, linux-kernel, dl-linux-imx

Hi Viresh

Thanks for the quick fix.

> From: Viresh Kumar <viresh.kumar@linaro.org>
> Sent: Wednesday, October 14, 2020 12:26 PM
> 
> The patch missed returning 0 early in case of success and hence the static OPPs
> got removed by mistake. Fix it.
> 
> Fixes: 90d46d71cce2 ("opp: Handle multiple calls for same OPP table in
> _of_add_opp_table_v1()")
> Reported-by: Aisheng Dong <aisheng.dong@nxp.com>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Tested-by: Dong Aisheng <aisheng.dong@nxp.com>

Regards
Aisheng

> ---
>  drivers/opp/of.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/opp/of.c b/drivers/opp/of.c index
> 874b58756220..9faeb83e4b32 100644
> --- a/drivers/opp/of.c
> +++ b/drivers/opp/of.c
> @@ -944,6 +944,8 @@ static int _of_add_opp_table_v1(struct device *dev,
> struct opp_table *opp_table)
>  		nr -= 2;
>  	}
> 
> +	return 0;
> +
>  remove_static_opp:
>  	_opp_remove_all_static(opp_table);
> 
> --
> 2.25.0.rc1.19.g042ed3e048af


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

* Re: [PATCH] opp: Don't always remove static OPPs in _of_add_opp_table_v1()
  2020-10-15  2:35 ` Aisheng Dong
@ 2020-10-15  4:31   ` Viresh Kumar
  2020-10-20  5:28     ` Viresh Kumar
  0 siblings, 1 reply; 5+ messages in thread
From: Viresh Kumar @ 2020-10-15  4:31 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: Rafael Wysocki, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	linux-pm, Vincent Guittot, linux-kernel, dl-linux-imx

On 15-10-20, 02:35, Aisheng Dong wrote:
> Hi Viresh
> 
> Thanks for the quick fix.
> 
> > From: Viresh Kumar <viresh.kumar@linaro.org>
> > Sent: Wednesday, October 14, 2020 12:26 PM
> > 
> > The patch missed returning 0 early in case of success and hence the static OPPs
> > got removed by mistake. Fix it.
> > 
> > Fixes: 90d46d71cce2 ("opp: Handle multiple calls for same OPP table in
> > _of_add_opp_table_v1()")
> > Reported-by: Aisheng Dong <aisheng.dong@nxp.com>
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> 
> Tested-by: Dong Aisheng <aisheng.dong@nxp.com>

Thanks.

Rafael: Please apply this one directly for 5.10-rc. Thanks.

-- 
viresh

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

* Re: [PATCH] opp: Don't always remove static OPPs in _of_add_opp_table_v1()
  2020-10-15  4:31   ` Viresh Kumar
@ 2020-10-20  5:28     ` Viresh Kumar
  0 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2020-10-20  5:28 UTC (permalink / raw)
  To: Rafael Wysocki, Aisheng Dong
  Cc: Viresh Kumar, Nishanth Menon, Stephen Boyd, linux-pm,
	Vincent Guittot, linux-kernel, dl-linux-imx

On 15-10-20, 10:01, Viresh Kumar wrote:
> On 15-10-20, 02:35, Aisheng Dong wrote:
> > Hi Viresh
> > 
> > Thanks for the quick fix.
> > 
> > > From: Viresh Kumar <viresh.kumar@linaro.org>
> > > Sent: Wednesday, October 14, 2020 12:26 PM
> > > 
> > > The patch missed returning 0 early in case of success and hence the static OPPs
> > > got removed by mistake. Fix it.
> > > 
> > > Fixes: 90d46d71cce2 ("opp: Handle multiple calls for same OPP table in
> > > _of_add_opp_table_v1()")
> > > Reported-by: Aisheng Dong <aisheng.dong@nxp.com>
> > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > 
> > Tested-by: Dong Aisheng <aisheng.dong@nxp.com>
> 
> Thanks.
> 
> Rafael: Please apply this one directly for 5.10-rc. Thanks.

Rafael: Ping.

-- 
viresh

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

* Re: [PATCH] opp: Don't always remove static OPPs in _of_add_opp_table_v1()
  2020-10-14  4:26 [PATCH] opp: Don't always remove static OPPs in _of_add_opp_table_v1() Viresh Kumar
  2020-10-15  2:35 ` Aisheng Dong
@ 2020-10-28  9:53 ` Geert Uytterhoeven
  1 sibling, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2020-10-28  9:53 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael Wysocki, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	linux-pm, Vincent Guittot, Aisheng Dong, linux-kernel,
	linux-renesas-soc

 	Hi Viresh,

On Wed, 14 Oct 2020, Viresh Kumar wrote:
> The patch missed returning 0 early in case of success and hence the
> static OPPs got removed by mistake. Fix it.
>
> Fixes: 90d46d71cce2 ("opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1()")
> Reported-by: Aisheng Dong <aisheng.dong@nxp.com>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

This revives cpufreq on R-Car Gen2, and fixes a later s2ram regression
in commit dc279ac6e5b4e06e ("cpufreq: dt: Refactor initialization to
handle probe deferral properly"), where the PMIC is accessesed while
the I2C controller is still suspended.

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/drivers/opp/of.c
> +++ b/drivers/opp/of.c
> @@ -944,6 +944,8 @@ static int _of_add_opp_table_v1(struct device *dev, struct opp_table *opp_table)
> 		nr -= 2;
> 	}
>
> +	return 0;
> +
> remove_static_opp:
> 	_opp_remove_all_static(opp_table);
>
> -- 
> 2.25.0.rc1.19.g042ed3e048af

Gr{oetje,eeting}s,

 						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
 							    -- Linus Torvalds

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

end of thread, other threads:[~2020-10-28 21:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14  4:26 [PATCH] opp: Don't always remove static OPPs in _of_add_opp_table_v1() Viresh Kumar
2020-10-15  2:35 ` Aisheng Dong
2020-10-15  4:31   ` Viresh Kumar
2020-10-20  5:28     ` Viresh Kumar
2020-10-28  9:53 ` Geert Uytterhoeven

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).