All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: edubezval@gmail.com
Cc: linaro-kernel@lists.linaro.org, rui.zhang@intel.com,
	linux-pm@vger.kernel.org, radivoje.jovanovic@linux.intel.com,
	punit.agrawal@arm.com, Viresh Kumar <viresh.kumar@linaro.org>,
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 2/6] thermal/cpu_cooling: quit early after updating policy
Date: Thu, 30 Jul 2015 12:40:31 +0530	[thread overview]
Message-ID: <47594802e96dc2b1e727fd88f92b3fa4459b4d09.1438239727.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1438239727.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1438239727.git.viresh.kumar@linaro.org>

If a valid cpufreq_dev is found for policy->cpu, we should update the
policy and quit the for loop. There is no need to keep traversing the
list of cpufreq_dev's.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/thermal/cpu_cooling.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index d010c6d0d722..276cec5a1fb7 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -232,6 +232,7 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
 			if (policy->max != max_freq)
 				cpufreq_verify_within_limits(policy, 0,
 							     max_freq);
+			break;
 		}
 		mutex_unlock(&cooling_cpufreq_lock);
 		break;
-- 
2.4.0


WARNING: multiple messages have this Message-ID (diff)
From: Viresh Kumar <viresh.kumar@linaro.org>
To: edubezval@gmail.com
Cc: linaro-kernel@lists.linaro.org, rui.zhang@intel.com,
	linux-pm@vger.kernel.org, radivoje.jovanovic@linux.intel.com,
	punit.agrawal@arm.com, Viresh Kumar <viresh.kumar@linaro.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/6] thermal/cpu_cooling: quit early after updating policy
Date: Thu, 30 Jul 2015 12:40:31 +0530	[thread overview]
Message-ID: <47594802e96dc2b1e727fd88f92b3fa4459b4d09.1438239727.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1438239727.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1438239727.git.viresh.kumar@linaro.org>

If a valid cpufreq_dev is found for policy->cpu, we should update the
policy and quit the for loop. There is no need to keep traversing the
list of cpufreq_dev's.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/thermal/cpu_cooling.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index d010c6d0d722..276cec5a1fb7 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -232,6 +232,7 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
 			if (policy->max != max_freq)
 				cpufreq_verify_within_limits(policy, 0,
 							     max_freq);
+			break;
 		}
 		mutex_unlock(&cooling_cpufreq_lock);
 		break;
-- 
2.4.0


  parent reply	other threads:[~2015-07-30  7:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  7:10 [PATCH 0/6] thermal/cpu_cooling: Minor cleanups Viresh Kumar
2015-07-30  7:10 ` [PATCH 1/6] thermal/cpu_cooling: No need to initialize max_freq to 0 Viresh Kumar
2015-07-30  7:10   ` Viresh Kumar
2015-07-30  7:10 ` Viresh Kumar [this message]
2015-07-30  7:10   ` [PATCH 2/6] thermal/cpu_cooling: quit early after updating policy Viresh Kumar
2015-07-30  7:10 ` [PATCH 3/6] thermal/cpu_cooling: convert 'switch' block to 'if' block in notifier Viresh Kumar
2015-07-30  7:10   ` Viresh Kumar
2015-07-30  7:10 ` [PATCH 4/6] thermal/cpu_cooling: rename cpufreq_val as clipped_freq Viresh Kumar
2015-07-30  7:10   ` Viresh Kumar
2015-07-30  7:10 ` [PATCH 5/6] thermal/cpu_cooling: rename max_freq as clipped_freq in notifier Viresh Kumar
2015-07-30  7:10   ` Viresh Kumar
2015-07-30  7:10 ` [PATCH 6/6] thermal/cpu_cooling: update policy limits if clipped_freq < policy->max Viresh Kumar
2015-07-30  7:10   ` Viresh Kumar
2015-08-04  8:56 ` [PATCH 0/6] thermal/cpu_cooling: Minor cleanups Viresh Kumar
2015-08-12 10:17   ` Viresh Kumar
2015-08-14  4:59     ` Eduardo Valentin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47594802e96dc2b1e727fd88f92b3fa4459b4d09.1438239727.git.viresh.kumar@linaro.org \
    --to=viresh.kumar@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=punit.agrawal@arm.com \
    --cc=radivoje.jovanovic@linux.intel.com \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.