From patchwork Thu Jun 11 10:51:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 49741 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C0D9620C81 for ; Thu, 11 Jun 2015 10:52:31 +0000 (UTC) Received: by wgme6 with SMTP id e6sf931733wgm.3 for ; Thu, 11 Jun 2015 03:52:31 -0700 (PDT) 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=uw4OzTS21wcGWzp4N/Q5Cmh3gETq2FdfNj77Q2ZUEJQ=; b=LorHUxsO6Zqhqr+Hf9UbzU+wINotcmvOIyEqm5Zvymdp5wnNqnOTyNGjGws4JgOnhN mS484P6Y0A6U1zD+zkIQqbwfTC6mzCUXrCOyV2GItKbCGIunAJ8gfm056O4VbeA9+f7v gVU/b9MctwKNvKK5XiTN0PUQEHHYlLQZJcTVZG8KLmW6GvriDzeDrDpkctCOnFcp8e0b LUOwz4VthUBlne5brEETzyuJ8QQ2wlmytzh51iz5tRGzRfZY5m0uam5e+OOtElEBJ04O +huKwbGPr603itA+TkjsT7uIt8Kv+HHMct+CubJTce6Qijyvn3xRdgMKLfMuv60VLvsX H0/w== X-Gm-Message-State: ALoCoQn0/fauZ/esrqzasnoBi+N/B55AteACPCSCKWDMEvKohKJ3vY5PMyj0wjwtX6OpEHAM5V+o X-Received: by 10.112.14.101 with SMTP id o5mr7842677lbc.3.1434019951075; Thu, 11 Jun 2015 03:52:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.97 with SMTP id c1ls349206laf.66.gmail; Thu, 11 Jun 2015 03:52:30 -0700 (PDT) X-Received: by 10.152.21.136 with SMTP id v8mr9188323lae.19.1434019950929; Thu, 11 Jun 2015 03:52:30 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id a3si260852laa.64.2015.06.11.03.52.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jun 2015 03:52:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbcue7 with SMTP id ue7so2222663lbc.0 for ; Thu, 11 Jun 2015 03:52:30 -0700 (PDT) X-Received: by 10.152.206.75 with SMTP id lm11mr8991331lac.41.1434019950777; Thu, 11 Jun 2015 03:52:30 -0700 (PDT) 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.108.230 with SMTP id hn6csp3952388lbb; Thu, 11 Jun 2015 03:52:29 -0700 (PDT) X-Received: by 10.70.96.194 with SMTP id du2mr14056741pdb.108.1434019948968; Thu, 11 Jun 2015 03:52:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fg3si370022pac.187.2015.06.11.03.52.28; Thu, 11 Jun 2015 03:52:28 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751183AbbFKKw1 (ORCPT + 11 others); Thu, 11 Jun 2015 06:52:27 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:32885 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751905AbbFKKw1 (ORCPT ); Thu, 11 Jun 2015 06:52:27 -0400 Received: by pdjn11 with SMTP id n11so2506204pdj.0 for ; Thu, 11 Jun 2015 03:52:26 -0700 (PDT) X-Received: by 10.70.131.73 with SMTP id ok9mr13770856pdb.109.1434019946662; Thu, 11 Jun 2015 03:52:26 -0700 (PDT) Received: from localhost ([122.167.219.251]) by mx.google.com with ESMTPSA id do16sm397978pac.15.2015.06.11.03.52.25 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 11 Jun 2015 03:52:25 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Preeti U Murthy , ke.wang@spreadtrum.com Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, ego@linux.vnet.ibm.com, paulus@samba.org, shilpa.bhat@linux.vnet.ibm.com, prarit@redhat.com, robert.schoene@tu-dresden.de, skannan@codeaurora.org, Viresh Kumar Subject: [PATCH 04/12] cpufreq: governor: name pointer to cpu_dbs_info as 'cdbs' Date: Thu, 11 Jun 2015 16:21:47 +0530 Message-Id: <20b096728a41a719bf8e45f99a0aadf142f60a03.1434019473.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.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.175 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: , It is called as 'cdbs' at most of the places and 'cpu_dbs' at others. Lets use 'cdbs' consistently for better readability. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq_governor.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 529f236f2d05..4ea13f182154 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -329,7 +329,7 @@ static int cpufreq_governor_start(struct cpufreq_policy *policy, { struct common_dbs_data *cdata = dbs_data->cdata; unsigned int sampling_rate, ignore_nice, j, cpu = policy->cpu; - struct cpu_dbs_info *cpu_cdbs = cdata->get_cpu_cdbs(cpu); + struct cpu_dbs_info *cdbs = cdata->get_cpu_cdbs(cpu); int io_busy = 0; if (!policy->cur) @@ -385,7 +385,7 @@ static int cpufreq_governor_start(struct cpufreq_policy *policy, } /* Initiate timer time stamp */ - cpu_cdbs->time_stamp = ktime_get(); + cdbs->time_stamp = ktime_get(); gov_queue_work(dbs_data, policy, delay_for_sampling_rate(sampling_rate), true); @@ -397,7 +397,7 @@ static void cpufreq_governor_stop(struct cpufreq_policy *policy, { struct common_dbs_data *cdata = dbs_data->cdata; unsigned int cpu = policy->cpu; - struct cpu_dbs_info *cpu_cdbs = cdata->get_cpu_cdbs(cpu); + struct cpu_dbs_info *cdbs = cdata->get_cpu_cdbs(cpu); if (cdata->governor == GOV_CONSERVATIVE) { struct cs_cpu_dbs_info_s *cs_dbs_info = @@ -408,8 +408,8 @@ static void cpufreq_governor_stop(struct cpufreq_policy *policy, gov_cancel_work(dbs_data, policy); - mutex_destroy(&cpu_cdbs->timer_mutex); - cpu_cdbs->cur_policy = NULL; + mutex_destroy(&cdbs->timer_mutex); + cdbs->cur_policy = NULL; } static void cpufreq_governor_limits(struct cpufreq_policy *policy, @@ -417,20 +417,20 @@ static void cpufreq_governor_limits(struct cpufreq_policy *policy, { struct common_dbs_data *cdata = dbs_data->cdata; unsigned int cpu = policy->cpu; - struct cpu_dbs_info *cpu_cdbs = cdata->get_cpu_cdbs(cpu); + struct cpu_dbs_info *cdbs = cdata->get_cpu_cdbs(cpu); - if (!cpu_cdbs->cur_policy) + if (!cdbs->cur_policy) return; - mutex_lock(&cpu_cdbs->timer_mutex); - if (policy->max < cpu_cdbs->cur_policy->cur) - __cpufreq_driver_target(cpu_cdbs->cur_policy, policy->max, + mutex_lock(&cdbs->timer_mutex); + if (policy->max < cdbs->cur_policy->cur) + __cpufreq_driver_target(cdbs->cur_policy, policy->max, CPUFREQ_RELATION_H); - else if (policy->min > cpu_cdbs->cur_policy->cur) - __cpufreq_driver_target(cpu_cdbs->cur_policy, policy->min, + else if (policy->min > cdbs->cur_policy->cur) + __cpufreq_driver_target(cdbs->cur_policy, policy->min, CPUFREQ_RELATION_L); dbs_check_cpu(dbs_data, cpu); - mutex_unlock(&cpu_cdbs->timer_mutex); + mutex_unlock(&cdbs->timer_mutex); } int cpufreq_governor_dbs(struct cpufreq_policy *policy,