From patchwork Mon Apr 17 06:01:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 97508 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1213318qgf; Sun, 16 Apr 2017 23:06:00 -0700 (PDT) X-Received: by 10.84.238.22 with SMTP id u22mr13719815plk.137.1492409160196; Sun, 16 Apr 2017 23:06:00 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l63si10041213plb.136.2017.04.16.23.05.59; Sun, 16 Apr 2017 23:06:00 -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 S933095AbdDQGFt (ORCPT + 14 others); Mon, 17 Apr 2017 02:05:49 -0400 Received: from mail-pg0-f48.google.com ([74.125.83.48]:34634 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932926AbdDQGDQ (ORCPT ); Mon, 17 Apr 2017 02:03:16 -0400 Received: by mail-pg0-f48.google.com with SMTP id z127so3839402pgb.1 for ; Sun, 16 Apr 2017 23:03:06 -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=WhTtnzQnTmCUH3vZ1RcEDQLMSXL4TqADGG0hlVycxX7Bz+EqU6zV+Lxe8nA1rCYGwr 5e0IrDPIkUFOa37RkKU+xFMFG7g3E3yfTY7qnPxP2ubHyALqoPyIcy25VyKMiTtYMOTa cmNzuPqUI2DDZ7T1BoRL9QTJfkz97NEzdeMRM= 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=YhZ304fdslzGRxrS6J7pg7fro+FAlCCb5kt1I0rWxtFxc6yQ/+SRVBJeEVA/YAEun/ iP2Kyy1r58uAq8ryDKuvEw+ss4OozRCOR72hW4SaYbSs9COikWdtx1dyiegtpmss0rzU ORWbgq9UlKOvj+oGaeYFk1wxvXjSkMDiQ8kQoKW78bN93PeH1517q0966iM9ZWXbLKER fClZ436/8MP41Jj4X1S7dJNd8Lf9UG63YeGHa31fx717fF9/Gplu7kXN0Y4Xr2vRgrgu jQV87ShlDd33qiJiDPj3MlndAKs1jMB/NwJm07kMXBk+d6OarmWz6YGxxCJs71NVEi0J iv5w== X-Gm-Message-State: AN3rC/726+T8C1yYagglV5yQWHnGX0YEcaoKzSFNeXjD8mis8z8TDKxj hTUY+E82p2BXpbOE X-Received: by 10.98.131.197 with SMTP id h188mr9860406pfe.99.1492408981132; Sun, 16 Apr 2017 23:03:01 -0700 (PDT) Received: from localhost ([122.172.121.5]) by smtp.gmail.com with ESMTPSA id v128sm10540417pgb.20.2017.04.16.23.03.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Apr 2017 23:03:00 -0700 (PDT) From: Viresh Kumar To: Javi Merino , Zhang Rui , Eduardo Valentin , 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 Subject: [PATCH V2 06/17] thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state() Date: Mon, 17 Apr 2017 11:31:51 +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 --- 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; }