Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1429585AbdDYK2Q (ORCPT ); Tue, 25 Apr 2017 06:28:16 -0400 Received: from mail-pg0-f42.google.com ([74.125.83.42]:33399 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1429549AbdDYK1z (ORCPT ); Tue, 25 Apr 2017 06:27:55 -0400 From: Viresh Kumar To: Javi Merino , Zhang Rui , Eduardo Valentin , Lukasz Luba , Amit Daniel Kachhap , Viresh Kumar Cc: linaro-kernel@lists.linaro.org, Rafael Wysocki , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , Punit Agrawal Subject: [PATCH V4 06/17] thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state() Date: Tue, 25 Apr 2017 15:57:13 +0530 Message-Id: X-Mailer: git-send-email 2.12.0.432.g71c3a4f4ba37 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: 1110 Lines: 32 'cpu' is used at only one place and there is no need to keep a separate variable for it. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- 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 1f4b6a719d05..002b48dc6bea 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -456,7 +456,6 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state) { struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata; - unsigned int cpu = cpumask_any(&cpufreq_cdev->allowed_cpus); unsigned int clip_freq; /* Request state should be less than max_level */ @@ -471,7 +470,7 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev, cpufreq_cdev->cpufreq_state = state; cpufreq_cdev->clipped_freq = clip_freq; - cpufreq_update_policy(cpu); + cpufreq_update_policy(cpumask_any(&cpufreq_cdev->allowed_cpus)); return 0; } -- 2.12.0.432.g71c3a4f4ba37