Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1601946

[PATCH 06/17] thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state()

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news.mb-net.net!open-news-network.org!aioe.org!bofh.it!news.nic.it!robomod
From Viresh Kumar <viresh.kumar@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 06/17] thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state()
Date Thu, 16 Mar 2017 06:40:02 +0100
Message-ID <tlwiK-223-35@gated-at.bofh.it> (permalink)
References <tlwiJ-223-3@gated-at.bofh.it>
X-Original-To Rafael Wysocki <rjw@rjwysocki.net>, Javi Merino <javi.merino@kernel.org>, Zhang Rui <rui.zhang@intel.com>, Eduardo Valentin <edubezval@gmail.com>, Amit Daniel Kachhap <amit.kachhap@gmail.com>, Viresh Kumar <viresh.kumar@linaro.org>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=GcyFRt72FtxqWhYtG34pd10p6ebfWEvR+F40cVEOrQs=; b=bEY/ZYsHA0uWtVpUT/Gpwm3OOhwuU/ymfd4RHKhkTgHjTgBSxyI1CK3miL0Cy0DRCQ hiqA99UBIJINoIyUQMCLe4pgV/X0GTRZJi8qUXRm5zoCIMd+Jso3CJs6t4oLCSJkNbFd lasZ9wwNx5CvIE6DV/XSoBpxHIL7z6BdRrEBQ=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=GcyFRt72FtxqWhYtG34pd10p6ebfWEvR+F40cVEOrQs=; b=S5/nGQi+mq+bmlBhzag98ZqQcedhGeAZXe+ijBsLfNBw8mUC2krFOW6rQi6M0uIGeZ 6aTWSeMdcDSkkMMexXCNjuiEb8STsTDP+IJbfp5b1GKkcxCQPajYOwyVFmHnf0CQ5mq8 WkO9geb84cjDaffHkBKBtIYTKbWhIQoxXO3zP3tN3C7hjq3d2IP2CqRFe7sfJWQwj0oP PPF52l8BUqBVsdH1BANjp/wvsurTvKwvBDOTVBZKSczWDLG2phWSM/pq5aIUCn0al7Lf iHhgdECR6++b8Rj7dC+zQ3xZ9vXaUimtJy8W14qNS1h9lLWG1kRvotMixSWo02K3EGKr gElw==
X-Gm-Message-State AFeK/H2X8TIgUDM0ujLp8XO8j+NiZ0M3odtgxeBIxMpr1srD/DLgZQHnl6CWy2md1jrGViw6
X-Received by 10.99.213.81 with SMTP id v17mr7782246pgi.130.1489642215425; Wed, 15 Mar 2017 22:30:15 -0700 (PDT)
X-Mailer git-send-email 2.7.1.410.g6faf27b
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 31
Organization linux.* mail to news gateway
X-Original-Cc linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot <vincent.guittot@linaro.org>
X-Original-Date Thu, 16 Mar 2017 10:59:41 +0530
X-Original-Message-ID <587728c8bc2173c5d742a24ec14ade8bdc5d6e92.1489640000.git.viresh.kumar@linaro.org>
X-Original-References <be952dc502195304ddecfe4eefa7043eb71d0c6b.1489639999.git.viresh.kumar@linaro.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1601946

Show key headers only | View raw


'cpu' is used at only one place and there is no need to keep a separate
variable for it.

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

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 99dc6833de75..46e90122b746 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -457,7 +457,6 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
 				 unsigned long state)
 {
 	struct cpufreq_cooling_device *cpufreq_dev = cdev->devdata;
-	unsigned int cpu = cpumask_any(&cpufreq_dev->allowed_cpus);
 	unsigned int clip_freq;
 
 	/* Request state should be less than max_level */
@@ -472,7 +471,7 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
 	cpufreq_dev->cpufreq_state = state;
 	cpufreq_dev->clipped_freq = clip_freq;
 
-	cpufreq_update_policy(cpu);
+	cpufreq_update_policy(cpumask_any(&cpufreq_dev->allowed_cpus));
 
 	return 0;
 }
-- 
2.7.1.410.g6faf27b

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 06/17] thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state() Viresh Kumar <viresh.kumar@linaro.org> - 2017-03-16 06:40 +0100

csiph-web