From patchwork Thu Mar 16 05:29:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 95376 Delivered-To: patch@linaro.org Received: by 10.140.89.134 with SMTP id v6csp660663qgd; Wed, 15 Mar 2017 22:30:31 -0700 (PDT) X-Received: by 10.84.129.195 with SMTP id b61mr9695901plb.83.1489642231052; Wed, 15 Mar 2017 22:30:31 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d82si2946670pfe.328.2017.03.15.22.30.30; Wed, 15 Mar 2017 22:30:31 -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 S1751523AbdCPFaT (ORCPT + 25 others); 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 Received: by mail-pf0-f180.google.com with SMTP id v190so18981119pfb.1 for ; Wed, 15 Mar 2017 22:30:15 -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=GcyFRt72FtxqWhYtG34pd10p6ebfWEvR+F40cVEOrQs=; b=bEY/ZYsHA0uWtVpUT/Gpwm3OOhwuU/ymfd4RHKhkTgHjTgBSxyI1CK3miL0Cy0DRCQ hiqA99UBIJINoIyUQMCLe4pgV/X0GTRZJi8qUXRm5zoCIMd+Jso3CJs6t4oLCSJkNbFd lasZ9wwNx5CvIE6DV/XSoBpxHIL7z6BdRrEBQ= 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=GcyFRt72FtxqWhYtG34pd10p6ebfWEvR+F40cVEOrQs=; b=S5/nGQi+mq+bmlBhzag98ZqQcedhGeAZXe+ijBsLfNBw8mUC2krFOW6rQi6M0uIGeZ 6aTWSeMdcDSkkMMexXCNjuiEb8STsTDP+IJbfp5b1GKkcxCQPajYOwyVFmHnf0CQ5mq8 WkO9geb84cjDaffHkBKBtIYTKbWhIQoxXO3zP3tN3C7hjq3d2IP2CqRFe7sfJWQwj0oP PPF52l8BUqBVsdH1BANjp/wvsurTvKwvBDOTVBZKSczWDLG2phWSM/pq5aIUCn0al7Lf iHhgdECR6++b8Rj7dC+zQ3xZ9vXaUimtJy8W14qNS1h9lLWG1kRvotMixSWo02K3EGKr gElw== X-Gm-Message-State: AFeK/H2X8TIgUDM0ujLp8XO8j+NiZ0M3odtgxeBIxMpr1srD/DLgZQHnl6CWy2md1jrGViw6 X-Received: by 10.99.213.81 with SMTP id v17mr7782246pgi.130.1489642215425; Wed, 15 Mar 2017 22:30:15 -0700 (PDT) Received: from localhost ([122.171.239.200]) by smtp.gmail.com with ESMTPSA id s21sm7398024pfs.87.2017.03.15.22.30.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Mar 2017 22:30:14 -0700 (PDT) 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 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.7.1.410.g6faf27b 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; }