[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohponyMG-uA93ZpH-KD+EOQPmk5tT_QoaQ7+NCEf48vYj5-w@mail.gmail.com>
Date: Mon, 24 Jun 2013 19:01:59 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: linaro-kernel@...ts.linaro.org, patches@...aro.org,
cpufreq@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, robin.randhawa@....com,
Steve.Bannister@....com, Liviu.Dudau@....com,
charles.garcia-tobin@....com, arvind.chauhan@....com,
dave.martin@....com
Subject: Re: [PATCH 13/13] cpufreq: make sure frequency transitions are serialized
On 24 June 2013 19:03, Rafael J. Wysocki <rjw@...k.pl> wrote:
> Looks OK, but since transition_ongoing is either 0 or 1 now, as far as I can
> say, it would be better to make it a bool and use = true/false instead of
> ++/-- I suppose.
Another fixup:
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 6ca7eac..49d942a 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -108,7 +108,7 @@ static BLOCKING_NOTIFIER_HEAD(cpufreq_policy_notifier_list);
static struct srcu_notifier_head cpufreq_transition_notifier_list;
/* Tracks status of transition */
-static int transition_ongoing;
+static bool transition_ongoing;
static bool init_cpufreq_transition_notifier_list_called;
static int __init init_cpufreq_transition_notifier_list(void)
@@ -271,7 +271,7 @@ void __cpufreq_notify_transition(struct
cpufreq_policy *policy,
"In middle of another frequency transition\n"))
return;
- transition_ongoing++;
+ transition_ongoing = true;
/* detect if the driver reported a value as "old frequency"
* which is not equal to what the cpufreq core thinks is
@@ -296,7 +296,7 @@ void __cpufreq_notify_transition(struct
cpufreq_policy *policy,
"No frequency transition in progress\n"))
return;
- transition_ongoing--;
+ transition_ongoing = false;
adjust_jiffies(CPUFREQ_POSTCHANGE, freqs);
pr_debug("FREQ: %lu - CPU: %lu", (unsigned long)freqs->new,
Download attachment "0001-cpufreq-make-sure-frequency-transitions-are-serializ.patch" of type "application/octet-stream" (2563 bytes)
Powered by blists - more mailing lists