Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751521AbdCPFaT (ORCPT ); Thu, 16 Mar 2017 01:30:19 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:34381 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751362AbdCPFaQ (ORCPT ); Thu, 16 Mar 2017 01:30:16 -0400 From: Viresh Kumar To: Rafael Wysocki , Javi Merino , Zhang Rui , Eduardo Valentin , Amit Daniel Kachhap , Viresh Kumar Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot Subject: [PATCH 06/17] thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state() Date: Thu, 16 Mar 2017 10:59:41 +0530 Message-Id: <587728c8bc2173c5d742a24ec14ade8bdc5d6e92.1489640000.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1054 Lines: 31 'cpu' is used at only one place and there is no need to keep a separate variable for it. Signed-off-by: Viresh Kumar --- 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