From patchwork Fri Jun 19 11:48:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 50079 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 38406218C9 for ; Fri, 19 Jun 2015 11:48:54 +0000 (UTC) Received: by lbcak1 with SMTP id ak1sf27754705lbc.2 for ; Fri, 19 Jun 2015 04:48:53 -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=L6/jEDsQkWOHJ52UktpSCike9+tavjFt37O5qj8GNqA=; b=g9LwmxZ5wqaAz1fvS5GX8mxQuRi+DQEo2iVv7xixuicwdFnjYvbgMokqJ+DVo0IoPj ASEt448xXF8EvdVo4FpXYGs6X1OwePDylqzItOgLBXzP2nBicqC4BczQjAddpVQrfzDV RrlZ73nu81tPyowuezdgpUeNP2keiJxA2U5i9uEYNYJR8I8aDor3xwrVQ82Qu1xYVhub AfBnae3w9510vcGepo5PcmJBMJJ5GwwIbEWqa8gMVTN83l51Pu06PNpkDtdRotAqY2QQ nBj4ocNaj600H3WNDH/DeXhBosl2EMefKeXJaWHUIx9LcFTQRQxPYpn1SO491G+sss4x eO5g== X-Gm-Message-State: ALoCoQlsvDRfiLDrMrZ2o6UFPOwCtCEa2xp2r/EmtmdeEyaL1zR5U940mUSzvZeMmS+paehwzd1o X-Received: by 10.112.13.200 with SMTP id j8mr14836089lbc.14.1434714533111; Fri, 19 Jun 2015 04:48:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.129 with SMTP id m1ls542561laf.76.gmail; Fri, 19 Jun 2015 04:48:52 -0700 (PDT) X-Received: by 10.112.150.130 with SMTP id ui2mr15802146lbb.116.1434714532964; Fri, 19 Jun 2015 04:48:52 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id oc5si8957497lbc.151.2015.06.19.04.48.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jun 2015 04:48:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbbti3 with SMTP id ti3so70483965lbb.1 for ; Fri, 19 Jun 2015 04:48:52 -0700 (PDT) X-Received: by 10.152.6.69 with SMTP id y5mr17216529lay.72.1434714532826; Fri, 19 Jun 2015 04:48:52 -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 hn6csp529083lbb; Fri, 19 Jun 2015 04:48:51 -0700 (PDT) X-Received: by 10.68.252.106 with SMTP id zr10mr31346530pbc.79.1434714531066; Fri, 19 Jun 2015 04:48:51 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ji4si16030128pbd.56.2015.06.19.04.48.50; Fri, 19 Jun 2015 04:48:51 -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 S1751464AbbFSLss (ORCPT + 11 others); Fri, 19 Jun 2015 07:48:48 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:34310 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751193AbbFSLso (ORCPT ); Fri, 19 Jun 2015 07:48:44 -0400 Received: by pabvl15 with SMTP id vl15so37739597pab.1 for ; Fri, 19 Jun 2015 04:48:43 -0700 (PDT) X-Received: by 10.69.25.41 with SMTP id in9mr30962045pbd.80.1434714523466; Fri, 19 Jun 2015 04:48:43 -0700 (PDT) Received: from localhost ([122.167.70.98]) by mx.google.com with ESMTPSA id ug1sm10992873pbc.39.2015.06.19.04.48.42 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 19 Jun 2015 04:48:42 -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 V2 04/10] cpufreq: governor: name pointer to cpu_dbs_info as 'cdbs' Date: Fri, 19 Jun 2015 17:18:04 +0530 Message-Id: <0a306611ebb63f9a9bcaffe01f6c056bef8ee1bc.1434713657.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.171 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. Reviewed-by: Preeti U Murthy 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,