From patchwork Fri Jan 2 07:04:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 42683 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 23A6426CD1 for ; Fri, 2 Jan 2015 07:05:42 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id y19sf10356777wgg.7 for ; Thu, 01 Jan 2015 23:05:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=ONu3+xU6nu02Uw69PqfwSvGDRzEb63mOLXsDzJPQ0OE=; b=ELNhJy37Jsn6Buh94kZl0koy9OkRoGPnKJnM+4cRLK76I+cXU+T6j4PqBAk19L7n4/ um1LfzTx8cn2V3g6iYrOUowS+9ws3KTdMAqfAl+2kIixPcryJmN0Y89wXSL+1Jkt+4nU tpjmlTycYu/2CF4uqH7mYGbMq/cGQCUj1ysV7/IWrsj+hjMhURO3wxgTMZMAIapu2xd0 xu4athI9st3UuMQoFiA4YGFadRAwZiy6dQpHDhIqwRqiO+xCVozVc/YI2Tp9vcLQ6P/r Hs57Cr3NZy9DWCC5tFYIhCfYoCt7zBjdT7h7yPt0U0YW3bL3mljTWjFB2/stpgppYMOp pvSw== X-Gm-Message-State: ALoCoQndAEKbpP9dyEktoSnaIb/K+l8OwYK3lSvs+2zXnHDgVk+eOEEmnpwk7w6QEkSW5sQqPq+n X-Received: by 10.194.92.34 with SMTP id cj2mr830wjb.5.1420182341359; Thu, 01 Jan 2015 23:05:41 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.225 with SMTP id i1ls1057494lae.19.gmail; Thu, 01 Jan 2015 23:05:40 -0800 (PST) X-Received: by 10.152.170.194 with SMTP id ao2mr75854417lac.12.1420182340846; Thu, 01 Jan 2015 23:05:40 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id h3si50465642lam.29.2015.01.01.23.05.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Jan 2015 23:05:40 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id f15so16853774lbj.9 for ; Thu, 01 Jan 2015 23:05:40 -0800 (PST) X-Received: by 10.152.164.133 with SMTP id yq5mr69361328lab.38.1420182340665; Thu, 01 Jan 2015 23:05:40 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp126189lbb; Thu, 1 Jan 2015 23:05:39 -0800 (PST) X-Received: by 10.70.43.37 with SMTP id t5mr95027600pdl.139.1420182338878; Thu, 01 Jan 2015 23:05:38 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dl1si29047854pbb.67.2015.01.01.23.05.37; Thu, 01 Jan 2015 23:05:38 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750761AbbABHFh (ORCPT + 12 others); Fri, 2 Jan 2015 02:05:37 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:41857 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744AbbABHFg (ORCPT ); Fri, 2 Jan 2015 02:05:36 -0500 Received: by mail-pa0-f46.google.com with SMTP id lf10so23691250pab.33 for ; Thu, 01 Jan 2015 23:05:36 -0800 (PST) X-Received: by 10.70.52.33 with SMTP id q1mr116972105pdo.64.1420182336274; Thu, 01 Jan 2015 23:05:36 -0800 (PST) Received: from localhost ([122.167.116.151]) by mx.google.com with ESMTPSA id z2sm30653802pdc.95.2015.01.01.23.05.35 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 01 Jan 2015 23:05:35 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, prarit@redhat.com, skannan@codeaurora.org, Viresh Kumar Subject: [PATCH 11/17] cpufreq: get rid of 'tpolicy' from __cpufreq_add_dev() Date: Fri, 2 Jan 2015 12:34:32 +0530 Message-Id: <066845a4d739d35139621837574e88db6272c907.1420181916.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.2.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , There is no need of this separate variable, use 'policy' instead. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 3893c87739d1..3061a5823e3c 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1098,7 +1098,7 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) { unsigned int j, cpu = dev->id; int ret = -ENOMEM; - struct cpufreq_policy *policy, *tpolicy; + struct cpufreq_policy *policy; unsigned long flags; bool recover_policy = cpufreq_suspended; @@ -1120,10 +1120,10 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) /* Check if this cpu was hot-unplugged earlier and has siblings */ read_lock_irqsave(&cpufreq_driver_lock, flags); - list_for_each_entry(tpolicy, &cpufreq_policy_list, policy_list) { - if (cpumask_test_cpu(cpu, tpolicy->related_cpus)) { + list_for_each_entry(policy, &cpufreq_policy_list, policy_list) { + if (cpumask_test_cpu(cpu, policy->related_cpus)) { read_unlock_irqrestore(&cpufreq_driver_lock, flags); - ret = cpufreq_add_policy_cpu(tpolicy, cpu, dev); + ret = cpufreq_add_policy_cpu(policy, cpu, dev); up_read(&cpufreq_rwsem); return ret; }