From patchwork Wed Apr 19 05:29:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 97593 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp159225qgf; Tue, 18 Apr 2017 22:31:08 -0700 (PDT) X-Received: by 10.98.13.134 with SMTP id 6mr1198749pfn.112.1492579868097; Tue, 18 Apr 2017 22:31:08 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5si1294599pfb.367.2017.04.18.22.31.07; Tue, 18 Apr 2017 22:31:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1759884AbdDSFa4 (ORCPT + 12 others); Wed, 19 Apr 2017 01:30:56 -0400 Received: from mail-pg0-f46.google.com ([74.125.83.46]:33535 "EHLO mail-pg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759846AbdDSFay (ORCPT ); Wed, 19 Apr 2017 01:30:54 -0400 Received: by mail-pg0-f46.google.com with SMTP id 63so7409823pgh.0 for ; Tue, 18 Apr 2017 22:30:54 -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=RIBbV5INEApKwfzXtN1yzs39j/90oRovdZxl2OtKWZk=; b=Ev+f56tAeoLbkbPwVdjdx1U2TNJpTxv6D2QIulPzKJlLmpw7L17NIoEqacRh7ZLwgj 5CxqCnK0gsT+9JoDkh63+mLn/LLRXMzDja92dVOFDTicPSsSNX1Tu2ojJq3LmQxnJIdi E6zA+y5ChBCeDQC6dkv8l8dd0atCO+R+vf8vc= 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=RIBbV5INEApKwfzXtN1yzs39j/90oRovdZxl2OtKWZk=; b=arAg7nal8UD95gOXYcmQ4ywYvKnOyuk8uTu8drPufBPUaUGr95MWnACMxWvdyE6Mp6 rUhVEy+zTx4LM+Md+sAyL0Lib8fJJStbU+el2OHVh0+QZ2cyk+iGNL0LfHR2VEfj0ydA MNcdy2P8H2ITUkopJPtbv2O49vz/br9sUNQ0DW8pX5kYp9pQxAbe7xH+JqJlfi9+Qn5l 3lJ3KF7bXyIw4EEtgZ3daB3wfsq0D8wbgprWelUs1HIu/RyQ03R8cSoRcPQ0PwoSZ8O3 yB6C9ZTo5SWj+D7FJ0j9ByCcOqU6h+GVnIyrv4FJ38OTP+2IPtIA8NqZE6QegbS93onZ J7vA== X-Gm-Message-State: AN3rC/7r98RLtMaMQRTG+hzv+CWVyemisTTgS+jJ5DIRztLdDyytB99j Kbt0BA7ZyvVCdxKR X-Received: by 10.84.210.10 with SMTP id z10mr1531023plh.173.1492579854034; Tue, 18 Apr 2017 22:30:54 -0700 (PDT) Received: from localhost ([122.172.121.5]) by smtp.gmail.com with ESMTPSA id r77sm1651140pfe.105.2017.04.18.22.30.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Apr 2017 22:30:53 -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 V3 06/17] thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state() Date: Wed, 19 Apr 2017 10:59:01 +0530 Message-Id: X-Mailer: git-send-email 2.12.0.432.g71c3a4f4ba37 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 --- 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; }