From patchwork Tue Apr 25 10:27:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 98187 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1879747qgf; Tue, 25 Apr 2017 03:28:26 -0700 (PDT) X-Received: by 10.84.224.136 with SMTP id s8mr37486805plj.93.1493116106912; Tue, 25 Apr 2017 03:28:26 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y206si21883928pfb.368.2017.04.25.03.28.26; Tue, 25 Apr 2017 03:28:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1429585AbdDYK2Q (ORCPT + 10 others); 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 Received: by mail-pg0-f42.google.com with SMTP id 63so26531111pgh.0 for ; Tue, 25 Apr 2017 03:27:50 -0700 (PDT) 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=NTzDNKUrxJo+mZYQHO8GQIv2DC6SjIGm3QsFjjU5HB8=; b=SHkHbfdO6nf8Kxzv/cb9+gZ2jCmtaR8EdNgnOdEQjhB2FHkAZj9BevSWZfN4+bHUo+ Tu1mA255RJEs70sIF+qH3FGud9aMhCfX7aqWxB9Ai6r7ZgBWl4okKWoyW8tDD+/NojVp VKtbgxHUenKpXdi8Tm7SrltCFI/M44Ym1vzMk= 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=NTzDNKUrxJo+mZYQHO8GQIv2DC6SjIGm3QsFjjU5HB8=; b=dNQpmDf2a8/6owNN4oZU7Jy8eNtF5GznnobhOT+yokmzniypOK5P0HUyJt9+AXVmJI ivjVUKmToNQhuLAni53PO/GtGDG1hM22lN4EKa4qjO5YCMnxDpGGik0KhMTYhjfDeWkp HXH9rHgTt2dkcg1Zz266pT8bjWiIKZ9mn2/1iqq8faJzXLN0C9Xdrr5DnI0ybK+mdwFS JSIVkVWjWPpIvuv9ca/VDwFhGMLVNmv3cyfpwZ75MWrb4neAeftyYLQHQKOx0sUsRT9w UxGiFNM1sRbt7pmpsKLzDsLXRIbvfSpF7xywexmaffACTmbsyK78EAou6+LzQuCJje3k ogZg== X-Gm-Message-State: AN3rC/6ln/8CMI0WfythVQcQUvU7n0x0xK1RJoIlRwgo9AphxCyMTItC svQhD3eyTItEmc3E X-Received: by 10.99.115.30 with SMTP id o30mr28150257pgc.155.1493116069002; Tue, 25 Apr 2017 03:27:49 -0700 (PDT) Received: from localhost ([122.172.121.5]) by smtp.gmail.com with ESMTPSA id p7sm18627608pfb.125.2017.04.25.03.27.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Apr 2017 03:27:48 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org '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(-) -- 2.12.0.432.g71c3a4f4ba37 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; }