lkml.org 
[lkml]   [2019]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [PATCH v5] PM / devfreq: Restart previous governor if new governor fails to start
From
Date
>From: Saravana Kannan <skannan@codeaurora.org>
>
>If the new governor fails to start, switch back to old governor so that the
>devfreq state is not left in some weird limbo.
>
>[Mjungjoo: assume fatal on revert failure and set df->governor to NULL]
>Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
>Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
>Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>

I'll modify WARN->ERROR for the case when it's fatal:

>+ if (ret) {
>+ dev_warn(dev,
>+ "%s: reverting to Governor %s failed (%d)\n",
>+ __func__, df->governor_name, ret);
>+ df->governor = NULL;
>+ }

Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>


>---
>V5:
>* assume fatal on revert failure and set df->governor to NULL
>
>V4:
>* Removed prev_governor check.
>
>V3:
>* Fix NULL deref for real this time.
>* Addressed some style preferences.
>
>V2:
>* Fixed typo in commit text
>* Fixed potential NULL deref
>
> drivers/devfreq/devfreq.c | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>

\
 
 \ /
  Last update: 2019-03-12 08:17    [W:0.051 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site